commit 778ea912f43c7d8e460e86ffca94952f9019a85e Author: rowan Date: Mon Apr 14 13:15:53 2025 -0500 initial commit diff --git a/godot/.editorconfig b/godot/.editorconfig new file mode 100644 index 0000000..f28239b --- /dev/null +++ b/godot/.editorconfig @@ -0,0 +1,4 @@ +root = true + +[*] +charset = utf-8 diff --git a/godot/.gitattributes b/godot/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/godot/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/godot/.gitignore b/godot/.gitignore new file mode 100644 index 0000000..dbb2f91 --- /dev/null +++ b/godot/.gitignore @@ -0,0 +1,4 @@ +# Godot 4+ specific ignores +.godot/ +/android/ +node_modules/ diff --git a/godot/StudioSuicide.gdextension b/godot/StudioSuicide.gdextension new file mode 100644 index 0000000..ea5a407 --- /dev/null +++ b/godot/StudioSuicide.gdextension @@ -0,0 +1,16 @@ +[configuration] +entry_symbol = "gdext_rust_init" +compatibility_minimum = 4.1 +reloadable = true + +[libraries] +linux.debug.x86_64 = "res://../rust/target/debug/libstudio_suicide.so" +linux.release.x86_64 = "res://../rust/target/release/libstudio_suicide.so" +windows.debug.x86_64 = "res://../rust/target/debug/studio_suicide.dll" +windows.release.x86_64 = "res://../rust/target/release/studio_suicide.dll" +macos.debug = "res://../rust/target/debug/libstudio_suicide.dylib" +macos.release = "res://../rust/target/release/libstudio_suicide.dylib" +macos.debug.arm64 = "res://../rust/target/debug/libstudio_suicide.dylib" +macos.release.arm64 = "res://../rust/target/release/libstudio_suicide.dylib" + + diff --git a/godot/assets/X Bot.fbx.import b/godot/assets/X Bot.fbx.import new file mode 100644 index 0000000..56868c8 --- /dev/null +++ b/godot/assets/X Bot.fbx.import @@ -0,0 +1,37 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://djsal4qopsem" +path="res://.godot/imported/X Bot.fbx-fbe026a69ba44c7b7c506a4970de1691.scn" + +[deps] + +source_file="res://assets/X Bot.fbx" +dest_files=["res://.godot/imported/X Bot.fbx-fbe026a69ba44c7b7c506a4970de1691.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=true +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={} +fbx/importer=0 +fbx/allow_geometry_helper_nodes=false +fbx/embedded_image_handling=1 diff --git a/godot/assets/player.glb b/godot/assets/player.glb new file mode 100644 index 0000000..147d615 Binary files /dev/null and b/godot/assets/player.glb differ diff --git a/godot/assets/player.glb.import b/godot/assets/player.glb.import new file mode 100644 index 0000000..14f6c55 --- /dev/null +++ b/godot/assets/player.glb.import @@ -0,0 +1,5436 @@ +[remap] + +importer="scene" +importer_version=1 +type="PackedScene" +uid="uid://c28drqeq2gok0" +path="res://.godot/imported/player.glb-03f8f9d85e4dfa04a5794367d8ef5969.scn" + +[deps] + +source_file="res://assets/player.glb" +dest_files=["res://.godot/imported/player.glb-03f8f9d85e4dfa04a5794367d8ef5969.scn"] + +[params] + +nodes/root_type="" +nodes/root_name="" +nodes/apply_root_scale=true +nodes/root_scale=1.0 +nodes/import_as_skeleton_bones=false +meshes/ensure_tangents=true +meshes/generate_lods=true +meshes/create_shadow_meshes=true +meshes/light_baking=1 +meshes/lightmap_texel_size=0.2 +meshes/force_disable_compression=false +skins/use_named_skins=true +animation/import=true +animation/fps=30 +animation/trimming=false +animation/remove_immutable_tracks=true +animation/import_rest_as_RESET=false +import_script/path="" +_subresources={ +"animations": { +"Idle": { +"save_to_file/enabled": false, +"save_to_file/keep_custom_tracks": "", +"save_to_file/path": "", +"settings/loop_mode": 1, +"slice_1/end_frame": 0, +"slice_1/loop_mode": 0, +"slice_1/name": "", +"slice_1/save_to_file/enabled": false, +"slice_1/save_to_file/keep_custom_tracks": false, +"slice_1/save_to_file/path": "", +"slice_1/start_frame": 0, +"slice_10/end_frame": 0, +"slice_10/loop_mode": 0, +"slice_10/name": "", +"slice_10/save_to_file/enabled": false, +"slice_10/save_to_file/keep_custom_tracks": false, +"slice_10/save_to_file/path": "", +"slice_10/start_frame": 0, +"slice_100/end_frame": 0, +"slice_100/loop_mode": 0, +"slice_100/name": "", +"slice_100/save_to_file/enabled": false, +"slice_100/save_to_file/keep_custom_tracks": false, +"slice_100/save_to_file/path": "", +"slice_100/start_frame": 0, +"slice_101/end_frame": 0, +"slice_101/loop_mode": 0, +"slice_101/name": "", +"slice_101/save_to_file/enabled": false, +"slice_101/save_to_file/keep_custom_tracks": false, +"slice_101/save_to_file/path": "", +"slice_101/start_frame": 0, +"slice_102/end_frame": 0, +"slice_102/loop_mode": 0, +"slice_102/name": "", +"slice_102/save_to_file/enabled": false, +"slice_102/save_to_file/keep_custom_tracks": false, +"slice_102/save_to_file/path": "", +"slice_102/start_frame": 0, +"slice_103/end_frame": 0, +"slice_103/loop_mode": 0, +"slice_103/name": "", +"slice_103/save_to_file/enabled": false, +"slice_103/save_to_file/keep_custom_tracks": false, +"slice_103/save_to_file/path": "", +"slice_103/start_frame": 0, +"slice_104/end_frame": 0, +"slice_104/loop_mode": 0, +"slice_104/name": "", +"slice_104/save_to_file/enabled": false, +"slice_104/save_to_file/keep_custom_tracks": false, +"slice_104/save_to_file/path": "", +"slice_104/start_frame": 0, +"slice_105/end_frame": 0, +"slice_105/loop_mode": 0, +"slice_105/name": "", +"slice_105/save_to_file/enabled": false, +"slice_105/save_to_file/keep_custom_tracks": false, +"slice_105/save_to_file/path": "", +"slice_105/start_frame": 0, +"slice_106/end_frame": 0, +"slice_106/loop_mode": 0, +"slice_106/name": "", +"slice_106/save_to_file/enabled": false, +"slice_106/save_to_file/keep_custom_tracks": false, +"slice_106/save_to_file/path": "", +"slice_106/start_frame": 0, +"slice_107/end_frame": 0, +"slice_107/loop_mode": 0, +"slice_107/name": "", +"slice_107/save_to_file/enabled": false, +"slice_107/save_to_file/keep_custom_tracks": false, +"slice_107/save_to_file/path": "", +"slice_107/start_frame": 0, +"slice_108/end_frame": 0, +"slice_108/loop_mode": 0, +"slice_108/name": "", +"slice_108/save_to_file/enabled": false, +"slice_108/save_to_file/keep_custom_tracks": false, +"slice_108/save_to_file/path": "", +"slice_108/start_frame": 0, +"slice_109/end_frame": 0, +"slice_109/loop_mode": 0, +"slice_109/name": "", +"slice_109/save_to_file/enabled": false, +"slice_109/save_to_file/keep_custom_tracks": false, +"slice_109/save_to_file/path": "", +"slice_109/start_frame": 0, +"slice_11/end_frame": 0, +"slice_11/loop_mode": 0, +"slice_11/name": "", +"slice_11/save_to_file/enabled": false, +"slice_11/save_to_file/keep_custom_tracks": false, +"slice_11/save_to_file/path": "", +"slice_11/start_frame": 0, +"slice_110/end_frame": 0, +"slice_110/loop_mode": 0, +"slice_110/name": "", +"slice_110/save_to_file/enabled": false, +"slice_110/save_to_file/keep_custom_tracks": false, +"slice_110/save_to_file/path": "", +"slice_110/start_frame": 0, +"slice_111/end_frame": 0, +"slice_111/loop_mode": 0, +"slice_111/name": "", +"slice_111/save_to_file/enabled": false, +"slice_111/save_to_file/keep_custom_tracks": false, +"slice_111/save_to_file/path": "", +"slice_111/start_frame": 0, +"slice_112/end_frame": 0, +"slice_112/loop_mode": 0, +"slice_112/name": "", +"slice_112/save_to_file/enabled": false, +"slice_112/save_to_file/keep_custom_tracks": false, +"slice_112/save_to_file/path": "", +"slice_112/start_frame": 0, +"slice_113/end_frame": 0, +"slice_113/loop_mode": 0, +"slice_113/name": "", +"slice_113/save_to_file/enabled": false, +"slice_113/save_to_file/keep_custom_tracks": false, +"slice_113/save_to_file/path": "", +"slice_113/start_frame": 0, +"slice_114/end_frame": 0, +"slice_114/loop_mode": 0, +"slice_114/name": "", +"slice_114/save_to_file/enabled": false, +"slice_114/save_to_file/keep_custom_tracks": false, +"slice_114/save_to_file/path": "", +"slice_114/start_frame": 0, +"slice_115/end_frame": 0, +"slice_115/loop_mode": 0, +"slice_115/name": "", +"slice_115/save_to_file/enabled": false, +"slice_115/save_to_file/keep_custom_tracks": false, +"slice_115/save_to_file/path": "", +"slice_115/start_frame": 0, +"slice_116/end_frame": 0, +"slice_116/loop_mode": 0, +"slice_116/name": "", +"slice_116/save_to_file/enabled": false, +"slice_116/save_to_file/keep_custom_tracks": false, +"slice_116/save_to_file/path": "", +"slice_116/start_frame": 0, +"slice_117/end_frame": 0, +"slice_117/loop_mode": 0, +"slice_117/name": "", +"slice_117/save_to_file/enabled": false, +"slice_117/save_to_file/keep_custom_tracks": false, +"slice_117/save_to_file/path": "", +"slice_117/start_frame": 0, +"slice_118/end_frame": 0, +"slice_118/loop_mode": 0, +"slice_118/name": "", +"slice_118/save_to_file/enabled": false, +"slice_118/save_to_file/keep_custom_tracks": false, +"slice_118/save_to_file/path": "", +"slice_118/start_frame": 0, +"slice_119/end_frame": 0, +"slice_119/loop_mode": 0, +"slice_119/name": "", +"slice_119/save_to_file/enabled": false, +"slice_119/save_to_file/keep_custom_tracks": false, +"slice_119/save_to_file/path": "", +"slice_119/start_frame": 0, +"slice_12/end_frame": 0, +"slice_12/loop_mode": 0, +"slice_12/name": "", +"slice_12/save_to_file/enabled": false, +"slice_12/save_to_file/keep_custom_tracks": false, +"slice_12/save_to_file/path": "", +"slice_12/start_frame": 0, +"slice_120/end_frame": 0, +"slice_120/loop_mode": 0, +"slice_120/name": "", +"slice_120/save_to_file/enabled": false, +"slice_120/save_to_file/keep_custom_tracks": false, +"slice_120/save_to_file/path": "", +"slice_120/start_frame": 0, +"slice_121/end_frame": 0, +"slice_121/loop_mode": 0, +"slice_121/name": "", +"slice_121/save_to_file/enabled": false, +"slice_121/save_to_file/keep_custom_tracks": false, +"slice_121/save_to_file/path": "", +"slice_121/start_frame": 0, +"slice_122/end_frame": 0, +"slice_122/loop_mode": 0, +"slice_122/name": "", +"slice_122/save_to_file/enabled": false, +"slice_122/save_to_file/keep_custom_tracks": false, +"slice_122/save_to_file/path": "", +"slice_122/start_frame": 0, +"slice_123/end_frame": 0, +"slice_123/loop_mode": 0, +"slice_123/name": "", +"slice_123/save_to_file/enabled": false, +"slice_123/save_to_file/keep_custom_tracks": false, +"slice_123/save_to_file/path": "", +"slice_123/start_frame": 0, +"slice_124/end_frame": 0, +"slice_124/loop_mode": 0, +"slice_124/name": "", +"slice_124/save_to_file/enabled": false, +"slice_124/save_to_file/keep_custom_tracks": false, +"slice_124/save_to_file/path": "", +"slice_124/start_frame": 0, +"slice_125/end_frame": 0, +"slice_125/loop_mode": 0, +"slice_125/name": "", +"slice_125/save_to_file/enabled": false, +"slice_125/save_to_file/keep_custom_tracks": false, +"slice_125/save_to_file/path": "", +"slice_125/start_frame": 0, +"slice_126/end_frame": 0, +"slice_126/loop_mode": 0, +"slice_126/name": "", +"slice_126/save_to_file/enabled": false, +"slice_126/save_to_file/keep_custom_tracks": false, +"slice_126/save_to_file/path": "", +"slice_126/start_frame": 0, +"slice_127/end_frame": 0, +"slice_127/loop_mode": 0, +"slice_127/name": "", +"slice_127/save_to_file/enabled": false, +"slice_127/save_to_file/keep_custom_tracks": false, +"slice_127/save_to_file/path": "", +"slice_127/start_frame": 0, +"slice_128/end_frame": 0, +"slice_128/loop_mode": 0, +"slice_128/name": "", +"slice_128/save_to_file/enabled": false, +"slice_128/save_to_file/keep_custom_tracks": false, +"slice_128/save_to_file/path": "", +"slice_128/start_frame": 0, +"slice_129/end_frame": 0, +"slice_129/loop_mode": 0, +"slice_129/name": "", +"slice_129/save_to_file/enabled": false, +"slice_129/save_to_file/keep_custom_tracks": false, +"slice_129/save_to_file/path": "", +"slice_129/start_frame": 0, +"slice_13/end_frame": 0, +"slice_13/loop_mode": 0, +"slice_13/name": "", +"slice_13/save_to_file/enabled": false, +"slice_13/save_to_file/keep_custom_tracks": false, +"slice_13/save_to_file/path": "", +"slice_13/start_frame": 0, +"slice_130/end_frame": 0, +"slice_130/loop_mode": 0, +"slice_130/name": "", +"slice_130/save_to_file/enabled": false, +"slice_130/save_to_file/keep_custom_tracks": false, +"slice_130/save_to_file/path": "", +"slice_130/start_frame": 0, +"slice_131/end_frame": 0, +"slice_131/loop_mode": 0, +"slice_131/name": "", +"slice_131/save_to_file/enabled": false, +"slice_131/save_to_file/keep_custom_tracks": false, +"slice_131/save_to_file/path": "", +"slice_131/start_frame": 0, +"slice_132/end_frame": 0, +"slice_132/loop_mode": 0, +"slice_132/name": "", +"slice_132/save_to_file/enabled": false, +"slice_132/save_to_file/keep_custom_tracks": false, +"slice_132/save_to_file/path": "", +"slice_132/start_frame": 0, +"slice_133/end_frame": 0, +"slice_133/loop_mode": 0, +"slice_133/name": "", +"slice_133/save_to_file/enabled": false, +"slice_133/save_to_file/keep_custom_tracks": false, +"slice_133/save_to_file/path": "", +"slice_133/start_frame": 0, +"slice_134/end_frame": 0, +"slice_134/loop_mode": 0, +"slice_134/name": "", +"slice_134/save_to_file/enabled": false, +"slice_134/save_to_file/keep_custom_tracks": false, +"slice_134/save_to_file/path": "", +"slice_134/start_frame": 0, +"slice_135/end_frame": 0, +"slice_135/loop_mode": 0, +"slice_135/name": "", +"slice_135/save_to_file/enabled": false, +"slice_135/save_to_file/keep_custom_tracks": false, +"slice_135/save_to_file/path": "", +"slice_135/start_frame": 0, +"slice_136/end_frame": 0, +"slice_136/loop_mode": 0, +"slice_136/name": "", +"slice_136/save_to_file/enabled": false, +"slice_136/save_to_file/keep_custom_tracks": false, +"slice_136/save_to_file/path": "", +"slice_136/start_frame": 0, +"slice_137/end_frame": 0, +"slice_137/loop_mode": 0, +"slice_137/name": "", +"slice_137/save_to_file/enabled": false, +"slice_137/save_to_file/keep_custom_tracks": false, +"slice_137/save_to_file/path": "", +"slice_137/start_frame": 0, +"slice_138/end_frame": 0, +"slice_138/loop_mode": 0, +"slice_138/name": "", +"slice_138/save_to_file/enabled": false, +"slice_138/save_to_file/keep_custom_tracks": false, +"slice_138/save_to_file/path": "", +"slice_138/start_frame": 0, +"slice_139/end_frame": 0, +"slice_139/loop_mode": 0, +"slice_139/name": "", +"slice_139/save_to_file/enabled": false, +"slice_139/save_to_file/keep_custom_tracks": false, +"slice_139/save_to_file/path": "", +"slice_139/start_frame": 0, +"slice_14/end_frame": 0, +"slice_14/loop_mode": 0, +"slice_14/name": "", +"slice_14/save_to_file/enabled": false, +"slice_14/save_to_file/keep_custom_tracks": false, +"slice_14/save_to_file/path": "", +"slice_14/start_frame": 0, +"slice_140/end_frame": 0, +"slice_140/loop_mode": 0, +"slice_140/name": "", +"slice_140/save_to_file/enabled": false, +"slice_140/save_to_file/keep_custom_tracks": false, +"slice_140/save_to_file/path": "", +"slice_140/start_frame": 0, +"slice_141/end_frame": 0, +"slice_141/loop_mode": 0, +"slice_141/name": "", +"slice_141/save_to_file/enabled": false, +"slice_141/save_to_file/keep_custom_tracks": false, +"slice_141/save_to_file/path": "", +"slice_141/start_frame": 0, +"slice_142/end_frame": 0, +"slice_142/loop_mode": 0, +"slice_142/name": "", +"slice_142/save_to_file/enabled": false, +"slice_142/save_to_file/keep_custom_tracks": false, +"slice_142/save_to_file/path": "", +"slice_142/start_frame": 0, +"slice_143/end_frame": 0, +"slice_143/loop_mode": 0, +"slice_143/name": "", +"slice_143/save_to_file/enabled": false, +"slice_143/save_to_file/keep_custom_tracks": false, +"slice_143/save_to_file/path": "", +"slice_143/start_frame": 0, +"slice_144/end_frame": 0, +"slice_144/loop_mode": 0, +"slice_144/name": "", +"slice_144/save_to_file/enabled": false, +"slice_144/save_to_file/keep_custom_tracks": false, +"slice_144/save_to_file/path": "", +"slice_144/start_frame": 0, +"slice_145/end_frame": 0, +"slice_145/loop_mode": 0, +"slice_145/name": "", +"slice_145/save_to_file/enabled": false, +"slice_145/save_to_file/keep_custom_tracks": false, +"slice_145/save_to_file/path": "", +"slice_145/start_frame": 0, +"slice_146/end_frame": 0, +"slice_146/loop_mode": 0, +"slice_146/name": "", +"slice_146/save_to_file/enabled": false, +"slice_146/save_to_file/keep_custom_tracks": false, +"slice_146/save_to_file/path": "", +"slice_146/start_frame": 0, +"slice_147/end_frame": 0, +"slice_147/loop_mode": 0, +"slice_147/name": "", +"slice_147/save_to_file/enabled": false, +"slice_147/save_to_file/keep_custom_tracks": false, +"slice_147/save_to_file/path": "", +"slice_147/start_frame": 0, +"slice_148/end_frame": 0, +"slice_148/loop_mode": 0, +"slice_148/name": "", +"slice_148/save_to_file/enabled": false, +"slice_148/save_to_file/keep_custom_tracks": false, +"slice_148/save_to_file/path": "", +"slice_148/start_frame": 0, +"slice_149/end_frame": 0, +"slice_149/loop_mode": 0, +"slice_149/name": "", +"slice_149/save_to_file/enabled": false, +"slice_149/save_to_file/keep_custom_tracks": false, +"slice_149/save_to_file/path": "", +"slice_149/start_frame": 0, +"slice_15/end_frame": 0, +"slice_15/loop_mode": 0, +"slice_15/name": "", +"slice_15/save_to_file/enabled": false, +"slice_15/save_to_file/keep_custom_tracks": false, +"slice_15/save_to_file/path": "", +"slice_15/start_frame": 0, +"slice_150/end_frame": 0, +"slice_150/loop_mode": 0, +"slice_150/name": "", +"slice_150/save_to_file/enabled": false, +"slice_150/save_to_file/keep_custom_tracks": false, +"slice_150/save_to_file/path": "", +"slice_150/start_frame": 0, +"slice_151/end_frame": 0, +"slice_151/loop_mode": 0, +"slice_151/name": "", +"slice_151/save_to_file/enabled": false, +"slice_151/save_to_file/keep_custom_tracks": false, +"slice_151/save_to_file/path": "", +"slice_151/start_frame": 0, +"slice_152/end_frame": 0, +"slice_152/loop_mode": 0, +"slice_152/name": "", +"slice_152/save_to_file/enabled": false, +"slice_152/save_to_file/keep_custom_tracks": false, +"slice_152/save_to_file/path": "", +"slice_152/start_frame": 0, +"slice_153/end_frame": 0, +"slice_153/loop_mode": 0, +"slice_153/name": "", +"slice_153/save_to_file/enabled": false, +"slice_153/save_to_file/keep_custom_tracks": false, +"slice_153/save_to_file/path": "", +"slice_153/start_frame": 0, +"slice_154/end_frame": 0, +"slice_154/loop_mode": 0, +"slice_154/name": "", +"slice_154/save_to_file/enabled": false, +"slice_154/save_to_file/keep_custom_tracks": false, +"slice_154/save_to_file/path": "", +"slice_154/start_frame": 0, +"slice_155/end_frame": 0, +"slice_155/loop_mode": 0, +"slice_155/name": "", +"slice_155/save_to_file/enabled": false, +"slice_155/save_to_file/keep_custom_tracks": false, +"slice_155/save_to_file/path": "", +"slice_155/start_frame": 0, +"slice_156/end_frame": 0, +"slice_156/loop_mode": 0, +"slice_156/name": "", +"slice_156/save_to_file/enabled": false, +"slice_156/save_to_file/keep_custom_tracks": false, +"slice_156/save_to_file/path": "", +"slice_156/start_frame": 0, +"slice_157/end_frame": 0, +"slice_157/loop_mode": 0, +"slice_157/name": "", +"slice_157/save_to_file/enabled": false, +"slice_157/save_to_file/keep_custom_tracks": false, +"slice_157/save_to_file/path": "", +"slice_157/start_frame": 0, +"slice_158/end_frame": 0, +"slice_158/loop_mode": 0, +"slice_158/name": "", +"slice_158/save_to_file/enabled": false, +"slice_158/save_to_file/keep_custom_tracks": false, +"slice_158/save_to_file/path": "", +"slice_158/start_frame": 0, +"slice_159/end_frame": 0, +"slice_159/loop_mode": 0, +"slice_159/name": "", +"slice_159/save_to_file/enabled": false, +"slice_159/save_to_file/keep_custom_tracks": false, +"slice_159/save_to_file/path": "", +"slice_159/start_frame": 0, +"slice_16/end_frame": 0, +"slice_16/loop_mode": 0, +"slice_16/name": "", +"slice_16/save_to_file/enabled": false, +"slice_16/save_to_file/keep_custom_tracks": false, +"slice_16/save_to_file/path": "", +"slice_16/start_frame": 0, +"slice_160/end_frame": 0, +"slice_160/loop_mode": 0, +"slice_160/name": "", +"slice_160/save_to_file/enabled": false, +"slice_160/save_to_file/keep_custom_tracks": false, +"slice_160/save_to_file/path": "", +"slice_160/start_frame": 0, +"slice_161/end_frame": 0, +"slice_161/loop_mode": 0, +"slice_161/name": "", +"slice_161/save_to_file/enabled": false, +"slice_161/save_to_file/keep_custom_tracks": false, +"slice_161/save_to_file/path": "", +"slice_161/start_frame": 0, +"slice_162/end_frame": 0, +"slice_162/loop_mode": 0, +"slice_162/name": "", +"slice_162/save_to_file/enabled": false, +"slice_162/save_to_file/keep_custom_tracks": false, +"slice_162/save_to_file/path": "", +"slice_162/start_frame": 0, +"slice_163/end_frame": 0, +"slice_163/loop_mode": 0, +"slice_163/name": "", +"slice_163/save_to_file/enabled": false, +"slice_163/save_to_file/keep_custom_tracks": false, +"slice_163/save_to_file/path": "", +"slice_163/start_frame": 0, +"slice_164/end_frame": 0, +"slice_164/loop_mode": 0, +"slice_164/name": "", +"slice_164/save_to_file/enabled": false, +"slice_164/save_to_file/keep_custom_tracks": false, +"slice_164/save_to_file/path": "", +"slice_164/start_frame": 0, +"slice_165/end_frame": 0, +"slice_165/loop_mode": 0, +"slice_165/name": "", +"slice_165/save_to_file/enabled": false, +"slice_165/save_to_file/keep_custom_tracks": false, +"slice_165/save_to_file/path": "", +"slice_165/start_frame": 0, +"slice_166/end_frame": 0, +"slice_166/loop_mode": 0, +"slice_166/name": "", +"slice_166/save_to_file/enabled": false, +"slice_166/save_to_file/keep_custom_tracks": false, +"slice_166/save_to_file/path": "", +"slice_166/start_frame": 0, +"slice_167/end_frame": 0, +"slice_167/loop_mode": 0, +"slice_167/name": "", +"slice_167/save_to_file/enabled": false, +"slice_167/save_to_file/keep_custom_tracks": false, +"slice_167/save_to_file/path": "", +"slice_167/start_frame": 0, +"slice_168/end_frame": 0, +"slice_168/loop_mode": 0, +"slice_168/name": "", +"slice_168/save_to_file/enabled": false, +"slice_168/save_to_file/keep_custom_tracks": false, +"slice_168/save_to_file/path": "", +"slice_168/start_frame": 0, +"slice_169/end_frame": 0, +"slice_169/loop_mode": 0, +"slice_169/name": "", +"slice_169/save_to_file/enabled": false, +"slice_169/save_to_file/keep_custom_tracks": false, +"slice_169/save_to_file/path": "", +"slice_169/start_frame": 0, +"slice_17/end_frame": 0, +"slice_17/loop_mode": 0, +"slice_17/name": "", +"slice_17/save_to_file/enabled": false, +"slice_17/save_to_file/keep_custom_tracks": false, +"slice_17/save_to_file/path": "", +"slice_17/start_frame": 0, +"slice_170/end_frame": 0, +"slice_170/loop_mode": 0, +"slice_170/name": "", +"slice_170/save_to_file/enabled": false, +"slice_170/save_to_file/keep_custom_tracks": false, +"slice_170/save_to_file/path": "", +"slice_170/start_frame": 0, +"slice_171/end_frame": 0, +"slice_171/loop_mode": 0, +"slice_171/name": "", +"slice_171/save_to_file/enabled": false, +"slice_171/save_to_file/keep_custom_tracks": false, +"slice_171/save_to_file/path": "", +"slice_171/start_frame": 0, +"slice_172/end_frame": 0, +"slice_172/loop_mode": 0, +"slice_172/name": "", +"slice_172/save_to_file/enabled": false, +"slice_172/save_to_file/keep_custom_tracks": false, +"slice_172/save_to_file/path": "", +"slice_172/start_frame": 0, +"slice_173/end_frame": 0, +"slice_173/loop_mode": 0, +"slice_173/name": "", +"slice_173/save_to_file/enabled": false, +"slice_173/save_to_file/keep_custom_tracks": false, +"slice_173/save_to_file/path": "", +"slice_173/start_frame": 0, +"slice_174/end_frame": 0, +"slice_174/loop_mode": 0, +"slice_174/name": "", +"slice_174/save_to_file/enabled": false, +"slice_174/save_to_file/keep_custom_tracks": false, +"slice_174/save_to_file/path": "", +"slice_174/start_frame": 0, +"slice_175/end_frame": 0, +"slice_175/loop_mode": 0, +"slice_175/name": "", +"slice_175/save_to_file/enabled": false, +"slice_175/save_to_file/keep_custom_tracks": false, +"slice_175/save_to_file/path": "", +"slice_175/start_frame": 0, +"slice_176/end_frame": 0, +"slice_176/loop_mode": 0, +"slice_176/name": "", +"slice_176/save_to_file/enabled": false, +"slice_176/save_to_file/keep_custom_tracks": false, +"slice_176/save_to_file/path": "", +"slice_176/start_frame": 0, +"slice_177/end_frame": 0, +"slice_177/loop_mode": 0, +"slice_177/name": "", +"slice_177/save_to_file/enabled": false, +"slice_177/save_to_file/keep_custom_tracks": false, +"slice_177/save_to_file/path": "", +"slice_177/start_frame": 0, +"slice_178/end_frame": 0, +"slice_178/loop_mode": 0, +"slice_178/name": "", +"slice_178/save_to_file/enabled": false, +"slice_178/save_to_file/keep_custom_tracks": false, +"slice_178/save_to_file/path": "", +"slice_178/start_frame": 0, +"slice_179/end_frame": 0, +"slice_179/loop_mode": 0, +"slice_179/name": "", +"slice_179/save_to_file/enabled": false, +"slice_179/save_to_file/keep_custom_tracks": false, +"slice_179/save_to_file/path": "", +"slice_179/start_frame": 0, +"slice_18/end_frame": 0, +"slice_18/loop_mode": 0, +"slice_18/name": "", +"slice_18/save_to_file/enabled": false, +"slice_18/save_to_file/keep_custom_tracks": false, +"slice_18/save_to_file/path": "", +"slice_18/start_frame": 0, +"slice_180/end_frame": 0, +"slice_180/loop_mode": 0, +"slice_180/name": "", +"slice_180/save_to_file/enabled": false, +"slice_180/save_to_file/keep_custom_tracks": false, +"slice_180/save_to_file/path": "", +"slice_180/start_frame": 0, +"slice_181/end_frame": 0, +"slice_181/loop_mode": 0, +"slice_181/name": "", +"slice_181/save_to_file/enabled": false, +"slice_181/save_to_file/keep_custom_tracks": false, +"slice_181/save_to_file/path": "", +"slice_181/start_frame": 0, +"slice_182/end_frame": 0, +"slice_182/loop_mode": 0, +"slice_182/name": "", +"slice_182/save_to_file/enabled": false, +"slice_182/save_to_file/keep_custom_tracks": false, +"slice_182/save_to_file/path": "", +"slice_182/start_frame": 0, +"slice_183/end_frame": 0, +"slice_183/loop_mode": 0, +"slice_183/name": "", +"slice_183/save_to_file/enabled": false, +"slice_183/save_to_file/keep_custom_tracks": false, +"slice_183/save_to_file/path": "", +"slice_183/start_frame": 0, +"slice_184/end_frame": 0, +"slice_184/loop_mode": 0, +"slice_184/name": "", +"slice_184/save_to_file/enabled": false, +"slice_184/save_to_file/keep_custom_tracks": false, +"slice_184/save_to_file/path": "", +"slice_184/start_frame": 0, +"slice_185/end_frame": 0, +"slice_185/loop_mode": 0, +"slice_185/name": "", +"slice_185/save_to_file/enabled": false, +"slice_185/save_to_file/keep_custom_tracks": false, +"slice_185/save_to_file/path": "", +"slice_185/start_frame": 0, +"slice_186/end_frame": 0, +"slice_186/loop_mode": 0, +"slice_186/name": "", +"slice_186/save_to_file/enabled": false, +"slice_186/save_to_file/keep_custom_tracks": false, +"slice_186/save_to_file/path": "", +"slice_186/start_frame": 0, +"slice_187/end_frame": 0, +"slice_187/loop_mode": 0, +"slice_187/name": "", +"slice_187/save_to_file/enabled": false, +"slice_187/save_to_file/keep_custom_tracks": false, +"slice_187/save_to_file/path": "", +"slice_187/start_frame": 0, +"slice_188/end_frame": 0, +"slice_188/loop_mode": 0, +"slice_188/name": "", +"slice_188/save_to_file/enabled": false, +"slice_188/save_to_file/keep_custom_tracks": false, +"slice_188/save_to_file/path": "", +"slice_188/start_frame": 0, +"slice_189/end_frame": 0, +"slice_189/loop_mode": 0, +"slice_189/name": "", +"slice_189/save_to_file/enabled": false, +"slice_189/save_to_file/keep_custom_tracks": false, +"slice_189/save_to_file/path": "", +"slice_189/start_frame": 0, +"slice_19/end_frame": 0, +"slice_19/loop_mode": 0, +"slice_19/name": "", +"slice_19/save_to_file/enabled": false, +"slice_19/save_to_file/keep_custom_tracks": false, +"slice_19/save_to_file/path": "", +"slice_19/start_frame": 0, +"slice_190/end_frame": 0, +"slice_190/loop_mode": 0, +"slice_190/name": "", +"slice_190/save_to_file/enabled": false, +"slice_190/save_to_file/keep_custom_tracks": false, +"slice_190/save_to_file/path": "", +"slice_190/start_frame": 0, +"slice_191/end_frame": 0, +"slice_191/loop_mode": 0, +"slice_191/name": "", +"slice_191/save_to_file/enabled": false, +"slice_191/save_to_file/keep_custom_tracks": false, +"slice_191/save_to_file/path": "", +"slice_191/start_frame": 0, +"slice_192/end_frame": 0, +"slice_192/loop_mode": 0, +"slice_192/name": "", +"slice_192/save_to_file/enabled": false, +"slice_192/save_to_file/keep_custom_tracks": false, +"slice_192/save_to_file/path": "", +"slice_192/start_frame": 0, +"slice_193/end_frame": 0, +"slice_193/loop_mode": 0, +"slice_193/name": "", +"slice_193/save_to_file/enabled": false, +"slice_193/save_to_file/keep_custom_tracks": false, +"slice_193/save_to_file/path": "", +"slice_193/start_frame": 0, +"slice_194/end_frame": 0, +"slice_194/loop_mode": 0, +"slice_194/name": "", +"slice_194/save_to_file/enabled": false, +"slice_194/save_to_file/keep_custom_tracks": false, +"slice_194/save_to_file/path": "", +"slice_194/start_frame": 0, +"slice_195/end_frame": 0, +"slice_195/loop_mode": 0, +"slice_195/name": "", +"slice_195/save_to_file/enabled": false, +"slice_195/save_to_file/keep_custom_tracks": false, +"slice_195/save_to_file/path": "", +"slice_195/start_frame": 0, +"slice_196/end_frame": 0, +"slice_196/loop_mode": 0, +"slice_196/name": "", +"slice_196/save_to_file/enabled": false, +"slice_196/save_to_file/keep_custom_tracks": false, +"slice_196/save_to_file/path": "", +"slice_196/start_frame": 0, +"slice_197/end_frame": 0, +"slice_197/loop_mode": 0, +"slice_197/name": "", +"slice_197/save_to_file/enabled": false, +"slice_197/save_to_file/keep_custom_tracks": false, +"slice_197/save_to_file/path": "", +"slice_197/start_frame": 0, +"slice_198/end_frame": 0, +"slice_198/loop_mode": 0, +"slice_198/name": "", +"slice_198/save_to_file/enabled": false, +"slice_198/save_to_file/keep_custom_tracks": false, +"slice_198/save_to_file/path": "", +"slice_198/start_frame": 0, +"slice_199/end_frame": 0, +"slice_199/loop_mode": 0, +"slice_199/name": "", +"slice_199/save_to_file/enabled": false, +"slice_199/save_to_file/keep_custom_tracks": false, +"slice_199/save_to_file/path": "", +"slice_199/start_frame": 0, +"slice_2/end_frame": 0, +"slice_2/loop_mode": 0, +"slice_2/name": "", +"slice_2/save_to_file/enabled": false, +"slice_2/save_to_file/keep_custom_tracks": false, +"slice_2/save_to_file/path": "", +"slice_2/start_frame": 0, +"slice_20/end_frame": 0, +"slice_20/loop_mode": 0, +"slice_20/name": "", +"slice_20/save_to_file/enabled": false, +"slice_20/save_to_file/keep_custom_tracks": false, +"slice_20/save_to_file/path": "", +"slice_20/start_frame": 0, +"slice_200/end_frame": 0, +"slice_200/loop_mode": 0, +"slice_200/name": "", +"slice_200/save_to_file/enabled": false, +"slice_200/save_to_file/keep_custom_tracks": false, +"slice_200/save_to_file/path": "", +"slice_200/start_frame": 0, +"slice_201/end_frame": 0, +"slice_201/loop_mode": 0, +"slice_201/name": "", +"slice_201/save_to_file/enabled": false, +"slice_201/save_to_file/keep_custom_tracks": false, +"slice_201/save_to_file/path": "", +"slice_201/start_frame": 0, +"slice_202/end_frame": 0, +"slice_202/loop_mode": 0, +"slice_202/name": "", +"slice_202/save_to_file/enabled": false, +"slice_202/save_to_file/keep_custom_tracks": false, +"slice_202/save_to_file/path": "", +"slice_202/start_frame": 0, +"slice_203/end_frame": 0, +"slice_203/loop_mode": 0, +"slice_203/name": "", +"slice_203/save_to_file/enabled": false, +"slice_203/save_to_file/keep_custom_tracks": false, +"slice_203/save_to_file/path": "", +"slice_203/start_frame": 0, +"slice_204/end_frame": 0, +"slice_204/loop_mode": 0, +"slice_204/name": "", +"slice_204/save_to_file/enabled": false, +"slice_204/save_to_file/keep_custom_tracks": false, +"slice_204/save_to_file/path": "", +"slice_204/start_frame": 0, +"slice_205/end_frame": 0, +"slice_205/loop_mode": 0, +"slice_205/name": "", +"slice_205/save_to_file/enabled": false, +"slice_205/save_to_file/keep_custom_tracks": false, +"slice_205/save_to_file/path": "", +"slice_205/start_frame": 0, +"slice_206/end_frame": 0, +"slice_206/loop_mode": 0, +"slice_206/name": "", +"slice_206/save_to_file/enabled": false, +"slice_206/save_to_file/keep_custom_tracks": false, +"slice_206/save_to_file/path": "", +"slice_206/start_frame": 0, +"slice_207/end_frame": 0, +"slice_207/loop_mode": 0, +"slice_207/name": "", +"slice_207/save_to_file/enabled": false, +"slice_207/save_to_file/keep_custom_tracks": false, +"slice_207/save_to_file/path": "", +"slice_207/start_frame": 0, +"slice_208/end_frame": 0, +"slice_208/loop_mode": 0, +"slice_208/name": "", +"slice_208/save_to_file/enabled": false, +"slice_208/save_to_file/keep_custom_tracks": false, +"slice_208/save_to_file/path": "", +"slice_208/start_frame": 0, +"slice_209/end_frame": 0, +"slice_209/loop_mode": 0, +"slice_209/name": "", +"slice_209/save_to_file/enabled": false, +"slice_209/save_to_file/keep_custom_tracks": false, +"slice_209/save_to_file/path": "", +"slice_209/start_frame": 0, +"slice_21/end_frame": 0, +"slice_21/loop_mode": 0, +"slice_21/name": "", +"slice_21/save_to_file/enabled": false, +"slice_21/save_to_file/keep_custom_tracks": false, +"slice_21/save_to_file/path": "", +"slice_21/start_frame": 0, +"slice_210/end_frame": 0, +"slice_210/loop_mode": 0, +"slice_210/name": "", +"slice_210/save_to_file/enabled": false, +"slice_210/save_to_file/keep_custom_tracks": false, +"slice_210/save_to_file/path": "", +"slice_210/start_frame": 0, +"slice_211/end_frame": 0, +"slice_211/loop_mode": 0, +"slice_211/name": "", +"slice_211/save_to_file/enabled": false, +"slice_211/save_to_file/keep_custom_tracks": false, +"slice_211/save_to_file/path": "", +"slice_211/start_frame": 0, +"slice_212/end_frame": 0, +"slice_212/loop_mode": 0, +"slice_212/name": "", +"slice_212/save_to_file/enabled": false, +"slice_212/save_to_file/keep_custom_tracks": false, +"slice_212/save_to_file/path": "", +"slice_212/start_frame": 0, +"slice_213/end_frame": 0, +"slice_213/loop_mode": 0, +"slice_213/name": "", +"slice_213/save_to_file/enabled": false, +"slice_213/save_to_file/keep_custom_tracks": false, +"slice_213/save_to_file/path": "", +"slice_213/start_frame": 0, +"slice_214/end_frame": 0, +"slice_214/loop_mode": 0, +"slice_214/name": "", +"slice_214/save_to_file/enabled": false, +"slice_214/save_to_file/keep_custom_tracks": false, +"slice_214/save_to_file/path": "", +"slice_214/start_frame": 0, +"slice_215/end_frame": 0, +"slice_215/loop_mode": 0, +"slice_215/name": "", +"slice_215/save_to_file/enabled": false, +"slice_215/save_to_file/keep_custom_tracks": false, +"slice_215/save_to_file/path": "", +"slice_215/start_frame": 0, +"slice_216/end_frame": 0, +"slice_216/loop_mode": 0, +"slice_216/name": "", +"slice_216/save_to_file/enabled": false, +"slice_216/save_to_file/keep_custom_tracks": false, +"slice_216/save_to_file/path": "", +"slice_216/start_frame": 0, +"slice_217/end_frame": 0, +"slice_217/loop_mode": 0, +"slice_217/name": "", +"slice_217/save_to_file/enabled": false, +"slice_217/save_to_file/keep_custom_tracks": false, +"slice_217/save_to_file/path": "", +"slice_217/start_frame": 0, +"slice_218/end_frame": 0, +"slice_218/loop_mode": 0, +"slice_218/name": "", +"slice_218/save_to_file/enabled": false, +"slice_218/save_to_file/keep_custom_tracks": false, +"slice_218/save_to_file/path": "", +"slice_218/start_frame": 0, +"slice_219/end_frame": 0, +"slice_219/loop_mode": 0, +"slice_219/name": "", +"slice_219/save_to_file/enabled": false, +"slice_219/save_to_file/keep_custom_tracks": false, +"slice_219/save_to_file/path": "", +"slice_219/start_frame": 0, +"slice_22/end_frame": 0, +"slice_22/loop_mode": 0, +"slice_22/name": "", +"slice_22/save_to_file/enabled": false, +"slice_22/save_to_file/keep_custom_tracks": false, +"slice_22/save_to_file/path": "", +"slice_22/start_frame": 0, +"slice_220/end_frame": 0, +"slice_220/loop_mode": 0, +"slice_220/name": "", +"slice_220/save_to_file/enabled": false, +"slice_220/save_to_file/keep_custom_tracks": false, +"slice_220/save_to_file/path": "", +"slice_220/start_frame": 0, +"slice_221/end_frame": 0, +"slice_221/loop_mode": 0, +"slice_221/name": "", +"slice_221/save_to_file/enabled": false, +"slice_221/save_to_file/keep_custom_tracks": false, +"slice_221/save_to_file/path": "", +"slice_221/start_frame": 0, +"slice_222/end_frame": 0, +"slice_222/loop_mode": 0, +"slice_222/name": "", +"slice_222/save_to_file/enabled": false, +"slice_222/save_to_file/keep_custom_tracks": false, +"slice_222/save_to_file/path": "", +"slice_222/start_frame": 0, +"slice_223/end_frame": 0, +"slice_223/loop_mode": 0, +"slice_223/name": "", +"slice_223/save_to_file/enabled": false, +"slice_223/save_to_file/keep_custom_tracks": false, +"slice_223/save_to_file/path": "", +"slice_223/start_frame": 0, +"slice_224/end_frame": 0, +"slice_224/loop_mode": 0, +"slice_224/name": "", +"slice_224/save_to_file/enabled": false, +"slice_224/save_to_file/keep_custom_tracks": false, +"slice_224/save_to_file/path": "", +"slice_224/start_frame": 0, +"slice_225/end_frame": 0, +"slice_225/loop_mode": 0, +"slice_225/name": "", +"slice_225/save_to_file/enabled": false, +"slice_225/save_to_file/keep_custom_tracks": false, +"slice_225/save_to_file/path": "", +"slice_225/start_frame": 0, +"slice_226/end_frame": 0, +"slice_226/loop_mode": 0, +"slice_226/name": "", +"slice_226/save_to_file/enabled": false, +"slice_226/save_to_file/keep_custom_tracks": false, +"slice_226/save_to_file/path": "", +"slice_226/start_frame": 0, +"slice_227/end_frame": 0, +"slice_227/loop_mode": 0, +"slice_227/name": "", +"slice_227/save_to_file/enabled": false, +"slice_227/save_to_file/keep_custom_tracks": false, +"slice_227/save_to_file/path": "", +"slice_227/start_frame": 0, +"slice_228/end_frame": 0, +"slice_228/loop_mode": 0, +"slice_228/name": "", +"slice_228/save_to_file/enabled": false, +"slice_228/save_to_file/keep_custom_tracks": false, +"slice_228/save_to_file/path": "", +"slice_228/start_frame": 0, +"slice_229/end_frame": 0, +"slice_229/loop_mode": 0, +"slice_229/name": "", +"slice_229/save_to_file/enabled": false, +"slice_229/save_to_file/keep_custom_tracks": false, +"slice_229/save_to_file/path": "", +"slice_229/start_frame": 0, +"slice_23/end_frame": 0, +"slice_23/loop_mode": 0, +"slice_23/name": "", +"slice_23/save_to_file/enabled": false, +"slice_23/save_to_file/keep_custom_tracks": false, +"slice_23/save_to_file/path": "", +"slice_23/start_frame": 0, +"slice_230/end_frame": 0, +"slice_230/loop_mode": 0, +"slice_230/name": "", +"slice_230/save_to_file/enabled": false, +"slice_230/save_to_file/keep_custom_tracks": false, +"slice_230/save_to_file/path": "", +"slice_230/start_frame": 0, +"slice_231/end_frame": 0, +"slice_231/loop_mode": 0, +"slice_231/name": "", +"slice_231/save_to_file/enabled": false, +"slice_231/save_to_file/keep_custom_tracks": false, +"slice_231/save_to_file/path": "", +"slice_231/start_frame": 0, +"slice_232/end_frame": 0, +"slice_232/loop_mode": 0, +"slice_232/name": "", +"slice_232/save_to_file/enabled": false, +"slice_232/save_to_file/keep_custom_tracks": false, +"slice_232/save_to_file/path": "", +"slice_232/start_frame": 0, +"slice_233/end_frame": 0, +"slice_233/loop_mode": 0, +"slice_233/name": "", +"slice_233/save_to_file/enabled": false, +"slice_233/save_to_file/keep_custom_tracks": false, +"slice_233/save_to_file/path": "", +"slice_233/start_frame": 0, +"slice_234/end_frame": 0, +"slice_234/loop_mode": 0, +"slice_234/name": "", +"slice_234/save_to_file/enabled": false, +"slice_234/save_to_file/keep_custom_tracks": false, +"slice_234/save_to_file/path": "", +"slice_234/start_frame": 0, +"slice_235/end_frame": 0, +"slice_235/loop_mode": 0, +"slice_235/name": "", +"slice_235/save_to_file/enabled": false, +"slice_235/save_to_file/keep_custom_tracks": false, +"slice_235/save_to_file/path": "", +"slice_235/start_frame": 0, +"slice_236/end_frame": 0, +"slice_236/loop_mode": 0, +"slice_236/name": "", +"slice_236/save_to_file/enabled": false, +"slice_236/save_to_file/keep_custom_tracks": false, +"slice_236/save_to_file/path": "", +"slice_236/start_frame": 0, +"slice_237/end_frame": 0, +"slice_237/loop_mode": 0, +"slice_237/name": "", +"slice_237/save_to_file/enabled": false, +"slice_237/save_to_file/keep_custom_tracks": false, +"slice_237/save_to_file/path": "", +"slice_237/start_frame": 0, +"slice_238/end_frame": 0, +"slice_238/loop_mode": 0, +"slice_238/name": "", +"slice_238/save_to_file/enabled": false, +"slice_238/save_to_file/keep_custom_tracks": false, +"slice_238/save_to_file/path": "", +"slice_238/start_frame": 0, +"slice_239/end_frame": 0, +"slice_239/loop_mode": 0, +"slice_239/name": "", +"slice_239/save_to_file/enabled": false, +"slice_239/save_to_file/keep_custom_tracks": false, +"slice_239/save_to_file/path": "", +"slice_239/start_frame": 0, +"slice_24/end_frame": 0, +"slice_24/loop_mode": 0, +"slice_24/name": "", +"slice_24/save_to_file/enabled": false, +"slice_24/save_to_file/keep_custom_tracks": false, +"slice_24/save_to_file/path": "", +"slice_24/start_frame": 0, +"slice_240/end_frame": 0, +"slice_240/loop_mode": 0, +"slice_240/name": "", +"slice_240/save_to_file/enabled": false, +"slice_240/save_to_file/keep_custom_tracks": false, +"slice_240/save_to_file/path": "", +"slice_240/start_frame": 0, +"slice_241/end_frame": 0, +"slice_241/loop_mode": 0, +"slice_241/name": "", +"slice_241/save_to_file/enabled": false, +"slice_241/save_to_file/keep_custom_tracks": false, +"slice_241/save_to_file/path": "", +"slice_241/start_frame": 0, +"slice_242/end_frame": 0, +"slice_242/loop_mode": 0, +"slice_242/name": "", +"slice_242/save_to_file/enabled": false, +"slice_242/save_to_file/keep_custom_tracks": false, +"slice_242/save_to_file/path": "", +"slice_242/start_frame": 0, +"slice_243/end_frame": 0, +"slice_243/loop_mode": 0, +"slice_243/name": "", +"slice_243/save_to_file/enabled": false, +"slice_243/save_to_file/keep_custom_tracks": false, +"slice_243/save_to_file/path": "", +"slice_243/start_frame": 0, +"slice_244/end_frame": 0, +"slice_244/loop_mode": 0, +"slice_244/name": "", +"slice_244/save_to_file/enabled": false, +"slice_244/save_to_file/keep_custom_tracks": false, +"slice_244/save_to_file/path": "", +"slice_244/start_frame": 0, +"slice_245/end_frame": 0, +"slice_245/loop_mode": 0, +"slice_245/name": "", +"slice_245/save_to_file/enabled": false, +"slice_245/save_to_file/keep_custom_tracks": false, +"slice_245/save_to_file/path": "", +"slice_245/start_frame": 0, +"slice_246/end_frame": 0, +"slice_246/loop_mode": 0, +"slice_246/name": "", +"slice_246/save_to_file/enabled": false, +"slice_246/save_to_file/keep_custom_tracks": false, +"slice_246/save_to_file/path": "", +"slice_246/start_frame": 0, +"slice_247/end_frame": 0, +"slice_247/loop_mode": 0, +"slice_247/name": "", +"slice_247/save_to_file/enabled": false, +"slice_247/save_to_file/keep_custom_tracks": false, +"slice_247/save_to_file/path": "", +"slice_247/start_frame": 0, +"slice_248/end_frame": 0, +"slice_248/loop_mode": 0, +"slice_248/name": "", +"slice_248/save_to_file/enabled": false, +"slice_248/save_to_file/keep_custom_tracks": false, +"slice_248/save_to_file/path": "", +"slice_248/start_frame": 0, +"slice_249/end_frame": 0, +"slice_249/loop_mode": 0, +"slice_249/name": "", +"slice_249/save_to_file/enabled": false, +"slice_249/save_to_file/keep_custom_tracks": false, +"slice_249/save_to_file/path": "", +"slice_249/start_frame": 0, +"slice_25/end_frame": 0, +"slice_25/loop_mode": 0, +"slice_25/name": "", +"slice_25/save_to_file/enabled": false, +"slice_25/save_to_file/keep_custom_tracks": false, +"slice_25/save_to_file/path": "", +"slice_25/start_frame": 0, +"slice_250/end_frame": 0, +"slice_250/loop_mode": 0, +"slice_250/name": "", +"slice_250/save_to_file/enabled": false, +"slice_250/save_to_file/keep_custom_tracks": false, +"slice_250/save_to_file/path": "", +"slice_250/start_frame": 0, +"slice_251/end_frame": 0, +"slice_251/loop_mode": 0, +"slice_251/name": "", +"slice_251/save_to_file/enabled": false, +"slice_251/save_to_file/keep_custom_tracks": false, +"slice_251/save_to_file/path": "", +"slice_251/start_frame": 0, +"slice_252/end_frame": 0, +"slice_252/loop_mode": 0, +"slice_252/name": "", +"slice_252/save_to_file/enabled": false, +"slice_252/save_to_file/keep_custom_tracks": false, +"slice_252/save_to_file/path": "", +"slice_252/start_frame": 0, +"slice_253/end_frame": 0, +"slice_253/loop_mode": 0, +"slice_253/name": "", +"slice_253/save_to_file/enabled": false, +"slice_253/save_to_file/keep_custom_tracks": false, +"slice_253/save_to_file/path": "", +"slice_253/start_frame": 0, +"slice_254/end_frame": 0, +"slice_254/loop_mode": 0, +"slice_254/name": "", +"slice_254/save_to_file/enabled": false, +"slice_254/save_to_file/keep_custom_tracks": false, +"slice_254/save_to_file/path": "", +"slice_254/start_frame": 0, +"slice_255/end_frame": 0, +"slice_255/loop_mode": 0, +"slice_255/name": "", +"slice_255/save_to_file/enabled": false, +"slice_255/save_to_file/keep_custom_tracks": false, +"slice_255/save_to_file/path": "", +"slice_255/start_frame": 0, +"slice_256/end_frame": 0, +"slice_256/loop_mode": 0, +"slice_256/name": "", +"slice_256/save_to_file/enabled": false, +"slice_256/save_to_file/keep_custom_tracks": false, +"slice_256/save_to_file/path": "", +"slice_256/start_frame": 0, +"slice_26/end_frame": 0, +"slice_26/loop_mode": 0, +"slice_26/name": "", +"slice_26/save_to_file/enabled": false, +"slice_26/save_to_file/keep_custom_tracks": false, +"slice_26/save_to_file/path": "", +"slice_26/start_frame": 0, +"slice_27/end_frame": 0, +"slice_27/loop_mode": 0, +"slice_27/name": "", +"slice_27/save_to_file/enabled": false, +"slice_27/save_to_file/keep_custom_tracks": false, +"slice_27/save_to_file/path": "", +"slice_27/start_frame": 0, +"slice_28/end_frame": 0, +"slice_28/loop_mode": 0, +"slice_28/name": "", +"slice_28/save_to_file/enabled": false, +"slice_28/save_to_file/keep_custom_tracks": false, +"slice_28/save_to_file/path": "", +"slice_28/start_frame": 0, +"slice_29/end_frame": 0, +"slice_29/loop_mode": 0, +"slice_29/name": "", +"slice_29/save_to_file/enabled": false, +"slice_29/save_to_file/keep_custom_tracks": false, +"slice_29/save_to_file/path": "", +"slice_29/start_frame": 0, +"slice_3/end_frame": 0, +"slice_3/loop_mode": 0, +"slice_3/name": "", +"slice_3/save_to_file/enabled": false, +"slice_3/save_to_file/keep_custom_tracks": false, +"slice_3/save_to_file/path": "", +"slice_3/start_frame": 0, +"slice_30/end_frame": 0, +"slice_30/loop_mode": 0, +"slice_30/name": "", +"slice_30/save_to_file/enabled": false, +"slice_30/save_to_file/keep_custom_tracks": false, +"slice_30/save_to_file/path": "", +"slice_30/start_frame": 0, +"slice_31/end_frame": 0, +"slice_31/loop_mode": 0, +"slice_31/name": "", +"slice_31/save_to_file/enabled": false, +"slice_31/save_to_file/keep_custom_tracks": false, +"slice_31/save_to_file/path": "", +"slice_31/start_frame": 0, +"slice_32/end_frame": 0, +"slice_32/loop_mode": 0, +"slice_32/name": "", +"slice_32/save_to_file/enabled": false, +"slice_32/save_to_file/keep_custom_tracks": false, +"slice_32/save_to_file/path": "", +"slice_32/start_frame": 0, +"slice_33/end_frame": 0, +"slice_33/loop_mode": 0, +"slice_33/name": "", +"slice_33/save_to_file/enabled": false, +"slice_33/save_to_file/keep_custom_tracks": false, +"slice_33/save_to_file/path": "", +"slice_33/start_frame": 0, +"slice_34/end_frame": 0, +"slice_34/loop_mode": 0, +"slice_34/name": "", +"slice_34/save_to_file/enabled": false, +"slice_34/save_to_file/keep_custom_tracks": false, +"slice_34/save_to_file/path": "", +"slice_34/start_frame": 0, +"slice_35/end_frame": 0, +"slice_35/loop_mode": 0, +"slice_35/name": "", +"slice_35/save_to_file/enabled": false, +"slice_35/save_to_file/keep_custom_tracks": false, +"slice_35/save_to_file/path": "", +"slice_35/start_frame": 0, +"slice_36/end_frame": 0, +"slice_36/loop_mode": 0, +"slice_36/name": "", +"slice_36/save_to_file/enabled": false, +"slice_36/save_to_file/keep_custom_tracks": false, +"slice_36/save_to_file/path": "", +"slice_36/start_frame": 0, +"slice_37/end_frame": 0, +"slice_37/loop_mode": 0, +"slice_37/name": "", +"slice_37/save_to_file/enabled": false, +"slice_37/save_to_file/keep_custom_tracks": false, +"slice_37/save_to_file/path": "", +"slice_37/start_frame": 0, +"slice_38/end_frame": 0, +"slice_38/loop_mode": 0, +"slice_38/name": "", +"slice_38/save_to_file/enabled": false, +"slice_38/save_to_file/keep_custom_tracks": false, +"slice_38/save_to_file/path": "", +"slice_38/start_frame": 0, +"slice_39/end_frame": 0, +"slice_39/loop_mode": 0, +"slice_39/name": "", +"slice_39/save_to_file/enabled": false, +"slice_39/save_to_file/keep_custom_tracks": false, +"slice_39/save_to_file/path": "", +"slice_39/start_frame": 0, +"slice_4/end_frame": 0, +"slice_4/loop_mode": 0, +"slice_4/name": "", +"slice_4/save_to_file/enabled": false, +"slice_4/save_to_file/keep_custom_tracks": false, +"slice_4/save_to_file/path": "", +"slice_4/start_frame": 0, +"slice_40/end_frame": 0, +"slice_40/loop_mode": 0, +"slice_40/name": "", +"slice_40/save_to_file/enabled": false, +"slice_40/save_to_file/keep_custom_tracks": false, +"slice_40/save_to_file/path": "", +"slice_40/start_frame": 0, +"slice_41/end_frame": 0, +"slice_41/loop_mode": 0, +"slice_41/name": "", +"slice_41/save_to_file/enabled": false, +"slice_41/save_to_file/keep_custom_tracks": false, +"slice_41/save_to_file/path": "", +"slice_41/start_frame": 0, +"slice_42/end_frame": 0, +"slice_42/loop_mode": 0, +"slice_42/name": "", +"slice_42/save_to_file/enabled": false, +"slice_42/save_to_file/keep_custom_tracks": false, +"slice_42/save_to_file/path": "", +"slice_42/start_frame": 0, +"slice_43/end_frame": 0, +"slice_43/loop_mode": 0, +"slice_43/name": "", +"slice_43/save_to_file/enabled": false, +"slice_43/save_to_file/keep_custom_tracks": false, +"slice_43/save_to_file/path": "", +"slice_43/start_frame": 0, +"slice_44/end_frame": 0, +"slice_44/loop_mode": 0, +"slice_44/name": "", +"slice_44/save_to_file/enabled": false, +"slice_44/save_to_file/keep_custom_tracks": false, +"slice_44/save_to_file/path": "", +"slice_44/start_frame": 0, +"slice_45/end_frame": 0, +"slice_45/loop_mode": 0, +"slice_45/name": "", +"slice_45/save_to_file/enabled": false, +"slice_45/save_to_file/keep_custom_tracks": false, +"slice_45/save_to_file/path": "", +"slice_45/start_frame": 0, +"slice_46/end_frame": 0, +"slice_46/loop_mode": 0, +"slice_46/name": "", +"slice_46/save_to_file/enabled": false, +"slice_46/save_to_file/keep_custom_tracks": false, +"slice_46/save_to_file/path": "", +"slice_46/start_frame": 0, +"slice_47/end_frame": 0, +"slice_47/loop_mode": 0, +"slice_47/name": "", +"slice_47/save_to_file/enabled": false, +"slice_47/save_to_file/keep_custom_tracks": false, +"slice_47/save_to_file/path": "", +"slice_47/start_frame": 0, +"slice_48/end_frame": 0, +"slice_48/loop_mode": 0, +"slice_48/name": "", +"slice_48/save_to_file/enabled": false, +"slice_48/save_to_file/keep_custom_tracks": false, +"slice_48/save_to_file/path": "", +"slice_48/start_frame": 0, +"slice_49/end_frame": 0, +"slice_49/loop_mode": 0, +"slice_49/name": "", +"slice_49/save_to_file/enabled": false, +"slice_49/save_to_file/keep_custom_tracks": false, +"slice_49/save_to_file/path": "", +"slice_49/start_frame": 0, +"slice_5/end_frame": 0, +"slice_5/loop_mode": 0, +"slice_5/name": "", +"slice_5/save_to_file/enabled": false, +"slice_5/save_to_file/keep_custom_tracks": false, +"slice_5/save_to_file/path": "", +"slice_5/start_frame": 0, +"slice_50/end_frame": 0, +"slice_50/loop_mode": 0, +"slice_50/name": "", +"slice_50/save_to_file/enabled": false, +"slice_50/save_to_file/keep_custom_tracks": false, +"slice_50/save_to_file/path": "", +"slice_50/start_frame": 0, +"slice_51/end_frame": 0, +"slice_51/loop_mode": 0, +"slice_51/name": "", +"slice_51/save_to_file/enabled": false, +"slice_51/save_to_file/keep_custom_tracks": false, +"slice_51/save_to_file/path": "", +"slice_51/start_frame": 0, +"slice_52/end_frame": 0, +"slice_52/loop_mode": 0, +"slice_52/name": "", +"slice_52/save_to_file/enabled": false, +"slice_52/save_to_file/keep_custom_tracks": false, +"slice_52/save_to_file/path": "", +"slice_52/start_frame": 0, +"slice_53/end_frame": 0, +"slice_53/loop_mode": 0, +"slice_53/name": "", +"slice_53/save_to_file/enabled": false, +"slice_53/save_to_file/keep_custom_tracks": false, +"slice_53/save_to_file/path": "", +"slice_53/start_frame": 0, +"slice_54/end_frame": 0, +"slice_54/loop_mode": 0, +"slice_54/name": "", +"slice_54/save_to_file/enabled": false, +"slice_54/save_to_file/keep_custom_tracks": false, +"slice_54/save_to_file/path": "", +"slice_54/start_frame": 0, +"slice_55/end_frame": 0, +"slice_55/loop_mode": 0, +"slice_55/name": "", +"slice_55/save_to_file/enabled": false, +"slice_55/save_to_file/keep_custom_tracks": false, +"slice_55/save_to_file/path": "", +"slice_55/start_frame": 0, +"slice_56/end_frame": 0, +"slice_56/loop_mode": 0, +"slice_56/name": "", +"slice_56/save_to_file/enabled": false, +"slice_56/save_to_file/keep_custom_tracks": false, +"slice_56/save_to_file/path": "", +"slice_56/start_frame": 0, +"slice_57/end_frame": 0, +"slice_57/loop_mode": 0, +"slice_57/name": "", +"slice_57/save_to_file/enabled": false, +"slice_57/save_to_file/keep_custom_tracks": false, +"slice_57/save_to_file/path": "", +"slice_57/start_frame": 0, +"slice_58/end_frame": 0, +"slice_58/loop_mode": 0, +"slice_58/name": "", +"slice_58/save_to_file/enabled": false, +"slice_58/save_to_file/keep_custom_tracks": false, +"slice_58/save_to_file/path": "", +"slice_58/start_frame": 0, +"slice_59/end_frame": 0, +"slice_59/loop_mode": 0, +"slice_59/name": "", +"slice_59/save_to_file/enabled": false, +"slice_59/save_to_file/keep_custom_tracks": false, +"slice_59/save_to_file/path": "", +"slice_59/start_frame": 0, +"slice_6/end_frame": 0, +"slice_6/loop_mode": 0, +"slice_6/name": "", +"slice_6/save_to_file/enabled": false, +"slice_6/save_to_file/keep_custom_tracks": false, +"slice_6/save_to_file/path": "", +"slice_6/start_frame": 0, +"slice_60/end_frame": 0, +"slice_60/loop_mode": 0, +"slice_60/name": "", +"slice_60/save_to_file/enabled": false, +"slice_60/save_to_file/keep_custom_tracks": false, +"slice_60/save_to_file/path": "", +"slice_60/start_frame": 0, +"slice_61/end_frame": 0, +"slice_61/loop_mode": 0, +"slice_61/name": "", +"slice_61/save_to_file/enabled": false, +"slice_61/save_to_file/keep_custom_tracks": false, +"slice_61/save_to_file/path": "", +"slice_61/start_frame": 0, +"slice_62/end_frame": 0, +"slice_62/loop_mode": 0, +"slice_62/name": "", +"slice_62/save_to_file/enabled": false, +"slice_62/save_to_file/keep_custom_tracks": false, +"slice_62/save_to_file/path": "", +"slice_62/start_frame": 0, +"slice_63/end_frame": 0, +"slice_63/loop_mode": 0, +"slice_63/name": "", +"slice_63/save_to_file/enabled": false, +"slice_63/save_to_file/keep_custom_tracks": false, +"slice_63/save_to_file/path": "", +"slice_63/start_frame": 0, +"slice_64/end_frame": 0, +"slice_64/loop_mode": 0, +"slice_64/name": "", +"slice_64/save_to_file/enabled": false, +"slice_64/save_to_file/keep_custom_tracks": false, +"slice_64/save_to_file/path": "", +"slice_64/start_frame": 0, +"slice_65/end_frame": 0, +"slice_65/loop_mode": 0, +"slice_65/name": "", +"slice_65/save_to_file/enabled": false, +"slice_65/save_to_file/keep_custom_tracks": false, +"slice_65/save_to_file/path": "", +"slice_65/start_frame": 0, +"slice_66/end_frame": 0, +"slice_66/loop_mode": 0, +"slice_66/name": "", +"slice_66/save_to_file/enabled": false, +"slice_66/save_to_file/keep_custom_tracks": false, +"slice_66/save_to_file/path": "", +"slice_66/start_frame": 0, +"slice_67/end_frame": 0, +"slice_67/loop_mode": 0, +"slice_67/name": "", +"slice_67/save_to_file/enabled": false, +"slice_67/save_to_file/keep_custom_tracks": false, +"slice_67/save_to_file/path": "", +"slice_67/start_frame": 0, +"slice_68/end_frame": 0, +"slice_68/loop_mode": 0, +"slice_68/name": "", +"slice_68/save_to_file/enabled": false, +"slice_68/save_to_file/keep_custom_tracks": false, +"slice_68/save_to_file/path": "", +"slice_68/start_frame": 0, +"slice_69/end_frame": 0, +"slice_69/loop_mode": 0, +"slice_69/name": "", +"slice_69/save_to_file/enabled": false, +"slice_69/save_to_file/keep_custom_tracks": false, +"slice_69/save_to_file/path": "", +"slice_69/start_frame": 0, +"slice_7/end_frame": 0, +"slice_7/loop_mode": 0, +"slice_7/name": "", +"slice_7/save_to_file/enabled": false, +"slice_7/save_to_file/keep_custom_tracks": false, +"slice_7/save_to_file/path": "", +"slice_7/start_frame": 0, +"slice_70/end_frame": 0, +"slice_70/loop_mode": 0, +"slice_70/name": "", +"slice_70/save_to_file/enabled": false, +"slice_70/save_to_file/keep_custom_tracks": false, +"slice_70/save_to_file/path": "", +"slice_70/start_frame": 0, +"slice_71/end_frame": 0, +"slice_71/loop_mode": 0, +"slice_71/name": "", +"slice_71/save_to_file/enabled": false, +"slice_71/save_to_file/keep_custom_tracks": false, +"slice_71/save_to_file/path": "", +"slice_71/start_frame": 0, +"slice_72/end_frame": 0, +"slice_72/loop_mode": 0, +"slice_72/name": "", +"slice_72/save_to_file/enabled": false, +"slice_72/save_to_file/keep_custom_tracks": false, +"slice_72/save_to_file/path": "", +"slice_72/start_frame": 0, +"slice_73/end_frame": 0, +"slice_73/loop_mode": 0, +"slice_73/name": "", +"slice_73/save_to_file/enabled": false, +"slice_73/save_to_file/keep_custom_tracks": false, +"slice_73/save_to_file/path": "", +"slice_73/start_frame": 0, +"slice_74/end_frame": 0, +"slice_74/loop_mode": 0, +"slice_74/name": "", +"slice_74/save_to_file/enabled": false, +"slice_74/save_to_file/keep_custom_tracks": false, +"slice_74/save_to_file/path": "", +"slice_74/start_frame": 0, +"slice_75/end_frame": 0, +"slice_75/loop_mode": 0, +"slice_75/name": "", +"slice_75/save_to_file/enabled": false, +"slice_75/save_to_file/keep_custom_tracks": false, +"slice_75/save_to_file/path": "", +"slice_75/start_frame": 0, +"slice_76/end_frame": 0, +"slice_76/loop_mode": 0, +"slice_76/name": "", +"slice_76/save_to_file/enabled": false, +"slice_76/save_to_file/keep_custom_tracks": false, +"slice_76/save_to_file/path": "", +"slice_76/start_frame": 0, +"slice_77/end_frame": 0, +"slice_77/loop_mode": 0, +"slice_77/name": "", +"slice_77/save_to_file/enabled": false, +"slice_77/save_to_file/keep_custom_tracks": false, +"slice_77/save_to_file/path": "", +"slice_77/start_frame": 0, +"slice_78/end_frame": 0, +"slice_78/loop_mode": 0, +"slice_78/name": "", +"slice_78/save_to_file/enabled": false, +"slice_78/save_to_file/keep_custom_tracks": false, +"slice_78/save_to_file/path": "", +"slice_78/start_frame": 0, +"slice_79/end_frame": 0, +"slice_79/loop_mode": 0, +"slice_79/name": "", +"slice_79/save_to_file/enabled": false, +"slice_79/save_to_file/keep_custom_tracks": false, +"slice_79/save_to_file/path": "", +"slice_79/start_frame": 0, +"slice_8/end_frame": 0, +"slice_8/loop_mode": 0, +"slice_8/name": "", +"slice_8/save_to_file/enabled": false, +"slice_8/save_to_file/keep_custom_tracks": false, +"slice_8/save_to_file/path": "", +"slice_8/start_frame": 0, +"slice_80/end_frame": 0, +"slice_80/loop_mode": 0, +"slice_80/name": "", +"slice_80/save_to_file/enabled": false, +"slice_80/save_to_file/keep_custom_tracks": false, +"slice_80/save_to_file/path": "", +"slice_80/start_frame": 0, +"slice_81/end_frame": 0, +"slice_81/loop_mode": 0, +"slice_81/name": "", +"slice_81/save_to_file/enabled": false, +"slice_81/save_to_file/keep_custom_tracks": false, +"slice_81/save_to_file/path": "", +"slice_81/start_frame": 0, +"slice_82/end_frame": 0, +"slice_82/loop_mode": 0, +"slice_82/name": "", +"slice_82/save_to_file/enabled": false, +"slice_82/save_to_file/keep_custom_tracks": false, +"slice_82/save_to_file/path": "", +"slice_82/start_frame": 0, +"slice_83/end_frame": 0, +"slice_83/loop_mode": 0, +"slice_83/name": "", +"slice_83/save_to_file/enabled": false, +"slice_83/save_to_file/keep_custom_tracks": false, +"slice_83/save_to_file/path": "", +"slice_83/start_frame": 0, +"slice_84/end_frame": 0, +"slice_84/loop_mode": 0, +"slice_84/name": "", +"slice_84/save_to_file/enabled": false, +"slice_84/save_to_file/keep_custom_tracks": false, +"slice_84/save_to_file/path": "", +"slice_84/start_frame": 0, +"slice_85/end_frame": 0, +"slice_85/loop_mode": 0, +"slice_85/name": "", +"slice_85/save_to_file/enabled": false, +"slice_85/save_to_file/keep_custom_tracks": false, +"slice_85/save_to_file/path": "", +"slice_85/start_frame": 0, +"slice_86/end_frame": 0, +"slice_86/loop_mode": 0, +"slice_86/name": "", +"slice_86/save_to_file/enabled": false, +"slice_86/save_to_file/keep_custom_tracks": false, +"slice_86/save_to_file/path": "", +"slice_86/start_frame": 0, +"slice_87/end_frame": 0, +"slice_87/loop_mode": 0, +"slice_87/name": "", +"slice_87/save_to_file/enabled": false, +"slice_87/save_to_file/keep_custom_tracks": false, +"slice_87/save_to_file/path": "", +"slice_87/start_frame": 0, +"slice_88/end_frame": 0, +"slice_88/loop_mode": 0, +"slice_88/name": "", +"slice_88/save_to_file/enabled": false, +"slice_88/save_to_file/keep_custom_tracks": false, +"slice_88/save_to_file/path": "", +"slice_88/start_frame": 0, +"slice_89/end_frame": 0, +"slice_89/loop_mode": 0, +"slice_89/name": "", +"slice_89/save_to_file/enabled": false, +"slice_89/save_to_file/keep_custom_tracks": false, +"slice_89/save_to_file/path": "", +"slice_89/start_frame": 0, +"slice_9/end_frame": 0, +"slice_9/loop_mode": 0, +"slice_9/name": "", +"slice_9/save_to_file/enabled": false, +"slice_9/save_to_file/keep_custom_tracks": false, +"slice_9/save_to_file/path": "", +"slice_9/start_frame": 0, +"slice_90/end_frame": 0, +"slice_90/loop_mode": 0, +"slice_90/name": "", +"slice_90/save_to_file/enabled": false, +"slice_90/save_to_file/keep_custom_tracks": false, +"slice_90/save_to_file/path": "", +"slice_90/start_frame": 0, +"slice_91/end_frame": 0, +"slice_91/loop_mode": 0, +"slice_91/name": "", +"slice_91/save_to_file/enabled": false, +"slice_91/save_to_file/keep_custom_tracks": false, +"slice_91/save_to_file/path": "", +"slice_91/start_frame": 0, +"slice_92/end_frame": 0, +"slice_92/loop_mode": 0, +"slice_92/name": "", +"slice_92/save_to_file/enabled": false, +"slice_92/save_to_file/keep_custom_tracks": false, +"slice_92/save_to_file/path": "", +"slice_92/start_frame": 0, +"slice_93/end_frame": 0, +"slice_93/loop_mode": 0, +"slice_93/name": "", +"slice_93/save_to_file/enabled": false, +"slice_93/save_to_file/keep_custom_tracks": false, +"slice_93/save_to_file/path": "", +"slice_93/start_frame": 0, +"slice_94/end_frame": 0, +"slice_94/loop_mode": 0, +"slice_94/name": "", +"slice_94/save_to_file/enabled": false, +"slice_94/save_to_file/keep_custom_tracks": false, +"slice_94/save_to_file/path": "", +"slice_94/start_frame": 0, +"slice_95/end_frame": 0, +"slice_95/loop_mode": 0, +"slice_95/name": "", +"slice_95/save_to_file/enabled": false, +"slice_95/save_to_file/keep_custom_tracks": false, +"slice_95/save_to_file/path": "", +"slice_95/start_frame": 0, +"slice_96/end_frame": 0, +"slice_96/loop_mode": 0, +"slice_96/name": "", +"slice_96/save_to_file/enabled": false, +"slice_96/save_to_file/keep_custom_tracks": false, +"slice_96/save_to_file/path": "", +"slice_96/start_frame": 0, +"slice_97/end_frame": 0, +"slice_97/loop_mode": 0, +"slice_97/name": "", +"slice_97/save_to_file/enabled": false, +"slice_97/save_to_file/keep_custom_tracks": false, +"slice_97/save_to_file/path": "", +"slice_97/start_frame": 0, +"slice_98/end_frame": 0, +"slice_98/loop_mode": 0, +"slice_98/name": "", +"slice_98/save_to_file/enabled": false, +"slice_98/save_to_file/keep_custom_tracks": false, +"slice_98/save_to_file/path": "", +"slice_98/start_frame": 0, +"slice_99/end_frame": 0, +"slice_99/loop_mode": 0, +"slice_99/name": "", +"slice_99/save_to_file/enabled": false, +"slice_99/save_to_file/keep_custom_tracks": false, +"slice_99/save_to_file/path": "", +"slice_99/start_frame": 0, +"slices/amount": 0 +}, +"SlowRun": { +"save_to_file/enabled": false, +"save_to_file/keep_custom_tracks": "", +"save_to_file/path": "", +"settings/loop_mode": 1, +"slice_1/end_frame": 0, +"slice_1/loop_mode": 0, +"slice_1/name": "", +"slice_1/save_to_file/enabled": false, +"slice_1/save_to_file/keep_custom_tracks": false, +"slice_1/save_to_file/path": "", +"slice_1/start_frame": 0, +"slice_10/end_frame": 0, +"slice_10/loop_mode": 0, +"slice_10/name": "", +"slice_10/save_to_file/enabled": false, +"slice_10/save_to_file/keep_custom_tracks": false, +"slice_10/save_to_file/path": "", +"slice_10/start_frame": 0, +"slice_100/end_frame": 0, +"slice_100/loop_mode": 0, +"slice_100/name": "", +"slice_100/save_to_file/enabled": false, +"slice_100/save_to_file/keep_custom_tracks": false, +"slice_100/save_to_file/path": "", +"slice_100/start_frame": 0, +"slice_101/end_frame": 0, +"slice_101/loop_mode": 0, +"slice_101/name": "", +"slice_101/save_to_file/enabled": false, +"slice_101/save_to_file/keep_custom_tracks": false, +"slice_101/save_to_file/path": "", +"slice_101/start_frame": 0, +"slice_102/end_frame": 0, +"slice_102/loop_mode": 0, +"slice_102/name": "", +"slice_102/save_to_file/enabled": false, +"slice_102/save_to_file/keep_custom_tracks": false, +"slice_102/save_to_file/path": "", +"slice_102/start_frame": 0, +"slice_103/end_frame": 0, +"slice_103/loop_mode": 0, +"slice_103/name": "", +"slice_103/save_to_file/enabled": false, +"slice_103/save_to_file/keep_custom_tracks": false, +"slice_103/save_to_file/path": "", +"slice_103/start_frame": 0, +"slice_104/end_frame": 0, +"slice_104/loop_mode": 0, +"slice_104/name": "", +"slice_104/save_to_file/enabled": false, +"slice_104/save_to_file/keep_custom_tracks": false, +"slice_104/save_to_file/path": "", +"slice_104/start_frame": 0, +"slice_105/end_frame": 0, +"slice_105/loop_mode": 0, +"slice_105/name": "", +"slice_105/save_to_file/enabled": false, +"slice_105/save_to_file/keep_custom_tracks": false, +"slice_105/save_to_file/path": "", +"slice_105/start_frame": 0, +"slice_106/end_frame": 0, +"slice_106/loop_mode": 0, +"slice_106/name": "", +"slice_106/save_to_file/enabled": false, +"slice_106/save_to_file/keep_custom_tracks": false, +"slice_106/save_to_file/path": "", +"slice_106/start_frame": 0, +"slice_107/end_frame": 0, +"slice_107/loop_mode": 0, +"slice_107/name": "", +"slice_107/save_to_file/enabled": false, +"slice_107/save_to_file/keep_custom_tracks": false, +"slice_107/save_to_file/path": "", +"slice_107/start_frame": 0, +"slice_108/end_frame": 0, +"slice_108/loop_mode": 0, +"slice_108/name": "", +"slice_108/save_to_file/enabled": false, +"slice_108/save_to_file/keep_custom_tracks": false, +"slice_108/save_to_file/path": "", +"slice_108/start_frame": 0, +"slice_109/end_frame": 0, +"slice_109/loop_mode": 0, +"slice_109/name": "", +"slice_109/save_to_file/enabled": false, +"slice_109/save_to_file/keep_custom_tracks": false, +"slice_109/save_to_file/path": "", +"slice_109/start_frame": 0, +"slice_11/end_frame": 0, +"slice_11/loop_mode": 0, +"slice_11/name": "", +"slice_11/save_to_file/enabled": false, +"slice_11/save_to_file/keep_custom_tracks": false, +"slice_11/save_to_file/path": "", +"slice_11/start_frame": 0, +"slice_110/end_frame": 0, +"slice_110/loop_mode": 0, +"slice_110/name": "", +"slice_110/save_to_file/enabled": false, +"slice_110/save_to_file/keep_custom_tracks": false, +"slice_110/save_to_file/path": "", +"slice_110/start_frame": 0, +"slice_111/end_frame": 0, +"slice_111/loop_mode": 0, +"slice_111/name": "", +"slice_111/save_to_file/enabled": false, +"slice_111/save_to_file/keep_custom_tracks": false, +"slice_111/save_to_file/path": "", +"slice_111/start_frame": 0, +"slice_112/end_frame": 0, +"slice_112/loop_mode": 0, +"slice_112/name": "", +"slice_112/save_to_file/enabled": false, +"slice_112/save_to_file/keep_custom_tracks": false, +"slice_112/save_to_file/path": "", +"slice_112/start_frame": 0, +"slice_113/end_frame": 0, +"slice_113/loop_mode": 0, +"slice_113/name": "", +"slice_113/save_to_file/enabled": false, +"slice_113/save_to_file/keep_custom_tracks": false, +"slice_113/save_to_file/path": "", +"slice_113/start_frame": 0, +"slice_114/end_frame": 0, +"slice_114/loop_mode": 0, +"slice_114/name": "", +"slice_114/save_to_file/enabled": false, +"slice_114/save_to_file/keep_custom_tracks": false, +"slice_114/save_to_file/path": "", +"slice_114/start_frame": 0, +"slice_115/end_frame": 0, +"slice_115/loop_mode": 0, +"slice_115/name": "", +"slice_115/save_to_file/enabled": false, +"slice_115/save_to_file/keep_custom_tracks": false, +"slice_115/save_to_file/path": "", +"slice_115/start_frame": 0, +"slice_116/end_frame": 0, +"slice_116/loop_mode": 0, +"slice_116/name": "", +"slice_116/save_to_file/enabled": false, +"slice_116/save_to_file/keep_custom_tracks": false, +"slice_116/save_to_file/path": "", +"slice_116/start_frame": 0, +"slice_117/end_frame": 0, +"slice_117/loop_mode": 0, +"slice_117/name": "", +"slice_117/save_to_file/enabled": false, +"slice_117/save_to_file/keep_custom_tracks": false, +"slice_117/save_to_file/path": "", +"slice_117/start_frame": 0, +"slice_118/end_frame": 0, +"slice_118/loop_mode": 0, +"slice_118/name": "", +"slice_118/save_to_file/enabled": false, +"slice_118/save_to_file/keep_custom_tracks": false, +"slice_118/save_to_file/path": "", +"slice_118/start_frame": 0, +"slice_119/end_frame": 0, +"slice_119/loop_mode": 0, +"slice_119/name": "", +"slice_119/save_to_file/enabled": false, +"slice_119/save_to_file/keep_custom_tracks": false, +"slice_119/save_to_file/path": "", +"slice_119/start_frame": 0, +"slice_12/end_frame": 0, +"slice_12/loop_mode": 0, +"slice_12/name": "", +"slice_12/save_to_file/enabled": false, +"slice_12/save_to_file/keep_custom_tracks": false, +"slice_12/save_to_file/path": "", +"slice_12/start_frame": 0, +"slice_120/end_frame": 0, +"slice_120/loop_mode": 0, +"slice_120/name": "", +"slice_120/save_to_file/enabled": false, +"slice_120/save_to_file/keep_custom_tracks": false, +"slice_120/save_to_file/path": "", +"slice_120/start_frame": 0, +"slice_121/end_frame": 0, +"slice_121/loop_mode": 0, +"slice_121/name": "", +"slice_121/save_to_file/enabled": false, +"slice_121/save_to_file/keep_custom_tracks": false, +"slice_121/save_to_file/path": "", +"slice_121/start_frame": 0, +"slice_122/end_frame": 0, +"slice_122/loop_mode": 0, +"slice_122/name": "", +"slice_122/save_to_file/enabled": false, +"slice_122/save_to_file/keep_custom_tracks": false, +"slice_122/save_to_file/path": "", +"slice_122/start_frame": 0, +"slice_123/end_frame": 0, +"slice_123/loop_mode": 0, +"slice_123/name": "", +"slice_123/save_to_file/enabled": false, +"slice_123/save_to_file/keep_custom_tracks": false, +"slice_123/save_to_file/path": "", +"slice_123/start_frame": 0, +"slice_124/end_frame": 0, +"slice_124/loop_mode": 0, +"slice_124/name": "", +"slice_124/save_to_file/enabled": false, +"slice_124/save_to_file/keep_custom_tracks": false, +"slice_124/save_to_file/path": "", +"slice_124/start_frame": 0, +"slice_125/end_frame": 0, +"slice_125/loop_mode": 0, +"slice_125/name": "", +"slice_125/save_to_file/enabled": false, +"slice_125/save_to_file/keep_custom_tracks": false, +"slice_125/save_to_file/path": "", +"slice_125/start_frame": 0, +"slice_126/end_frame": 0, +"slice_126/loop_mode": 0, +"slice_126/name": "", +"slice_126/save_to_file/enabled": false, +"slice_126/save_to_file/keep_custom_tracks": false, +"slice_126/save_to_file/path": "", +"slice_126/start_frame": 0, +"slice_127/end_frame": 0, +"slice_127/loop_mode": 0, +"slice_127/name": "", +"slice_127/save_to_file/enabled": false, +"slice_127/save_to_file/keep_custom_tracks": false, +"slice_127/save_to_file/path": "", +"slice_127/start_frame": 0, +"slice_128/end_frame": 0, +"slice_128/loop_mode": 0, +"slice_128/name": "", +"slice_128/save_to_file/enabled": false, +"slice_128/save_to_file/keep_custom_tracks": false, +"slice_128/save_to_file/path": "", +"slice_128/start_frame": 0, +"slice_129/end_frame": 0, +"slice_129/loop_mode": 0, +"slice_129/name": "", +"slice_129/save_to_file/enabled": false, +"slice_129/save_to_file/keep_custom_tracks": false, +"slice_129/save_to_file/path": "", +"slice_129/start_frame": 0, +"slice_13/end_frame": 0, +"slice_13/loop_mode": 0, +"slice_13/name": "", +"slice_13/save_to_file/enabled": false, +"slice_13/save_to_file/keep_custom_tracks": false, +"slice_13/save_to_file/path": "", +"slice_13/start_frame": 0, +"slice_130/end_frame": 0, +"slice_130/loop_mode": 0, +"slice_130/name": "", +"slice_130/save_to_file/enabled": false, +"slice_130/save_to_file/keep_custom_tracks": false, +"slice_130/save_to_file/path": "", +"slice_130/start_frame": 0, +"slice_131/end_frame": 0, +"slice_131/loop_mode": 0, +"slice_131/name": "", +"slice_131/save_to_file/enabled": false, +"slice_131/save_to_file/keep_custom_tracks": false, +"slice_131/save_to_file/path": "", +"slice_131/start_frame": 0, +"slice_132/end_frame": 0, +"slice_132/loop_mode": 0, +"slice_132/name": "", +"slice_132/save_to_file/enabled": false, +"slice_132/save_to_file/keep_custom_tracks": false, +"slice_132/save_to_file/path": "", +"slice_132/start_frame": 0, +"slice_133/end_frame": 0, +"slice_133/loop_mode": 0, +"slice_133/name": "", +"slice_133/save_to_file/enabled": false, +"slice_133/save_to_file/keep_custom_tracks": false, +"slice_133/save_to_file/path": "", +"slice_133/start_frame": 0, +"slice_134/end_frame": 0, +"slice_134/loop_mode": 0, +"slice_134/name": "", +"slice_134/save_to_file/enabled": false, +"slice_134/save_to_file/keep_custom_tracks": false, +"slice_134/save_to_file/path": "", +"slice_134/start_frame": 0, +"slice_135/end_frame": 0, +"slice_135/loop_mode": 0, +"slice_135/name": "", +"slice_135/save_to_file/enabled": false, +"slice_135/save_to_file/keep_custom_tracks": false, +"slice_135/save_to_file/path": "", +"slice_135/start_frame": 0, +"slice_136/end_frame": 0, +"slice_136/loop_mode": 0, +"slice_136/name": "", +"slice_136/save_to_file/enabled": false, +"slice_136/save_to_file/keep_custom_tracks": false, +"slice_136/save_to_file/path": "", +"slice_136/start_frame": 0, +"slice_137/end_frame": 0, +"slice_137/loop_mode": 0, +"slice_137/name": "", +"slice_137/save_to_file/enabled": false, +"slice_137/save_to_file/keep_custom_tracks": false, +"slice_137/save_to_file/path": "", +"slice_137/start_frame": 0, +"slice_138/end_frame": 0, +"slice_138/loop_mode": 0, +"slice_138/name": "", +"slice_138/save_to_file/enabled": false, +"slice_138/save_to_file/keep_custom_tracks": false, +"slice_138/save_to_file/path": "", +"slice_138/start_frame": 0, +"slice_139/end_frame": 0, +"slice_139/loop_mode": 0, +"slice_139/name": "", +"slice_139/save_to_file/enabled": false, +"slice_139/save_to_file/keep_custom_tracks": false, +"slice_139/save_to_file/path": "", +"slice_139/start_frame": 0, +"slice_14/end_frame": 0, +"slice_14/loop_mode": 0, +"slice_14/name": "", +"slice_14/save_to_file/enabled": false, +"slice_14/save_to_file/keep_custom_tracks": false, +"slice_14/save_to_file/path": "", +"slice_14/start_frame": 0, +"slice_140/end_frame": 0, +"slice_140/loop_mode": 0, +"slice_140/name": "", +"slice_140/save_to_file/enabled": false, +"slice_140/save_to_file/keep_custom_tracks": false, +"slice_140/save_to_file/path": "", +"slice_140/start_frame": 0, +"slice_141/end_frame": 0, +"slice_141/loop_mode": 0, +"slice_141/name": "", +"slice_141/save_to_file/enabled": false, +"slice_141/save_to_file/keep_custom_tracks": false, +"slice_141/save_to_file/path": "", +"slice_141/start_frame": 0, +"slice_142/end_frame": 0, +"slice_142/loop_mode": 0, +"slice_142/name": "", +"slice_142/save_to_file/enabled": false, +"slice_142/save_to_file/keep_custom_tracks": false, +"slice_142/save_to_file/path": "", +"slice_142/start_frame": 0, +"slice_143/end_frame": 0, +"slice_143/loop_mode": 0, +"slice_143/name": "", +"slice_143/save_to_file/enabled": false, +"slice_143/save_to_file/keep_custom_tracks": false, +"slice_143/save_to_file/path": "", +"slice_143/start_frame": 0, +"slice_144/end_frame": 0, +"slice_144/loop_mode": 0, +"slice_144/name": "", +"slice_144/save_to_file/enabled": false, +"slice_144/save_to_file/keep_custom_tracks": false, +"slice_144/save_to_file/path": "", +"slice_144/start_frame": 0, +"slice_145/end_frame": 0, +"slice_145/loop_mode": 0, +"slice_145/name": "", +"slice_145/save_to_file/enabled": false, +"slice_145/save_to_file/keep_custom_tracks": false, +"slice_145/save_to_file/path": "", +"slice_145/start_frame": 0, +"slice_146/end_frame": 0, +"slice_146/loop_mode": 0, +"slice_146/name": "", +"slice_146/save_to_file/enabled": false, +"slice_146/save_to_file/keep_custom_tracks": false, +"slice_146/save_to_file/path": "", +"slice_146/start_frame": 0, +"slice_147/end_frame": 0, +"slice_147/loop_mode": 0, +"slice_147/name": "", +"slice_147/save_to_file/enabled": false, +"slice_147/save_to_file/keep_custom_tracks": false, +"slice_147/save_to_file/path": "", +"slice_147/start_frame": 0, +"slice_148/end_frame": 0, +"slice_148/loop_mode": 0, +"slice_148/name": "", +"slice_148/save_to_file/enabled": false, +"slice_148/save_to_file/keep_custom_tracks": false, +"slice_148/save_to_file/path": "", +"slice_148/start_frame": 0, +"slice_149/end_frame": 0, +"slice_149/loop_mode": 0, +"slice_149/name": "", +"slice_149/save_to_file/enabled": false, +"slice_149/save_to_file/keep_custom_tracks": false, +"slice_149/save_to_file/path": "", +"slice_149/start_frame": 0, +"slice_15/end_frame": 0, +"slice_15/loop_mode": 0, +"slice_15/name": "", +"slice_15/save_to_file/enabled": false, +"slice_15/save_to_file/keep_custom_tracks": false, +"slice_15/save_to_file/path": "", +"slice_15/start_frame": 0, +"slice_150/end_frame": 0, +"slice_150/loop_mode": 0, +"slice_150/name": "", +"slice_150/save_to_file/enabled": false, +"slice_150/save_to_file/keep_custom_tracks": false, +"slice_150/save_to_file/path": "", +"slice_150/start_frame": 0, +"slice_151/end_frame": 0, +"slice_151/loop_mode": 0, +"slice_151/name": "", +"slice_151/save_to_file/enabled": false, +"slice_151/save_to_file/keep_custom_tracks": false, +"slice_151/save_to_file/path": "", +"slice_151/start_frame": 0, +"slice_152/end_frame": 0, +"slice_152/loop_mode": 0, +"slice_152/name": "", +"slice_152/save_to_file/enabled": false, +"slice_152/save_to_file/keep_custom_tracks": false, +"slice_152/save_to_file/path": "", +"slice_152/start_frame": 0, +"slice_153/end_frame": 0, +"slice_153/loop_mode": 0, +"slice_153/name": "", +"slice_153/save_to_file/enabled": false, +"slice_153/save_to_file/keep_custom_tracks": false, +"slice_153/save_to_file/path": "", +"slice_153/start_frame": 0, +"slice_154/end_frame": 0, +"slice_154/loop_mode": 0, +"slice_154/name": "", +"slice_154/save_to_file/enabled": false, +"slice_154/save_to_file/keep_custom_tracks": false, +"slice_154/save_to_file/path": "", +"slice_154/start_frame": 0, +"slice_155/end_frame": 0, +"slice_155/loop_mode": 0, +"slice_155/name": "", +"slice_155/save_to_file/enabled": false, +"slice_155/save_to_file/keep_custom_tracks": false, +"slice_155/save_to_file/path": "", +"slice_155/start_frame": 0, +"slice_156/end_frame": 0, +"slice_156/loop_mode": 0, +"slice_156/name": "", +"slice_156/save_to_file/enabled": false, +"slice_156/save_to_file/keep_custom_tracks": false, +"slice_156/save_to_file/path": "", +"slice_156/start_frame": 0, +"slice_157/end_frame": 0, +"slice_157/loop_mode": 0, +"slice_157/name": "", +"slice_157/save_to_file/enabled": false, +"slice_157/save_to_file/keep_custom_tracks": false, +"slice_157/save_to_file/path": "", +"slice_157/start_frame": 0, +"slice_158/end_frame": 0, +"slice_158/loop_mode": 0, +"slice_158/name": "", +"slice_158/save_to_file/enabled": false, +"slice_158/save_to_file/keep_custom_tracks": false, +"slice_158/save_to_file/path": "", +"slice_158/start_frame": 0, +"slice_159/end_frame": 0, +"slice_159/loop_mode": 0, +"slice_159/name": "", +"slice_159/save_to_file/enabled": false, +"slice_159/save_to_file/keep_custom_tracks": false, +"slice_159/save_to_file/path": "", +"slice_159/start_frame": 0, +"slice_16/end_frame": 0, +"slice_16/loop_mode": 0, +"slice_16/name": "", +"slice_16/save_to_file/enabled": false, +"slice_16/save_to_file/keep_custom_tracks": false, +"slice_16/save_to_file/path": "", +"slice_16/start_frame": 0, +"slice_160/end_frame": 0, +"slice_160/loop_mode": 0, +"slice_160/name": "", +"slice_160/save_to_file/enabled": false, +"slice_160/save_to_file/keep_custom_tracks": false, +"slice_160/save_to_file/path": "", +"slice_160/start_frame": 0, +"slice_161/end_frame": 0, +"slice_161/loop_mode": 0, +"slice_161/name": "", +"slice_161/save_to_file/enabled": false, +"slice_161/save_to_file/keep_custom_tracks": false, +"slice_161/save_to_file/path": "", +"slice_161/start_frame": 0, +"slice_162/end_frame": 0, +"slice_162/loop_mode": 0, +"slice_162/name": "", +"slice_162/save_to_file/enabled": false, +"slice_162/save_to_file/keep_custom_tracks": false, +"slice_162/save_to_file/path": "", +"slice_162/start_frame": 0, +"slice_163/end_frame": 0, +"slice_163/loop_mode": 0, +"slice_163/name": "", +"slice_163/save_to_file/enabled": false, +"slice_163/save_to_file/keep_custom_tracks": false, +"slice_163/save_to_file/path": "", +"slice_163/start_frame": 0, +"slice_164/end_frame": 0, +"slice_164/loop_mode": 0, +"slice_164/name": "", +"slice_164/save_to_file/enabled": false, +"slice_164/save_to_file/keep_custom_tracks": false, +"slice_164/save_to_file/path": "", +"slice_164/start_frame": 0, +"slice_165/end_frame": 0, +"slice_165/loop_mode": 0, +"slice_165/name": "", +"slice_165/save_to_file/enabled": false, +"slice_165/save_to_file/keep_custom_tracks": false, +"slice_165/save_to_file/path": "", +"slice_165/start_frame": 0, +"slice_166/end_frame": 0, +"slice_166/loop_mode": 0, +"slice_166/name": "", +"slice_166/save_to_file/enabled": false, +"slice_166/save_to_file/keep_custom_tracks": false, +"slice_166/save_to_file/path": "", +"slice_166/start_frame": 0, +"slice_167/end_frame": 0, +"slice_167/loop_mode": 0, +"slice_167/name": "", +"slice_167/save_to_file/enabled": false, +"slice_167/save_to_file/keep_custom_tracks": false, +"slice_167/save_to_file/path": "", +"slice_167/start_frame": 0, +"slice_168/end_frame": 0, +"slice_168/loop_mode": 0, +"slice_168/name": "", +"slice_168/save_to_file/enabled": false, +"slice_168/save_to_file/keep_custom_tracks": false, +"slice_168/save_to_file/path": "", +"slice_168/start_frame": 0, +"slice_169/end_frame": 0, +"slice_169/loop_mode": 0, +"slice_169/name": "", +"slice_169/save_to_file/enabled": false, +"slice_169/save_to_file/keep_custom_tracks": false, +"slice_169/save_to_file/path": "", +"slice_169/start_frame": 0, +"slice_17/end_frame": 0, +"slice_17/loop_mode": 0, +"slice_17/name": "", +"slice_17/save_to_file/enabled": false, +"slice_17/save_to_file/keep_custom_tracks": false, +"slice_17/save_to_file/path": "", +"slice_17/start_frame": 0, +"slice_170/end_frame": 0, +"slice_170/loop_mode": 0, +"slice_170/name": "", +"slice_170/save_to_file/enabled": false, +"slice_170/save_to_file/keep_custom_tracks": false, +"slice_170/save_to_file/path": "", +"slice_170/start_frame": 0, +"slice_171/end_frame": 0, +"slice_171/loop_mode": 0, +"slice_171/name": "", +"slice_171/save_to_file/enabled": false, +"slice_171/save_to_file/keep_custom_tracks": false, +"slice_171/save_to_file/path": "", +"slice_171/start_frame": 0, +"slice_172/end_frame": 0, +"slice_172/loop_mode": 0, +"slice_172/name": "", +"slice_172/save_to_file/enabled": false, +"slice_172/save_to_file/keep_custom_tracks": false, +"slice_172/save_to_file/path": "", +"slice_172/start_frame": 0, +"slice_173/end_frame": 0, +"slice_173/loop_mode": 0, +"slice_173/name": "", +"slice_173/save_to_file/enabled": false, +"slice_173/save_to_file/keep_custom_tracks": false, +"slice_173/save_to_file/path": "", +"slice_173/start_frame": 0, +"slice_174/end_frame": 0, +"slice_174/loop_mode": 0, +"slice_174/name": "", +"slice_174/save_to_file/enabled": false, +"slice_174/save_to_file/keep_custom_tracks": false, +"slice_174/save_to_file/path": "", +"slice_174/start_frame": 0, +"slice_175/end_frame": 0, +"slice_175/loop_mode": 0, +"slice_175/name": "", +"slice_175/save_to_file/enabled": false, +"slice_175/save_to_file/keep_custom_tracks": false, +"slice_175/save_to_file/path": "", +"slice_175/start_frame": 0, +"slice_176/end_frame": 0, +"slice_176/loop_mode": 0, +"slice_176/name": "", +"slice_176/save_to_file/enabled": false, +"slice_176/save_to_file/keep_custom_tracks": false, +"slice_176/save_to_file/path": "", +"slice_176/start_frame": 0, +"slice_177/end_frame": 0, +"slice_177/loop_mode": 0, +"slice_177/name": "", +"slice_177/save_to_file/enabled": false, +"slice_177/save_to_file/keep_custom_tracks": false, +"slice_177/save_to_file/path": "", +"slice_177/start_frame": 0, +"slice_178/end_frame": 0, +"slice_178/loop_mode": 0, +"slice_178/name": "", +"slice_178/save_to_file/enabled": false, +"slice_178/save_to_file/keep_custom_tracks": false, +"slice_178/save_to_file/path": "", +"slice_178/start_frame": 0, +"slice_179/end_frame": 0, +"slice_179/loop_mode": 0, +"slice_179/name": "", +"slice_179/save_to_file/enabled": false, +"slice_179/save_to_file/keep_custom_tracks": false, +"slice_179/save_to_file/path": "", +"slice_179/start_frame": 0, +"slice_18/end_frame": 0, +"slice_18/loop_mode": 0, +"slice_18/name": "", +"slice_18/save_to_file/enabled": false, +"slice_18/save_to_file/keep_custom_tracks": false, +"slice_18/save_to_file/path": "", +"slice_18/start_frame": 0, +"slice_180/end_frame": 0, +"slice_180/loop_mode": 0, +"slice_180/name": "", +"slice_180/save_to_file/enabled": false, +"slice_180/save_to_file/keep_custom_tracks": false, +"slice_180/save_to_file/path": "", +"slice_180/start_frame": 0, +"slice_181/end_frame": 0, +"slice_181/loop_mode": 0, +"slice_181/name": "", +"slice_181/save_to_file/enabled": false, +"slice_181/save_to_file/keep_custom_tracks": false, +"slice_181/save_to_file/path": "", +"slice_181/start_frame": 0, +"slice_182/end_frame": 0, +"slice_182/loop_mode": 0, +"slice_182/name": "", +"slice_182/save_to_file/enabled": false, +"slice_182/save_to_file/keep_custom_tracks": false, +"slice_182/save_to_file/path": "", +"slice_182/start_frame": 0, +"slice_183/end_frame": 0, +"slice_183/loop_mode": 0, +"slice_183/name": "", +"slice_183/save_to_file/enabled": false, +"slice_183/save_to_file/keep_custom_tracks": false, +"slice_183/save_to_file/path": "", +"slice_183/start_frame": 0, +"slice_184/end_frame": 0, +"slice_184/loop_mode": 0, +"slice_184/name": "", +"slice_184/save_to_file/enabled": false, +"slice_184/save_to_file/keep_custom_tracks": false, +"slice_184/save_to_file/path": "", +"slice_184/start_frame": 0, +"slice_185/end_frame": 0, +"slice_185/loop_mode": 0, +"slice_185/name": "", +"slice_185/save_to_file/enabled": false, +"slice_185/save_to_file/keep_custom_tracks": false, +"slice_185/save_to_file/path": "", +"slice_185/start_frame": 0, +"slice_186/end_frame": 0, +"slice_186/loop_mode": 0, +"slice_186/name": "", +"slice_186/save_to_file/enabled": false, +"slice_186/save_to_file/keep_custom_tracks": false, +"slice_186/save_to_file/path": "", +"slice_186/start_frame": 0, +"slice_187/end_frame": 0, +"slice_187/loop_mode": 0, +"slice_187/name": "", +"slice_187/save_to_file/enabled": false, +"slice_187/save_to_file/keep_custom_tracks": false, +"slice_187/save_to_file/path": "", +"slice_187/start_frame": 0, +"slice_188/end_frame": 0, +"slice_188/loop_mode": 0, +"slice_188/name": "", +"slice_188/save_to_file/enabled": false, +"slice_188/save_to_file/keep_custom_tracks": false, +"slice_188/save_to_file/path": "", +"slice_188/start_frame": 0, +"slice_189/end_frame": 0, +"slice_189/loop_mode": 0, +"slice_189/name": "", +"slice_189/save_to_file/enabled": false, +"slice_189/save_to_file/keep_custom_tracks": false, +"slice_189/save_to_file/path": "", +"slice_189/start_frame": 0, +"slice_19/end_frame": 0, +"slice_19/loop_mode": 0, +"slice_19/name": "", +"slice_19/save_to_file/enabled": false, +"slice_19/save_to_file/keep_custom_tracks": false, +"slice_19/save_to_file/path": "", +"slice_19/start_frame": 0, +"slice_190/end_frame": 0, +"slice_190/loop_mode": 0, +"slice_190/name": "", +"slice_190/save_to_file/enabled": false, +"slice_190/save_to_file/keep_custom_tracks": false, +"slice_190/save_to_file/path": "", +"slice_190/start_frame": 0, +"slice_191/end_frame": 0, +"slice_191/loop_mode": 0, +"slice_191/name": "", +"slice_191/save_to_file/enabled": false, +"slice_191/save_to_file/keep_custom_tracks": false, +"slice_191/save_to_file/path": "", +"slice_191/start_frame": 0, +"slice_192/end_frame": 0, +"slice_192/loop_mode": 0, +"slice_192/name": "", +"slice_192/save_to_file/enabled": false, +"slice_192/save_to_file/keep_custom_tracks": false, +"slice_192/save_to_file/path": "", +"slice_192/start_frame": 0, +"slice_193/end_frame": 0, +"slice_193/loop_mode": 0, +"slice_193/name": "", +"slice_193/save_to_file/enabled": false, +"slice_193/save_to_file/keep_custom_tracks": false, +"slice_193/save_to_file/path": "", +"slice_193/start_frame": 0, +"slice_194/end_frame": 0, +"slice_194/loop_mode": 0, +"slice_194/name": "", +"slice_194/save_to_file/enabled": false, +"slice_194/save_to_file/keep_custom_tracks": false, +"slice_194/save_to_file/path": "", +"slice_194/start_frame": 0, +"slice_195/end_frame": 0, +"slice_195/loop_mode": 0, +"slice_195/name": "", +"slice_195/save_to_file/enabled": false, +"slice_195/save_to_file/keep_custom_tracks": false, +"slice_195/save_to_file/path": "", +"slice_195/start_frame": 0, +"slice_196/end_frame": 0, +"slice_196/loop_mode": 0, +"slice_196/name": "", +"slice_196/save_to_file/enabled": false, +"slice_196/save_to_file/keep_custom_tracks": false, +"slice_196/save_to_file/path": "", +"slice_196/start_frame": 0, +"slice_197/end_frame": 0, +"slice_197/loop_mode": 0, +"slice_197/name": "", +"slice_197/save_to_file/enabled": false, +"slice_197/save_to_file/keep_custom_tracks": false, +"slice_197/save_to_file/path": "", +"slice_197/start_frame": 0, +"slice_198/end_frame": 0, +"slice_198/loop_mode": 0, +"slice_198/name": "", +"slice_198/save_to_file/enabled": false, +"slice_198/save_to_file/keep_custom_tracks": false, +"slice_198/save_to_file/path": "", +"slice_198/start_frame": 0, +"slice_199/end_frame": 0, +"slice_199/loop_mode": 0, +"slice_199/name": "", +"slice_199/save_to_file/enabled": false, +"slice_199/save_to_file/keep_custom_tracks": false, +"slice_199/save_to_file/path": "", +"slice_199/start_frame": 0, +"slice_2/end_frame": 0, +"slice_2/loop_mode": 0, +"slice_2/name": "", +"slice_2/save_to_file/enabled": false, +"slice_2/save_to_file/keep_custom_tracks": false, +"slice_2/save_to_file/path": "", +"slice_2/start_frame": 0, +"slice_20/end_frame": 0, +"slice_20/loop_mode": 0, +"slice_20/name": "", +"slice_20/save_to_file/enabled": false, +"slice_20/save_to_file/keep_custom_tracks": false, +"slice_20/save_to_file/path": "", +"slice_20/start_frame": 0, +"slice_200/end_frame": 0, +"slice_200/loop_mode": 0, +"slice_200/name": "", +"slice_200/save_to_file/enabled": false, +"slice_200/save_to_file/keep_custom_tracks": false, +"slice_200/save_to_file/path": "", +"slice_200/start_frame": 0, +"slice_201/end_frame": 0, +"slice_201/loop_mode": 0, +"slice_201/name": "", +"slice_201/save_to_file/enabled": false, +"slice_201/save_to_file/keep_custom_tracks": false, +"slice_201/save_to_file/path": "", +"slice_201/start_frame": 0, +"slice_202/end_frame": 0, +"slice_202/loop_mode": 0, +"slice_202/name": "", +"slice_202/save_to_file/enabled": false, +"slice_202/save_to_file/keep_custom_tracks": false, +"slice_202/save_to_file/path": "", +"slice_202/start_frame": 0, +"slice_203/end_frame": 0, +"slice_203/loop_mode": 0, +"slice_203/name": "", +"slice_203/save_to_file/enabled": false, +"slice_203/save_to_file/keep_custom_tracks": false, +"slice_203/save_to_file/path": "", +"slice_203/start_frame": 0, +"slice_204/end_frame": 0, +"slice_204/loop_mode": 0, +"slice_204/name": "", +"slice_204/save_to_file/enabled": false, +"slice_204/save_to_file/keep_custom_tracks": false, +"slice_204/save_to_file/path": "", +"slice_204/start_frame": 0, +"slice_205/end_frame": 0, +"slice_205/loop_mode": 0, +"slice_205/name": "", +"slice_205/save_to_file/enabled": false, +"slice_205/save_to_file/keep_custom_tracks": false, +"slice_205/save_to_file/path": "", +"slice_205/start_frame": 0, +"slice_206/end_frame": 0, +"slice_206/loop_mode": 0, +"slice_206/name": "", +"slice_206/save_to_file/enabled": false, +"slice_206/save_to_file/keep_custom_tracks": false, +"slice_206/save_to_file/path": "", +"slice_206/start_frame": 0, +"slice_207/end_frame": 0, +"slice_207/loop_mode": 0, +"slice_207/name": "", +"slice_207/save_to_file/enabled": false, +"slice_207/save_to_file/keep_custom_tracks": false, +"slice_207/save_to_file/path": "", +"slice_207/start_frame": 0, +"slice_208/end_frame": 0, +"slice_208/loop_mode": 0, +"slice_208/name": "", +"slice_208/save_to_file/enabled": false, +"slice_208/save_to_file/keep_custom_tracks": false, +"slice_208/save_to_file/path": "", +"slice_208/start_frame": 0, +"slice_209/end_frame": 0, +"slice_209/loop_mode": 0, +"slice_209/name": "", +"slice_209/save_to_file/enabled": false, +"slice_209/save_to_file/keep_custom_tracks": false, +"slice_209/save_to_file/path": "", +"slice_209/start_frame": 0, +"slice_21/end_frame": 0, +"slice_21/loop_mode": 0, +"slice_21/name": "", +"slice_21/save_to_file/enabled": false, +"slice_21/save_to_file/keep_custom_tracks": false, +"slice_21/save_to_file/path": "", +"slice_21/start_frame": 0, +"slice_210/end_frame": 0, +"slice_210/loop_mode": 0, +"slice_210/name": "", +"slice_210/save_to_file/enabled": false, +"slice_210/save_to_file/keep_custom_tracks": false, +"slice_210/save_to_file/path": "", +"slice_210/start_frame": 0, +"slice_211/end_frame": 0, +"slice_211/loop_mode": 0, +"slice_211/name": "", +"slice_211/save_to_file/enabled": false, +"slice_211/save_to_file/keep_custom_tracks": false, +"slice_211/save_to_file/path": "", +"slice_211/start_frame": 0, +"slice_212/end_frame": 0, +"slice_212/loop_mode": 0, +"slice_212/name": "", +"slice_212/save_to_file/enabled": false, +"slice_212/save_to_file/keep_custom_tracks": false, +"slice_212/save_to_file/path": "", +"slice_212/start_frame": 0, +"slice_213/end_frame": 0, +"slice_213/loop_mode": 0, +"slice_213/name": "", +"slice_213/save_to_file/enabled": false, +"slice_213/save_to_file/keep_custom_tracks": false, +"slice_213/save_to_file/path": "", +"slice_213/start_frame": 0, +"slice_214/end_frame": 0, +"slice_214/loop_mode": 0, +"slice_214/name": "", +"slice_214/save_to_file/enabled": false, +"slice_214/save_to_file/keep_custom_tracks": false, +"slice_214/save_to_file/path": "", +"slice_214/start_frame": 0, +"slice_215/end_frame": 0, +"slice_215/loop_mode": 0, +"slice_215/name": "", +"slice_215/save_to_file/enabled": false, +"slice_215/save_to_file/keep_custom_tracks": false, +"slice_215/save_to_file/path": "", +"slice_215/start_frame": 0, +"slice_216/end_frame": 0, +"slice_216/loop_mode": 0, +"slice_216/name": "", +"slice_216/save_to_file/enabled": false, +"slice_216/save_to_file/keep_custom_tracks": false, +"slice_216/save_to_file/path": "", +"slice_216/start_frame": 0, +"slice_217/end_frame": 0, +"slice_217/loop_mode": 0, +"slice_217/name": "", +"slice_217/save_to_file/enabled": false, +"slice_217/save_to_file/keep_custom_tracks": false, +"slice_217/save_to_file/path": "", +"slice_217/start_frame": 0, +"slice_218/end_frame": 0, +"slice_218/loop_mode": 0, +"slice_218/name": "", +"slice_218/save_to_file/enabled": false, +"slice_218/save_to_file/keep_custom_tracks": false, +"slice_218/save_to_file/path": "", +"slice_218/start_frame": 0, +"slice_219/end_frame": 0, +"slice_219/loop_mode": 0, +"slice_219/name": "", +"slice_219/save_to_file/enabled": false, +"slice_219/save_to_file/keep_custom_tracks": false, +"slice_219/save_to_file/path": "", +"slice_219/start_frame": 0, +"slice_22/end_frame": 0, +"slice_22/loop_mode": 0, +"slice_22/name": "", +"slice_22/save_to_file/enabled": false, +"slice_22/save_to_file/keep_custom_tracks": false, +"slice_22/save_to_file/path": "", +"slice_22/start_frame": 0, +"slice_220/end_frame": 0, +"slice_220/loop_mode": 0, +"slice_220/name": "", +"slice_220/save_to_file/enabled": false, +"slice_220/save_to_file/keep_custom_tracks": false, +"slice_220/save_to_file/path": "", +"slice_220/start_frame": 0, +"slice_221/end_frame": 0, +"slice_221/loop_mode": 0, +"slice_221/name": "", +"slice_221/save_to_file/enabled": false, +"slice_221/save_to_file/keep_custom_tracks": false, +"slice_221/save_to_file/path": "", +"slice_221/start_frame": 0, +"slice_222/end_frame": 0, +"slice_222/loop_mode": 0, +"slice_222/name": "", +"slice_222/save_to_file/enabled": false, +"slice_222/save_to_file/keep_custom_tracks": false, +"slice_222/save_to_file/path": "", +"slice_222/start_frame": 0, +"slice_223/end_frame": 0, +"slice_223/loop_mode": 0, +"slice_223/name": "", +"slice_223/save_to_file/enabled": false, +"slice_223/save_to_file/keep_custom_tracks": false, +"slice_223/save_to_file/path": "", +"slice_223/start_frame": 0, +"slice_224/end_frame": 0, +"slice_224/loop_mode": 0, +"slice_224/name": "", +"slice_224/save_to_file/enabled": false, +"slice_224/save_to_file/keep_custom_tracks": false, +"slice_224/save_to_file/path": "", +"slice_224/start_frame": 0, +"slice_225/end_frame": 0, +"slice_225/loop_mode": 0, +"slice_225/name": "", +"slice_225/save_to_file/enabled": false, +"slice_225/save_to_file/keep_custom_tracks": false, +"slice_225/save_to_file/path": "", +"slice_225/start_frame": 0, +"slice_226/end_frame": 0, +"slice_226/loop_mode": 0, +"slice_226/name": "", +"slice_226/save_to_file/enabled": false, +"slice_226/save_to_file/keep_custom_tracks": false, +"slice_226/save_to_file/path": "", +"slice_226/start_frame": 0, +"slice_227/end_frame": 0, +"slice_227/loop_mode": 0, +"slice_227/name": "", +"slice_227/save_to_file/enabled": false, +"slice_227/save_to_file/keep_custom_tracks": false, +"slice_227/save_to_file/path": "", +"slice_227/start_frame": 0, +"slice_228/end_frame": 0, +"slice_228/loop_mode": 0, +"slice_228/name": "", +"slice_228/save_to_file/enabled": false, +"slice_228/save_to_file/keep_custom_tracks": false, +"slice_228/save_to_file/path": "", +"slice_228/start_frame": 0, +"slice_229/end_frame": 0, +"slice_229/loop_mode": 0, +"slice_229/name": "", +"slice_229/save_to_file/enabled": false, +"slice_229/save_to_file/keep_custom_tracks": false, +"slice_229/save_to_file/path": "", +"slice_229/start_frame": 0, +"slice_23/end_frame": 0, +"slice_23/loop_mode": 0, +"slice_23/name": "", +"slice_23/save_to_file/enabled": false, +"slice_23/save_to_file/keep_custom_tracks": false, +"slice_23/save_to_file/path": "", +"slice_23/start_frame": 0, +"slice_230/end_frame": 0, +"slice_230/loop_mode": 0, +"slice_230/name": "", +"slice_230/save_to_file/enabled": false, +"slice_230/save_to_file/keep_custom_tracks": false, +"slice_230/save_to_file/path": "", +"slice_230/start_frame": 0, +"slice_231/end_frame": 0, +"slice_231/loop_mode": 0, +"slice_231/name": "", +"slice_231/save_to_file/enabled": false, +"slice_231/save_to_file/keep_custom_tracks": false, +"slice_231/save_to_file/path": "", +"slice_231/start_frame": 0, +"slice_232/end_frame": 0, +"slice_232/loop_mode": 0, +"slice_232/name": "", +"slice_232/save_to_file/enabled": false, +"slice_232/save_to_file/keep_custom_tracks": false, +"slice_232/save_to_file/path": "", +"slice_232/start_frame": 0, +"slice_233/end_frame": 0, +"slice_233/loop_mode": 0, +"slice_233/name": "", +"slice_233/save_to_file/enabled": false, +"slice_233/save_to_file/keep_custom_tracks": false, +"slice_233/save_to_file/path": "", +"slice_233/start_frame": 0, +"slice_234/end_frame": 0, +"slice_234/loop_mode": 0, +"slice_234/name": "", +"slice_234/save_to_file/enabled": false, +"slice_234/save_to_file/keep_custom_tracks": false, +"slice_234/save_to_file/path": "", +"slice_234/start_frame": 0, +"slice_235/end_frame": 0, +"slice_235/loop_mode": 0, +"slice_235/name": "", +"slice_235/save_to_file/enabled": false, +"slice_235/save_to_file/keep_custom_tracks": false, +"slice_235/save_to_file/path": "", +"slice_235/start_frame": 0, +"slice_236/end_frame": 0, +"slice_236/loop_mode": 0, +"slice_236/name": "", +"slice_236/save_to_file/enabled": false, +"slice_236/save_to_file/keep_custom_tracks": false, +"slice_236/save_to_file/path": "", +"slice_236/start_frame": 0, +"slice_237/end_frame": 0, +"slice_237/loop_mode": 0, +"slice_237/name": "", +"slice_237/save_to_file/enabled": false, +"slice_237/save_to_file/keep_custom_tracks": false, +"slice_237/save_to_file/path": "", +"slice_237/start_frame": 0, +"slice_238/end_frame": 0, +"slice_238/loop_mode": 0, +"slice_238/name": "", +"slice_238/save_to_file/enabled": false, +"slice_238/save_to_file/keep_custom_tracks": false, +"slice_238/save_to_file/path": "", +"slice_238/start_frame": 0, +"slice_239/end_frame": 0, +"slice_239/loop_mode": 0, +"slice_239/name": "", +"slice_239/save_to_file/enabled": false, +"slice_239/save_to_file/keep_custom_tracks": false, +"slice_239/save_to_file/path": "", +"slice_239/start_frame": 0, +"slice_24/end_frame": 0, +"slice_24/loop_mode": 0, +"slice_24/name": "", +"slice_24/save_to_file/enabled": false, +"slice_24/save_to_file/keep_custom_tracks": false, +"slice_24/save_to_file/path": "", +"slice_24/start_frame": 0, +"slice_240/end_frame": 0, +"slice_240/loop_mode": 0, +"slice_240/name": "", +"slice_240/save_to_file/enabled": false, +"slice_240/save_to_file/keep_custom_tracks": false, +"slice_240/save_to_file/path": "", +"slice_240/start_frame": 0, +"slice_241/end_frame": 0, +"slice_241/loop_mode": 0, +"slice_241/name": "", +"slice_241/save_to_file/enabled": false, +"slice_241/save_to_file/keep_custom_tracks": false, +"slice_241/save_to_file/path": "", +"slice_241/start_frame": 0, +"slice_242/end_frame": 0, +"slice_242/loop_mode": 0, +"slice_242/name": "", +"slice_242/save_to_file/enabled": false, +"slice_242/save_to_file/keep_custom_tracks": false, +"slice_242/save_to_file/path": "", +"slice_242/start_frame": 0, +"slice_243/end_frame": 0, +"slice_243/loop_mode": 0, +"slice_243/name": "", +"slice_243/save_to_file/enabled": false, +"slice_243/save_to_file/keep_custom_tracks": false, +"slice_243/save_to_file/path": "", +"slice_243/start_frame": 0, +"slice_244/end_frame": 0, +"slice_244/loop_mode": 0, +"slice_244/name": "", +"slice_244/save_to_file/enabled": false, +"slice_244/save_to_file/keep_custom_tracks": false, +"slice_244/save_to_file/path": "", +"slice_244/start_frame": 0, +"slice_245/end_frame": 0, +"slice_245/loop_mode": 0, +"slice_245/name": "", +"slice_245/save_to_file/enabled": false, +"slice_245/save_to_file/keep_custom_tracks": false, +"slice_245/save_to_file/path": "", +"slice_245/start_frame": 0, +"slice_246/end_frame": 0, +"slice_246/loop_mode": 0, +"slice_246/name": "", +"slice_246/save_to_file/enabled": false, +"slice_246/save_to_file/keep_custom_tracks": false, +"slice_246/save_to_file/path": "", +"slice_246/start_frame": 0, +"slice_247/end_frame": 0, +"slice_247/loop_mode": 0, +"slice_247/name": "", +"slice_247/save_to_file/enabled": false, +"slice_247/save_to_file/keep_custom_tracks": false, +"slice_247/save_to_file/path": "", +"slice_247/start_frame": 0, +"slice_248/end_frame": 0, +"slice_248/loop_mode": 0, +"slice_248/name": "", +"slice_248/save_to_file/enabled": false, +"slice_248/save_to_file/keep_custom_tracks": false, +"slice_248/save_to_file/path": "", +"slice_248/start_frame": 0, +"slice_249/end_frame": 0, +"slice_249/loop_mode": 0, +"slice_249/name": "", +"slice_249/save_to_file/enabled": false, +"slice_249/save_to_file/keep_custom_tracks": false, +"slice_249/save_to_file/path": "", +"slice_249/start_frame": 0, +"slice_25/end_frame": 0, +"slice_25/loop_mode": 0, +"slice_25/name": "", +"slice_25/save_to_file/enabled": false, +"slice_25/save_to_file/keep_custom_tracks": false, +"slice_25/save_to_file/path": "", +"slice_25/start_frame": 0, +"slice_250/end_frame": 0, +"slice_250/loop_mode": 0, +"slice_250/name": "", +"slice_250/save_to_file/enabled": false, +"slice_250/save_to_file/keep_custom_tracks": false, +"slice_250/save_to_file/path": "", +"slice_250/start_frame": 0, +"slice_251/end_frame": 0, +"slice_251/loop_mode": 0, +"slice_251/name": "", +"slice_251/save_to_file/enabled": false, +"slice_251/save_to_file/keep_custom_tracks": false, +"slice_251/save_to_file/path": "", +"slice_251/start_frame": 0, +"slice_252/end_frame": 0, +"slice_252/loop_mode": 0, +"slice_252/name": "", +"slice_252/save_to_file/enabled": false, +"slice_252/save_to_file/keep_custom_tracks": false, +"slice_252/save_to_file/path": "", +"slice_252/start_frame": 0, +"slice_253/end_frame": 0, +"slice_253/loop_mode": 0, +"slice_253/name": "", +"slice_253/save_to_file/enabled": false, +"slice_253/save_to_file/keep_custom_tracks": false, +"slice_253/save_to_file/path": "", +"slice_253/start_frame": 0, +"slice_254/end_frame": 0, +"slice_254/loop_mode": 0, +"slice_254/name": "", +"slice_254/save_to_file/enabled": false, +"slice_254/save_to_file/keep_custom_tracks": false, +"slice_254/save_to_file/path": "", +"slice_254/start_frame": 0, +"slice_255/end_frame": 0, +"slice_255/loop_mode": 0, +"slice_255/name": "", +"slice_255/save_to_file/enabled": false, +"slice_255/save_to_file/keep_custom_tracks": false, +"slice_255/save_to_file/path": "", +"slice_255/start_frame": 0, +"slice_256/end_frame": 0, +"slice_256/loop_mode": 0, +"slice_256/name": "", +"slice_256/save_to_file/enabled": false, +"slice_256/save_to_file/keep_custom_tracks": false, +"slice_256/save_to_file/path": "", +"slice_256/start_frame": 0, +"slice_26/end_frame": 0, +"slice_26/loop_mode": 0, +"slice_26/name": "", +"slice_26/save_to_file/enabled": false, +"slice_26/save_to_file/keep_custom_tracks": false, +"slice_26/save_to_file/path": "", +"slice_26/start_frame": 0, +"slice_27/end_frame": 0, +"slice_27/loop_mode": 0, +"slice_27/name": "", +"slice_27/save_to_file/enabled": false, +"slice_27/save_to_file/keep_custom_tracks": false, +"slice_27/save_to_file/path": "", +"slice_27/start_frame": 0, +"slice_28/end_frame": 0, +"slice_28/loop_mode": 0, +"slice_28/name": "", +"slice_28/save_to_file/enabled": false, +"slice_28/save_to_file/keep_custom_tracks": false, +"slice_28/save_to_file/path": "", +"slice_28/start_frame": 0, +"slice_29/end_frame": 0, +"slice_29/loop_mode": 0, +"slice_29/name": "", +"slice_29/save_to_file/enabled": false, +"slice_29/save_to_file/keep_custom_tracks": false, +"slice_29/save_to_file/path": "", +"slice_29/start_frame": 0, +"slice_3/end_frame": 0, +"slice_3/loop_mode": 0, +"slice_3/name": "", +"slice_3/save_to_file/enabled": false, +"slice_3/save_to_file/keep_custom_tracks": false, +"slice_3/save_to_file/path": "", +"slice_3/start_frame": 0, +"slice_30/end_frame": 0, +"slice_30/loop_mode": 0, +"slice_30/name": "", +"slice_30/save_to_file/enabled": false, +"slice_30/save_to_file/keep_custom_tracks": false, +"slice_30/save_to_file/path": "", +"slice_30/start_frame": 0, +"slice_31/end_frame": 0, +"slice_31/loop_mode": 0, +"slice_31/name": "", +"slice_31/save_to_file/enabled": false, +"slice_31/save_to_file/keep_custom_tracks": false, +"slice_31/save_to_file/path": "", +"slice_31/start_frame": 0, +"slice_32/end_frame": 0, +"slice_32/loop_mode": 0, +"slice_32/name": "", +"slice_32/save_to_file/enabled": false, +"slice_32/save_to_file/keep_custom_tracks": false, +"slice_32/save_to_file/path": "", +"slice_32/start_frame": 0, +"slice_33/end_frame": 0, +"slice_33/loop_mode": 0, +"slice_33/name": "", +"slice_33/save_to_file/enabled": false, +"slice_33/save_to_file/keep_custom_tracks": false, +"slice_33/save_to_file/path": "", +"slice_33/start_frame": 0, +"slice_34/end_frame": 0, +"slice_34/loop_mode": 0, +"slice_34/name": "", +"slice_34/save_to_file/enabled": false, +"slice_34/save_to_file/keep_custom_tracks": false, +"slice_34/save_to_file/path": "", +"slice_34/start_frame": 0, +"slice_35/end_frame": 0, +"slice_35/loop_mode": 0, +"slice_35/name": "", +"slice_35/save_to_file/enabled": false, +"slice_35/save_to_file/keep_custom_tracks": false, +"slice_35/save_to_file/path": "", +"slice_35/start_frame": 0, +"slice_36/end_frame": 0, +"slice_36/loop_mode": 0, +"slice_36/name": "", +"slice_36/save_to_file/enabled": false, +"slice_36/save_to_file/keep_custom_tracks": false, +"slice_36/save_to_file/path": "", +"slice_36/start_frame": 0, +"slice_37/end_frame": 0, +"slice_37/loop_mode": 0, +"slice_37/name": "", +"slice_37/save_to_file/enabled": false, +"slice_37/save_to_file/keep_custom_tracks": false, +"slice_37/save_to_file/path": "", +"slice_37/start_frame": 0, +"slice_38/end_frame": 0, +"slice_38/loop_mode": 0, +"slice_38/name": "", +"slice_38/save_to_file/enabled": false, +"slice_38/save_to_file/keep_custom_tracks": false, +"slice_38/save_to_file/path": "", +"slice_38/start_frame": 0, +"slice_39/end_frame": 0, +"slice_39/loop_mode": 0, +"slice_39/name": "", +"slice_39/save_to_file/enabled": false, +"slice_39/save_to_file/keep_custom_tracks": false, +"slice_39/save_to_file/path": "", +"slice_39/start_frame": 0, +"slice_4/end_frame": 0, +"slice_4/loop_mode": 0, +"slice_4/name": "", +"slice_4/save_to_file/enabled": false, +"slice_4/save_to_file/keep_custom_tracks": false, +"slice_4/save_to_file/path": "", +"slice_4/start_frame": 0, +"slice_40/end_frame": 0, +"slice_40/loop_mode": 0, +"slice_40/name": "", +"slice_40/save_to_file/enabled": false, +"slice_40/save_to_file/keep_custom_tracks": false, +"slice_40/save_to_file/path": "", +"slice_40/start_frame": 0, +"slice_41/end_frame": 0, +"slice_41/loop_mode": 0, +"slice_41/name": "", +"slice_41/save_to_file/enabled": false, +"slice_41/save_to_file/keep_custom_tracks": false, +"slice_41/save_to_file/path": "", +"slice_41/start_frame": 0, +"slice_42/end_frame": 0, +"slice_42/loop_mode": 0, +"slice_42/name": "", +"slice_42/save_to_file/enabled": false, +"slice_42/save_to_file/keep_custom_tracks": false, +"slice_42/save_to_file/path": "", +"slice_42/start_frame": 0, +"slice_43/end_frame": 0, +"slice_43/loop_mode": 0, +"slice_43/name": "", +"slice_43/save_to_file/enabled": false, +"slice_43/save_to_file/keep_custom_tracks": false, +"slice_43/save_to_file/path": "", +"slice_43/start_frame": 0, +"slice_44/end_frame": 0, +"slice_44/loop_mode": 0, +"slice_44/name": "", +"slice_44/save_to_file/enabled": false, +"slice_44/save_to_file/keep_custom_tracks": false, +"slice_44/save_to_file/path": "", +"slice_44/start_frame": 0, +"slice_45/end_frame": 0, +"slice_45/loop_mode": 0, +"slice_45/name": "", +"slice_45/save_to_file/enabled": false, +"slice_45/save_to_file/keep_custom_tracks": false, +"slice_45/save_to_file/path": "", +"slice_45/start_frame": 0, +"slice_46/end_frame": 0, +"slice_46/loop_mode": 0, +"slice_46/name": "", +"slice_46/save_to_file/enabled": false, +"slice_46/save_to_file/keep_custom_tracks": false, +"slice_46/save_to_file/path": "", +"slice_46/start_frame": 0, +"slice_47/end_frame": 0, +"slice_47/loop_mode": 0, +"slice_47/name": "", +"slice_47/save_to_file/enabled": false, +"slice_47/save_to_file/keep_custom_tracks": false, +"slice_47/save_to_file/path": "", +"slice_47/start_frame": 0, +"slice_48/end_frame": 0, +"slice_48/loop_mode": 0, +"slice_48/name": "", +"slice_48/save_to_file/enabled": false, +"slice_48/save_to_file/keep_custom_tracks": false, +"slice_48/save_to_file/path": "", +"slice_48/start_frame": 0, +"slice_49/end_frame": 0, +"slice_49/loop_mode": 0, +"slice_49/name": "", +"slice_49/save_to_file/enabled": false, +"slice_49/save_to_file/keep_custom_tracks": false, +"slice_49/save_to_file/path": "", +"slice_49/start_frame": 0, +"slice_5/end_frame": 0, +"slice_5/loop_mode": 0, +"slice_5/name": "", +"slice_5/save_to_file/enabled": false, +"slice_5/save_to_file/keep_custom_tracks": false, +"slice_5/save_to_file/path": "", +"slice_5/start_frame": 0, +"slice_50/end_frame": 0, +"slice_50/loop_mode": 0, +"slice_50/name": "", +"slice_50/save_to_file/enabled": false, +"slice_50/save_to_file/keep_custom_tracks": false, +"slice_50/save_to_file/path": "", +"slice_50/start_frame": 0, +"slice_51/end_frame": 0, +"slice_51/loop_mode": 0, +"slice_51/name": "", +"slice_51/save_to_file/enabled": false, +"slice_51/save_to_file/keep_custom_tracks": false, +"slice_51/save_to_file/path": "", +"slice_51/start_frame": 0, +"slice_52/end_frame": 0, +"slice_52/loop_mode": 0, +"slice_52/name": "", +"slice_52/save_to_file/enabled": false, +"slice_52/save_to_file/keep_custom_tracks": false, +"slice_52/save_to_file/path": "", +"slice_52/start_frame": 0, +"slice_53/end_frame": 0, +"slice_53/loop_mode": 0, +"slice_53/name": "", +"slice_53/save_to_file/enabled": false, +"slice_53/save_to_file/keep_custom_tracks": false, +"slice_53/save_to_file/path": "", +"slice_53/start_frame": 0, +"slice_54/end_frame": 0, +"slice_54/loop_mode": 0, +"slice_54/name": "", +"slice_54/save_to_file/enabled": false, +"slice_54/save_to_file/keep_custom_tracks": false, +"slice_54/save_to_file/path": "", +"slice_54/start_frame": 0, +"slice_55/end_frame": 0, +"slice_55/loop_mode": 0, +"slice_55/name": "", +"slice_55/save_to_file/enabled": false, +"slice_55/save_to_file/keep_custom_tracks": false, +"slice_55/save_to_file/path": "", +"slice_55/start_frame": 0, +"slice_56/end_frame": 0, +"slice_56/loop_mode": 0, +"slice_56/name": "", +"slice_56/save_to_file/enabled": false, +"slice_56/save_to_file/keep_custom_tracks": false, +"slice_56/save_to_file/path": "", +"slice_56/start_frame": 0, +"slice_57/end_frame": 0, +"slice_57/loop_mode": 0, +"slice_57/name": "", +"slice_57/save_to_file/enabled": false, +"slice_57/save_to_file/keep_custom_tracks": false, +"slice_57/save_to_file/path": "", +"slice_57/start_frame": 0, +"slice_58/end_frame": 0, +"slice_58/loop_mode": 0, +"slice_58/name": "", +"slice_58/save_to_file/enabled": false, +"slice_58/save_to_file/keep_custom_tracks": false, +"slice_58/save_to_file/path": "", +"slice_58/start_frame": 0, +"slice_59/end_frame": 0, +"slice_59/loop_mode": 0, +"slice_59/name": "", +"slice_59/save_to_file/enabled": false, +"slice_59/save_to_file/keep_custom_tracks": false, +"slice_59/save_to_file/path": "", +"slice_59/start_frame": 0, +"slice_6/end_frame": 0, +"slice_6/loop_mode": 0, +"slice_6/name": "", +"slice_6/save_to_file/enabled": false, +"slice_6/save_to_file/keep_custom_tracks": false, +"slice_6/save_to_file/path": "", +"slice_6/start_frame": 0, +"slice_60/end_frame": 0, +"slice_60/loop_mode": 0, +"slice_60/name": "", +"slice_60/save_to_file/enabled": false, +"slice_60/save_to_file/keep_custom_tracks": false, +"slice_60/save_to_file/path": "", +"slice_60/start_frame": 0, +"slice_61/end_frame": 0, +"slice_61/loop_mode": 0, +"slice_61/name": "", +"slice_61/save_to_file/enabled": false, +"slice_61/save_to_file/keep_custom_tracks": false, +"slice_61/save_to_file/path": "", +"slice_61/start_frame": 0, +"slice_62/end_frame": 0, +"slice_62/loop_mode": 0, +"slice_62/name": "", +"slice_62/save_to_file/enabled": false, +"slice_62/save_to_file/keep_custom_tracks": false, +"slice_62/save_to_file/path": "", +"slice_62/start_frame": 0, +"slice_63/end_frame": 0, +"slice_63/loop_mode": 0, +"slice_63/name": "", +"slice_63/save_to_file/enabled": false, +"slice_63/save_to_file/keep_custom_tracks": false, +"slice_63/save_to_file/path": "", +"slice_63/start_frame": 0, +"slice_64/end_frame": 0, +"slice_64/loop_mode": 0, +"slice_64/name": "", +"slice_64/save_to_file/enabled": false, +"slice_64/save_to_file/keep_custom_tracks": false, +"slice_64/save_to_file/path": "", +"slice_64/start_frame": 0, +"slice_65/end_frame": 0, +"slice_65/loop_mode": 0, +"slice_65/name": "", +"slice_65/save_to_file/enabled": false, +"slice_65/save_to_file/keep_custom_tracks": false, +"slice_65/save_to_file/path": "", +"slice_65/start_frame": 0, +"slice_66/end_frame": 0, +"slice_66/loop_mode": 0, +"slice_66/name": "", +"slice_66/save_to_file/enabled": false, +"slice_66/save_to_file/keep_custom_tracks": false, +"slice_66/save_to_file/path": "", +"slice_66/start_frame": 0, +"slice_67/end_frame": 0, +"slice_67/loop_mode": 0, +"slice_67/name": "", +"slice_67/save_to_file/enabled": false, +"slice_67/save_to_file/keep_custom_tracks": false, +"slice_67/save_to_file/path": "", +"slice_67/start_frame": 0, +"slice_68/end_frame": 0, +"slice_68/loop_mode": 0, +"slice_68/name": "", +"slice_68/save_to_file/enabled": false, +"slice_68/save_to_file/keep_custom_tracks": false, +"slice_68/save_to_file/path": "", +"slice_68/start_frame": 0, +"slice_69/end_frame": 0, +"slice_69/loop_mode": 0, +"slice_69/name": "", +"slice_69/save_to_file/enabled": false, +"slice_69/save_to_file/keep_custom_tracks": false, +"slice_69/save_to_file/path": "", +"slice_69/start_frame": 0, +"slice_7/end_frame": 0, +"slice_7/loop_mode": 0, +"slice_7/name": "", +"slice_7/save_to_file/enabled": false, +"slice_7/save_to_file/keep_custom_tracks": false, +"slice_7/save_to_file/path": "", +"slice_7/start_frame": 0, +"slice_70/end_frame": 0, +"slice_70/loop_mode": 0, +"slice_70/name": "", +"slice_70/save_to_file/enabled": false, +"slice_70/save_to_file/keep_custom_tracks": false, +"slice_70/save_to_file/path": "", +"slice_70/start_frame": 0, +"slice_71/end_frame": 0, +"slice_71/loop_mode": 0, +"slice_71/name": "", +"slice_71/save_to_file/enabled": false, +"slice_71/save_to_file/keep_custom_tracks": false, +"slice_71/save_to_file/path": "", +"slice_71/start_frame": 0, +"slice_72/end_frame": 0, +"slice_72/loop_mode": 0, +"slice_72/name": "", +"slice_72/save_to_file/enabled": false, +"slice_72/save_to_file/keep_custom_tracks": false, +"slice_72/save_to_file/path": "", +"slice_72/start_frame": 0, +"slice_73/end_frame": 0, +"slice_73/loop_mode": 0, +"slice_73/name": "", +"slice_73/save_to_file/enabled": false, +"slice_73/save_to_file/keep_custom_tracks": false, +"slice_73/save_to_file/path": "", +"slice_73/start_frame": 0, +"slice_74/end_frame": 0, +"slice_74/loop_mode": 0, +"slice_74/name": "", +"slice_74/save_to_file/enabled": false, +"slice_74/save_to_file/keep_custom_tracks": false, +"slice_74/save_to_file/path": "", +"slice_74/start_frame": 0, +"slice_75/end_frame": 0, +"slice_75/loop_mode": 0, +"slice_75/name": "", +"slice_75/save_to_file/enabled": false, +"slice_75/save_to_file/keep_custom_tracks": false, +"slice_75/save_to_file/path": "", +"slice_75/start_frame": 0, +"slice_76/end_frame": 0, +"slice_76/loop_mode": 0, +"slice_76/name": "", +"slice_76/save_to_file/enabled": false, +"slice_76/save_to_file/keep_custom_tracks": false, +"slice_76/save_to_file/path": "", +"slice_76/start_frame": 0, +"slice_77/end_frame": 0, +"slice_77/loop_mode": 0, +"slice_77/name": "", +"slice_77/save_to_file/enabled": false, +"slice_77/save_to_file/keep_custom_tracks": false, +"slice_77/save_to_file/path": "", +"slice_77/start_frame": 0, +"slice_78/end_frame": 0, +"slice_78/loop_mode": 0, +"slice_78/name": "", +"slice_78/save_to_file/enabled": false, +"slice_78/save_to_file/keep_custom_tracks": false, +"slice_78/save_to_file/path": "", +"slice_78/start_frame": 0, +"slice_79/end_frame": 0, +"slice_79/loop_mode": 0, +"slice_79/name": "", +"slice_79/save_to_file/enabled": false, +"slice_79/save_to_file/keep_custom_tracks": false, +"slice_79/save_to_file/path": "", +"slice_79/start_frame": 0, +"slice_8/end_frame": 0, +"slice_8/loop_mode": 0, +"slice_8/name": "", +"slice_8/save_to_file/enabled": false, +"slice_8/save_to_file/keep_custom_tracks": false, +"slice_8/save_to_file/path": "", +"slice_8/start_frame": 0, +"slice_80/end_frame": 0, +"slice_80/loop_mode": 0, +"slice_80/name": "", +"slice_80/save_to_file/enabled": false, +"slice_80/save_to_file/keep_custom_tracks": false, +"slice_80/save_to_file/path": "", +"slice_80/start_frame": 0, +"slice_81/end_frame": 0, +"slice_81/loop_mode": 0, +"slice_81/name": "", +"slice_81/save_to_file/enabled": false, +"slice_81/save_to_file/keep_custom_tracks": false, +"slice_81/save_to_file/path": "", +"slice_81/start_frame": 0, +"slice_82/end_frame": 0, +"slice_82/loop_mode": 0, +"slice_82/name": "", +"slice_82/save_to_file/enabled": false, +"slice_82/save_to_file/keep_custom_tracks": false, +"slice_82/save_to_file/path": "", +"slice_82/start_frame": 0, +"slice_83/end_frame": 0, +"slice_83/loop_mode": 0, +"slice_83/name": "", +"slice_83/save_to_file/enabled": false, +"slice_83/save_to_file/keep_custom_tracks": false, +"slice_83/save_to_file/path": "", +"slice_83/start_frame": 0, +"slice_84/end_frame": 0, +"slice_84/loop_mode": 0, +"slice_84/name": "", +"slice_84/save_to_file/enabled": false, +"slice_84/save_to_file/keep_custom_tracks": false, +"slice_84/save_to_file/path": "", +"slice_84/start_frame": 0, +"slice_85/end_frame": 0, +"slice_85/loop_mode": 0, +"slice_85/name": "", +"slice_85/save_to_file/enabled": false, +"slice_85/save_to_file/keep_custom_tracks": false, +"slice_85/save_to_file/path": "", +"slice_85/start_frame": 0, +"slice_86/end_frame": 0, +"slice_86/loop_mode": 0, +"slice_86/name": "", +"slice_86/save_to_file/enabled": false, +"slice_86/save_to_file/keep_custom_tracks": false, +"slice_86/save_to_file/path": "", +"slice_86/start_frame": 0, +"slice_87/end_frame": 0, +"slice_87/loop_mode": 0, +"slice_87/name": "", +"slice_87/save_to_file/enabled": false, +"slice_87/save_to_file/keep_custom_tracks": false, +"slice_87/save_to_file/path": "", +"slice_87/start_frame": 0, +"slice_88/end_frame": 0, +"slice_88/loop_mode": 0, +"slice_88/name": "", +"slice_88/save_to_file/enabled": false, +"slice_88/save_to_file/keep_custom_tracks": false, +"slice_88/save_to_file/path": "", +"slice_88/start_frame": 0, +"slice_89/end_frame": 0, +"slice_89/loop_mode": 0, +"slice_89/name": "", +"slice_89/save_to_file/enabled": false, +"slice_89/save_to_file/keep_custom_tracks": false, +"slice_89/save_to_file/path": "", +"slice_89/start_frame": 0, +"slice_9/end_frame": 0, +"slice_9/loop_mode": 0, +"slice_9/name": "", +"slice_9/save_to_file/enabled": false, +"slice_9/save_to_file/keep_custom_tracks": false, +"slice_9/save_to_file/path": "", +"slice_9/start_frame": 0, +"slice_90/end_frame": 0, +"slice_90/loop_mode": 0, +"slice_90/name": "", +"slice_90/save_to_file/enabled": false, +"slice_90/save_to_file/keep_custom_tracks": false, +"slice_90/save_to_file/path": "", +"slice_90/start_frame": 0, +"slice_91/end_frame": 0, +"slice_91/loop_mode": 0, +"slice_91/name": "", +"slice_91/save_to_file/enabled": false, +"slice_91/save_to_file/keep_custom_tracks": false, +"slice_91/save_to_file/path": "", +"slice_91/start_frame": 0, +"slice_92/end_frame": 0, +"slice_92/loop_mode": 0, +"slice_92/name": "", +"slice_92/save_to_file/enabled": false, +"slice_92/save_to_file/keep_custom_tracks": false, +"slice_92/save_to_file/path": "", +"slice_92/start_frame": 0, +"slice_93/end_frame": 0, +"slice_93/loop_mode": 0, +"slice_93/name": "", +"slice_93/save_to_file/enabled": false, +"slice_93/save_to_file/keep_custom_tracks": false, +"slice_93/save_to_file/path": "", +"slice_93/start_frame": 0, +"slice_94/end_frame": 0, +"slice_94/loop_mode": 0, +"slice_94/name": "", +"slice_94/save_to_file/enabled": false, +"slice_94/save_to_file/keep_custom_tracks": false, +"slice_94/save_to_file/path": "", +"slice_94/start_frame": 0, +"slice_95/end_frame": 0, +"slice_95/loop_mode": 0, +"slice_95/name": "", +"slice_95/save_to_file/enabled": false, +"slice_95/save_to_file/keep_custom_tracks": false, +"slice_95/save_to_file/path": "", +"slice_95/start_frame": 0, +"slice_96/end_frame": 0, +"slice_96/loop_mode": 0, +"slice_96/name": "", +"slice_96/save_to_file/enabled": false, +"slice_96/save_to_file/keep_custom_tracks": false, +"slice_96/save_to_file/path": "", +"slice_96/start_frame": 0, +"slice_97/end_frame": 0, +"slice_97/loop_mode": 0, +"slice_97/name": "", +"slice_97/save_to_file/enabled": false, +"slice_97/save_to_file/keep_custom_tracks": false, +"slice_97/save_to_file/path": "", +"slice_97/start_frame": 0, +"slice_98/end_frame": 0, +"slice_98/loop_mode": 0, +"slice_98/name": "", +"slice_98/save_to_file/enabled": false, +"slice_98/save_to_file/keep_custom_tracks": false, +"slice_98/save_to_file/path": "", +"slice_98/start_frame": 0, +"slice_99/end_frame": 0, +"slice_99/loop_mode": 0, +"slice_99/name": "", +"slice_99/save_to_file/enabled": false, +"slice_99/save_to_file/keep_custom_tracks": false, +"slice_99/save_to_file/path": "", +"slice_99/start_frame": 0, +"slices/amount": 0 +}, +"Walking": { +"save_to_file/enabled": false, +"save_to_file/keep_custom_tracks": "", +"save_to_file/path": "", +"settings/loop_mode": 1, +"slice_1/end_frame": 0, +"slice_1/loop_mode": 0, +"slice_1/name": "", +"slice_1/save_to_file/enabled": false, +"slice_1/save_to_file/keep_custom_tracks": false, +"slice_1/save_to_file/path": "", +"slice_1/start_frame": 0, +"slice_10/end_frame": 0, +"slice_10/loop_mode": 0, +"slice_10/name": "", +"slice_10/save_to_file/enabled": false, +"slice_10/save_to_file/keep_custom_tracks": false, +"slice_10/save_to_file/path": "", +"slice_10/start_frame": 0, +"slice_100/end_frame": 0, +"slice_100/loop_mode": 0, +"slice_100/name": "", +"slice_100/save_to_file/enabled": false, +"slice_100/save_to_file/keep_custom_tracks": false, +"slice_100/save_to_file/path": "", +"slice_100/start_frame": 0, +"slice_101/end_frame": 0, +"slice_101/loop_mode": 0, +"slice_101/name": "", +"slice_101/save_to_file/enabled": false, +"slice_101/save_to_file/keep_custom_tracks": false, +"slice_101/save_to_file/path": "", +"slice_101/start_frame": 0, +"slice_102/end_frame": 0, +"slice_102/loop_mode": 0, +"slice_102/name": "", +"slice_102/save_to_file/enabled": false, +"slice_102/save_to_file/keep_custom_tracks": false, +"slice_102/save_to_file/path": "", +"slice_102/start_frame": 0, +"slice_103/end_frame": 0, +"slice_103/loop_mode": 0, +"slice_103/name": "", +"slice_103/save_to_file/enabled": false, +"slice_103/save_to_file/keep_custom_tracks": false, +"slice_103/save_to_file/path": "", +"slice_103/start_frame": 0, +"slice_104/end_frame": 0, +"slice_104/loop_mode": 0, +"slice_104/name": "", +"slice_104/save_to_file/enabled": false, +"slice_104/save_to_file/keep_custom_tracks": false, +"slice_104/save_to_file/path": "", +"slice_104/start_frame": 0, +"slice_105/end_frame": 0, +"slice_105/loop_mode": 0, +"slice_105/name": "", +"slice_105/save_to_file/enabled": false, +"slice_105/save_to_file/keep_custom_tracks": false, +"slice_105/save_to_file/path": "", +"slice_105/start_frame": 0, +"slice_106/end_frame": 0, +"slice_106/loop_mode": 0, +"slice_106/name": "", +"slice_106/save_to_file/enabled": false, +"slice_106/save_to_file/keep_custom_tracks": false, +"slice_106/save_to_file/path": "", +"slice_106/start_frame": 0, +"slice_107/end_frame": 0, +"slice_107/loop_mode": 0, +"slice_107/name": "", +"slice_107/save_to_file/enabled": false, +"slice_107/save_to_file/keep_custom_tracks": false, +"slice_107/save_to_file/path": "", +"slice_107/start_frame": 0, +"slice_108/end_frame": 0, +"slice_108/loop_mode": 0, +"slice_108/name": "", +"slice_108/save_to_file/enabled": false, +"slice_108/save_to_file/keep_custom_tracks": false, +"slice_108/save_to_file/path": "", +"slice_108/start_frame": 0, +"slice_109/end_frame": 0, +"slice_109/loop_mode": 0, +"slice_109/name": "", +"slice_109/save_to_file/enabled": false, +"slice_109/save_to_file/keep_custom_tracks": false, +"slice_109/save_to_file/path": "", +"slice_109/start_frame": 0, +"slice_11/end_frame": 0, +"slice_11/loop_mode": 0, +"slice_11/name": "", +"slice_11/save_to_file/enabled": false, +"slice_11/save_to_file/keep_custom_tracks": false, +"slice_11/save_to_file/path": "", +"slice_11/start_frame": 0, +"slice_110/end_frame": 0, +"slice_110/loop_mode": 0, +"slice_110/name": "", +"slice_110/save_to_file/enabled": false, +"slice_110/save_to_file/keep_custom_tracks": false, +"slice_110/save_to_file/path": "", +"slice_110/start_frame": 0, +"slice_111/end_frame": 0, +"slice_111/loop_mode": 0, +"slice_111/name": "", +"slice_111/save_to_file/enabled": false, +"slice_111/save_to_file/keep_custom_tracks": false, +"slice_111/save_to_file/path": "", +"slice_111/start_frame": 0, +"slice_112/end_frame": 0, +"slice_112/loop_mode": 0, +"slice_112/name": "", +"slice_112/save_to_file/enabled": false, +"slice_112/save_to_file/keep_custom_tracks": false, +"slice_112/save_to_file/path": "", +"slice_112/start_frame": 0, +"slice_113/end_frame": 0, +"slice_113/loop_mode": 0, +"slice_113/name": "", +"slice_113/save_to_file/enabled": false, +"slice_113/save_to_file/keep_custom_tracks": false, +"slice_113/save_to_file/path": "", +"slice_113/start_frame": 0, +"slice_114/end_frame": 0, +"slice_114/loop_mode": 0, +"slice_114/name": "", +"slice_114/save_to_file/enabled": false, +"slice_114/save_to_file/keep_custom_tracks": false, +"slice_114/save_to_file/path": "", +"slice_114/start_frame": 0, +"slice_115/end_frame": 0, +"slice_115/loop_mode": 0, +"slice_115/name": "", +"slice_115/save_to_file/enabled": false, +"slice_115/save_to_file/keep_custom_tracks": false, +"slice_115/save_to_file/path": "", +"slice_115/start_frame": 0, +"slice_116/end_frame": 0, +"slice_116/loop_mode": 0, +"slice_116/name": "", +"slice_116/save_to_file/enabled": false, +"slice_116/save_to_file/keep_custom_tracks": false, +"slice_116/save_to_file/path": "", +"slice_116/start_frame": 0, +"slice_117/end_frame": 0, +"slice_117/loop_mode": 0, +"slice_117/name": "", +"slice_117/save_to_file/enabled": false, +"slice_117/save_to_file/keep_custom_tracks": false, +"slice_117/save_to_file/path": "", +"slice_117/start_frame": 0, +"slice_118/end_frame": 0, +"slice_118/loop_mode": 0, +"slice_118/name": "", +"slice_118/save_to_file/enabled": false, +"slice_118/save_to_file/keep_custom_tracks": false, +"slice_118/save_to_file/path": "", +"slice_118/start_frame": 0, +"slice_119/end_frame": 0, +"slice_119/loop_mode": 0, +"slice_119/name": "", +"slice_119/save_to_file/enabled": false, +"slice_119/save_to_file/keep_custom_tracks": false, +"slice_119/save_to_file/path": "", +"slice_119/start_frame": 0, +"slice_12/end_frame": 0, +"slice_12/loop_mode": 0, +"slice_12/name": "", +"slice_12/save_to_file/enabled": false, +"slice_12/save_to_file/keep_custom_tracks": false, +"slice_12/save_to_file/path": "", +"slice_12/start_frame": 0, +"slice_120/end_frame": 0, +"slice_120/loop_mode": 0, +"slice_120/name": "", +"slice_120/save_to_file/enabled": false, +"slice_120/save_to_file/keep_custom_tracks": false, +"slice_120/save_to_file/path": "", +"slice_120/start_frame": 0, +"slice_121/end_frame": 0, +"slice_121/loop_mode": 0, +"slice_121/name": "", +"slice_121/save_to_file/enabled": false, +"slice_121/save_to_file/keep_custom_tracks": false, +"slice_121/save_to_file/path": "", +"slice_121/start_frame": 0, +"slice_122/end_frame": 0, +"slice_122/loop_mode": 0, +"slice_122/name": "", +"slice_122/save_to_file/enabled": false, +"slice_122/save_to_file/keep_custom_tracks": false, +"slice_122/save_to_file/path": "", +"slice_122/start_frame": 0, +"slice_123/end_frame": 0, +"slice_123/loop_mode": 0, +"slice_123/name": "", +"slice_123/save_to_file/enabled": false, +"slice_123/save_to_file/keep_custom_tracks": false, +"slice_123/save_to_file/path": "", +"slice_123/start_frame": 0, +"slice_124/end_frame": 0, +"slice_124/loop_mode": 0, +"slice_124/name": "", +"slice_124/save_to_file/enabled": false, +"slice_124/save_to_file/keep_custom_tracks": false, +"slice_124/save_to_file/path": "", +"slice_124/start_frame": 0, +"slice_125/end_frame": 0, +"slice_125/loop_mode": 0, +"slice_125/name": "", +"slice_125/save_to_file/enabled": false, +"slice_125/save_to_file/keep_custom_tracks": false, +"slice_125/save_to_file/path": "", +"slice_125/start_frame": 0, +"slice_126/end_frame": 0, +"slice_126/loop_mode": 0, +"slice_126/name": "", +"slice_126/save_to_file/enabled": false, +"slice_126/save_to_file/keep_custom_tracks": false, +"slice_126/save_to_file/path": "", +"slice_126/start_frame": 0, +"slice_127/end_frame": 0, +"slice_127/loop_mode": 0, +"slice_127/name": "", +"slice_127/save_to_file/enabled": false, +"slice_127/save_to_file/keep_custom_tracks": false, +"slice_127/save_to_file/path": "", +"slice_127/start_frame": 0, +"slice_128/end_frame": 0, +"slice_128/loop_mode": 0, +"slice_128/name": "", +"slice_128/save_to_file/enabled": false, +"slice_128/save_to_file/keep_custom_tracks": false, +"slice_128/save_to_file/path": "", +"slice_128/start_frame": 0, +"slice_129/end_frame": 0, +"slice_129/loop_mode": 0, +"slice_129/name": "", +"slice_129/save_to_file/enabled": false, +"slice_129/save_to_file/keep_custom_tracks": false, +"slice_129/save_to_file/path": "", +"slice_129/start_frame": 0, +"slice_13/end_frame": 0, +"slice_13/loop_mode": 0, +"slice_13/name": "", +"slice_13/save_to_file/enabled": false, +"slice_13/save_to_file/keep_custom_tracks": false, +"slice_13/save_to_file/path": "", +"slice_13/start_frame": 0, +"slice_130/end_frame": 0, +"slice_130/loop_mode": 0, +"slice_130/name": "", +"slice_130/save_to_file/enabled": false, +"slice_130/save_to_file/keep_custom_tracks": false, +"slice_130/save_to_file/path": "", +"slice_130/start_frame": 0, +"slice_131/end_frame": 0, +"slice_131/loop_mode": 0, +"slice_131/name": "", +"slice_131/save_to_file/enabled": false, +"slice_131/save_to_file/keep_custom_tracks": false, +"slice_131/save_to_file/path": "", +"slice_131/start_frame": 0, +"slice_132/end_frame": 0, +"slice_132/loop_mode": 0, +"slice_132/name": "", +"slice_132/save_to_file/enabled": false, +"slice_132/save_to_file/keep_custom_tracks": false, +"slice_132/save_to_file/path": "", +"slice_132/start_frame": 0, +"slice_133/end_frame": 0, +"slice_133/loop_mode": 0, +"slice_133/name": "", +"slice_133/save_to_file/enabled": false, +"slice_133/save_to_file/keep_custom_tracks": false, +"slice_133/save_to_file/path": "", +"slice_133/start_frame": 0, +"slice_134/end_frame": 0, +"slice_134/loop_mode": 0, +"slice_134/name": "", +"slice_134/save_to_file/enabled": false, +"slice_134/save_to_file/keep_custom_tracks": false, +"slice_134/save_to_file/path": "", +"slice_134/start_frame": 0, +"slice_135/end_frame": 0, +"slice_135/loop_mode": 0, +"slice_135/name": "", +"slice_135/save_to_file/enabled": false, +"slice_135/save_to_file/keep_custom_tracks": false, +"slice_135/save_to_file/path": "", +"slice_135/start_frame": 0, +"slice_136/end_frame": 0, +"slice_136/loop_mode": 0, +"slice_136/name": "", +"slice_136/save_to_file/enabled": false, +"slice_136/save_to_file/keep_custom_tracks": false, +"slice_136/save_to_file/path": "", +"slice_136/start_frame": 0, +"slice_137/end_frame": 0, +"slice_137/loop_mode": 0, +"slice_137/name": "", +"slice_137/save_to_file/enabled": false, +"slice_137/save_to_file/keep_custom_tracks": false, +"slice_137/save_to_file/path": "", +"slice_137/start_frame": 0, +"slice_138/end_frame": 0, +"slice_138/loop_mode": 0, +"slice_138/name": "", +"slice_138/save_to_file/enabled": false, +"slice_138/save_to_file/keep_custom_tracks": false, +"slice_138/save_to_file/path": "", +"slice_138/start_frame": 0, +"slice_139/end_frame": 0, +"slice_139/loop_mode": 0, +"slice_139/name": "", +"slice_139/save_to_file/enabled": false, +"slice_139/save_to_file/keep_custom_tracks": false, +"slice_139/save_to_file/path": "", +"slice_139/start_frame": 0, +"slice_14/end_frame": 0, +"slice_14/loop_mode": 0, +"slice_14/name": "", +"slice_14/save_to_file/enabled": false, +"slice_14/save_to_file/keep_custom_tracks": false, +"slice_14/save_to_file/path": "", +"slice_14/start_frame": 0, +"slice_140/end_frame": 0, +"slice_140/loop_mode": 0, +"slice_140/name": "", +"slice_140/save_to_file/enabled": false, +"slice_140/save_to_file/keep_custom_tracks": false, +"slice_140/save_to_file/path": "", +"slice_140/start_frame": 0, +"slice_141/end_frame": 0, +"slice_141/loop_mode": 0, +"slice_141/name": "", +"slice_141/save_to_file/enabled": false, +"slice_141/save_to_file/keep_custom_tracks": false, +"slice_141/save_to_file/path": "", +"slice_141/start_frame": 0, +"slice_142/end_frame": 0, +"slice_142/loop_mode": 0, +"slice_142/name": "", +"slice_142/save_to_file/enabled": false, +"slice_142/save_to_file/keep_custom_tracks": false, +"slice_142/save_to_file/path": "", +"slice_142/start_frame": 0, +"slice_143/end_frame": 0, +"slice_143/loop_mode": 0, +"slice_143/name": "", +"slice_143/save_to_file/enabled": false, +"slice_143/save_to_file/keep_custom_tracks": false, +"slice_143/save_to_file/path": "", +"slice_143/start_frame": 0, +"slice_144/end_frame": 0, +"slice_144/loop_mode": 0, +"slice_144/name": "", +"slice_144/save_to_file/enabled": false, +"slice_144/save_to_file/keep_custom_tracks": false, +"slice_144/save_to_file/path": "", +"slice_144/start_frame": 0, +"slice_145/end_frame": 0, +"slice_145/loop_mode": 0, +"slice_145/name": "", +"slice_145/save_to_file/enabled": false, +"slice_145/save_to_file/keep_custom_tracks": false, +"slice_145/save_to_file/path": "", +"slice_145/start_frame": 0, +"slice_146/end_frame": 0, +"slice_146/loop_mode": 0, +"slice_146/name": "", +"slice_146/save_to_file/enabled": false, +"slice_146/save_to_file/keep_custom_tracks": false, +"slice_146/save_to_file/path": "", +"slice_146/start_frame": 0, +"slice_147/end_frame": 0, +"slice_147/loop_mode": 0, +"slice_147/name": "", +"slice_147/save_to_file/enabled": false, +"slice_147/save_to_file/keep_custom_tracks": false, +"slice_147/save_to_file/path": "", +"slice_147/start_frame": 0, +"slice_148/end_frame": 0, +"slice_148/loop_mode": 0, +"slice_148/name": "", +"slice_148/save_to_file/enabled": false, +"slice_148/save_to_file/keep_custom_tracks": false, +"slice_148/save_to_file/path": "", +"slice_148/start_frame": 0, +"slice_149/end_frame": 0, +"slice_149/loop_mode": 0, +"slice_149/name": "", +"slice_149/save_to_file/enabled": false, +"slice_149/save_to_file/keep_custom_tracks": false, +"slice_149/save_to_file/path": "", +"slice_149/start_frame": 0, +"slice_15/end_frame": 0, +"slice_15/loop_mode": 0, +"slice_15/name": "", +"slice_15/save_to_file/enabled": false, +"slice_15/save_to_file/keep_custom_tracks": false, +"slice_15/save_to_file/path": "", +"slice_15/start_frame": 0, +"slice_150/end_frame": 0, +"slice_150/loop_mode": 0, +"slice_150/name": "", +"slice_150/save_to_file/enabled": false, +"slice_150/save_to_file/keep_custom_tracks": false, +"slice_150/save_to_file/path": "", +"slice_150/start_frame": 0, +"slice_151/end_frame": 0, +"slice_151/loop_mode": 0, +"slice_151/name": "", +"slice_151/save_to_file/enabled": false, +"slice_151/save_to_file/keep_custom_tracks": false, +"slice_151/save_to_file/path": "", +"slice_151/start_frame": 0, +"slice_152/end_frame": 0, +"slice_152/loop_mode": 0, +"slice_152/name": "", +"slice_152/save_to_file/enabled": false, +"slice_152/save_to_file/keep_custom_tracks": false, +"slice_152/save_to_file/path": "", +"slice_152/start_frame": 0, +"slice_153/end_frame": 0, +"slice_153/loop_mode": 0, +"slice_153/name": "", +"slice_153/save_to_file/enabled": false, +"slice_153/save_to_file/keep_custom_tracks": false, +"slice_153/save_to_file/path": "", +"slice_153/start_frame": 0, +"slice_154/end_frame": 0, +"slice_154/loop_mode": 0, +"slice_154/name": "", +"slice_154/save_to_file/enabled": false, +"slice_154/save_to_file/keep_custom_tracks": false, +"slice_154/save_to_file/path": "", +"slice_154/start_frame": 0, +"slice_155/end_frame": 0, +"slice_155/loop_mode": 0, +"slice_155/name": "", +"slice_155/save_to_file/enabled": false, +"slice_155/save_to_file/keep_custom_tracks": false, +"slice_155/save_to_file/path": "", +"slice_155/start_frame": 0, +"slice_156/end_frame": 0, +"slice_156/loop_mode": 0, +"slice_156/name": "", +"slice_156/save_to_file/enabled": false, +"slice_156/save_to_file/keep_custom_tracks": false, +"slice_156/save_to_file/path": "", +"slice_156/start_frame": 0, +"slice_157/end_frame": 0, +"slice_157/loop_mode": 0, +"slice_157/name": "", +"slice_157/save_to_file/enabled": false, +"slice_157/save_to_file/keep_custom_tracks": false, +"slice_157/save_to_file/path": "", +"slice_157/start_frame": 0, +"slice_158/end_frame": 0, +"slice_158/loop_mode": 0, +"slice_158/name": "", +"slice_158/save_to_file/enabled": false, +"slice_158/save_to_file/keep_custom_tracks": false, +"slice_158/save_to_file/path": "", +"slice_158/start_frame": 0, +"slice_159/end_frame": 0, +"slice_159/loop_mode": 0, +"slice_159/name": "", +"slice_159/save_to_file/enabled": false, +"slice_159/save_to_file/keep_custom_tracks": false, +"slice_159/save_to_file/path": "", +"slice_159/start_frame": 0, +"slice_16/end_frame": 0, +"slice_16/loop_mode": 0, +"slice_16/name": "", +"slice_16/save_to_file/enabled": false, +"slice_16/save_to_file/keep_custom_tracks": false, +"slice_16/save_to_file/path": "", +"slice_16/start_frame": 0, +"slice_160/end_frame": 0, +"slice_160/loop_mode": 0, +"slice_160/name": "", +"slice_160/save_to_file/enabled": false, +"slice_160/save_to_file/keep_custom_tracks": false, +"slice_160/save_to_file/path": "", +"slice_160/start_frame": 0, +"slice_161/end_frame": 0, +"slice_161/loop_mode": 0, +"slice_161/name": "", +"slice_161/save_to_file/enabled": false, +"slice_161/save_to_file/keep_custom_tracks": false, +"slice_161/save_to_file/path": "", +"slice_161/start_frame": 0, +"slice_162/end_frame": 0, +"slice_162/loop_mode": 0, +"slice_162/name": "", +"slice_162/save_to_file/enabled": false, +"slice_162/save_to_file/keep_custom_tracks": false, +"slice_162/save_to_file/path": "", +"slice_162/start_frame": 0, +"slice_163/end_frame": 0, +"slice_163/loop_mode": 0, +"slice_163/name": "", +"slice_163/save_to_file/enabled": false, +"slice_163/save_to_file/keep_custom_tracks": false, +"slice_163/save_to_file/path": "", +"slice_163/start_frame": 0, +"slice_164/end_frame": 0, +"slice_164/loop_mode": 0, +"slice_164/name": "", +"slice_164/save_to_file/enabled": false, +"slice_164/save_to_file/keep_custom_tracks": false, +"slice_164/save_to_file/path": "", +"slice_164/start_frame": 0, +"slice_165/end_frame": 0, +"slice_165/loop_mode": 0, +"slice_165/name": "", +"slice_165/save_to_file/enabled": false, +"slice_165/save_to_file/keep_custom_tracks": false, +"slice_165/save_to_file/path": "", +"slice_165/start_frame": 0, +"slice_166/end_frame": 0, +"slice_166/loop_mode": 0, +"slice_166/name": "", +"slice_166/save_to_file/enabled": false, +"slice_166/save_to_file/keep_custom_tracks": false, +"slice_166/save_to_file/path": "", +"slice_166/start_frame": 0, +"slice_167/end_frame": 0, +"slice_167/loop_mode": 0, +"slice_167/name": "", +"slice_167/save_to_file/enabled": false, +"slice_167/save_to_file/keep_custom_tracks": false, +"slice_167/save_to_file/path": "", +"slice_167/start_frame": 0, +"slice_168/end_frame": 0, +"slice_168/loop_mode": 0, +"slice_168/name": "", +"slice_168/save_to_file/enabled": false, +"slice_168/save_to_file/keep_custom_tracks": false, +"slice_168/save_to_file/path": "", +"slice_168/start_frame": 0, +"slice_169/end_frame": 0, +"slice_169/loop_mode": 0, +"slice_169/name": "", +"slice_169/save_to_file/enabled": false, +"slice_169/save_to_file/keep_custom_tracks": false, +"slice_169/save_to_file/path": "", +"slice_169/start_frame": 0, +"slice_17/end_frame": 0, +"slice_17/loop_mode": 0, +"slice_17/name": "", +"slice_17/save_to_file/enabled": false, +"slice_17/save_to_file/keep_custom_tracks": false, +"slice_17/save_to_file/path": "", +"slice_17/start_frame": 0, +"slice_170/end_frame": 0, +"slice_170/loop_mode": 0, +"slice_170/name": "", +"slice_170/save_to_file/enabled": false, +"slice_170/save_to_file/keep_custom_tracks": false, +"slice_170/save_to_file/path": "", +"slice_170/start_frame": 0, +"slice_171/end_frame": 0, +"slice_171/loop_mode": 0, +"slice_171/name": "", +"slice_171/save_to_file/enabled": false, +"slice_171/save_to_file/keep_custom_tracks": false, +"slice_171/save_to_file/path": "", +"slice_171/start_frame": 0, +"slice_172/end_frame": 0, +"slice_172/loop_mode": 0, +"slice_172/name": "", +"slice_172/save_to_file/enabled": false, +"slice_172/save_to_file/keep_custom_tracks": false, +"slice_172/save_to_file/path": "", +"slice_172/start_frame": 0, +"slice_173/end_frame": 0, +"slice_173/loop_mode": 0, +"slice_173/name": "", +"slice_173/save_to_file/enabled": false, +"slice_173/save_to_file/keep_custom_tracks": false, +"slice_173/save_to_file/path": "", +"slice_173/start_frame": 0, +"slice_174/end_frame": 0, +"slice_174/loop_mode": 0, +"slice_174/name": "", +"slice_174/save_to_file/enabled": false, +"slice_174/save_to_file/keep_custom_tracks": false, +"slice_174/save_to_file/path": "", +"slice_174/start_frame": 0, +"slice_175/end_frame": 0, +"slice_175/loop_mode": 0, +"slice_175/name": "", +"slice_175/save_to_file/enabled": false, +"slice_175/save_to_file/keep_custom_tracks": false, +"slice_175/save_to_file/path": "", +"slice_175/start_frame": 0, +"slice_176/end_frame": 0, +"slice_176/loop_mode": 0, +"slice_176/name": "", +"slice_176/save_to_file/enabled": false, +"slice_176/save_to_file/keep_custom_tracks": false, +"slice_176/save_to_file/path": "", +"slice_176/start_frame": 0, +"slice_177/end_frame": 0, +"slice_177/loop_mode": 0, +"slice_177/name": "", +"slice_177/save_to_file/enabled": false, +"slice_177/save_to_file/keep_custom_tracks": false, +"slice_177/save_to_file/path": "", +"slice_177/start_frame": 0, +"slice_178/end_frame": 0, +"slice_178/loop_mode": 0, +"slice_178/name": "", +"slice_178/save_to_file/enabled": false, +"slice_178/save_to_file/keep_custom_tracks": false, +"slice_178/save_to_file/path": "", +"slice_178/start_frame": 0, +"slice_179/end_frame": 0, +"slice_179/loop_mode": 0, +"slice_179/name": "", +"slice_179/save_to_file/enabled": false, +"slice_179/save_to_file/keep_custom_tracks": false, +"slice_179/save_to_file/path": "", +"slice_179/start_frame": 0, +"slice_18/end_frame": 0, +"slice_18/loop_mode": 0, +"slice_18/name": "", +"slice_18/save_to_file/enabled": false, +"slice_18/save_to_file/keep_custom_tracks": false, +"slice_18/save_to_file/path": "", +"slice_18/start_frame": 0, +"slice_180/end_frame": 0, +"slice_180/loop_mode": 0, +"slice_180/name": "", +"slice_180/save_to_file/enabled": false, +"slice_180/save_to_file/keep_custom_tracks": false, +"slice_180/save_to_file/path": "", +"slice_180/start_frame": 0, +"slice_181/end_frame": 0, +"slice_181/loop_mode": 0, +"slice_181/name": "", +"slice_181/save_to_file/enabled": false, +"slice_181/save_to_file/keep_custom_tracks": false, +"slice_181/save_to_file/path": "", +"slice_181/start_frame": 0, +"slice_182/end_frame": 0, +"slice_182/loop_mode": 0, +"slice_182/name": "", +"slice_182/save_to_file/enabled": false, +"slice_182/save_to_file/keep_custom_tracks": false, +"slice_182/save_to_file/path": "", +"slice_182/start_frame": 0, +"slice_183/end_frame": 0, +"slice_183/loop_mode": 0, +"slice_183/name": "", +"slice_183/save_to_file/enabled": false, +"slice_183/save_to_file/keep_custom_tracks": false, +"slice_183/save_to_file/path": "", +"slice_183/start_frame": 0, +"slice_184/end_frame": 0, +"slice_184/loop_mode": 0, +"slice_184/name": "", +"slice_184/save_to_file/enabled": false, +"slice_184/save_to_file/keep_custom_tracks": false, +"slice_184/save_to_file/path": "", +"slice_184/start_frame": 0, +"slice_185/end_frame": 0, +"slice_185/loop_mode": 0, +"slice_185/name": "", +"slice_185/save_to_file/enabled": false, +"slice_185/save_to_file/keep_custom_tracks": false, +"slice_185/save_to_file/path": "", +"slice_185/start_frame": 0, +"slice_186/end_frame": 0, +"slice_186/loop_mode": 0, +"slice_186/name": "", +"slice_186/save_to_file/enabled": false, +"slice_186/save_to_file/keep_custom_tracks": false, +"slice_186/save_to_file/path": "", +"slice_186/start_frame": 0, +"slice_187/end_frame": 0, +"slice_187/loop_mode": 0, +"slice_187/name": "", +"slice_187/save_to_file/enabled": false, +"slice_187/save_to_file/keep_custom_tracks": false, +"slice_187/save_to_file/path": "", +"slice_187/start_frame": 0, +"slice_188/end_frame": 0, +"slice_188/loop_mode": 0, +"slice_188/name": "", +"slice_188/save_to_file/enabled": false, +"slice_188/save_to_file/keep_custom_tracks": false, +"slice_188/save_to_file/path": "", +"slice_188/start_frame": 0, +"slice_189/end_frame": 0, +"slice_189/loop_mode": 0, +"slice_189/name": "", +"slice_189/save_to_file/enabled": false, +"slice_189/save_to_file/keep_custom_tracks": false, +"slice_189/save_to_file/path": "", +"slice_189/start_frame": 0, +"slice_19/end_frame": 0, +"slice_19/loop_mode": 0, +"slice_19/name": "", +"slice_19/save_to_file/enabled": false, +"slice_19/save_to_file/keep_custom_tracks": false, +"slice_19/save_to_file/path": "", +"slice_19/start_frame": 0, +"slice_190/end_frame": 0, +"slice_190/loop_mode": 0, +"slice_190/name": "", +"slice_190/save_to_file/enabled": false, +"slice_190/save_to_file/keep_custom_tracks": false, +"slice_190/save_to_file/path": "", +"slice_190/start_frame": 0, +"slice_191/end_frame": 0, +"slice_191/loop_mode": 0, +"slice_191/name": "", +"slice_191/save_to_file/enabled": false, +"slice_191/save_to_file/keep_custom_tracks": false, +"slice_191/save_to_file/path": "", +"slice_191/start_frame": 0, +"slice_192/end_frame": 0, +"slice_192/loop_mode": 0, +"slice_192/name": "", +"slice_192/save_to_file/enabled": false, +"slice_192/save_to_file/keep_custom_tracks": false, +"slice_192/save_to_file/path": "", +"slice_192/start_frame": 0, +"slice_193/end_frame": 0, +"slice_193/loop_mode": 0, +"slice_193/name": "", +"slice_193/save_to_file/enabled": false, +"slice_193/save_to_file/keep_custom_tracks": false, +"slice_193/save_to_file/path": "", +"slice_193/start_frame": 0, +"slice_194/end_frame": 0, +"slice_194/loop_mode": 0, +"slice_194/name": "", +"slice_194/save_to_file/enabled": false, +"slice_194/save_to_file/keep_custom_tracks": false, +"slice_194/save_to_file/path": "", +"slice_194/start_frame": 0, +"slice_195/end_frame": 0, +"slice_195/loop_mode": 0, +"slice_195/name": "", +"slice_195/save_to_file/enabled": false, +"slice_195/save_to_file/keep_custom_tracks": false, +"slice_195/save_to_file/path": "", +"slice_195/start_frame": 0, +"slice_196/end_frame": 0, +"slice_196/loop_mode": 0, +"slice_196/name": "", +"slice_196/save_to_file/enabled": false, +"slice_196/save_to_file/keep_custom_tracks": false, +"slice_196/save_to_file/path": "", +"slice_196/start_frame": 0, +"slice_197/end_frame": 0, +"slice_197/loop_mode": 0, +"slice_197/name": "", +"slice_197/save_to_file/enabled": false, +"slice_197/save_to_file/keep_custom_tracks": false, +"slice_197/save_to_file/path": "", +"slice_197/start_frame": 0, +"slice_198/end_frame": 0, +"slice_198/loop_mode": 0, +"slice_198/name": "", +"slice_198/save_to_file/enabled": false, +"slice_198/save_to_file/keep_custom_tracks": false, +"slice_198/save_to_file/path": "", +"slice_198/start_frame": 0, +"slice_199/end_frame": 0, +"slice_199/loop_mode": 0, +"slice_199/name": "", +"slice_199/save_to_file/enabled": false, +"slice_199/save_to_file/keep_custom_tracks": false, +"slice_199/save_to_file/path": "", +"slice_199/start_frame": 0, +"slice_2/end_frame": 0, +"slice_2/loop_mode": 0, +"slice_2/name": "", +"slice_2/save_to_file/enabled": false, +"slice_2/save_to_file/keep_custom_tracks": false, +"slice_2/save_to_file/path": "", +"slice_2/start_frame": 0, +"slice_20/end_frame": 0, +"slice_20/loop_mode": 0, +"slice_20/name": "", +"slice_20/save_to_file/enabled": false, +"slice_20/save_to_file/keep_custom_tracks": false, +"slice_20/save_to_file/path": "", +"slice_20/start_frame": 0, +"slice_200/end_frame": 0, +"slice_200/loop_mode": 0, +"slice_200/name": "", +"slice_200/save_to_file/enabled": false, +"slice_200/save_to_file/keep_custom_tracks": false, +"slice_200/save_to_file/path": "", +"slice_200/start_frame": 0, +"slice_201/end_frame": 0, +"slice_201/loop_mode": 0, +"slice_201/name": "", +"slice_201/save_to_file/enabled": false, +"slice_201/save_to_file/keep_custom_tracks": false, +"slice_201/save_to_file/path": "", +"slice_201/start_frame": 0, +"slice_202/end_frame": 0, +"slice_202/loop_mode": 0, +"slice_202/name": "", +"slice_202/save_to_file/enabled": false, +"slice_202/save_to_file/keep_custom_tracks": false, +"slice_202/save_to_file/path": "", +"slice_202/start_frame": 0, +"slice_203/end_frame": 0, +"slice_203/loop_mode": 0, +"slice_203/name": "", +"slice_203/save_to_file/enabled": false, +"slice_203/save_to_file/keep_custom_tracks": false, +"slice_203/save_to_file/path": "", +"slice_203/start_frame": 0, +"slice_204/end_frame": 0, +"slice_204/loop_mode": 0, +"slice_204/name": "", +"slice_204/save_to_file/enabled": false, +"slice_204/save_to_file/keep_custom_tracks": false, +"slice_204/save_to_file/path": "", +"slice_204/start_frame": 0, +"slice_205/end_frame": 0, +"slice_205/loop_mode": 0, +"slice_205/name": "", +"slice_205/save_to_file/enabled": false, +"slice_205/save_to_file/keep_custom_tracks": false, +"slice_205/save_to_file/path": "", +"slice_205/start_frame": 0, +"slice_206/end_frame": 0, +"slice_206/loop_mode": 0, +"slice_206/name": "", +"slice_206/save_to_file/enabled": false, +"slice_206/save_to_file/keep_custom_tracks": false, +"slice_206/save_to_file/path": "", +"slice_206/start_frame": 0, +"slice_207/end_frame": 0, +"slice_207/loop_mode": 0, +"slice_207/name": "", +"slice_207/save_to_file/enabled": false, +"slice_207/save_to_file/keep_custom_tracks": false, +"slice_207/save_to_file/path": "", +"slice_207/start_frame": 0, +"slice_208/end_frame": 0, +"slice_208/loop_mode": 0, +"slice_208/name": "", +"slice_208/save_to_file/enabled": false, +"slice_208/save_to_file/keep_custom_tracks": false, +"slice_208/save_to_file/path": "", +"slice_208/start_frame": 0, +"slice_209/end_frame": 0, +"slice_209/loop_mode": 0, +"slice_209/name": "", +"slice_209/save_to_file/enabled": false, +"slice_209/save_to_file/keep_custom_tracks": false, +"slice_209/save_to_file/path": "", +"slice_209/start_frame": 0, +"slice_21/end_frame": 0, +"slice_21/loop_mode": 0, +"slice_21/name": "", +"slice_21/save_to_file/enabled": false, +"slice_21/save_to_file/keep_custom_tracks": false, +"slice_21/save_to_file/path": "", +"slice_21/start_frame": 0, +"slice_210/end_frame": 0, +"slice_210/loop_mode": 0, +"slice_210/name": "", +"slice_210/save_to_file/enabled": false, +"slice_210/save_to_file/keep_custom_tracks": false, +"slice_210/save_to_file/path": "", +"slice_210/start_frame": 0, +"slice_211/end_frame": 0, +"slice_211/loop_mode": 0, +"slice_211/name": "", +"slice_211/save_to_file/enabled": false, +"slice_211/save_to_file/keep_custom_tracks": false, +"slice_211/save_to_file/path": "", +"slice_211/start_frame": 0, +"slice_212/end_frame": 0, +"slice_212/loop_mode": 0, +"slice_212/name": "", +"slice_212/save_to_file/enabled": false, +"slice_212/save_to_file/keep_custom_tracks": false, +"slice_212/save_to_file/path": "", +"slice_212/start_frame": 0, +"slice_213/end_frame": 0, +"slice_213/loop_mode": 0, +"slice_213/name": "", +"slice_213/save_to_file/enabled": false, +"slice_213/save_to_file/keep_custom_tracks": false, +"slice_213/save_to_file/path": "", +"slice_213/start_frame": 0, +"slice_214/end_frame": 0, +"slice_214/loop_mode": 0, +"slice_214/name": "", +"slice_214/save_to_file/enabled": false, +"slice_214/save_to_file/keep_custom_tracks": false, +"slice_214/save_to_file/path": "", +"slice_214/start_frame": 0, +"slice_215/end_frame": 0, +"slice_215/loop_mode": 0, +"slice_215/name": "", +"slice_215/save_to_file/enabled": false, +"slice_215/save_to_file/keep_custom_tracks": false, +"slice_215/save_to_file/path": "", +"slice_215/start_frame": 0, +"slice_216/end_frame": 0, +"slice_216/loop_mode": 0, +"slice_216/name": "", +"slice_216/save_to_file/enabled": false, +"slice_216/save_to_file/keep_custom_tracks": false, +"slice_216/save_to_file/path": "", +"slice_216/start_frame": 0, +"slice_217/end_frame": 0, +"slice_217/loop_mode": 0, +"slice_217/name": "", +"slice_217/save_to_file/enabled": false, +"slice_217/save_to_file/keep_custom_tracks": false, +"slice_217/save_to_file/path": "", +"slice_217/start_frame": 0, +"slice_218/end_frame": 0, +"slice_218/loop_mode": 0, +"slice_218/name": "", +"slice_218/save_to_file/enabled": false, +"slice_218/save_to_file/keep_custom_tracks": false, +"slice_218/save_to_file/path": "", +"slice_218/start_frame": 0, +"slice_219/end_frame": 0, +"slice_219/loop_mode": 0, +"slice_219/name": "", +"slice_219/save_to_file/enabled": false, +"slice_219/save_to_file/keep_custom_tracks": false, +"slice_219/save_to_file/path": "", +"slice_219/start_frame": 0, +"slice_22/end_frame": 0, +"slice_22/loop_mode": 0, +"slice_22/name": "", +"slice_22/save_to_file/enabled": false, +"slice_22/save_to_file/keep_custom_tracks": false, +"slice_22/save_to_file/path": "", +"slice_22/start_frame": 0, +"slice_220/end_frame": 0, +"slice_220/loop_mode": 0, +"slice_220/name": "", +"slice_220/save_to_file/enabled": false, +"slice_220/save_to_file/keep_custom_tracks": false, +"slice_220/save_to_file/path": "", +"slice_220/start_frame": 0, +"slice_221/end_frame": 0, +"slice_221/loop_mode": 0, +"slice_221/name": "", +"slice_221/save_to_file/enabled": false, +"slice_221/save_to_file/keep_custom_tracks": false, +"slice_221/save_to_file/path": "", +"slice_221/start_frame": 0, +"slice_222/end_frame": 0, +"slice_222/loop_mode": 0, +"slice_222/name": "", +"slice_222/save_to_file/enabled": false, +"slice_222/save_to_file/keep_custom_tracks": false, +"slice_222/save_to_file/path": "", +"slice_222/start_frame": 0, +"slice_223/end_frame": 0, +"slice_223/loop_mode": 0, +"slice_223/name": "", +"slice_223/save_to_file/enabled": false, +"slice_223/save_to_file/keep_custom_tracks": false, +"slice_223/save_to_file/path": "", +"slice_223/start_frame": 0, +"slice_224/end_frame": 0, +"slice_224/loop_mode": 0, +"slice_224/name": "", +"slice_224/save_to_file/enabled": false, +"slice_224/save_to_file/keep_custom_tracks": false, +"slice_224/save_to_file/path": "", +"slice_224/start_frame": 0, +"slice_225/end_frame": 0, +"slice_225/loop_mode": 0, +"slice_225/name": "", +"slice_225/save_to_file/enabled": false, +"slice_225/save_to_file/keep_custom_tracks": false, +"slice_225/save_to_file/path": "", +"slice_225/start_frame": 0, +"slice_226/end_frame": 0, +"slice_226/loop_mode": 0, +"slice_226/name": "", +"slice_226/save_to_file/enabled": false, +"slice_226/save_to_file/keep_custom_tracks": false, +"slice_226/save_to_file/path": "", +"slice_226/start_frame": 0, +"slice_227/end_frame": 0, +"slice_227/loop_mode": 0, +"slice_227/name": "", +"slice_227/save_to_file/enabled": false, +"slice_227/save_to_file/keep_custom_tracks": false, +"slice_227/save_to_file/path": "", +"slice_227/start_frame": 0, +"slice_228/end_frame": 0, +"slice_228/loop_mode": 0, +"slice_228/name": "", +"slice_228/save_to_file/enabled": false, +"slice_228/save_to_file/keep_custom_tracks": false, +"slice_228/save_to_file/path": "", +"slice_228/start_frame": 0, +"slice_229/end_frame": 0, +"slice_229/loop_mode": 0, +"slice_229/name": "", +"slice_229/save_to_file/enabled": false, +"slice_229/save_to_file/keep_custom_tracks": false, +"slice_229/save_to_file/path": "", +"slice_229/start_frame": 0, +"slice_23/end_frame": 0, +"slice_23/loop_mode": 0, +"slice_23/name": "", +"slice_23/save_to_file/enabled": false, +"slice_23/save_to_file/keep_custom_tracks": false, +"slice_23/save_to_file/path": "", +"slice_23/start_frame": 0, +"slice_230/end_frame": 0, +"slice_230/loop_mode": 0, +"slice_230/name": "", +"slice_230/save_to_file/enabled": false, +"slice_230/save_to_file/keep_custom_tracks": false, +"slice_230/save_to_file/path": "", +"slice_230/start_frame": 0, +"slice_231/end_frame": 0, +"slice_231/loop_mode": 0, +"slice_231/name": "", +"slice_231/save_to_file/enabled": false, +"slice_231/save_to_file/keep_custom_tracks": false, +"slice_231/save_to_file/path": "", +"slice_231/start_frame": 0, +"slice_232/end_frame": 0, +"slice_232/loop_mode": 0, +"slice_232/name": "", +"slice_232/save_to_file/enabled": false, +"slice_232/save_to_file/keep_custom_tracks": false, +"slice_232/save_to_file/path": "", +"slice_232/start_frame": 0, +"slice_233/end_frame": 0, +"slice_233/loop_mode": 0, +"slice_233/name": "", +"slice_233/save_to_file/enabled": false, +"slice_233/save_to_file/keep_custom_tracks": false, +"slice_233/save_to_file/path": "", +"slice_233/start_frame": 0, +"slice_234/end_frame": 0, +"slice_234/loop_mode": 0, +"slice_234/name": "", +"slice_234/save_to_file/enabled": false, +"slice_234/save_to_file/keep_custom_tracks": false, +"slice_234/save_to_file/path": "", +"slice_234/start_frame": 0, +"slice_235/end_frame": 0, +"slice_235/loop_mode": 0, +"slice_235/name": "", +"slice_235/save_to_file/enabled": false, +"slice_235/save_to_file/keep_custom_tracks": false, +"slice_235/save_to_file/path": "", +"slice_235/start_frame": 0, +"slice_236/end_frame": 0, +"slice_236/loop_mode": 0, +"slice_236/name": "", +"slice_236/save_to_file/enabled": false, +"slice_236/save_to_file/keep_custom_tracks": false, +"slice_236/save_to_file/path": "", +"slice_236/start_frame": 0, +"slice_237/end_frame": 0, +"slice_237/loop_mode": 0, +"slice_237/name": "", +"slice_237/save_to_file/enabled": false, +"slice_237/save_to_file/keep_custom_tracks": false, +"slice_237/save_to_file/path": "", +"slice_237/start_frame": 0, +"slice_238/end_frame": 0, +"slice_238/loop_mode": 0, +"slice_238/name": "", +"slice_238/save_to_file/enabled": false, +"slice_238/save_to_file/keep_custom_tracks": false, +"slice_238/save_to_file/path": "", +"slice_238/start_frame": 0, +"slice_239/end_frame": 0, +"slice_239/loop_mode": 0, +"slice_239/name": "", +"slice_239/save_to_file/enabled": false, +"slice_239/save_to_file/keep_custom_tracks": false, +"slice_239/save_to_file/path": "", +"slice_239/start_frame": 0, +"slice_24/end_frame": 0, +"slice_24/loop_mode": 0, +"slice_24/name": "", +"slice_24/save_to_file/enabled": false, +"slice_24/save_to_file/keep_custom_tracks": false, +"slice_24/save_to_file/path": "", +"slice_24/start_frame": 0, +"slice_240/end_frame": 0, +"slice_240/loop_mode": 0, +"slice_240/name": "", +"slice_240/save_to_file/enabled": false, +"slice_240/save_to_file/keep_custom_tracks": false, +"slice_240/save_to_file/path": "", +"slice_240/start_frame": 0, +"slice_241/end_frame": 0, +"slice_241/loop_mode": 0, +"slice_241/name": "", +"slice_241/save_to_file/enabled": false, +"slice_241/save_to_file/keep_custom_tracks": false, +"slice_241/save_to_file/path": "", +"slice_241/start_frame": 0, +"slice_242/end_frame": 0, +"slice_242/loop_mode": 0, +"slice_242/name": "", +"slice_242/save_to_file/enabled": false, +"slice_242/save_to_file/keep_custom_tracks": false, +"slice_242/save_to_file/path": "", +"slice_242/start_frame": 0, +"slice_243/end_frame": 0, +"slice_243/loop_mode": 0, +"slice_243/name": "", +"slice_243/save_to_file/enabled": false, +"slice_243/save_to_file/keep_custom_tracks": false, +"slice_243/save_to_file/path": "", +"slice_243/start_frame": 0, +"slice_244/end_frame": 0, +"slice_244/loop_mode": 0, +"slice_244/name": "", +"slice_244/save_to_file/enabled": false, +"slice_244/save_to_file/keep_custom_tracks": false, +"slice_244/save_to_file/path": "", +"slice_244/start_frame": 0, +"slice_245/end_frame": 0, +"slice_245/loop_mode": 0, +"slice_245/name": "", +"slice_245/save_to_file/enabled": false, +"slice_245/save_to_file/keep_custom_tracks": false, +"slice_245/save_to_file/path": "", +"slice_245/start_frame": 0, +"slice_246/end_frame": 0, +"slice_246/loop_mode": 0, +"slice_246/name": "", +"slice_246/save_to_file/enabled": false, +"slice_246/save_to_file/keep_custom_tracks": false, +"slice_246/save_to_file/path": "", +"slice_246/start_frame": 0, +"slice_247/end_frame": 0, +"slice_247/loop_mode": 0, +"slice_247/name": "", +"slice_247/save_to_file/enabled": false, +"slice_247/save_to_file/keep_custom_tracks": false, +"slice_247/save_to_file/path": "", +"slice_247/start_frame": 0, +"slice_248/end_frame": 0, +"slice_248/loop_mode": 0, +"slice_248/name": "", +"slice_248/save_to_file/enabled": false, +"slice_248/save_to_file/keep_custom_tracks": false, +"slice_248/save_to_file/path": "", +"slice_248/start_frame": 0, +"slice_249/end_frame": 0, +"slice_249/loop_mode": 0, +"slice_249/name": "", +"slice_249/save_to_file/enabled": false, +"slice_249/save_to_file/keep_custom_tracks": false, +"slice_249/save_to_file/path": "", +"slice_249/start_frame": 0, +"slice_25/end_frame": 0, +"slice_25/loop_mode": 0, +"slice_25/name": "", +"slice_25/save_to_file/enabled": false, +"slice_25/save_to_file/keep_custom_tracks": false, +"slice_25/save_to_file/path": "", +"slice_25/start_frame": 0, +"slice_250/end_frame": 0, +"slice_250/loop_mode": 0, +"slice_250/name": "", +"slice_250/save_to_file/enabled": false, +"slice_250/save_to_file/keep_custom_tracks": false, +"slice_250/save_to_file/path": "", +"slice_250/start_frame": 0, +"slice_251/end_frame": 0, +"slice_251/loop_mode": 0, +"slice_251/name": "", +"slice_251/save_to_file/enabled": false, +"slice_251/save_to_file/keep_custom_tracks": false, +"slice_251/save_to_file/path": "", +"slice_251/start_frame": 0, +"slice_252/end_frame": 0, +"slice_252/loop_mode": 0, +"slice_252/name": "", +"slice_252/save_to_file/enabled": false, +"slice_252/save_to_file/keep_custom_tracks": false, +"slice_252/save_to_file/path": "", +"slice_252/start_frame": 0, +"slice_253/end_frame": 0, +"slice_253/loop_mode": 0, +"slice_253/name": "", +"slice_253/save_to_file/enabled": false, +"slice_253/save_to_file/keep_custom_tracks": false, +"slice_253/save_to_file/path": "", +"slice_253/start_frame": 0, +"slice_254/end_frame": 0, +"slice_254/loop_mode": 0, +"slice_254/name": "", +"slice_254/save_to_file/enabled": false, +"slice_254/save_to_file/keep_custom_tracks": false, +"slice_254/save_to_file/path": "", +"slice_254/start_frame": 0, +"slice_255/end_frame": 0, +"slice_255/loop_mode": 0, +"slice_255/name": "", +"slice_255/save_to_file/enabled": false, +"slice_255/save_to_file/keep_custom_tracks": false, +"slice_255/save_to_file/path": "", +"slice_255/start_frame": 0, +"slice_256/end_frame": 0, +"slice_256/loop_mode": 0, +"slice_256/name": "", +"slice_256/save_to_file/enabled": false, +"slice_256/save_to_file/keep_custom_tracks": false, +"slice_256/save_to_file/path": "", +"slice_256/start_frame": 0, +"slice_26/end_frame": 0, +"slice_26/loop_mode": 0, +"slice_26/name": "", +"slice_26/save_to_file/enabled": false, +"slice_26/save_to_file/keep_custom_tracks": false, +"slice_26/save_to_file/path": "", +"slice_26/start_frame": 0, +"slice_27/end_frame": 0, +"slice_27/loop_mode": 0, +"slice_27/name": "", +"slice_27/save_to_file/enabled": false, +"slice_27/save_to_file/keep_custom_tracks": false, +"slice_27/save_to_file/path": "", +"slice_27/start_frame": 0, +"slice_28/end_frame": 0, +"slice_28/loop_mode": 0, +"slice_28/name": "", +"slice_28/save_to_file/enabled": false, +"slice_28/save_to_file/keep_custom_tracks": false, +"slice_28/save_to_file/path": "", +"slice_28/start_frame": 0, +"slice_29/end_frame": 0, +"slice_29/loop_mode": 0, +"slice_29/name": "", +"slice_29/save_to_file/enabled": false, +"slice_29/save_to_file/keep_custom_tracks": false, +"slice_29/save_to_file/path": "", +"slice_29/start_frame": 0, +"slice_3/end_frame": 0, +"slice_3/loop_mode": 0, +"slice_3/name": "", +"slice_3/save_to_file/enabled": false, +"slice_3/save_to_file/keep_custom_tracks": false, +"slice_3/save_to_file/path": "", +"slice_3/start_frame": 0, +"slice_30/end_frame": 0, +"slice_30/loop_mode": 0, +"slice_30/name": "", +"slice_30/save_to_file/enabled": false, +"slice_30/save_to_file/keep_custom_tracks": false, +"slice_30/save_to_file/path": "", +"slice_30/start_frame": 0, +"slice_31/end_frame": 0, +"slice_31/loop_mode": 0, +"slice_31/name": "", +"slice_31/save_to_file/enabled": false, +"slice_31/save_to_file/keep_custom_tracks": false, +"slice_31/save_to_file/path": "", +"slice_31/start_frame": 0, +"slice_32/end_frame": 0, +"slice_32/loop_mode": 0, +"slice_32/name": "", +"slice_32/save_to_file/enabled": false, +"slice_32/save_to_file/keep_custom_tracks": false, +"slice_32/save_to_file/path": "", +"slice_32/start_frame": 0, +"slice_33/end_frame": 0, +"slice_33/loop_mode": 0, +"slice_33/name": "", +"slice_33/save_to_file/enabled": false, +"slice_33/save_to_file/keep_custom_tracks": false, +"slice_33/save_to_file/path": "", +"slice_33/start_frame": 0, +"slice_34/end_frame": 0, +"slice_34/loop_mode": 0, +"slice_34/name": "", +"slice_34/save_to_file/enabled": false, +"slice_34/save_to_file/keep_custom_tracks": false, +"slice_34/save_to_file/path": "", +"slice_34/start_frame": 0, +"slice_35/end_frame": 0, +"slice_35/loop_mode": 0, +"slice_35/name": "", +"slice_35/save_to_file/enabled": false, +"slice_35/save_to_file/keep_custom_tracks": false, +"slice_35/save_to_file/path": "", +"slice_35/start_frame": 0, +"slice_36/end_frame": 0, +"slice_36/loop_mode": 0, +"slice_36/name": "", +"slice_36/save_to_file/enabled": false, +"slice_36/save_to_file/keep_custom_tracks": false, +"slice_36/save_to_file/path": "", +"slice_36/start_frame": 0, +"slice_37/end_frame": 0, +"slice_37/loop_mode": 0, +"slice_37/name": "", +"slice_37/save_to_file/enabled": false, +"slice_37/save_to_file/keep_custom_tracks": false, +"slice_37/save_to_file/path": "", +"slice_37/start_frame": 0, +"slice_38/end_frame": 0, +"slice_38/loop_mode": 0, +"slice_38/name": "", +"slice_38/save_to_file/enabled": false, +"slice_38/save_to_file/keep_custom_tracks": false, +"slice_38/save_to_file/path": "", +"slice_38/start_frame": 0, +"slice_39/end_frame": 0, +"slice_39/loop_mode": 0, +"slice_39/name": "", +"slice_39/save_to_file/enabled": false, +"slice_39/save_to_file/keep_custom_tracks": false, +"slice_39/save_to_file/path": "", +"slice_39/start_frame": 0, +"slice_4/end_frame": 0, +"slice_4/loop_mode": 0, +"slice_4/name": "", +"slice_4/save_to_file/enabled": false, +"slice_4/save_to_file/keep_custom_tracks": false, +"slice_4/save_to_file/path": "", +"slice_4/start_frame": 0, +"slice_40/end_frame": 0, +"slice_40/loop_mode": 0, +"slice_40/name": "", +"slice_40/save_to_file/enabled": false, +"slice_40/save_to_file/keep_custom_tracks": false, +"slice_40/save_to_file/path": "", +"slice_40/start_frame": 0, +"slice_41/end_frame": 0, +"slice_41/loop_mode": 0, +"slice_41/name": "", +"slice_41/save_to_file/enabled": false, +"slice_41/save_to_file/keep_custom_tracks": false, +"slice_41/save_to_file/path": "", +"slice_41/start_frame": 0, +"slice_42/end_frame": 0, +"slice_42/loop_mode": 0, +"slice_42/name": "", +"slice_42/save_to_file/enabled": false, +"slice_42/save_to_file/keep_custom_tracks": false, +"slice_42/save_to_file/path": "", +"slice_42/start_frame": 0, +"slice_43/end_frame": 0, +"slice_43/loop_mode": 0, +"slice_43/name": "", +"slice_43/save_to_file/enabled": false, +"slice_43/save_to_file/keep_custom_tracks": false, +"slice_43/save_to_file/path": "", +"slice_43/start_frame": 0, +"slice_44/end_frame": 0, +"slice_44/loop_mode": 0, +"slice_44/name": "", +"slice_44/save_to_file/enabled": false, +"slice_44/save_to_file/keep_custom_tracks": false, +"slice_44/save_to_file/path": "", +"slice_44/start_frame": 0, +"slice_45/end_frame": 0, +"slice_45/loop_mode": 0, +"slice_45/name": "", +"slice_45/save_to_file/enabled": false, +"slice_45/save_to_file/keep_custom_tracks": false, +"slice_45/save_to_file/path": "", +"slice_45/start_frame": 0, +"slice_46/end_frame": 0, +"slice_46/loop_mode": 0, +"slice_46/name": "", +"slice_46/save_to_file/enabled": false, +"slice_46/save_to_file/keep_custom_tracks": false, +"slice_46/save_to_file/path": "", +"slice_46/start_frame": 0, +"slice_47/end_frame": 0, +"slice_47/loop_mode": 0, +"slice_47/name": "", +"slice_47/save_to_file/enabled": false, +"slice_47/save_to_file/keep_custom_tracks": false, +"slice_47/save_to_file/path": "", +"slice_47/start_frame": 0, +"slice_48/end_frame": 0, +"slice_48/loop_mode": 0, +"slice_48/name": "", +"slice_48/save_to_file/enabled": false, +"slice_48/save_to_file/keep_custom_tracks": false, +"slice_48/save_to_file/path": "", +"slice_48/start_frame": 0, +"slice_49/end_frame": 0, +"slice_49/loop_mode": 0, +"slice_49/name": "", +"slice_49/save_to_file/enabled": false, +"slice_49/save_to_file/keep_custom_tracks": false, +"slice_49/save_to_file/path": "", +"slice_49/start_frame": 0, +"slice_5/end_frame": 0, +"slice_5/loop_mode": 0, +"slice_5/name": "", +"slice_5/save_to_file/enabled": false, +"slice_5/save_to_file/keep_custom_tracks": false, +"slice_5/save_to_file/path": "", +"slice_5/start_frame": 0, +"slice_50/end_frame": 0, +"slice_50/loop_mode": 0, +"slice_50/name": "", +"slice_50/save_to_file/enabled": false, +"slice_50/save_to_file/keep_custom_tracks": false, +"slice_50/save_to_file/path": "", +"slice_50/start_frame": 0, +"slice_51/end_frame": 0, +"slice_51/loop_mode": 0, +"slice_51/name": "", +"slice_51/save_to_file/enabled": false, +"slice_51/save_to_file/keep_custom_tracks": false, +"slice_51/save_to_file/path": "", +"slice_51/start_frame": 0, +"slice_52/end_frame": 0, +"slice_52/loop_mode": 0, +"slice_52/name": "", +"slice_52/save_to_file/enabled": false, +"slice_52/save_to_file/keep_custom_tracks": false, +"slice_52/save_to_file/path": "", +"slice_52/start_frame": 0, +"slice_53/end_frame": 0, +"slice_53/loop_mode": 0, +"slice_53/name": "", +"slice_53/save_to_file/enabled": false, +"slice_53/save_to_file/keep_custom_tracks": false, +"slice_53/save_to_file/path": "", +"slice_53/start_frame": 0, +"slice_54/end_frame": 0, +"slice_54/loop_mode": 0, +"slice_54/name": "", +"slice_54/save_to_file/enabled": false, +"slice_54/save_to_file/keep_custom_tracks": false, +"slice_54/save_to_file/path": "", +"slice_54/start_frame": 0, +"slice_55/end_frame": 0, +"slice_55/loop_mode": 0, +"slice_55/name": "", +"slice_55/save_to_file/enabled": false, +"slice_55/save_to_file/keep_custom_tracks": false, +"slice_55/save_to_file/path": "", +"slice_55/start_frame": 0, +"slice_56/end_frame": 0, +"slice_56/loop_mode": 0, +"slice_56/name": "", +"slice_56/save_to_file/enabled": false, +"slice_56/save_to_file/keep_custom_tracks": false, +"slice_56/save_to_file/path": "", +"slice_56/start_frame": 0, +"slice_57/end_frame": 0, +"slice_57/loop_mode": 0, +"slice_57/name": "", +"slice_57/save_to_file/enabled": false, +"slice_57/save_to_file/keep_custom_tracks": false, +"slice_57/save_to_file/path": "", +"slice_57/start_frame": 0, +"slice_58/end_frame": 0, +"slice_58/loop_mode": 0, +"slice_58/name": "", +"slice_58/save_to_file/enabled": false, +"slice_58/save_to_file/keep_custom_tracks": false, +"slice_58/save_to_file/path": "", +"slice_58/start_frame": 0, +"slice_59/end_frame": 0, +"slice_59/loop_mode": 0, +"slice_59/name": "", +"slice_59/save_to_file/enabled": false, +"slice_59/save_to_file/keep_custom_tracks": false, +"slice_59/save_to_file/path": "", +"slice_59/start_frame": 0, +"slice_6/end_frame": 0, +"slice_6/loop_mode": 0, +"slice_6/name": "", +"slice_6/save_to_file/enabled": false, +"slice_6/save_to_file/keep_custom_tracks": false, +"slice_6/save_to_file/path": "", +"slice_6/start_frame": 0, +"slice_60/end_frame": 0, +"slice_60/loop_mode": 0, +"slice_60/name": "", +"slice_60/save_to_file/enabled": false, +"slice_60/save_to_file/keep_custom_tracks": false, +"slice_60/save_to_file/path": "", +"slice_60/start_frame": 0, +"slice_61/end_frame": 0, +"slice_61/loop_mode": 0, +"slice_61/name": "", +"slice_61/save_to_file/enabled": false, +"slice_61/save_to_file/keep_custom_tracks": false, +"slice_61/save_to_file/path": "", +"slice_61/start_frame": 0, +"slice_62/end_frame": 0, +"slice_62/loop_mode": 0, +"slice_62/name": "", +"slice_62/save_to_file/enabled": false, +"slice_62/save_to_file/keep_custom_tracks": false, +"slice_62/save_to_file/path": "", +"slice_62/start_frame": 0, +"slice_63/end_frame": 0, +"slice_63/loop_mode": 0, +"slice_63/name": "", +"slice_63/save_to_file/enabled": false, +"slice_63/save_to_file/keep_custom_tracks": false, +"slice_63/save_to_file/path": "", +"slice_63/start_frame": 0, +"slice_64/end_frame": 0, +"slice_64/loop_mode": 0, +"slice_64/name": "", +"slice_64/save_to_file/enabled": false, +"slice_64/save_to_file/keep_custom_tracks": false, +"slice_64/save_to_file/path": "", +"slice_64/start_frame": 0, +"slice_65/end_frame": 0, +"slice_65/loop_mode": 0, +"slice_65/name": "", +"slice_65/save_to_file/enabled": false, +"slice_65/save_to_file/keep_custom_tracks": false, +"slice_65/save_to_file/path": "", +"slice_65/start_frame": 0, +"slice_66/end_frame": 0, +"slice_66/loop_mode": 0, +"slice_66/name": "", +"slice_66/save_to_file/enabled": false, +"slice_66/save_to_file/keep_custom_tracks": false, +"slice_66/save_to_file/path": "", +"slice_66/start_frame": 0, +"slice_67/end_frame": 0, +"slice_67/loop_mode": 0, +"slice_67/name": "", +"slice_67/save_to_file/enabled": false, +"slice_67/save_to_file/keep_custom_tracks": false, +"slice_67/save_to_file/path": "", +"slice_67/start_frame": 0, +"slice_68/end_frame": 0, +"slice_68/loop_mode": 0, +"slice_68/name": "", +"slice_68/save_to_file/enabled": false, +"slice_68/save_to_file/keep_custom_tracks": false, +"slice_68/save_to_file/path": "", +"slice_68/start_frame": 0, +"slice_69/end_frame": 0, +"slice_69/loop_mode": 0, +"slice_69/name": "", +"slice_69/save_to_file/enabled": false, +"slice_69/save_to_file/keep_custom_tracks": false, +"slice_69/save_to_file/path": "", +"slice_69/start_frame": 0, +"slice_7/end_frame": 0, +"slice_7/loop_mode": 0, +"slice_7/name": "", +"slice_7/save_to_file/enabled": false, +"slice_7/save_to_file/keep_custom_tracks": false, +"slice_7/save_to_file/path": "", +"slice_7/start_frame": 0, +"slice_70/end_frame": 0, +"slice_70/loop_mode": 0, +"slice_70/name": "", +"slice_70/save_to_file/enabled": false, +"slice_70/save_to_file/keep_custom_tracks": false, +"slice_70/save_to_file/path": "", +"slice_70/start_frame": 0, +"slice_71/end_frame": 0, +"slice_71/loop_mode": 0, +"slice_71/name": "", +"slice_71/save_to_file/enabled": false, +"slice_71/save_to_file/keep_custom_tracks": false, +"slice_71/save_to_file/path": "", +"slice_71/start_frame": 0, +"slice_72/end_frame": 0, +"slice_72/loop_mode": 0, +"slice_72/name": "", +"slice_72/save_to_file/enabled": false, +"slice_72/save_to_file/keep_custom_tracks": false, +"slice_72/save_to_file/path": "", +"slice_72/start_frame": 0, +"slice_73/end_frame": 0, +"slice_73/loop_mode": 0, +"slice_73/name": "", +"slice_73/save_to_file/enabled": false, +"slice_73/save_to_file/keep_custom_tracks": false, +"slice_73/save_to_file/path": "", +"slice_73/start_frame": 0, +"slice_74/end_frame": 0, +"slice_74/loop_mode": 0, +"slice_74/name": "", +"slice_74/save_to_file/enabled": false, +"slice_74/save_to_file/keep_custom_tracks": false, +"slice_74/save_to_file/path": "", +"slice_74/start_frame": 0, +"slice_75/end_frame": 0, +"slice_75/loop_mode": 0, +"slice_75/name": "", +"slice_75/save_to_file/enabled": false, +"slice_75/save_to_file/keep_custom_tracks": false, +"slice_75/save_to_file/path": "", +"slice_75/start_frame": 0, +"slice_76/end_frame": 0, +"slice_76/loop_mode": 0, +"slice_76/name": "", +"slice_76/save_to_file/enabled": false, +"slice_76/save_to_file/keep_custom_tracks": false, +"slice_76/save_to_file/path": "", +"slice_76/start_frame": 0, +"slice_77/end_frame": 0, +"slice_77/loop_mode": 0, +"slice_77/name": "", +"slice_77/save_to_file/enabled": false, +"slice_77/save_to_file/keep_custom_tracks": false, +"slice_77/save_to_file/path": "", +"slice_77/start_frame": 0, +"slice_78/end_frame": 0, +"slice_78/loop_mode": 0, +"slice_78/name": "", +"slice_78/save_to_file/enabled": false, +"slice_78/save_to_file/keep_custom_tracks": false, +"slice_78/save_to_file/path": "", +"slice_78/start_frame": 0, +"slice_79/end_frame": 0, +"slice_79/loop_mode": 0, +"slice_79/name": "", +"slice_79/save_to_file/enabled": false, +"slice_79/save_to_file/keep_custom_tracks": false, +"slice_79/save_to_file/path": "", +"slice_79/start_frame": 0, +"slice_8/end_frame": 0, +"slice_8/loop_mode": 0, +"slice_8/name": "", +"slice_8/save_to_file/enabled": false, +"slice_8/save_to_file/keep_custom_tracks": false, +"slice_8/save_to_file/path": "", +"slice_8/start_frame": 0, +"slice_80/end_frame": 0, +"slice_80/loop_mode": 0, +"slice_80/name": "", +"slice_80/save_to_file/enabled": false, +"slice_80/save_to_file/keep_custom_tracks": false, +"slice_80/save_to_file/path": "", +"slice_80/start_frame": 0, +"slice_81/end_frame": 0, +"slice_81/loop_mode": 0, +"slice_81/name": "", +"slice_81/save_to_file/enabled": false, +"slice_81/save_to_file/keep_custom_tracks": false, +"slice_81/save_to_file/path": "", +"slice_81/start_frame": 0, +"slice_82/end_frame": 0, +"slice_82/loop_mode": 0, +"slice_82/name": "", +"slice_82/save_to_file/enabled": false, +"slice_82/save_to_file/keep_custom_tracks": false, +"slice_82/save_to_file/path": "", +"slice_82/start_frame": 0, +"slice_83/end_frame": 0, +"slice_83/loop_mode": 0, +"slice_83/name": "", +"slice_83/save_to_file/enabled": false, +"slice_83/save_to_file/keep_custom_tracks": false, +"slice_83/save_to_file/path": "", +"slice_83/start_frame": 0, +"slice_84/end_frame": 0, +"slice_84/loop_mode": 0, +"slice_84/name": "", +"slice_84/save_to_file/enabled": false, +"slice_84/save_to_file/keep_custom_tracks": false, +"slice_84/save_to_file/path": "", +"slice_84/start_frame": 0, +"slice_85/end_frame": 0, +"slice_85/loop_mode": 0, +"slice_85/name": "", +"slice_85/save_to_file/enabled": false, +"slice_85/save_to_file/keep_custom_tracks": false, +"slice_85/save_to_file/path": "", +"slice_85/start_frame": 0, +"slice_86/end_frame": 0, +"slice_86/loop_mode": 0, +"slice_86/name": "", +"slice_86/save_to_file/enabled": false, +"slice_86/save_to_file/keep_custom_tracks": false, +"slice_86/save_to_file/path": "", +"slice_86/start_frame": 0, +"slice_87/end_frame": 0, +"slice_87/loop_mode": 0, +"slice_87/name": "", +"slice_87/save_to_file/enabled": false, +"slice_87/save_to_file/keep_custom_tracks": false, +"slice_87/save_to_file/path": "", +"slice_87/start_frame": 0, +"slice_88/end_frame": 0, +"slice_88/loop_mode": 0, +"slice_88/name": "", +"slice_88/save_to_file/enabled": false, +"slice_88/save_to_file/keep_custom_tracks": false, +"slice_88/save_to_file/path": "", +"slice_88/start_frame": 0, +"slice_89/end_frame": 0, +"slice_89/loop_mode": 0, +"slice_89/name": "", +"slice_89/save_to_file/enabled": false, +"slice_89/save_to_file/keep_custom_tracks": false, +"slice_89/save_to_file/path": "", +"slice_89/start_frame": 0, +"slice_9/end_frame": 0, +"slice_9/loop_mode": 0, +"slice_9/name": "", +"slice_9/save_to_file/enabled": false, +"slice_9/save_to_file/keep_custom_tracks": false, +"slice_9/save_to_file/path": "", +"slice_9/start_frame": 0, +"slice_90/end_frame": 0, +"slice_90/loop_mode": 0, +"slice_90/name": "", +"slice_90/save_to_file/enabled": false, +"slice_90/save_to_file/keep_custom_tracks": false, +"slice_90/save_to_file/path": "", +"slice_90/start_frame": 0, +"slice_91/end_frame": 0, +"slice_91/loop_mode": 0, +"slice_91/name": "", +"slice_91/save_to_file/enabled": false, +"slice_91/save_to_file/keep_custom_tracks": false, +"slice_91/save_to_file/path": "", +"slice_91/start_frame": 0, +"slice_92/end_frame": 0, +"slice_92/loop_mode": 0, +"slice_92/name": "", +"slice_92/save_to_file/enabled": false, +"slice_92/save_to_file/keep_custom_tracks": false, +"slice_92/save_to_file/path": "", +"slice_92/start_frame": 0, +"slice_93/end_frame": 0, +"slice_93/loop_mode": 0, +"slice_93/name": "", +"slice_93/save_to_file/enabled": false, +"slice_93/save_to_file/keep_custom_tracks": false, +"slice_93/save_to_file/path": "", +"slice_93/start_frame": 0, +"slice_94/end_frame": 0, +"slice_94/loop_mode": 0, +"slice_94/name": "", +"slice_94/save_to_file/enabled": false, +"slice_94/save_to_file/keep_custom_tracks": false, +"slice_94/save_to_file/path": "", +"slice_94/start_frame": 0, +"slice_95/end_frame": 0, +"slice_95/loop_mode": 0, +"slice_95/name": "", +"slice_95/save_to_file/enabled": false, +"slice_95/save_to_file/keep_custom_tracks": false, +"slice_95/save_to_file/path": "", +"slice_95/start_frame": 0, +"slice_96/end_frame": 0, +"slice_96/loop_mode": 0, +"slice_96/name": "", +"slice_96/save_to_file/enabled": false, +"slice_96/save_to_file/keep_custom_tracks": false, +"slice_96/save_to_file/path": "", +"slice_96/start_frame": 0, +"slice_97/end_frame": 0, +"slice_97/loop_mode": 0, +"slice_97/name": "", +"slice_97/save_to_file/enabled": false, +"slice_97/save_to_file/keep_custom_tracks": false, +"slice_97/save_to_file/path": "", +"slice_97/start_frame": 0, +"slice_98/end_frame": 0, +"slice_98/loop_mode": 0, +"slice_98/name": "", +"slice_98/save_to_file/enabled": false, +"slice_98/save_to_file/keep_custom_tracks": false, +"slice_98/save_to_file/path": "", +"slice_98/start_frame": 0, +"slice_99/end_frame": 0, +"slice_99/loop_mode": 0, +"slice_99/name": "", +"slice_99/save_to_file/enabled": false, +"slice_99/save_to_file/keep_custom_tracks": false, +"slice_99/save_to_file/path": "", +"slice_99/start_frame": 0, +"slices/amount": 0 +} +} +} +gltf/naming_version=1 +gltf/embedded_image_handling=1 diff --git a/godot/icon.svg b/godot/icon.svg new file mode 100644 index 0000000..9d8b7fa --- /dev/null +++ b/godot/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/godot/icon.svg.import b/godot/icon.svg.import new file mode 100644 index 0000000..a9ed556 --- /dev/null +++ b/godot/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbh2guq5uttuf" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/godot/package-lock.json b/godot/package-lock.json new file mode 100644 index 0000000..74b9d6c --- /dev/null +++ b/godot/package-lock.json @@ -0,0 +1,44 @@ +{ + "name": "studio-suicide", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "devDependencies": { + "@types/node": "^20.11.30", + "typescript": "^5.4.3" + } + }, + "node_modules/@types/node": { + "version": "20.17.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.30.tgz", + "integrity": "sha512-7zf4YyHA+jvBNfVrk2Gtvs6x7E8V+YDW05bNfG2XkWDJfYRXrTiP/DsB2zSYTaHX0bGIujTBQdMVAhb+j7mwpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/godot/package.json b/godot/package.json new file mode 100644 index 0000000..576039c --- /dev/null +++ b/godot/package.json @@ -0,0 +1,6 @@ +{ + "devDependencies": { + "@types/node": "^20.11.30", + "typescript": "^5.4.3" + } +} diff --git a/godot/project.godot b/godot/project.godot new file mode 100644 index 0000000..51935c2 --- /dev/null +++ b/godot/project.godot @@ -0,0 +1,59 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +[application] + +config/name="studio-suicide" +run/main_scene="res://scenes/node_3d.tscn" +config/features=PackedStringArray("4.3", "Forward Plus") +config/icon="res://icon.svg" + +[autoload] + +MessageBus="*res://src/message_bus.ts" +DebugDraw="*res://src/debug_draw.ts" + +[display] + +window/size/viewport_width=1280 +window/size/viewport_height=720 + +[input] + +move_forward={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":119,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) +] +} +move_back={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) +] +} +move_left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) +] +} +move_right={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) +] +} +run={ +"deadzone": 0.5, +"events": [Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":true,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194325,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null) +] +} diff --git a/godot/scenes/node_3d.tscn b/godot/scenes/node_3d.tscn new file mode 100644 index 0000000..82d1eea --- /dev/null +++ b/godot/scenes/node_3d.tscn @@ -0,0 +1,133 @@ +[gd_scene load_steps=9 format=3 uid="uid://c634jlnd870wg"] + +[ext_resource type="Script" path="res://src/camera_trigger.ts" id="2_anf5t"] +[ext_resource type="PackedScene" uid="uid://b46lmxhgyg5fh" path="res://scenes/player.tscn" id="2_pd54o"] + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ijx74"] +albedo_color = Color(0.427493, 0.427493, 0.427493, 1) + +[sub_resource type="PlaneMesh" id="PlaneMesh_0d3pj"] + +[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_0580h"] + +[sub_resource type="BoxMesh" id="BoxMesh_7osgm"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_3vccc"] + +[sub_resource type="BoxShape3D" id="BoxShape3D_fx65l"] + +[node name="Node3D" type="Node3D"] + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(0.989102, 0.103249, -0.104963, -0.0287189, 0.834504, 0.550253, 0.144405, -0.541242, 0.828375, 0, 18.9707, 0) + +[node name="Ground" type="StaticBody3D" parent="."] + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"] +transform = Transform3D(50, 0, 0, 0, 1, 0, 0, 0, 50, 0, 0, 0) +material_override = SubResource("StandardMaterial3D_ijx74") +mesh = SubResource("PlaneMesh_0d3pj") +skeleton = NodePath("../../root/@EditorNode@16939/@Panel@13/@VBoxContainer@14/DockHSplitLeftL/DockHSplitLeftR/DockHSplitMain/@VBoxContainer@25/DockVSplitCenter/@VSplitContainer@52/@VBoxContainer@53/@PanelContainer@98/MainScreen/@CanvasItemEditor@9272/@VSplitContainer@9094/@HSplitContainer@9096/@HSplitContainer@9098/@Control@9099/@SubViewportContainer@9100/@SubViewport@9101/Node3D") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"] +shape = SubResource("WorldBoundaryShape3D_0580h") + +[node name="Walls" type="Node" parent="."] + +[node name="StaticBody3D" type="StaticBody3D" parent="Walls"] +transform = Transform3D(1, 0, 0, 0, 6, 0, 0, 0, 18, -4, 3, -3) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="StaticBody3D2" type="StaticBody3D" parent="Walls"] +transform = Transform3D(1, 0, 0, 0, 6, 0, 0, 0, 26, 5, 3, -7) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D2"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D2"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="StaticBody3D3" type="StaticBody3D" parent="Walls"] +transform = Transform3D(26, 0, 0, 0, 6, 0, 0, 0, 1, -8, 3, -20) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D3"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D3"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="StaticBody3D6" type="StaticBody3D" parent="Walls"] +transform = Transform3D(10, 0, 0, 0, 6, 0, 0, 0, 1, 1, 3, 6) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D6"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D6"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="StaticBody3D4" type="StaticBody3D" parent="Walls"] +transform = Transform3D(17.5, 0, 0, 0, 6, 0, 0, 0, 1, -12, 3, -12) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D4"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D4"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="StaticBody3D5" type="StaticBody3D" parent="Walls"] +transform = Transform3D(1, 0, 0, 0, 6, 0, 0, 0, 8, -21, 3, -16) + +[node name="MeshInstance3D" type="MeshInstance3D" parent="Walls/StaticBody3D5"] +mesh = SubResource("BoxMesh_7osgm") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Walls/StaticBody3D5"] +shape = SubResource("BoxShape3D_3vccc") + +[node name="Cameras" type="Node" parent="."] + +[node name="Camera3D" type="Camera3D" parent="Cameras"] +transform = Transform3D(-0.868308, 0.0669873, -0.491482, -0.0669873, 0.965926, 0.25, 0.491482, 0.25, -0.834234, -3, 4, -11) +current = true + +[node name="Camera Trigger" type="Area3D" parent="Cameras"] +transform = Transform3D(8, 0, 0, 0, 8, 0, 0, 0, 14.4, 1, 2, -3) +script = ExtResource("2_anf5t") +camera = NodePath("../Camera3D") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Cameras/Camera Trigger"] +shape = SubResource("BoxShape3D_fx65l") + +[node name="Camera3D2" type="Camera3D" parent="Cameras"] +transform = Transform3D(-0.258819, 0, -0.965926, 0, 1, 0, 0.965926, 0, -0.258819, -9, 2, -16) + +[node name="Camera Trigger2" type="Area3D" parent="Cameras"] +transform = Transform3D(12.1176, 0, 0, 0, 9, 0, 0, 0, 9, -1, 2, -15) +script = ExtResource("2_anf5t") +camera = NodePath("../Camera3D2") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Cameras/Camera Trigger2"] +transform = Transform3D(1.1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +shape = SubResource("BoxShape3D_fx65l") + +[node name="Camera3D3" type="Camera3D" parent="Cameras"] +transform = Transform3D(0.258819, 0, 0.965926, 0, 1, 0, -0.965926, 0, 0.258819, -9, 2, -15) + +[node name="Camera Trigger3" type="Area3D" parent="Cameras"] +transform = Transform3D(9, 0, 0, 0, 9, 0, 0, 0, 9, -12, 2, -16) +script = ExtResource("2_anf5t") +camera = NodePath("../Camera3D3") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Cameras/Camera Trigger3"] +transform = Transform3D(1.4, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) +shape = SubResource("BoxShape3D_fx65l") + +[node name="CharacterBody3D" parent="." instance=ExtResource("2_pd54o")] + +[connection signal="body_entered" from="Cameras/Camera Trigger" to="Cameras/Camera Trigger" method="_on_body_entered"] +[connection signal="body_entered" from="Cameras/Camera Trigger2" to="Cameras/Camera Trigger2" method="_on_body_entered"] +[connection signal="body_entered" from="Cameras/Camera Trigger3" to="Cameras/Camera Trigger3" method="_on_body_entered"] diff --git a/godot/scenes/player.tscn b/godot/scenes/player.tscn new file mode 100644 index 0000000..46e05d7 --- /dev/null +++ b/godot/scenes/player.tscn @@ -0,0 +1,222 @@ +[gd_scene load_steps=19 format=3 uid="uid://b46lmxhgyg5fh"] + +[ext_resource type="Script" path="res://src/player.ts" id="1_a88ao"] +[ext_resource type="Script" path="res://src/player_animation.ts" id="2_ypldj"] +[ext_resource type="Script" path="res://src/player_input.ts" id="3_b7c8b"] +[ext_resource type="PackedScene" uid="uid://dv1aoe06v6dbo" path="res://scenes/player_mesh.tscn" id="4_27blp"] + +[sub_resource type="CylinderShape3D" id="CylinderShape3D_x8bhs"] + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_oenqu"] +animation = &"Idle" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_it6i4"] +animation = &"PushButton" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_sl6il"] +animation = &"SlowRun" + +[sub_resource type="AnimationNodeAnimation" id="AnimationNodeAnimation_3b84f"] +animation = &"Walking" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_a51th"] +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_lhuck"] +advance_mode = 2 +advance_condition = &"interact" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_jf23w"] +switch_mode = 2 +advance_mode = 2 + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_dxcas"] +xfade_time = 0.1 +advance_mode = 2 +advance_expression = "velocity" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_5x23f"] +advance_mode = 2 +advance_condition = &"interact" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_mq4ne"] +xfade_time = 0.1 +advance_mode = 2 +advance_expression = "!velocity" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_rx5qf"] +xfade_time = 0.1 +advance_mode = 2 +advance_expression = "is_running()" + +[sub_resource type="AnimationNodeStateMachineTransition" id="AnimationNodeStateMachineTransition_yo8po"] +xfade_time = 0.1 +advance_mode = 2 +advance_expression = "!is_running()" + +[sub_resource type="AnimationNodeStateMachine" id="AnimationNodeStateMachine_u1egq"] +states/Idle/node = SubResource("AnimationNodeAnimation_oenqu") +states/Idle/position = Vector2(365, 100) +states/Interact/node = SubResource("AnimationNodeAnimation_it6i4") +states/Interact/position = Vector2(466, 204) +states/SlowRun/node = SubResource("AnimationNodeAnimation_sl6il") +states/SlowRun/position = Vector2(735, 98) +states/Walking/node = SubResource("AnimationNodeAnimation_3b84f") +states/Walking/position = Vector2(579, 98) +transitions = ["Start", "Idle", SubResource("AnimationNodeStateMachineTransition_a51th"), "Idle", "Interact", SubResource("AnimationNodeStateMachineTransition_lhuck"), "Interact", "Idle", SubResource("AnimationNodeStateMachineTransition_jf23w"), "Idle", "Walking", SubResource("AnimationNodeStateMachineTransition_dxcas"), "Walking", "Interact", SubResource("AnimationNodeStateMachineTransition_5x23f"), "Walking", "Idle", SubResource("AnimationNodeStateMachineTransition_mq4ne"), "Walking", "SlowRun", SubResource("AnimationNodeStateMachineTransition_rx5qf"), "SlowRun", "Walking", SubResource("AnimationNodeStateMachineTransition_yo8po")] +graph_offset = Vector2(264, 15) + +[node name="CharacterBody3D" type="CharacterBody3D"] +script = ExtResource("1_a88ao") +player_input = NodePath("Input") +walk_speed = 2.5 +run_speed = 4.0 + +[node name="CollisionShape3D" type="CollisionShape3D" parent="."] +transform = Transform3D(1.25, 0, 0, 0, 1.25, 0, 0, 0, 1.25, 0, 1.25, 0) +shape = SubResource("CylinderShape3D_x8bhs") + +[node name="AnimationTree" type="AnimationTree" parent="."] +root_node = NodePath("../PlayerMesh") +tree_root = SubResource("AnimationNodeStateMachine_u1egq") +advance_expression_base_node = NodePath("..") +anim_player = NodePath("../PlayerMesh/AnimationPlayer") +parameters/conditions/interact = false +script = ExtResource("2_ypldj") + +[node name="Input" type="Node3D" parent="."] +script = ExtResource("3_b7c8b") + +[node name="PlayerMesh" parent="." instance=ExtResource("4_27blp")] + +[node name="Skeleton3D" parent="PlayerMesh/Armature" index="0"] +bones/0/position = Vector3(10.8323, 100.566, 1.76934) +bones/0/rotation = Quaternion(-0.0230531, -0.134826, 0.0330271, 0.99005) +bones/1/position = Vector3(-1.08778e-06, 8.00974e-08, -5.45755e-07) +bones/2/rotation = Quaternion(-0.126312, 0.00390559, -0.0612111, 0.990093) +bones/3/position = Vector3(1.2666e-07, 1.38208e-06, 4.63426e-06) +bones/4/rotation = Quaternion(0.0179489, -0.00825122, -0.0178849, 0.999645) +bones/5/position = Vector3(-8.19564e-07, -1.46851e-05, 4.30644e-06) +bones/6/rotation = Quaternion(0.0308461, -0.00732419, -0.0178495, 0.999338) +bones/7/position = Vector3(3.57632e-07, -2.42144e-05, -3.53158e-06) +bones/8/rotation = Quaternion(-0.556759, 0.512207, -0.549306, -0.354861) +bones/9/position = Vector3(1.93715e-07, -8.76188e-06, -1.82156e-05) +bones/10/position = Vector3(-2.22259e-06, 10.8382, 6.657e-05) +bones/10/rotation = Quaternion(0.535951, -0.123005, -0.0947963, 0.829844) +bones/11/position = Vector3(1.66958e-06, -2.30764e-05, 5.90135e-07) +bones/12/rotation = Quaternion(6.63038e-08, 4.62427e-08, -0.238361, 0.971177) +bones/13/position = Vector3(7.10815e-06, 2.49848e-06, -3.67706e-07) +bones/14/position = Vector3(1.00884e-05, 28.3289, 1.42043e-06) +bones/14/rotation = Quaternion(-0.00100366, -0.153901, -0.0163265, 0.987951) +bones/15/position = Vector3(1.43223e-06, -9.47448e-06, -3.04991e-06) +bones/16/rotation = Quaternion(0.130922, -0.000536525, 0.0200024, 0.991191) +bones/17/position = Vector3(2.78027e-07, -1.63051e-05, 2.7709e-07) +bones/18/position = Vector3(-7.17311e-07, 3.6, -4.46059e-05) +bones/18/rotation = Quaternion(0.125981, 7.59033e-08, 0.0153541, 0.991914) +bones/19/position = Vector3(-1.09796e-06, -1.6639e-05, -1.30592e-05) +bones/20/rotation = Quaternion(0.19325, 7.59658e-09, 0.0235519, 0.980867) +bones/21/position = Vector3(-3.42208e-06, -3.57069e-06, -7.88492e-06) +bones/22/position = Vector3(-2.66578e-06, 2.11579, -6.80612e-06) +bones/23/position = Vector3(1.99676e-06, 2.3176e-06, 1.13522e-06) +bones/24/position = Vector3(-2.81929e-05, 9.5325, 4.46934e-05) +bones/24/rotation = Quaternion(0.118124, 0.00017292, 0.0129408, 0.992915) +bones/25/position = Vector3(-2.64221e-06, 1.33002e-05, 9.27813e-06) +bones/26/position = Vector3(-3.12982e-06, 3.70001, -1.88553e-05) +bones/26/rotation = Quaternion(0.118005, -1.8283e-08, 0.0143819, 0.992909) +bones/27/position = Vector3(4.8121e-06, -1.06792e-05, -1.50226e-05) +bones/28/position = Vector3(3.86115e-06, 2.95001, -1.38305e-05) +bones/28/rotation = Quaternion(0.221719, 0.0356031, 0.035285, 0.973821) +bones/31/position = Vector3(1.86637e-06, 5.9802e-06, -1.467e-05) +bones/32/rotation = Quaternion(0.173185, -0.000326617, 0.0229624, 0.984622) +bones/33/position = Vector3(-2.25109e-06, -9.16777e-06, 1.35742e-05) +bones/34/position = Vector3(-1.61634e-06, 3.37927, -2.16157e-06) +bones/34/rotation = Quaternion(0.0978745, -6.00722e-08, 0.0119283, 0.995127) +bones/36/position = Vector3(-1.34902e-06, 2.88968, 1.45266e-05) +bones/36/rotation = Quaternion(0.1665, 0.102706, 0.0382309, 0.979933) +bones/37/position = Vector3(7.45909e-07, -8.48482e-06, 1.51202e-05) +bones/38/position = Vector3(-7.0702e-07, 2.63882, -1.46823e-05) +bones/39/position = Vector3(-4.24683e-07, -3.16713e-06, -1.23643e-05) +bones/40/position = Vector3(2.25983, 9.10828, 0.517866) +bones/40/rotation = Quaternion(0.190553, -0.00191066, 0.0330006, 0.98112) +bones/41/position = Vector3(5.8333e-07, 6.3235e-07, 1.57826e-05) +bones/42/rotation = Quaternion(0.0903997, 7.32054e-08, 0.0110174, 0.995845) +bones/43/position = Vector3(-1.30539e-06, 1.28774e-05, 4.90486e-08) +bones/44/rotation = Quaternion(0.134768, -7.61413e-08, 0.0164247, 0.990741) +bones/45/position = Vector3(-2.28086e-07, -1.45823e-06, -4.29744e-07) +bones/48/position = Vector3(2.68185, 2.4648, 1.57399) +bones/48/rotation = Quaternion(0.123738, 0.0614859, -0.162114, 0.97705) +bones/49/position = Vector3(-3.57628e-06, -1.16825e-05, 6.73833e-06) +bones/50/position = Vector3(-7.17277e-06, 4.18897, 1.07578e-06) +bones/50/rotation = Quaternion(-0.065068, 0.0341859, 0.191511, 0.978734) +bones/52/position = Vector3(-8.77766e-06, 3.41628, -4.79003e-06) +bones/52/rotation = Quaternion(0.0223925, -0.00350703, -0.0584347, 0.998034) +bones/53/position = Vector3(-3.03984e-06, 2.01762e-05, -1.93187e-06) +bones/56/rotation = Quaternion(0.0531727, 0.00267766, 0.0303457, 0.998121) +bones/57/position = Vector3(1.19211e-07, -2.28947e-05, -3.36394e-06) +bones/58/rotation = Quaternion(-0.101476, 0.020969, 0.0128598, 0.994534) +bones/59/position = Vector3(-1.0431e-07, -1.54506e-05, -1.49384e-06) +bones/61/rotation = Quaternion(0.576319, 0.496831, -0.542606, 0.355801) +bones/62/position = Vector3(5.96046e-08, -6.10948e-07, -7.88433e-06) +bones/63/position = Vector3(3.42725e-07, 10.8377, 3.26269e-05) +bones/63/rotation = Quaternion(0.514101, 0.0626199, 0.0220347, 0.855157) +bones/64/position = Vector3(2.4772e-06, 1.24322e-06, 3.17702e-06) +bones/65/position = Vector3(7.81477e-06, 27.8415, 3.26074e-05) +bones/65/rotation = Quaternion(-1.80993e-08, -3.41039e-08, 0.199691, 0.979859) +bones/66/position = Vector3(-3.25318e-06, -4.67625e-06, -1.50252e-06) +bones/67/rotation = Quaternion(0.0551003, 0.135529, 0.0470682, 0.98812) +bones/68/position = Vector3(7.47968e-08, -6.91227e-07, -2.51579e-06) +bones/69/rotation = Quaternion(0.158909, -0.0734939, 0.0529653, 0.983128) +bones/70/position = Vector3(1.18017e-05, 1.18017e-05, 1.03254e-05) +bones/71/position = Vector3(-7.12144e-07, 4.18709, 2.40078e-06) +bones/71/rotation = Quaternion(-0.0321456, -0.0368734, -0.198096, 0.978961) +bones/72/position = Vector3(5.48363e-06, -9.44734e-06, -1.48937e-05) +bones/73/position = Vector3(-6.19066e-06, 3.41839, -3.25305e-05) +bones/73/rotation = Quaternion(-0.00653892, -0.129599, -0.140468, 0.981545) +bones/74/position = Vector3(3.75509e-06, 1.69277e-05, 9.12723e-07) +bones/75/position = Vector3(2.59013e-06, 2.5806, 1.43079e-06) +bones/77/rotation = Quaternion(0.0945151, -0.00116771, 0.00108596, 0.995522) +bones/78/position = Vector3(2.34035e-07, 6.61208e-07, -1.22018e-06) +bones/79/position = Vector3(-2.66701e-07, 3.7, -4.303e-07) +bones/79/rotation = Quaternion(0.113511, -1.25944e-07, -0.0136986, 0.993442) +bones/80/position = Vector3(-3.04282e-06, -2.24161e-06, -1.52532e-05) +bones/81/rotation = Quaternion(0.137959, -1.52381e-07, -0.0166491, 0.990298) +bones/84/position = Vector3(-1.56742e-06, -5.37828e-06, 1.60567e-05) +bones/85/rotation = Quaternion(0.0395193, -0.000171217, -0.000416618, 0.999219) +bones/86/position = Vector3(-2.09158e-07, 7.10476e-06, -1.37234e-05) +bones/87/rotation = Quaternion(0.125074, -2.31704e-07, -0.0150939, 0.992033) +bones/88/position = Vector3(-1.44259e-06, -2.81852e-06, -1.08586e-06) +bones/89/rotation = Quaternion(0.149466, -1.8287e-07, -0.0180375, 0.988602) +bones/90/position = Vector3(-1.67251e-06, -5.69229e-06, 4.16067e-06) +bones/92/position = Vector3(-2.07638e-06, -8.50701e-06, 1.83102e-06) +bones/93/rotation = Quaternion(0.0934523, -0.00111243, 0.000755997, 0.995623) +bones/94/position = Vector3(-1.24702e-06, -4.42364e-06, 5.52884e-07) +bones/95/rotation = Quaternion(0.142515, -1.9556e-07, -0.0171987, 0.989643) +bones/96/position = Vector3(-2.19045e-06, -7.68091e-06, -2.55365e-06) +bones/97/position = Vector3(1.62425e-06, 2.95, 1.38972e-05) +bones/97/rotation = Quaternion(0.21712, -3.15011e-07, -0.0262021, 0.975793) +bones/98/position = Vector3(-2.69965e-06, -1.43062e-07, 1.26105e-06) +bones/99/position = Vector3(-2.845e-05, 2.64431, 1.98053e-06) +bones/100/position = Vector3(6.57979e-07, -4.74934e-06, 1.44472e-05) +bones/101/position = Vector3(3.80627, 8.07779, 0.486894) +bones/101/rotation = Quaternion(0.109405, 0.00431716, -0.0507793, 0.99269) +bones/102/position = Vector3(-2.33662e-06, 1.08604e-05, 1.6658e-05) +bones/103/rotation = Quaternion(0.123519, 0.00427894, 0.0207453, 0.992116) +bones/104/position = Vector3(1.84285e-06, 5.76279e-06, -1.71906e-05) +bones/105/rotation = Quaternion(0.0937019, -6.23296e-08, -0.0113077, 0.995536) +bones/106/position = Vector3(1.48522e-06, -3.60209e-06, 1.44012e-05) +bones/107/position = Vector3(4.3816e-06, 2.12554, -2.07618e-05) +bones/108/position = Vector3(-4.91738e-07, 8.79425e-06, -1.38031e-06) +bones/109/rotation = Quaternion(-0.0692737, 0.141006, 0.983921, 0.0849542) +bones/110/position = Vector3(-1.06222e-06, 3.19319e-05, -1.56533e-06) +bones/111/rotation = Quaternion(-0.295735, -0.0596685, -0.0123846, 0.953324) +bones/112/position = Vector3(2.91388e-07, 4.25241e-06, -2.20301e-06) +bones/113/rotation = Quaternion(0.555602, -0.0142493, 0.0561636, 0.829427) +bones/115/rotation = Quaternion(0.338989, 3.45834e-05, 1.21499e-05, 0.94079) +bones/119/rotation = Quaternion(0.0140214, 0.106701, 0.989156, 0.0999454) +bones/120/position = Vector3(-8.23132e-07, -4.34501e-06, -1.59527e-06) +bones/121/rotation = Quaternion(-0.250538, -0.0735148, 0.00494552, 0.965299) +bones/122/position = Vector3(-6.62286e-07, 6.482e-06, 2.36121e-07) +bones/123/rotation = Quaternion(0.534216, -0.139986, 0.120867, 0.824869) +bones/125/rotation = Quaternion(0.342195, -0.0134352, -0.00466826, 0.939521) + +[editable path="PlayerMesh"] diff --git a/godot/scenes/player_mesh.tscn b/godot/scenes/player_mesh.tscn new file mode 100644 index 0000000..081d90c --- /dev/null +++ b/godot/scenes/player_mesh.tscn @@ -0,0 +1,165 @@ +[gd_scene load_steps=2 format=3 uid="uid://dv1aoe06v6dbo"] + +[ext_resource type="PackedScene" uid="uid://c28drqeq2gok0" path="res://assets/player.glb" id="1_8ooov"] + +[node name="PlayerMesh" instance=ExtResource("1_8ooov")] + +[node name="Skeleton3D" parent="Armature" index="0"] +bones/0/position = Vector3(-0.0661675, 86.7809, 1.97153) +bones/0/rotation = Quaternion(0.168007, -0.0337527, 0.0307023, 0.984729) +bones/0/scale = Vector3(1, 1, 1) +bones/1/position = Vector3(-5.73688e-07, -9.14512e-06, -1.26241e-06) +bones/2/rotation = Quaternion(-0.0442171, 0.0293714, -0.00188288, 0.998588) +bones/3/position = Vector3(9.31323e-07, 4.82425e-06, 3.63451e-07) +bones/4/rotation = Quaternion(0.026958, 0.019905, 0.00950527, 0.999393) +bones/5/position = Vector3(-1.93715e-07, -5.33462e-06, -3.29316e-06) +bones/6/rotation = Quaternion(0.0392055, 0.0202191, 0.01003, 0.998976) +bones/7/position = Vector3(7.1526e-07, -1.93864e-05, -4.64916e-06) +bones/8/rotation = Quaternion(-0.55287, 0.518692, -0.527348, -0.383663) +bones/8/scale = Vector3(1, 1, 1) +bones/9/position = Vector3(4.03821e-06, 2.32458e-06, -8.17219e-06) +bones/10/position = Vector3(-1.57305e-06, 10.8382, 6.06992e-05) +bones/10/rotation = Quaternion(0.311316, -0.233312, -0.211715, 0.896563) +bones/10/scale = Vector3(1, 1, 1) +bones/11/position = Vector3(4.29218e-06, -5.19505e-06, 6.01416e-06) +bones/12/rotation = Quaternion(1.82178e-07, 1.15022e-08, -0.649059, 0.760738) +bones/13/position = Vector3(-8.38905e-06, 3.33295e-06, 2.61253e-06) +bones/14/position = Vector3(-3.8591e-06, 28.3289, 4.04304e-06) +bones/14/rotation = Quaternion(-0.0542821, 0.10518, -0.0835181, 0.989452) +bones/15/position = Vector3(3.578e-06, -5.33786e-07, -1.20217e-06) +bones/16/rotation = Quaternion(0.540302, 0.0114986, 0.127946, 0.831608) +bones/17/position = Vector3(-5.2056e-06, -2.74507e-06, 2.17486e-07) +bones/18/position = Vector3(-4.54572e-06, 3.60001, -4.16853e-05) +bones/18/rotation = Quaternion(0.518766, 6.32048e-08, 0.0422635, 0.853871) +bones/19/position = Vector3(5.70967e-07, -7.07246e-06, -9.18487e-06) +bones/20/rotation = Quaternion(0.507401, 4.30081e-09, 0.0413371, 0.860718) +bones/21/position = Vector3(-6.99836e-06, -7.14697e-06, -2.1594e-05) +bones/22/position = Vector3(6.30171e-07, 2.11579, -2.0168e-05) +bones/22/rotation = Quaternion(6.43738e-08, 0.00156918, -4.10172e-05, 0.999999) +bones/22/scale = Vector3(1, 1, 1) +bones/23/position = Vector3(2.23517e-06, -3.43425e-06, -5.65971e-06) +bones/24/position = Vector3(-2.38966e-05, 9.5325, 4.5051e-05) +bones/24/rotation = Quaternion(0.489046, 0.00912573, 0.0578439, 0.87029) +bones/25/position = Vector3(-6.4569e-06, 7.69735e-06, 1.93997e-05) +bones/26/position = Vector3(-1.6476e-05, 3.70001, -1.55696e-05) +bones/26/rotation = Quaternion(0.218945, -1.54959e-08, 0.0178374, 0.975574) +bones/27/position = Vector3(-1.2354e-05, -8.65261e-06, -1.28768e-05) +bones/28/position = Vector3(-4.24592e-06, 2.95001, -9.53893e-06) +bones/28/rotation = Quaternion(0.207109, -1.91016e-07, 0.0168727, 0.978172) +bones/30/rotation = Quaternion(-1.54606e-07, 0.000928791, 0.000166436, 1) +bones/31/position = Vector3(-7.56234e-07, 7.47032e-06, -1.1809e-05) +bones/32/rotation = Quaternion(0.526484, -0.00597849, 0.0857894, 0.845825) +bones/33/position = Vector3(-6.06578e-06, 1.30555e-07, 1.69121e-05) +bones/34/position = Vector3(-4.23319e-06, 3.37928, 2.18956e-06) +bones/34/rotation = Quaternion(0.492157, -4.28412e-08, 0.0400953, 0.869583) +bones/34/scale = Vector3(1, 1, 1) +bones/36/position = Vector3(-1.18398e-05, 2.88968, 7.61242e-06) +bones/36/rotation = Quaternion(0.478412, 1.06171e-09, 0.0389752, 0.87727) +bones/37/position = Vector3(-6.88349e-06, -1.37002e-05, 1.28552e-05) +bones/38/position = Vector3(2.56333e-07, 2.63883, -1.43249e-05) +bones/38/rotation = Quaternion(1.16653e-07, 0.000145825, -0.00079924, 1) +bones/38/scale = Vector3(1, 1, 1) +bones/39/position = Vector3(-4.24683e-07, 1.26579e-05, -1.86824e-05) +bones/40/position = Vector3(2.25984, 9.10828, 0.517869) +bones/40/rotation = Quaternion(0.453931, 0.00430561, 0.0275771, 0.8906) +bones/41/position = Vector3(1.06017e-06, 7.42728e-06, 1.53654e-05) +bones/42/rotation = Quaternion(0.411916, 1.10464e-07, 0.0335583, 0.910604) +bones/43/position = Vector3(-7.02744e-06, 7.93018e-06, 5.25886e-07) +bones/44/rotation = Quaternion(0.401077, -5.18852e-08, 0.0326752, 0.915461) +bones/45/position = Vector3(-2.85069e-06, 1.82002e-06, -3.29077e-06) +bones/46/rotation = Quaternion(-8.72723e-08, 0.00100258, 8.70361e-05, 0.999999) +bones/46/scale = Vector3(1, 1, 1) +bones/48/position = Vector3(2.68185, 2.4648, 1.57399) +bones/48/rotation = Quaternion(0.198864, 0.0620904, -0.237479, 0.948789) +bones/48/scale = Vector3(1, 1, 1) +bones/49/position = Vector3(-9.0003e-06, -5.24521e-06, 4.05612e-06) +bones/50/position = Vector3(-1.37213e-05, 4.18898, 1.30866e-06) +bones/50/rotation = Quaternion(-0.0494684, -0.0169209, 0.208919, 0.976534) +bones/50/scale = Vector3(1, 1, 1) +bones/52/position = Vector3(-1.33398e-07, 3.41628, -7.38503e-06) +bones/52/rotation = Quaternion(-0.15632, -0.0119966, 0.0680515, 0.985286) +bones/52/scale = Vector3(1, 1, 1) +bones/53/position = Vector3(-1.13845e-05, 6.58631e-06, -2.40871e-06) +bones/54/rotation = Quaternion(0.00577409, -0.11751, -0.0487441, 0.991858) +bones/56/rotation = Quaternion(-0.0616403, -0.00291511, 0.0116202, 0.998027) +bones/57/position = Vector3(-1.43051e-06, -1.90437e-05, -4.97699e-06) +bones/58/rotation = Quaternion(-0.0888477, 0.0184369, -0.0284141, 0.995469) +bones/59/position = Vector3(3.57626e-07, -2.48402e-05, -4.05312e-06) +bones/60/rotation = Quaternion(3.91155e-08, 3.7787e-08, 2.9976e-15, 1) +bones/61/rotation = Quaternion(0.588158, 0.488325, -0.52304, 0.376879) +bones/62/position = Vector3(-9.28342e-06, -1.90735e-06, -1.25186e-05) +bones/63/position = Vector3(-6.21295e-06, 10.8377, 3.97934e-05) +bones/63/rotation = Quaternion(0.390411, 0.239833, 0.135332, 0.87849) +bones/63/scale = Vector3(1, 1, 1) +bones/64/position = Vector3(-6.81842e-07, 2.49492e-06, -4.24376e-06) +bones/65/position = Vector3(9.00633e-07, 27.8415, 2.65277e-05) +bones/65/rotation = Quaternion(-9.9156e-08, 3.62967e-09, 0.600159, 0.799881) +bones/66/position = Vector3(1.81322e-06, -7.35846e-06, -1.91975e-06) +bones/67/rotation = Quaternion(-0.0148658, -0.148494, 0.16027, 0.975726) +bones/68/position = Vector3(-2.66702e-06, 6.75935e-06, 1.82044e-06) +bones/69/rotation = Quaternion(0.110859, -0.0637618, 0.261867, 0.956593) +bones/69/scale = Vector3(1, 1, 1) +bones/70/position = Vector3(1.54972e-06, 1.10865e-05, 1.50938e-05) +bones/71/position = Vector3(-9.48468e-06, 4.18709, 6.46207e-06) +bones/71/rotation = Quaternion(-0.0485728, 0.0234044, -0.216652, 0.974759) +bones/72/position = Vector3(4.76837e-06, -6.58631e-06, -1.79932e-05) +bones/73/position = Vector3(3.41813e-06, 3.41839, -3.61406e-05) +bones/73/rotation = Quaternion(-0.0930313, -0.0290649, 0.13402, 0.986174) +bones/73/scale = Vector3(1, 1, 1) +bones/74/position = Vector3(6.76513e-06, 4.05312e-06, -9.94626e-07) +bones/75/position = Vector3(1.19018e-05, 2.58059, -2.38419e-06) +bones/75/rotation = Quaternion(0.0051477, 0.122682, 0.041651, 0.991558) +bones/75/scale = Vector3(1, 1, 1) +bones/77/rotation = Quaternion(0.687122, -0.0451216, 0.0119742, 0.725041) +bones/78/position = Vector3(1.02476e-05, 1.25725e-06, -3.09773e-06) +bones/79/position = Vector3(1.16544e-05, 3.7, -2.38235e-06) +bones/79/rotation = Quaternion(0.473463, -6.95732e-07, -0.0485189, 0.879476) +bones/80/position = Vector3(-4.95017e-06, 2.76518e-06, -1.62069e-05) +bones/81/rotation = Quaternion(0.399852, -6.25517e-07, -0.0409757, 0.915663) +bones/83/rotation = Quaternion(-4.89366e-09, -0.000377568, -1.2974e-05, 1) +bones/84/position = Vector3(2.00886e-06, -1.55707e-05, 1.65336e-05) +bones/85/rotation = Quaternion(0.693149, -0.0265264, -0.0731281, 0.716585) +bones/86/position = Vector3(-1.63967e-06, 3.17085e-06, -1.61075e-05) +bones/87/rotation = Quaternion(0.480525, -6.60523e-07, -0.0492427, 0.875597) +bones/88/position = Vector3(1.00015e-05, -1.164e-05, -9.66649e-07) +bones/89/rotation = Quaternion(0.404821, -7.17772e-07, -0.0414847, 0.913454) +bones/90/position = Vector3(1.66535e-06, -8.3745e-06, -2.99188e-06) +bones/91/rotation = Quaternion(2.85187e-08, -0.00102416, 2.78559e-05, 0.999999) +bones/92/position = Vector3(7.46036e-06, 4.84443e-06, -1.74526e-06) +bones/93/rotation = Quaternion(0.694768, -0.000648289, -0.0998806, 0.712265) +bones/94/position = Vector3(8.98751e-07, 5.35152e-06, -6.46659e-07) +bones/95/rotation = Quaternion(0.492817, -6.82946e-07, -0.0505023, 0.868666) +bones/96/position = Vector3(4.96211e-06, -1.72045e-06, 3.28761e-06) +bones/97/position = Vector3(6.86945e-06, 2.95, 1.36588e-05) +bones/97/rotation = Quaternion(0.403868, -6.6852e-07, -0.0413871, 0.91388) +bones/98/position = Vector3(-3.15467e-07, 5.01274e-06, 4.26586e-07) +bones/99/position = Vector3(-2.55906e-05, 2.64431, 3.08781e-07) +bones/100/position = Vector3(-1.24937e-06, -5.10697e-06, 1.54605e-05) +bones/101/position = Vector3(3.80626, 8.0778, 0.486897) +bones/101/rotation = Quaternion(0.714314, 0.0204882, -0.215513, 0.6655) +bones/102/position = Vector3(-3.4095e-06, 9.84711e-06, 2.19628e-05) +bones/103/rotation = Quaternion(0.497948, -4.89493e-07, -0.0510274, 0.865704) +bones/104/position = Vector3(2.55811e-06, 3.79583e-06, -1.0634e-05) +bones/105/rotation = Quaternion(0.415872, -5.33108e-07, -0.0426171, 0.908424) +bones/106/position = Vector3(-6.14417e-06, -1.13954e-05, 1.6547e-05) +bones/107/position = Vector3(-5.6429e-06, 2.12554, -1.44594e-05) +bones/107/rotation = Quaternion(-2.31341e-07, -0.000782879, -0.000295457, 1) +bones/107/scale = Vector3(1, 1, 1) +bones/108/position = Vector3(-9.07481e-06, 9.92674e-06, -5.45842e-07) +bones/109/rotation = Quaternion(-0.0285176, 0.354213, 0.934458, -0.0225491) +bones/109/scale = Vector3(1, 1, 1) +bones/110/position = Vector3(-8.46157e-07, 2.16948e-05, -6.41459e-07) +bones/111/rotation = Quaternion(-0.555783, 0.0104598, 0.0148413, 0.831129) +bones/112/position = Vector3(-6.62415e-08, 3.47755e-06, 3.22101e-06) +bones/113/rotation = Quaternion(0.744413, -0.0327251, -0.0586288, 0.664335) +bones/115/rotation = Quaternion(0.335242, 3.45451e-05, 1.23524e-05, 0.942132) +bones/117/rotation = Quaternion(2.98097e-08, 0.0115715, 3.46601e-10, 0.999933) +bones/119/rotation = Quaternion(0.0392834, 0.480883, 0.875853, 0.00947229) +bones/119/scale = Vector3(1, 1, 1) +bones/120/position = Vector3(-1.94257e-07, 7.09908e-06, -4.76177e-06) +bones/121/rotation = Quaternion(-0.766345, 0.0450773, -0.0338915, 0.639949) +bones/122/position = Vector3(-4.23867e-07, -3.05474e-06, -1.07518e-06) +bones/123/rotation = Quaternion(0.456476, -0.0556083, 0.0562292, 0.886214) +bones/123/scale = Vector3(1, 1, 1) +bones/125/rotation = Quaternion(0.315815, 3.41678e-05, 1.30299e-05, 0.948821) +bones/127/rotation = Quaternion(1.4904e-08, -0.0119058, -1.76878e-10, 0.999929) diff --git a/godot/src/camera_cache.ts b/godot/src/camera_cache.ts new file mode 100644 index 0000000..fccc38d --- /dev/null +++ b/godot/src/camera_cache.ts @@ -0,0 +1,39 @@ +import { Camera3D, float64, Vector3 } from 'godot' + +export class CameraCache extends Object { + private _camera: Camera3D + get camera() { return this._camera } + + private _angle: float64 + + get angle() { + return this._camera.rotation.y + } + + private _dirty: boolean = true + + constructor(initial_camera: Camera3D) { + super() + this._camera = initial_camera + this._angle = this._camera.rotation.y + } + + update_camera(camera: Camera3D) { + this._camera = camera + this._dirty = true + } + + recalculate() { + if (this._dirty) { + this._angle = this._camera.rotation.y + this._dirty = false + } + } + + transform_vec(vec: Vector3): Vector3 { + return vec.rotated(Vector3.UP, this._angle) + + } +} + + diff --git a/godot/src/camera_trigger.js b/godot/src/camera_trigger.js new file mode 100644 index 0000000..718e269 --- /dev/null +++ b/godot/src/camera_trigger.js @@ -0,0 +1,33 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +const godot_annotations_1 = require("godot.annotations"); +const player_1 = __importDefault(require("./player")); +const message_bus_1 = __importDefault(require("./message_bus")); +class CameraTrigger extends godot_1.Area3D { + _ready() { + this._camera = this.get_node(this.camera); + } + _on_body_entered(body) { + var _a; + if (body instanceof player_1.default) { + (_a = this._camera) === null || _a === void 0 ? void 0 : _a.make_current(); + console.log(message_bus_1.default.instance.active_camera_changed); + message_bus_1.default.instance.active_camera_changed.emit(this._camera); + } + } +} +exports.default = CameraTrigger; +__decorate([ + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_NODE_PATH) +], CameraTrigger.prototype, "camera", void 0); +//# sourceMappingURL=camera_trigger.js.map \ No newline at end of file diff --git a/godot/src/camera_trigger.js.map b/godot/src/camera_trigger.js.map new file mode 100644 index 0000000..1ec98ff --- /dev/null +++ b/godot/src/camera_trigger.js.map @@ -0,0 +1 @@ +{"version":3,"file":"camera_trigger.js","sourceRoot":"../../../","sources":["src/camera_trigger.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAA0E;AAC1E,yDAA2C;AAC3C,sDAA6B;AAC7B,gEAAsC;AAEtC,MAAqB,aAAc,SAAQ,cAAM;IAK/C,MAAM;QACJ,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAa,CAAA;IACvD,CAAC;IAED,gBAAgB,CAAC,IAAmB;;QAClC,IAAI,IAAI,YAAY,gBAAM,EAAE,CAAC;YAC3B,MAAA,IAAI,CAAC,OAAO,0CAAE,YAAY,EAAE,CAAA;YAC5B,OAAO,CAAC,GAAG,CAAC,qBAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAA;YACtD,qBAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAC9D,CAAC;IACH,CAAC;CACF;AAhBD,gCAgBC;AAdC;IADC,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,cAAc,CAAC;6CACpB"} \ No newline at end of file diff --git a/godot/src/camera_trigger.ts b/godot/src/camera_trigger.ts new file mode 100644 index 0000000..697f1a5 --- /dev/null +++ b/godot/src/camera_trigger.ts @@ -0,0 +1,22 @@ +import { Area3D, Camera3D, NodePath, PhysicsBody3D, Variant } from 'godot' +import { export_ } from 'godot.annotations' +import Player from './player' +import MessageBus from './message_bus' + +export default class CameraTrigger extends Area3D { + @export_(Variant.Type.TYPE_NODE_PATH) + camera!: NodePath + _camera!: Camera3D + + _ready(): void { + this._camera = this.get_node(this.camera) as Camera3D + } + + _on_body_entered(body: PhysicsBody3D) { + if (body instanceof Player) { + this._camera?.make_current() + console.log(MessageBus.instance.active_camera_changed) + MessageBus.instance.active_camera_changed.emit(this._camera) + } + } +} diff --git a/godot/src/debug_draw.js b/godot/src/debug_draw.js new file mode 100644 index 0000000..9dfb914 --- /dev/null +++ b/godot/src/debug_draw.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +class DebugDraw extends godot_1.Node { + static get instance() { + return DebugDraw._inst; + } + _ready() { + DebugDraw._inst = this; + } + draw_line(begin, end, color = godot_1.Color.CYAN) { + const instance = new godot_1.GeometryInstance3D(); + this.add_child(instance); + const geom = new godot_1.ImmediateMesh(); + geom.surface_begin(godot_1.ImmediateMesh.PrimitiveType.PRIMITIVE_LINES); + geom.surface_add_vertex(begin); + geom.surface_add_vertex(end); + geom.surface_set_color(color); + geom.surface_end(); + } +} +exports.default = DebugDraw; +//# sourceMappingURL=debug_draw.js.map \ No newline at end of file diff --git a/godot/src/debug_draw.js.map b/godot/src/debug_draw.js.map new file mode 100644 index 0000000..260951f --- /dev/null +++ b/godot/src/debug_draw.js.map @@ -0,0 +1 @@ +{"version":3,"file":"debug_draw.js","sourceRoot":"../../../","sources":["src/debug_draw.ts"],"names":[],"mappings":";;AAAA,iCAA+E;AAE/E,MAAqB,SAAU,SAAQ,YAAI;IAGzC,MAAM,KAAK,QAAQ;QACjB,OAAO,SAAS,CAAC,KAAK,CAAA;IACxB,CAAC;IAED,MAAM;QACJ,SAAS,CAAC,KAAK,GAAG,IAAI,CAAA;IACxB,CAAC;IAED,SAAS,CAAC,KAAc,EAAE,GAAY,EAAE,QAAe,aAAK,CAAC,IAAI;QAC/D,MAAM,QAAQ,GAAG,IAAI,0BAAkB,EAAE,CAAA;QACzC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAA;QAExB,MAAM,IAAI,GAAG,IAAI,qBAAa,EAAE,CAAA;QAChC,IAAI,CAAC,aAAa,CAAC,qBAAa,CAAC,aAAa,CAAC,eAAe,CAAC,CAAA;QAC/D,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAA;QAC9B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAA;QAC5B,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAA;QAC7B,IAAI,CAAC,WAAW,EAAE,CAAA;IACpB,CAAC;CACF;AAtBD,4BAsBC"} \ No newline at end of file diff --git a/godot/src/debug_draw.ts b/godot/src/debug_draw.ts new file mode 100644 index 0000000..8f48b31 --- /dev/null +++ b/godot/src/debug_draw.ts @@ -0,0 +1,104 @@ +import { BaseMaterial3D, Color, ImmediateMesh, Mesh, MeshInstance3D, Node, Node3D, PackedVector3Array, StandardMaterial3D, Vector3 } from 'godot' + +function createDefaultMaterial(): StandardMaterial3D { + const material = new StandardMaterial3D() + + material.shading_mode = BaseMaterial3D.ShadingMode.SHADING_MODE_UNSHADED + material.no_depth_test = true + material.vertex_color_use_as_albedo = true + material.transparency = BaseMaterial3D.Transparency.TRANSPARENCY_DISABLED + material.cull_mode = BaseMaterial3D.CullMode.CULL_DISABLED + + return material +} + +class PooledMeshInstance { + in_use: boolean = false + instance: MeshInstance3D + + constructor(material: StandardMaterial3D) { + this.instance = new MeshInstance3D() + this.instance.material_override = material + } +} + +class MeshPool { + target: Node + pool: PooledMeshInstance[] + default_material: StandardMaterial3D + + constructor(target: Node, initial: number = 10) { + this.pool = [] + this.target = target + this.default_material = createDefaultMaterial() + + for (let i = 0; i < initial; i++) { + this.create() + } + } + + create() { + const instance = new PooledMeshInstance(this.default_material) + instance.instance.mesh = new ImmediateMesh() + this.pool.push(instance) + this.target.add_child(instance.instance) + return instance + } + + get() { + const next = this.pool.find(x => !x.in_use) + if (next) { + next.in_use = true + return next + } else { + const instance = this.create() + instance.in_use = true + return instance + } + } + + release(instance: PooledMeshInstance) { + instance.in_use = false + } +} + +export default class DebugDraw extends Node { + private static _inst: DebugDraw + + static get instance() { + return DebugDraw._inst + } + + pool!: MeshPool + + _ready(): void { + DebugDraw._inst = this + this.pool = new MeshPool(this as Node) + } + + static draw_line(begin: Vector3, end: Vector3, color: Color = Color.CYAN) { + DebugDraw.draw_lines(new PackedVector3Array([begin, end]), color) + } + + static draw_lines(points: PackedVector3Array, color: Color = Color.CYAN) { + DebugDraw._inst._draw_lines(points, color) + } + + _draw_lines(points: PackedVector3Array, color: Color = Color.CYAN) { + const instance = this.pool.get() + const mesh = instance.instance.mesh as ImmediateMesh + + mesh.clear_surfaces() + mesh.surface_begin(Mesh.PrimitiveType.PRIMITIVE_LINES) + mesh.surface_set_color(color) + + const len = points.size() + for (let i = 0; i < len; i++) { + mesh.surface_add_vertex(points.get_indexed(i)) + } + + mesh.surface_end() + this.pool.release(instance) + } +} + diff --git a/godot/src/input_buffer.ts b/godot/src/input_buffer.ts new file mode 100644 index 0000000..6c98cd0 --- /dev/null +++ b/godot/src/input_buffer.ts @@ -0,0 +1,92 @@ +import { int32, int64, PackedVector2Array, Vector2 } from 'godot' + +export class InputBufferError extends Error { + constructor(message: string) { + super(`InputBufferError: ${message}`) + } + + static empty() { + return new InputBufferError('cannot perform operation, buffer is empty') + } + + static outOfBounds(index: int64) { + return new InputBufferError(`cannot access ${index}: index out of bounds`) + } +} + +export default class InputBuffer { + readonly capacity: int32 + private _buffer: PackedVector2Array + private _head: int32 = 0 + private _tail: int32 = 0 + private _size: int32 = 0 + + constructor(capacity: int32) { + this.capacity = capacity + this._buffer = new PackedVector2Array() + this._buffer.resize(capacity) + this._buffer.fill(Vector2.ZERO) + } + + is_empty() { + return this._size === 0 + } + + is_full() { + return this._size === this.capacity + } + + push(value: Vector2) { + this._buffer.set_indexed(this._head, value) + this._head = (this._head + 1) % this.capacity + + if (this.is_full()) { + this._tail = this._head + } else { + this._size += 1 + } + } + + pop(): Vector2 { + if (this.is_empty()) { + throw InputBufferError.empty() + } + + const value = this.tail() + this._tail = (this._tail + 1) % this.capacity + this._size += 1 + return value + } + + at(index: int64) { + if (index >= this._size) { + throw InputBufferError.outOfBounds(index) + } + + const n = index < 0 ? this._head - index : this._tail + index + const idx = n % this.capacity + return this._buffer.get_indexed(idx) + } + + size() { + return this._size + } + + head() { + return this._buffer.get_indexed(this._head) + } + + tail() { + return this._buffer.get_indexed(this._tail) + } + + slice(begin: int64, end?: int64) { + return this._buffer.slice(begin, end) + } + + clear() { + this._size = 0 + this._head = 0 + this._tail = 0 + } +} diff --git a/godot/src/message_bus.js b/godot/src/message_bus.js new file mode 100644 index 0000000..63088c1 --- /dev/null +++ b/godot/src/message_bus.js @@ -0,0 +1,23 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +const godot_annotations_1 = require("godot.annotations"); +class MessageBus extends godot_1.Node { + static get instance() { + return MessageBus._inst; + } + _ready() { + MessageBus._inst = this; + } +} +exports.default = MessageBus; +__decorate([ + (0, godot_annotations_1.signal)() +], MessageBus.prototype, "active_camera_changed", void 0); +//# sourceMappingURL=message_bus.js.map \ No newline at end of file diff --git a/godot/src/message_bus.js.map b/godot/src/message_bus.js.map new file mode 100644 index 0000000..28b2bfd --- /dev/null +++ b/godot/src/message_bus.js.map @@ -0,0 +1 @@ +{"version":3,"file":"message_bus.js","sourceRoot":"../../../","sources":["src/message_bus.ts"],"names":[],"mappings":";;;;;;;;AAAA,iCAA+C;AAC/C,yDAA0C;AAE1C,MAAqB,UAAW,SAAQ,YAAI;IAG1C,MAAM,KAAK,QAAQ;QACjB,OAAO,UAAU,CAAC,KAAK,CAAA;IACzB,CAAC;IAKD,MAAM;QACJ,UAAU,CAAC,KAAK,GAAG,IAAI,CAAA;IACzB,CAAC;CACF;AAbD,6BAaC;AALC;IADC,IAAA,0BAAM,GAAE;yDACgC"} \ No newline at end of file diff --git a/godot/src/message_bus.ts b/godot/src/message_bus.ts new file mode 100644 index 0000000..1ca2305 --- /dev/null +++ b/godot/src/message_bus.ts @@ -0,0 +1,17 @@ +import { Camera3D, Node, Signal1 } from 'godot' +import { signal } from 'godot.annotations' + +export default class MessageBus extends Node { + private static _inst: MessageBus + + static get instance() { + return MessageBus._inst + } + + @signal() + active_camera_changed!: Signal1 + + _ready(): void { + MessageBus._inst = this + } +} diff --git a/godot/src/player.js b/godot/src/player.js new file mode 100644 index 0000000..c49e68b --- /dev/null +++ b/godot/src/player.js @@ -0,0 +1,77 @@ +"use strict"; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +const godot_annotations_1 = require("godot.annotations"); +const message_bus_1 = __importDefault(require("./message_bus")); +class Player extends godot_1.CharacterBody3D { + constructor() { + super(...arguments); + this.gravity = godot_1.ProjectSettings.get_setting('physics/3d/default_gravity'); + this.walk_speed = 3; + this.walk_backward_speed = 2; + this.run_speed = 6; + this.turn_speed = 1; + this._rotation_speed = 2 * Math.PI; + } + _ready() { + this._rotation_speed = this.turn_speed * 2 * Math.PI; + this._player_input = this.get_node(this.player_input); + this._camera = this.get_viewport().get_camera_3d(); + message_bus_1.default.instance.active_camera_changed.connect(godot_1.Callable.create(this, this.on_camera_changed)); + } + get_movement(delta) { + const input = this._player_input.movement_input; + return godot_1.Vector3.MULTIPLY(this.walk_speed, new godot_1.Vector3(input.x, 0, input.y)); + } + //get_translation(_delta: float64): Vector3 { + // const forward = Vector3.MULTIPLY(-1, this.transform.basis.z) + // return Vector3.MULTIPLY(forward, this.get_movement()) + //} + get_gravitational_force(delta) { + return -this.gravity * delta; + } + relative_to(target, vec) { + return vec.rotated(godot_1.Vector3.UP, target.rotation.y); + } + on_camera_changed(camera) { + this._camera = camera; + } + _physics_process(delta) { + const movement = this.relative_to(this._camera, this.get_movement(delta)); + if (!movement.is_zero_approx()) { + this.look_at(godot_1.Vector3.NEGATE(godot_1.Vector3.ADD(this.position, movement)), godot_1.Vector3.UP); + } + this.velocity = new godot_1.Vector3(movement.x, this.velocity.y + this.get_gravitational_force(delta), movement.z); + this.move_and_slide(); + } +} +exports.default = Player; +__decorate([ + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_NODE_PATH) +], Player.prototype, "player_input", void 0); +__decorate([ + (0, godot_annotations_1.help)('Forward walk speed in units per second'), + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_FLOAT) +], Player.prototype, "walk_speed", void 0); +__decorate([ + (0, godot_annotations_1.help)('Backward walk speed in units per second'), + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_FLOAT) +], Player.prototype, "walk_backward_speed", void 0); +__decorate([ + (0, godot_annotations_1.help)('Run speed in units per second'), + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_FLOAT) +], Player.prototype, "run_speed", void 0); +__decorate([ + (0, godot_annotations_1.help)('Turn speed in rotations per second'), + (0, godot_annotations_1.export_)(godot_1.Variant.Type.TYPE_FLOAT) +], Player.prototype, "turn_speed", void 0); +//# sourceMappingURL=player.js.map \ No newline at end of file diff --git a/godot/src/player.js.map b/godot/src/player.js.map new file mode 100644 index 0000000..949a611 --- /dev/null +++ b/godot/src/player.js.map @@ -0,0 +1 @@ +{"version":3,"file":"player.js","sourceRoot":"../../../","sources":["src/player.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iCAAkI;AAClI,yDAAiD;AAEjD,gEAAsC;AAEtC,MAAqB,MAAO,SAAQ,uBAAe;IAAnD;;QACE,YAAO,GAAG,uBAAe,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAA;QAQnE,eAAU,GAAG,CAAC,CAAA;QAId,wBAAmB,GAAG,CAAC,CAAA;QAIvB,cAAS,GAAG,CAAC,CAAA;QAIb,eAAU,GAAG,CAAC,CAAA;QACd,oBAAe,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAA;IA+D/B,CAAC;IA3DC,MAAM;QACJ,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAA;QACpD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAgB,CAAA;QACpE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,aAAa,EAAE,CAAA;QAElD,qBAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,OAAO,CAC/C,gBAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAC9C,CAAA;IACH,CAAC;IAED,YAAY,CAAC,KAAc;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,cAAc,CAAA;QAC/C,OAAO,eAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,eAAO,CAClD,KAAK,CAAC,CAAC,EACP,CAAC,EACD,KAAK,CAAC,CAAC,CACR,CAAC,CAAA;IACJ,CAAC;IAED,6CAA6C;IAC7C,gEAAgE;IAChE,yDAAyD;IACzD,GAAG;IAEH,uBAAuB,CAAC,KAAc;QACpC,OAAO,CAAC,IAAI,CAAC,OAAO,GAAG,KAAK,CAAA;IAC9B,CAAC;IAED,WAAW,CAAC,MAAc,EAAE,GAAY;QACtC,OAAO,GAAG,CAAC,OAAO,CAAC,eAAO,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IACnD,CAAC;IAED,iBAAiB,CAAC,MAAgB;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;IACvB,CAAC;IAED,gBAAgB,CAAC,KAAc;QAC7B,MAAM,QAAQ,GAAG,IAAI,CAAC,WAAW,CAC/B,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CACzB,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC;YAC/B,IAAI,CAAC,OAAO,CACV,eAAO,CAAC,MAAM,CACZ,eAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CACrC,EACD,eAAO,CAAC,EAAE,CACX,CAAA;QACH,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAO,CACzB,QAAQ,CAAC,CAAC,EACV,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC,EACrD,QAAQ,CAAC,CAAC,CACX,CAAA;QAED,IAAI,CAAC,cAAc,EAAE,CAAA;IACvB,CAAC;CACF;AArFD,yBAqFC;AAjFC;IADC,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,cAAc,CAAC;4CACd;AAKvB;IAFC,IAAA,wBAAI,EAAC,wCAAwC,CAAC;IAC9C,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,UAAU,CAAC;0CACnB;AAId;IAFC,IAAA,wBAAI,EAAC,yCAAyC,CAAC;IAC/C,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,UAAU,CAAC;mDACV;AAIvB;IAFC,IAAA,wBAAI,EAAC,+BAA+B,CAAC;IACrC,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,UAAU,CAAC;yCACpB;AAIb;IAFC,IAAA,wBAAI,EAAC,oCAAoC,CAAC;IAC1C,IAAA,2BAAO,EAAC,eAAO,CAAC,IAAI,CAAC,UAAU,CAAC;0CACnB"} \ No newline at end of file diff --git a/godot/src/player.ts b/godot/src/player.ts new file mode 100644 index 0000000..db4df53 --- /dev/null +++ b/godot/src/player.ts @@ -0,0 +1,121 @@ +import { Callable, Camera3D, CharacterBody3D, Color, float64, NodePath, ProjectSettings, Variant, Vector2, Vector3 } from 'godot' +import { export_, help } from 'godot.annotations' +import PlayerInput from './player_input' +import MessageBus from './message_bus' +import DebugDraw from './debug_draw' +import { CameraCache } from './camera_cache' + +export default class Player extends CharacterBody3D { + gravity = ProjectSettings.get_setting('physics/3d/default_gravity') + + @export_(Variant.Type.TYPE_NODE_PATH) + player_input!: NodePath + _player_input!: PlayerInput + + is_running() { return this._player_input.is_running } + + @help('Forward walk speed in units per second') + @export_(Variant.Type.TYPE_FLOAT) + walk_speed = 3 + + @help('Run speed in units per second') + @export_(Variant.Type.TYPE_FLOAT) + run_speed = 6 + + @help('Turn speed in rotations per second') + @export_(Variant.Type.TYPE_FLOAT) + turn_speed = 1 + _rotation_speed = 2 * Math.PI + + _camera!: CameraCache + + _ready(): void { + this._rotation_speed = this.turn_speed * 2 * Math.PI + this._player_input = this.get_node(this.player_input) as PlayerInput + + const camera = this.get_viewport().get_camera_3d() + this._camera = new CameraCache(camera) + + MessageBus.instance.active_camera_changed.connect( + Callable.create( + this, + this.update_camera + ) + ) + } + + update_camera(cam: Camera3D) { + this._camera.update_camera(cam) + } + + get_movement(input: Vector2): Vector3 { + const speed = this.is_running() ? this.run_speed : this.walk_speed + return Vector3.MULTIPLY(speed, new Vector3( + input.x, + 0, + input.y + )) + } + + get_gravitational_force(delta: float64): float64 { + return -this.gravity * delta + } + + is_kinda_equal(a: Vector2, b: Vector2, e: float64 = 0.1) { + return a.distance_to(b) <= e + } + + _draw_movement(movement: Vector3) { + DebugDraw.draw_line( + Vector3.ADD( + Vector3.UP, + this.position, + ), + Vector3.ADD( + Vector3.UP, + Vector3.ADD(this.position, movement) + ), + Color.GREEN + ) + } + + rotate_toward(direction: Vector3, _delta: float64) { + if (!direction.is_zero_approx()) { + this.look_at( + Vector3.ADD(this.global_position, direction), + Vector3.UP, + true + ) + } + } + + move_toward(movement: Vector3, delta: float64) { + this.velocity = new Vector3( + movement.x, + this.velocity.y + this.get_gravitational_force(delta), + movement.z + ) + + this.move_and_slide() + } + + _physics_process(delta: float64): void { + const buf = this._player_input.input_buffer + const input = buf.tail() + const prev = buf.at(-2) + + if (prev && !this.is_kinda_equal(input, prev)) { + this._camera.recalculate() + } + + const movement = this._camera.transform_vec( + this.get_movement(input) + ) + + this._draw_movement(movement) + + this.rotate_toward(movement, delta) + this.move_toward(movement, delta) + } +} + diff --git a/godot/src/player_animation.js b/godot/src/player_animation.js new file mode 100644 index 0000000..8467a87 --- /dev/null +++ b/godot/src/player_animation.js @@ -0,0 +1,13 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +class PlayerAnimation extends godot_1.AnimationTree { + _ready() { + this.player = this.get_parent(); + this.player_input = this.player.get_node(this.player.player_input); + } +} +PlayerAnimation.Interact = 'parameters/interact'; +PlayerAnimation.WalkSpeed = 'parameters/Walk/blend_position'; +exports.default = PlayerAnimation; +//# sourceMappingURL=player_animation.js.map \ No newline at end of file diff --git a/godot/src/player_animation.js.map b/godot/src/player_animation.js.map new file mode 100644 index 0000000..b4aa644 --- /dev/null +++ b/godot/src/player_animation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"player_animation.js","sourceRoot":"../../../","sources":["src/player_animation.ts"],"names":[],"mappings":";;AAAA,iCAAqC;AAIrC,MAAqB,eAAgB,SAAQ,qBAAa;IAOxD,MAAM;QACJ,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,EAAY,CAAA;QACzC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,YAAa,CAAgB,CAAA;IACpF,CAAC;;AATc,wBAAQ,GAAG,qBAAqB,CAAA;AAChC,yBAAS,GAAG,gCAAgC,CAAA;kBAFxC,eAAe"} \ No newline at end of file diff --git a/godot/src/player_animation.ts b/godot/src/player_animation.ts new file mode 100644 index 0000000..31ca7aa --- /dev/null +++ b/godot/src/player_animation.ts @@ -0,0 +1,18 @@ +import { AnimationTree, float64 } from 'godot' +import Player from './player' +import PlayerInput from './player_input' + +export default class PlayerAnimation extends AnimationTree { + private static Interact = 'parameters/conditions/interact' + + player!: Player + player_input!: PlayerInput + + _ready(): void { + this.player = this.get_parent() as Player + this.player_input = this.player.get_node(this.player.player_input!) as PlayerInput + } + + _process(delta: float64): void { + } +} diff --git a/godot/src/player_input.js b/godot/src/player_input.js new file mode 100644 index 0000000..d58b29a --- /dev/null +++ b/godot/src/player_input.js @@ -0,0 +1,30 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const godot_1 = require("godot"); +var Device; +(function (Device) { + Device[Device["KeyboardMouse"] = 0] = "KeyboardMouse"; + Device[Device["Gamepad"] = 1] = "Gamepad"; +})(Device || (Device = {})); +class PlayerInput extends godot_1.Node3D { + constructor() { + super(...arguments); + this._last_known_device = Device.KeyboardMouse; + this._movement_input = godot_1.Vector2.ZERO; + } + get last_known_device() { return this._last_known_device; } + get movement_input() { return this._movement_input; } + _process(delta) { + this._movement_input = godot_1.Input.get_vector('move_left', 'move_right', 'move_forward', 'move_back'); + } + _input(event) { + if (event instanceof godot_1.InputEventKey || event instanceof godot_1.InputEventMouse) { + this._last_known_device = Device.KeyboardMouse; + } + else if (event instanceof godot_1.InputEventJoypadButton || event instanceof godot_1.InputEventJoypadMotion) { + this._last_known_device = Device.Gamepad; + } + } +} +exports.default = PlayerInput; +//# sourceMappingURL=player_input.js.map \ No newline at end of file diff --git a/godot/src/player_input.js.map b/godot/src/player_input.js.map new file mode 100644 index 0000000..122e2c7 --- /dev/null +++ b/godot/src/player_input.js.map @@ -0,0 +1 @@ +{"version":3,"file":"player_input.js","sourceRoot":"../../../","sources":["src/player_input.ts"],"names":[],"mappings":";;AAAA,iCAAmJ;AAEnJ,IAAK,MAGJ;AAHD,WAAK,MAAM;IACT,qDAAiB,CAAA;IACjB,yCAAW,CAAA;AACb,CAAC,EAHI,MAAM,KAAN,MAAM,QAGV;AAED,MAAqB,WAAY,SAAQ,cAAM;IAA/C;;QACE,uBAAkB,GAAG,MAAM,CAAC,aAAa,CAAA;QAGzC,oBAAe,GAAY,eAAO,CAAC,IAAI,CAAA;IAczC,CAAC;IAhBC,IAAI,iBAAiB,KAAK,OAAO,IAAI,CAAC,kBAAkB,CAAA,CAAC,CAAC;IAG1D,IAAI,cAAc,KAAK,OAAO,IAAI,CAAC,eAAe,CAAA,CAAC,CAAC;IAEpD,QAAQ,CAAC,KAAc;QACrB,IAAI,CAAC,eAAe,GAAG,aAAK,CAAC,UAAU,CAAC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,WAAW,CAAC,CAAA;IACjG,CAAC;IAED,MAAM,CAAC,KAAiB;QACtB,IAAI,KAAK,YAAY,qBAAa,IAAI,KAAK,YAAY,uBAAe,EAAE,CAAC;YACvE,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,aAAa,CAAA;QAChD,CAAC;aAAM,IAAI,KAAK,YAAY,8BAAsB,IAAI,KAAK,YAAY,8BAAsB,EAAE,CAAC;YAC9F,IAAI,CAAC,kBAAkB,GAAG,MAAM,CAAC,OAAO,CAAA;QAC1C,CAAC;IACH,CAAC;CACF;AAlBD,8BAkBC"} \ No newline at end of file diff --git a/godot/src/player_input.ts b/godot/src/player_input.ts new file mode 100644 index 0000000..75e2960 --- /dev/null +++ b/godot/src/player_input.ts @@ -0,0 +1,61 @@ +import { float64, Input, InputEvent, InputEventJoypadButton, InputEventJoypadMotion, InputEventKey, InputEventMouse, int32, Node3D, PackedVector2Array, Variant } from 'godot' +import { export_ } from 'godot.annotations' +import InputBuffer from './input_buffer' + +enum Device { + KeyboardMouse = 0, + Gamepad = 1 +} + +export default class PlayerInput extends Node3D { + @export_(Variant.Type.TYPE_INT) + private input_buffer_size: int32 = 8 + + private _last_known_device = Device.KeyboardMouse + + get last_known_device() { return this._last_known_device } + + private _input_buffer!: InputBuffer + + get input_buffer() { + return this._input_buffer + } + + get movement_input() { + return this._input_buffer.head() + } + + _running: boolean = false + + get is_running() { + return this._running + } + + private _changed_since_last_frame = false + + get changed_since_last_frame() { + return this._changed_since_last_frame + } + + _ready(): void { + this._input_buffer = new InputBuffer(this.input_buffer_size) + } + + _process(delta: float64): void { + const next_input = Input.get_vector('move_left', 'move_right', 'move_forward', 'move_back') + + this._changed_since_last_frame = !next_input.is_equal_approx(this.movement_input) + + this._input_buffer.push(next_input) + this._running = Input.is_action_pressed('run') + } + + _input(event: InputEvent): void { + if (event instanceof InputEventKey || event instanceof InputEventMouse) { + this._last_known_device = Device.KeyboardMouse + } else if (event instanceof InputEventJoypadButton || event instanceof InputEventJoypadMotion) { + this._last_known_device = Device.Gamepad + } + } +} + diff --git a/godot/tsconfig.json b/godot/tsconfig.json new file mode 100644 index 0000000..24032f0 --- /dev/null +++ b/godot/tsconfig.json @@ -0,0 +1,113 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + "tsBuildInfoFile": ".godot/.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "CommonJS", /* Specify what module code is generated. */ + "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": [ /* Specify multiple folders that act like './node_modules/@types'. */ + "./node_modules/@types","./typings" + ], + "types": [ + "node" + ], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + "outDir": ".godot/GodotJS", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + "sourceRoot": "../../../", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + "noEmitOnError": false, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +} diff --git a/godot/typings/.gdignore b/godot/typings/.gdignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/godot/typings/.gdignore @@ -0,0 +1 @@ + diff --git a/godot/typings/godot.minimal.d.ts b/godot/typings/godot.minimal.d.ts new file mode 100644 index 0000000..1ff5f71 --- /dev/null +++ b/godot/typings/godot.minimal.d.ts @@ -0,0 +1,282 @@ + +declare module "godot-jsb" { + import { Object as GDObject, PackedByteArray, PropertyUsageFlags, PropertyHint, MethodFlags, Variant, Callable0, Callable1, Callable2, Callable3, Callable4, Callable5, StringName, MultiplayerAPI, MultiplayerPeer } from "godot"; + + const DEV_ENABLED: boolean; + const TOOLS_ENABLED: boolean; + + /** version of GodotJS */ + const version: string; + + /** impl currently used */ + const impl: string; + + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: () => R): Callable0; + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: (v1: T1) => R): Callable1; + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: (v1: T1, v2: T2) => R): Callable2; + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: (v1: T1, v2: T2, v3: T3) => R): Callable3; + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: (v1: T1, v2: T2, v3: T3, v4: T4) => R): Callable4; + /** + * Create godot Callable with a bound object `self`. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(self: GDObject, fn: (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5) => R): Callable5; + + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: () => R): Callable0; + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: (v1: T1) => R): Callable1; + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: (v1: T1, v2: T2) => R): Callable2; + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: (v1: T1, v2: T2, v3: T3) => R): Callable3; + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: (v1: T1, v2: T2, v3: T3, v4: T4) => R): Callable4; + /** + * Create godot Callable without a bound object. + * @deprecated [WARNING] avoid using this function directly, use `Callable.create` instead. + */ + function callable(fn: (v1: T1, v2: T2, v3: T3, v4: T4, v5: T5) => R): Callable5; + + /** + * Explicitly convert a `PackedByteArray`(aka `Vector`) into a javascript `ArrayBuffer` + * @deprecated [WARNING] This free function '_to_array_buffer' is deprecated and will be removed in a future version, use 'PackedByteArray.to_array_buffer()' instead. + */ + function to_array_buffer(packed: PackedByteArray): ArrayBuffer; + + interface ScriptPropertyInfo { + name: string; + type: Variant.Type; + class_?: Function; + hint?: number; + hint_string?: string; + usage?: number; + } + + namespace internal { + type OnReadyEvaluatorFunc = (self: any) => any; + + interface RPCConfig { + mode?: MultiplayerAPI.RPCMode, + sync?: boolean, + transfer_mode?: MultiplayerPeer.TransferMode, + transfer_channel?: number, + } + + function add_script_signal(target: any, name: string): void; + function add_script_property(target: any, details: ScriptPropertyInfo): void; + function add_script_ready(target: any, details: { name: string, evaluator: string | OnReadyEvaluatorFunc }): void; + function add_script_tool(target: any): void; + function add_script_icon(target: any, path: string): void; + function add_script_rpc(target: any, propertyKey: string, config: RPCConfig): void; + + // 0: deprecated, 1: experimental, 2: help + function set_script_doc(target: any, propertyKey?: string, field: 0 | 1 | 2, message: string): void; + + function add_module(id: string, obj: any): void; + function find_module(id: string): any; + function notify_microtasks_run(): void; + + /** + * Get the transformed type name of a Variant.Type + */ + function get_type_name(type: Variant.Type): StringName; + } + + namespace editor { + interface PrimitiveConstantInfo { + name: string; + type: Variant.Type; + value: number; /* only if type is literal */ + } + + interface ConstantInfo { + name: string; + value: number; /** int64_t */ + } + + interface EnumInfo { + name: string; + + literals: Array; + is_bitfield: boolean; + } + + interface DefaultArgumentInfo { + type: Variant.Type; + value: any; + } + + // we treat godot MethodInfo/MethodBind as the same thing here for simplicity + //NOTE some fields will not be set if it's actually a MethodInfo struct + interface MethodBind { + id: number; + name: string; + + hint_flags: MethodFlags; + is_static: boolean; + is_const: boolean; + is_vararg: boolean; + argument_count: number; /** int32_t */ + + args_: Array; + default_arguments?: Array; + return_: PropertyInfo | undefined; + } + + interface PropertyInfo { + name: string; + type: Variant.Type; + class_name: string; + hint: PropertyHint; + hint_string: string; + usage: PropertyUsageFlags; + } + + interface PropertySetGetInfo { + name: string; + + type: Variant.Type; + index: number; + setter: string; + getter: string; + + info: PropertyInfo; + } + + interface PrimitiveGetSetInfo { + name: string; + type: Variant.Type; + } + + interface SignalInfo { + name: string; + method_: MethodBind; + } + + interface ArgumentInfo { + name: string; + type: Variant.Type; + } + + interface ConstructorInfo { + arguments: Array + } + + interface OperatorInfo { + name: string; + return_type: Variant.Type; + left_type: Variant.Type; + right_type: Variant.Type; + } + + interface BasicClassInfo { + name: string; + methods: Array; + enums?: Array; + } + + // godot class + interface ClassInfo extends BasicClassInfo { + super: string; + + properties: Array; + virtual_methods: Array; + signals: Array; + constants?: Array; + } + + // variant class + interface PrimitiveClassInfo extends BasicClassInfo { + // self type + type: Variant.Type; + + // valid only if has_indexing + element_type?: Variant.Type; + + // true only if is_keyed + is_keyed: boolean; + + constructors: Array; + operators: Array; + properties: Array; + constants?: Array; + } + + interface SingletonInfo { + name: string; + class_name: string; + user_created: boolean; + editor_only: boolean; + } + + interface GlobalConstantInfo { + name: string; + values: { [name: string]: number /** int64_t */ }; + } + + interface ClassDoc { + brief_description: string; + + constants: { [name: string]: { description: string } }; + methods: { [name: string]: { description: string } }; + properties: { [name: string]: { description: string } }; + signals: { [name: string]: { description: string } }; + } + + function get_class_doc(class_name: string): ClassDoc | undefined; + + /** + * get a list of all classes registered in ClassDB + */ + function get_classes(): Array; + + function get_primitive_types(): Array; + + function get_singletons(): Array; + + function get_global_constants(): Array; + + function get_utility_functions(): Array; + + function delete_file(filepath: string): void; + + const VERSION_DOCS_URL: string; + } +} + diff --git a/godot/typings/godot.mix.d.ts b/godot/typings/godot.mix.d.ts new file mode 100644 index 0000000..0e1581f --- /dev/null +++ b/godot/typings/godot.mix.d.ts @@ -0,0 +1,186 @@ +/// +declare module "godot" { + /** A built-in type representing a method or a standalone function. + * + * @link https://docs.godotengine.org/en/4.2/classes/class_callable.html + */ + interface AnyCallable { + /** Returns `true` if this [Callable] has no target to call the method on. */ + is_null(): boolean + + /** Returns `true` if this [Callable] is a custom callable. Custom callables are created from [method bind] or [method unbind]. In GDScript, lambda functions are also custom callables. */ + is_custom(): boolean + + /** Returns `true` if this [Callable] is a standard callable. This method is the opposite of [method is_custom]. Returns `false` if this callable is a lambda function. */ + is_standard(): boolean + + /** Returns `true` if the callable's object exists and has a valid method name assigned, or is a custom callable. */ + is_valid(): boolean + + /** Returns the object on which this [Callable] is called. */ + get_object(): Object + + /** Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]). */ + get_object_id(): int64 + + /** Returns the name of the method represented by this [Callable]. If the callable is a GDScript lambda function, returns the function's name or `""`. */ + get_method(): StringName + + /** Returns the total amount of arguments bound (or unbound) via successive [method bind] or [method unbind] calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. */ + get_bound_arguments_count(): int64 + + /** Return the bound arguments (as long as [method get_bound_arguments_count] is greater than zero), or empty (if [method get_bound_arguments_count] is less than or equal to zero). */ + get_bound_arguments(): Array + + /** Returns the 32-bit hash value of this [Callable]'s object. + * + * **Note:** [Callable]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for [method hash]. + */ + hash(): int64 + + /** Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by [method call]. See also [method unbind]. + * + * **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. + */ + bind(...vargargs: any[]): AnyCallable + + /** Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by [method call]. See also [method unbind]. + * + * **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. + */ + bindv(arguments_: GArray): AnyCallable + + /** Returns a copy of this [Callable] with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to [param argcount]. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also [method bind]. + * + * **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. + * + */ + unbind(argcount: int64): AnyCallable + + /** Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature. */ + call(...vargargs: any[]): any + + /** Calls the method represented by this [Callable]. Unlike [method call], this method expects all arguments to be contained inside the [param arguments] [Array]. */ + callv(arguments_: GArray): any + + /** Calls the method represented by this [Callable] in deferred mode, i.e. at the end of the current frame. Arguments can be passed and should match the method's signature. + * + * + * **Note:** Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. + * See also [method Object.call_deferred]. + */ + call_deferred(...vargargs: any[]): void + } + + /** A built-in type representing a signal of an [Object]. + * + * @link https://docs.godotengine.org/en/4.2/classes/class_signal.html + */ + interface AnySignal { + /** Returns `true` if the signal's name does not exist in its object, or the object is not valid. */ + is_null(): boolean + + /** Returns the object emitting this signal. */ + get_object(): Object + + /** Returns the ID of the object emitting this signal (see [method Object.get_instance_id]). */ + get_object_id(): int64 + + /** Returns the name of this signal. */ + get_name(): StringName + + /** Returns `true` if the specified [Callable] is connected to this signal. */ + is_connected(callable: AnyCallable): boolean + + /** Returns an [Array] of connections for this signal. Each connection is represented as a [Dictionary] that contains three entries: + * - `signal` is a reference to this signal; + * - `callable` is a reference to the connected [Callable]; + * - `flags` is a combination of [enum Object.ConnectFlags]. + */ + get_connections(): Array + } + + interface Callable0 extends AnyCallable { + call(): R; + } + + interface Callable1 extends AnyCallable { + call(v1: T1): R; + } + + interface Callable2 extends AnyCallable { + call(v1: T1, v2, T2): R; + } + + interface Callable3 extends AnyCallable { + call(v1: T1, v2: T2, v3: T3): R; + } + + interface Callable4 extends AnyCallable { + call(v1: T1, v2: T2, v3: T3, v4: T4): R; + } + + interface Callable5 extends AnyCallable { + call(v1: T1, v2: T2, v3: T3, v4: T4, v5: T5): R; + } + + interface Signal0 extends AnySignal { + connect(callable: Callable0, flags: int64 = 0): void; + disconnect(callable: Callable0): void; + is_connected(callable: Callable0): boolean; + emit(): void; + + as_promise(): Promise; + } + + interface Signal1 extends AnySignal { + connect(callable: Callable1, flags: int64 = 0): void; + disconnect(callable: Callable1): void; + is_connected(callable: Callable1): boolean; + emit(v1: T1): void; + + // the first argument is used as the resolved value + as_promise(): Promise; + } + + interface Signal2 extends AnySignal { + connect(callable: Callable2, flags: int64 = 0): void; + disconnect(callable: Callable2): void; + is_connected(callable: Callable2): boolean; + emit(v1: T1, v2: T2): void; + + // the first argument is used as the resolved value + as_promise(): Promise; + } + + interface Signal3 extends AnySignal { + connect(callable: Callable3, flags: int64 = 0): void; + disconnect(callable: Callable3): void; + is_connected(callable: Callable3): boolean; + emit(v1: T1, v2: T2, v3: T3): void; + + // the first argument is used as the resolved value + as_promise(): Promise; + } + + interface Signal4 extends AnySignal { + connect(callable: Callable4, flags: int64 = 0): void; + disconnect(callable: Callable4): void; + is_connected(callable: Callable4): boolean; + emit(v1: T1, v2: T2, v3: T3, v4: T4): void; + + // the first argument is used as the resolved value + as_promise(): Promise; + } + + interface Signal5 extends AnySignal { + connect(callable: Callable5, flags: int64 = 0): void; + disconnect(callable: Callable5): void; + is_connected(callable: Callable5): boolean; + emit(v1: T1, v2: T2, v3: T3, v4: T4, v5: T5): void; + + // the first argument is used as the resolved value + as_promise(): Promise; + } + +} \ No newline at end of file diff --git a/godot/typings/godot0.gen.d.ts b/godot/typings/godot0.gen.d.ts new file mode 100644 index 0000000..590af7f --- /dev/null +++ b/godot/typings/godot0.gen.d.ts @@ -0,0 +1,11172 @@ +// AUTO-GENERATED +/// +declare module "godot" { + type byte = number + type int32 = number + type int64 = number /* || bigint */ + type float32 = number + type float64 = number + type StringName = string + type unresolved = any + type GAny = boolean | int64 | float64 | string | Vector2 | Vector2i | Rect2 | Rect2i | Vector3 | Vector3i | Transform2D | Vector4 | Vector4i | Plane | Quaternion | AABB | Basis | Transform3D | Projection | Color | StringName | NodePath | RID | Object | Callable | Signal | GDictionary | GArray | PackedByteArray | PackedInt32Array | PackedInt64Array | PackedFloat32Array | PackedFloat64Array | PackedStringArray | PackedVector2Array | PackedVector3Array | PackedColorArray | PackedVector4Array | undefined + // _singleton_class_: Performance + namespace Performance { + enum Monitor { + /** The number of frames rendered in the last second. This metric is only updated once per second, even if queried more often. *Higher is better.* */ + TIME_FPS = 0, + + /** Time it took to complete one frame, in seconds. *Lower is better.* */ + TIME_PROCESS = 1, + + /** Time it took to complete one physics frame, in seconds. *Lower is better.* */ + TIME_PHYSICS_PROCESS = 2, + + /** Time it took to complete one navigation step, in seconds. This includes navigation map updates as well as agent avoidance calculations. *Lower is better.* */ + TIME_NAVIGATION_PROCESS = 3, + + /** Static memory currently used, in bytes. Not available in release builds. *Lower is better.* */ + MEMORY_STATIC = 4, + + /** Available static memory. Not available in release builds. *Lower is better.* */ + MEMORY_STATIC_MAX = 5, + + /** Largest amount of memory the message queue buffer has used, in bytes. The message queue is used for deferred functions calls and notifications. *Lower is better.* */ + MEMORY_MESSAGE_BUFFER_MAX = 6, + + /** Number of objects currently instantiated (including nodes). *Lower is better.* */ + OBJECT_COUNT = 7, + + /** Number of resources currently used. *Lower is better.* */ + OBJECT_RESOURCE_COUNT = 8, + + /** Number of nodes currently instantiated in the scene tree. This also includes the root node. *Lower is better.* */ + OBJECT_NODE_COUNT = 9, + + /** Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. *Lower is better.* */ + OBJECT_ORPHAN_NODE_COUNT = 10, + + /** The total number of objects in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling). *Lower is better.* */ + RENDER_TOTAL_OBJECTS_IN_FRAME = 11, + + /** The total number of vertices or indices rendered in the last rendered frame. This metric doesn't include primitives from culled objects (either via hiding nodes, frustum culling or occlusion culling). Due to the depth prepass and shadow passes, the number of primitives is always higher than the actual number of vertices in the scene (typically double or triple the original vertex count). *Lower is better.* */ + RENDER_TOTAL_PRIMITIVES_IN_FRAME = 12, + + /** The total number of draw calls performed in the last rendered frame. This metric doesn't include culled objects (either via hiding nodes, frustum culling or occlusion culling), since they do not result in draw calls. *Lower is better.* */ + RENDER_TOTAL_DRAW_CALLS_IN_FRAME = 13, + + /** The amount of video memory used (texture and vertex memory combined, in bytes). Since this metric also includes miscellaneous allocations, this value is always greater than the sum of [constant RENDER_TEXTURE_MEM_USED] and [constant RENDER_BUFFER_MEM_USED]. *Lower is better.* */ + RENDER_VIDEO_MEM_USED = 14, + + /** The amount of texture memory used (in bytes). *Lower is better.* */ + RENDER_TEXTURE_MEM_USED = 15, + + /** The amount of render buffer memory used (in bytes). *Lower is better.* */ + RENDER_BUFFER_MEM_USED = 16, + + /** Number of active [RigidBody2D] nodes in the game. *Lower is better.* */ + PHYSICS_2D_ACTIVE_OBJECTS = 17, + + /** Number of collision pairs in the 2D physics engine. *Lower is better.* */ + PHYSICS_2D_COLLISION_PAIRS = 18, + + /** Number of islands in the 2D physics engine. *Lower is better.* */ + PHYSICS_2D_ISLAND_COUNT = 19, + + /** Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. *Lower is better.* */ + PHYSICS_3D_ACTIVE_OBJECTS = 20, + + /** Number of collision pairs in the 3D physics engine. *Lower is better.* */ + PHYSICS_3D_COLLISION_PAIRS = 21, + + /** Number of islands in the 3D physics engine. *Lower is better.* */ + PHYSICS_3D_ISLAND_COUNT = 22, + + /** Output latency of the [AudioServer]. Equivalent to calling [method AudioServer.get_output_latency], it is not recommended to call this every frame. */ + AUDIO_OUTPUT_LATENCY = 23, + + /** Number of active navigation maps in the [NavigationServer3D]. This also includes the two empty default navigation maps created by World2D and World3D. */ + NAVIGATION_ACTIVE_MAPS = 24, + + /** Number of active navigation regions in the [NavigationServer3D]. */ + NAVIGATION_REGION_COUNT = 25, + + /** Number of active navigation agents processing avoidance in the [NavigationServer3D]. */ + NAVIGATION_AGENT_COUNT = 26, + + /** Number of active navigation links in the [NavigationServer3D]. */ + NAVIGATION_LINK_COUNT = 27, + + /** Number of navigation mesh polygons in the [NavigationServer3D]. */ + NAVIGATION_POLYGON_COUNT = 28, + + /** Number of navigation mesh polygon edges in the [NavigationServer3D]. */ + NAVIGATION_EDGE_COUNT = 29, + + /** Number of navigation mesh polygon edges that were merged due to edge key overlap in the [NavigationServer3D]. */ + NAVIGATION_EDGE_MERGE_COUNT = 30, + + /** Number of polygon edges that are considered connected by edge proximity [NavigationServer3D]. */ + NAVIGATION_EDGE_CONNECTION_COUNT = 31, + + /** Number of navigation mesh polygon edges that could not be merged in the [NavigationServer3D]. The edges still may be connected by edge proximity or with links. */ + NAVIGATION_EDGE_FREE_COUNT = 32, + + /** Represents the size of the [enum Monitor] enum. */ + MONITOR_MAX = 33, + } + } + /** Exposes performance-related data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_performance.html + */ + class Performance extends Object { + /** Returns the value of one of the available built-in monitors. You should provide one of the [enum Monitor] constants as the argument, like this: + * + * See [method get_custom_monitor] to query custom performance monitors' values. + */ + static get_monitor(monitor: Performance.Monitor): float64 + + /** Adds a custom monitor with the name [param id]. You can specify the category of the monitor using slash delimiters in [param id] (for example: `"Game/NumberOfNPCs"`). If there is more than one slash delimiter, then the default category is used. The default category is `"Custom"`. Prints an error if given [param id] is already present. + * + * The debugger calls the callable to get the value of custom monitor. The callable must return a zero or positive integer or floating-point number. + * Callables are called with arguments supplied in argument array. + */ + static add_custom_monitor(id: StringName, callable: Callable, arguments_: GArray = []): void + + /** Removes the custom monitor with given [param id]. Prints an error if the given [param id] is already absent. */ + static remove_custom_monitor(id: StringName): void + + /** Returns `true` if custom monitor with the given [param id] is present, `false` otherwise. */ + static has_custom_monitor(id: StringName): boolean + + /** Returns the value of custom monitor with given [param id]. The callable is called to get the value of custom monitor. See also [method has_custom_monitor]. Prints an error if the given [param id] is absent. */ + static get_custom_monitor(id: StringName): any + + /** Returns the last tick in which custom monitor was added/removed (in microseconds since the engine started). This is set to [method Time.get_ticks_usec] when the monitor is updated. */ + static get_monitor_modification_time(): int64 + + /** Returns the names of active custom monitors in an [Array]. */ + static get_custom_monitor_names(): GArray + } + // _singleton_class_: TextServerManager + /** A singleton for managing [TextServer] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_textservermanager.html + */ + class TextServerManager extends Object { + /** Registers a [TextServer] interface. */ + static add_interface(interface: TextServer): void + + /** Returns the number of interfaces currently registered. */ + static get_interface_count(): int64 + + /** Removes an interface. All fonts and shaped text caches should be freed before removing an interface. */ + static remove_interface(interface: TextServer): void + + /** Returns the interface registered at a given index. */ + static get_interface(idx: int64): TextServer + + /** Returns a list of available interfaces, with the index and name of each interface. */ + static get_interfaces(): GArray + + /** Finds an interface by its [param name]. */ + static find_interface(name: string): TextServer + + /** Sets the primary [TextServer] interface. */ + static set_primary_interface(index: TextServer): void + + /** Returns the primary [TextServer] interface currently in use. */ + static get_primary_interface(): TextServer + + /** Emitted when a new interface has been added. */ + static readonly interface_added: Signal1 + + /** Emitted when an interface is removed. */ + static readonly interface_removed: Signal1 + } + // _singleton_class_: PhysicsServer2DManager + /** A singleton for managing [PhysicsServer2D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver2dmanager.html + */ + class PhysicsServer2DManager extends Object { + /** Register a [PhysicsServer2D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer2D] object. */ + static register_server(name: string, create_callback: Callable): void + + /** Set the default [PhysicsServer2D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation. */ + static set_default_server(name: string, priority: int64): void + } + // _singleton_class_: PhysicsServer3DManager + /** A singleton for managing [PhysicsServer3D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver3dmanager.html + */ + class PhysicsServer3DManager extends Object { + /** Register a [PhysicsServer3D] implementation by passing a [param name] and a [Callable] that returns a [PhysicsServer3D] object. */ + static register_server(name: string, create_callback: Callable): void + + /** Set the default [PhysicsServer3D] implementation to the one identified by [param name], if [param priority] is greater than the priority of the current default implementation. */ + static set_default_server(name: string, priority: int64): void + } + // _singleton_class_: NavigationMeshGenerator + /** Helper class for creating and clearing navigation meshes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationmeshgenerator.html + */ + class NavigationMeshGenerator extends Object { + /** Bakes the [param navigation_mesh] with source geometry collected starting from the [param root_node]. */ + static bake(navigation_mesh: NavigationMesh, root_node: Node): void + + /** Removes all polygons and vertices from the provided [param navigation_mesh] resource. */ + static clear(navigation_mesh: NavigationMesh): void + + /** Parses the [SceneTree] for source geometry according to the properties of [param navigation_mesh]. Updates the provided [param source_geometry_data] resource with the resulting data. The resource can then be used to bake a navigation mesh with [method bake_from_source_geometry_data]. After the process is finished the optional [param callback] will be called. + * + * **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + * **Performance:** While convenient, reading data arrays from [Mesh] resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the [RenderingServer] in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + */ + static parse_source_geometry_data(navigation_mesh: NavigationMesh, source_geometry_data: NavigationMeshSourceGeometryData3D, root_node: Node, callback: Callable = new Callable()): void + + /** Bakes the provided [param navigation_mesh] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called. */ + static bake_from_source_geometry_data(navigation_mesh: NavigationMesh, source_geometry_data: NavigationMeshSourceGeometryData3D, callback: Callable = new Callable()): void + } + // _singleton_class_: ProjectSettings + /** Stores globally-accessible variables. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_projectsettings.html + */ + class ProjectSettings extends Object { + /** Returns `true` if a configuration value is present. */ + static has_setting(name: string): boolean + + /** Sets the value of a setting. + * **Example:** + * + * This can also be used to erase custom project settings. To do this change the setting value to `null`. + */ + static set_setting(name: string, value: any): void + + /** Returns the value of the setting identified by [param name]. If the setting doesn't exist and [param default_value] is specified, the value of [param default_value] is returned. Otherwise, `null` is returned. + * **Example:** + * + * + * **Note:** This method doesn't take potential feature overrides into account automatically. Use [method get_setting_with_override] to handle seamlessly. + */ + static get_setting(name: string, default_value: any = {}): any + + /** Similar to [method get_setting], but applies feature tag overrides if any exists and is valid. + * **Example:** + * If the following setting override exists "application/config/name.windows", and the following code is executed: + * + * Then the overridden setting will be returned instead if the project is running on the *Windows* operating system. + */ + static get_setting_with_override(name: StringName): any + + /** Returns an [Array] of registered global classes. Each global class is represented as a [Dictionary] that contains the following entries: + * - `base` is a name of the base class; + * - `class` is a name of the registered global class; + * - `icon` is a path to a custom icon of the global class, if it has any; + * - `language` is a name of a programming language in which the global class is written; + * - `path` is a path to a file containing the global class. + * + * **Note:** Both the script and the icon paths are local to the project filesystem, i.e. they start with `res://`. + */ + static get_global_class_list(): GArray + + /** Sets the order of a configuration value (influences when saved to the config file). */ + static set_order(name: string, position: int64): void + + /** Returns the order of a configuration value (influences when saved to the config file). */ + static get_order(name: string): int64 + + /** Sets the specified setting's initial value. This is the value the setting reverts to. */ + static set_initial_value(name: string, value: any): void + + /** Defines if the specified setting is considered basic or advanced. Basic settings will always be shown in the project settings. Advanced settings will only be shown if the user enables the "Advanced Settings" option. */ + static set_as_basic(name: string, basic: boolean): void + + /** Defines if the specified setting is considered internal. An internal setting won't show up in the Project Settings dialog. This is mostly useful for addons that need to store their own internal settings without exposing them directly to the user. */ + static set_as_internal(name: string, internal: boolean): void + + /** Adds a custom property info to a property. The dictionary must contain: + * - `"name"`: [String] (the property's name) + * - `"type"`: [int] (see [enum Variant.Type]) + * - optionally `"hint"`: [int] (see [enum PropertyHint]) and `"hint_string"`: [String] + * **Example:** + * + */ + static add_property_info(hint: GDictionary): void + + /** Sets whether a setting requires restarting the editor to properly take effect. + * + * **Note:** This is just a hint to display to the user that the editor must be restarted for changes to take effect. Enabling [method set_restart_if_changed] does *not* delay the setting being set when changed. + */ + static set_restart_if_changed(name: string, restart: boolean): void + + /** Clears the whole configuration (not recommended, may break things). */ + static clear(name: string): void + + /** Returns the localized path (starting with `res://`) corresponding to the absolute, native OS [param path]. See also [method globalize_path]. */ + static localize_path(path: string): string + + /** Returns the absolute, native OS path corresponding to the localized [param path] (starting with `res://` or `user://`). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/4.3/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. + * + * **Note:** [method globalize_path] with `res://` will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: + * + */ + static globalize_path(path: string): string + + /** Saves the configuration to the `project.godot` file. + * + * **Note:** This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save `override.cfg` file. + */ + static save(): GError + + /** Loads the contents of the .pck or .zip file specified by [param pack] into the resource filesystem (`res://`). Returns `true` on success. + * + * **Note:** If a file from [param pack] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [param pack] unless [param replace_files] is set to `false`. + * + * **Note:** The optional [param offset] parameter can be used to specify the offset in bytes to the start of the resource pack. This is only supported for .pck files. + */ + static load_resource_pack(pack: string, replace_files: boolean = true, offset: int64 = 0): boolean + + /** Saves the configuration to a custom file. The file extension must be `.godot` (to save in text-based [ConfigFile] format) or `.binary` (to save in binary format). You can also save `override.cfg` file, which is also text, but can be used in exported projects unlike other formats. */ + static save_custom(file: string): GError + + /** Emitted when any setting is changed, up to once per process frame. */ + static readonly settings_changed: Signal0 + } + // _singleton_class_: IP + namespace IP { + enum ResolverStatus { + /** DNS hostname resolver status: No status. */ + RESOLVER_STATUS_NONE = 0, + + /** DNS hostname resolver status: Waiting. */ + RESOLVER_STATUS_WAITING = 1, + + /** DNS hostname resolver status: Done. */ + RESOLVER_STATUS_DONE = 2, + + /** DNS hostname resolver status: Error. */ + RESOLVER_STATUS_ERROR = 3, + } + enum Type { + /** Address type: None. */ + TYPE_NONE = 0, + + /** Address type: Internet protocol version 4 (IPv4). */ + TYPE_IPV4 = 1, + + /** Address type: Internet protocol version 6 (IPv6). */ + TYPE_IPV6 = 2, + + /** Address type: Any. */ + TYPE_ANY = 3, + } + } + /** Internet protocol (IP) support functions such as DNS resolution. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_ip.html + */ + class IP extends Object { + /** Maximum number of concurrent DNS resolver queries allowed, [constant RESOLVER_INVALID_ID] is returned if exceeded. */ + static readonly RESOLVER_MAX_QUERIES = 256 + + /** Invalid ID constant. Returned if [constant RESOLVER_MAX_QUERIES] is exceeded. */ + static readonly RESOLVER_INVALID_ID = -1 + + /** Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [param ip_type]. */ + static resolve_hostname(host: string, ip_type: IP.Type = 3): string + + /** Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [param ip_type]. */ + static resolve_hostname_addresses(host: string, ip_type: IP.Type = 3): PackedStringArray + + /** Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [param ip_type]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. */ + static resolve_hostname_queue_item(host: string, ip_type: IP.Type = 3): int64 + + /** Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [param id]. */ + static get_resolve_item_status(id: int64): IP.ResolverStatus + + /** Returns a queued hostname's IP address, given its queue [param id]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). */ + static get_resolve_item_address(id: int64): string + + /** Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). */ + static get_resolve_item_addresses(id: int64): GArray + + /** Removes a given item [param id] from the queue. This should be used to free a queue after it has completed to enable more queries to happen. */ + static erase_resolve_item(id: int64): void + + /** Returns all the user's current IPv4 and IPv6 addresses as an array. */ + static get_local_addresses(): PackedStringArray + + /** Returns all network adapters as an array. + * Each adapter is a dictionary of the form: + * + */ + static get_local_interfaces(): GArray + + /** Removes all of a [param hostname]'s cached references. If no [param hostname] is given, all cached IP addresses are removed. */ + static clear_cache(hostname: string = ''): void + } + // _singleton_class_: Geometry2D + namespace Geometry2D { + enum PolyBooleanOperation { + /** Create regions where either subject or clip polygons (or both) are filled. */ + OPERATION_UNION = 0, + + /** Create regions where subject polygons are filled except where clip polygons are filled. */ + OPERATION_DIFFERENCE = 1, + + /** Create regions where both subject and clip polygons are filled. */ + OPERATION_INTERSECTION = 2, + + /** Create regions where either subject or clip polygons are filled but not where both are filled. */ + OPERATION_XOR = 3, + } + enum PolyJoinType { + /** Squaring is applied uniformally at all convex edge joins at `1 * delta`. */ + JOIN_SQUARE = 0, + + /** While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. */ + JOIN_ROUND = 1, + + /** There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. */ + JOIN_MITER = 2, + } + enum PolyEndType { + /** Endpoints are joined using the [enum PolyJoinType] value and the path filled as a polygon. */ + END_POLYGON = 0, + + /** Endpoints are joined using the [enum PolyJoinType] value and the path filled as a polyline. */ + END_JOINED = 1, + + /** Endpoints are squared off with no extension. */ + END_BUTT = 2, + + /** Endpoints are squared off and extended by `delta` units. */ + END_SQUARE = 3, + + /** Endpoints are rounded off and extended by `delta` units. */ + END_ROUND = 4, + } + } + /** Provides methods for some common 2D geometric operations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_geometry2d.html + */ + class Geometry2D extends Object { + /** Returns `true` if [param point] is inside the circle or if it's located exactly *on* the circle's boundary, otherwise returns `false`. */ + static is_point_in_circle(point: Vector2, circle_position: Vector2, circle_radius: float64): boolean + + /** Given the 2D segment ([param segment_from], [param segment_to]), returns the position on the segment (as a number between 0 and 1) at which the segment hits the circle that is located at position [param circle_position] and has radius [param circle_radius]. If the segment does not intersect the circle, -1 is returned (this is also the case if the line extending the segment would intersect the circle, but the segment does not). */ + static segment_intersects_circle(segment_from: Vector2, segment_to: Vector2, circle_position: Vector2, circle_radius: float64): float64 + + /** Checks if the two segments ([param from_a], [param to_a]) and ([param from_b], [param to_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns `null`. */ + static segment_intersects_segment(from_a: Vector2, to_a: Vector2, from_b: Vector2, to_b: Vector2): any + + /** Checks if the two lines ([param from_a], [param dir_a]) and ([param from_b], [param dir_b]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns `null`. + * + * **Note:** The lines are specified using direction vectors, not end points. + */ + static line_intersects_line(from_a: Vector2, dir_a: Vector2, from_b: Vector2, dir_b: Vector2): any + + /** Given the two 2D segments ([param p1], [param q1]) and ([param p2], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([param p1], [param q1]) as well the accompanying point on ([param p2], [param q2]). */ + static get_closest_points_between_segments(p1: Vector2, q1: Vector2, p2: Vector2, q2: Vector2): PackedVector2Array + + /** Returns the 2D point on the 2D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment. */ + static get_closest_point_to_segment(point: Vector2, s1: Vector2, s2: Vector2): Vector2 + + /** Returns the 2D point on the 2D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment. */ + static get_closest_point_to_segment_uncapped(point: Vector2, s1: Vector2, s2: Vector2): Vector2 + + /** Returns if [param point] is inside the triangle specified by [param a], [param b] and [param c]. */ + static point_is_inside_triangle(point: Vector2, a: Vector2, b: Vector2, c: Vector2): boolean + + /** Returns `true` if [param polygon]'s vertices are ordered in clockwise order, otherwise returns `false`. + * + * **Note:** Assumes a Cartesian coordinate system where `+x` is right and `+y` is up. If using screen coordinates (`+y` is down), the result will need to be flipped (i.e. a `true` result will indicate counter-clockwise). + */ + static is_polygon_clockwise(polygon: PackedVector2Array | Vector2[]): boolean + + /** Returns `true` if [param point] is inside [param polygon] or if it's located exactly *on* polygon's boundary, otherwise returns `false`. */ + static is_point_in_polygon(point: Vector2, polygon: PackedVector2Array | Vector2[]): boolean + + /** Triangulates the polygon specified by the points in [param polygon]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param polygon] (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). Output triangles will always be counter clockwise, and the contour will be flipped if it's clockwise. If the triangulation did not succeed, an empty [PackedInt32Array] is returned. */ + static triangulate_polygon(polygon: PackedVector2Array | Vector2[]): PackedInt32Array + + /** Triangulates the area specified by discrete set of [param points] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [param points] (i.e. the returned array will have `n * 3` elements, with `n` being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. */ + static triangulate_delaunay(points: PackedVector2Array | Vector2[]): PackedInt32Array + + /** Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. */ + static convex_hull(points: PackedVector2Array | Vector2[]): PackedVector2Array + + /** Decomposes the [param polygon] into multiple convex hulls and returns an array of [PackedVector2Array]. */ + static decompose_polygon_in_convex(polygon: PackedVector2Array | Vector2[]): GArray + + /** Merges (combines) [param polygon_a] and [param polygon_b] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. + * The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise]. + */ + static merge_polygons(polygon_a: PackedVector2Array | Vector2[], polygon_b: PackedVector2Array | Vector2[]): GArray + + /** Clips [param polygon_a] against [param polygon_b] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [param polygon_b] completely overlaps [param polygon_a]. + * If [param polygon_b] is enclosed by [param polygon_a], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise]. + */ + static clip_polygons(polygon_a: PackedVector2Array | Vector2[], polygon_b: PackedVector2Array | Vector2[]): GArray + + /** Intersects [param polygon_a] with [param polygon_b] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. + * The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + */ + static intersect_polygons(polygon_a: PackedVector2Array | Vector2[], polygon_b: PackedVector2Array | Vector2[]): GArray + + /** Mutually excludes common area defined by intersection of [param polygon_a] and [param polygon_b] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. + * The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + */ + static exclude_polygons(polygon_a: PackedVector2Array | Vector2[], polygon_b: PackedVector2Array | Vector2[]): GArray + + /** Clips [param polyline] against [param polygon] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. */ + static clip_polyline_with_polygon(polyline: PackedVector2Array | Vector2[], polygon: PackedVector2Array | Vector2[]): GArray + + /** Intersects [param polyline] with [param polygon] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. */ + static intersect_polyline_with_polygon(polyline: PackedVector2Array | Vector2[], polygon: PackedVector2Array | Vector2[]): GArray + + /** Inflates or deflates [param polygon] by [param delta] units (pixels). If [param delta] is positive, makes the polygon grow outward. If [param delta] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [param delta] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. + * Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType]. + * The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + * + * **Note:** To translate the polygon's vertices specifically, multiply them to a [Transform2D]: + * + */ + static offset_polygon(polygon: PackedVector2Array | Vector2[], delta: float64, join_type: Geometry2D.PolyJoinType = 0): GArray + + /** Inflates or deflates [param polyline] by [param delta] units (pixels), producing polygons. If [param delta] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [param delta] is negative, returns an empty array. + * Each polygon's vertices will be rounded as determined by [param join_type], see [enum PolyJoinType]. + * Each polygon's endpoints will be rounded as determined by [param end_type], see [enum PolyEndType]. + * The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + */ + static offset_polyline(polyline: PackedVector2Array | Vector2[], delta: float64, join_type: Geometry2D.PolyJoinType = 0, end_type: Geometry2D.PolyEndType = 3): GArray + + /** Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: `points` is a [PackedVector2Array] that specifies the positions of each tile, `size` contains the overall size of the whole atlas as [Vector2i]. */ + static make_atlas(sizes: PackedVector2Array | Vector2[]): GDictionary + } + // _singleton_class_: Geometry3D + /** Provides methods for some common 3D geometric operations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_geometry3d.html + */ + class Geometry3D extends Object { + /** Calculates and returns all the vertex points of a convex shape defined by an array of [param planes]. */ + static compute_convex_mesh_points(planes: GArray): PackedVector3Array + + /** Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [param extents], which represents one (positive) corner of the box (i.e. half its actual size). */ + static build_box_planes(extents: Vector3): GArray + + /** Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the round part of the cylinder. The parameter [param axis] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). */ + static build_cylinder_planes(radius: float64, height: float64, sides: int64, axis: Vector3.Axis = 2): GArray + + /** Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [param radius] and height [param height]. The parameter [param sides] defines how many planes will be generated for the side part of the capsule, whereas [param lats] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [param axis] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). */ + static build_capsule_planes(radius: float64, height: float64, sides: int64, lats: int64, axis: Vector3.Axis = 2): GArray + + /** Given the two 3D segments ([param p1], [param p2]) and ([param q1], [param q2]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([param p1], [param p2]) as well the accompanying point on ([param q1], [param q2]). */ + static get_closest_points_between_segments(p1: Vector3, p2: Vector3, q1: Vector3, q2: Vector3): PackedVector3Array + + /** Returns the 3D point on the 3D segment ([param s1], [param s2]) that is closest to [param point]. The returned point will always be inside the specified segment. */ + static get_closest_point_to_segment(point: Vector3, s1: Vector3, s2: Vector3): Vector3 + + /** Returns the 3D point on the 3D line defined by ([param s1], [param s2]) that is closest to [param point]. The returned point can be inside the segment ([param s1], [param s2]) or outside of it, i.e. somewhere on the line extending from the segment. */ + static get_closest_point_to_segment_uncapped(point: Vector3, s1: Vector3, s2: Vector3): Vector3 + + /** Returns a [Vector3] containing weights based on how close a 3D position ([param point]) is to a triangle's different vertices ([param a], [param b] and [param c]). This is useful for interpolating between the data of different vertices in a triangle. One example use case is using this to smoothly rotate over a mesh instead of relying solely on face normals. + * [url=https://en.wikipedia.org/wiki/Barycentric_coordinate_system]Here is a more detailed explanation of barycentric coordinates.[/url] + */ + static get_triangle_barycentric_coords(point: Vector3, a: Vector3, b: Vector3, c: Vector3): Vector3 + + /** Tests if the 3D ray starting at [param from] with the direction of [param dir] intersects the triangle specified by [param a], [param b] and [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns `null`. */ + static ray_intersects_triangle(from: Vector3, dir: Vector3, a: Vector3, b: Vector3, c: Vector3): any + + /** Tests if the segment ([param from], [param to]) intersects the triangle [param a], [param b], [param c]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, returns `null`. */ + static segment_intersects_triangle(from: Vector3, to: Vector3, a: Vector3, b: Vector3, c: Vector3): any + + /** Checks if the segment ([param from], [param to]) intersects the sphere that is located at [param sphere_position] and has radius [param sphere_radius]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. */ + static segment_intersects_sphere(from: Vector3, to: Vector3, sphere_position: Vector3, sphere_radius: float64): PackedVector3Array + + /** Checks if the segment ([param from], [param to]) intersects the cylinder with height [param height] that is centered at the origin and has radius [param radius]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. */ + static segment_intersects_cylinder(from: Vector3, to: Vector3, height: float64, radius: float64): PackedVector3Array + + /** Given a convex hull defined though the [Plane]s in the array [param planes], tests if the segment ([param from], [param to]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array. */ + static segment_intersects_convex(from: Vector3, to: Vector3, planes: GArray): PackedVector3Array + + /** Clips the polygon defined by the points in [param points] against the [param plane] and returns the points of the clipped polygon. */ + static clip_polygon(points: PackedVector3Array | Vector3[], plane: Plane): PackedVector3Array + + /** Tetrahedralizes the volume specified by a discrete set of [param points] in 3D space, ensuring that no point lies within the circumsphere of any resulting tetrahedron. The method returns a [PackedInt32Array] where each tetrahedron consists of four consecutive point indices into the [param points] array (resulting in an array with `n * 4` elements, where `n` is the number of tetrahedra found). If the tetrahedralization is unsuccessful, an empty [PackedInt32Array] is returned. */ + static tetrahedralize_delaunay(points: PackedVector3Array | Vector3[]): PackedInt32Array + } + // _singleton_class_: ResourceLoader + namespace ResourceLoader { + enum ThreadLoadStatus { + /** The resource is invalid, or has not been loaded with [method load_threaded_request]. */ + THREAD_LOAD_INVALID_RESOURCE = 0, + + /** The resource is still being loaded. */ + THREAD_LOAD_IN_PROGRESS = 1, + + /** Some error occurred during loading and it failed. */ + THREAD_LOAD_FAILED = 2, + + /** The resource was loaded successfully and can be accessed via [method load_threaded_get]. */ + THREAD_LOAD_LOADED = 3, + } + enum CacheMode { + /** Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with [constant CACHE_MODE_REUSE]. */ + CACHE_MODE_IGNORE = 0, + + /** The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_REUSE = 1, + + /** Like [constant CACHE_MODE_REUSE], but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. */ + CACHE_MODE_REPLACE = 2, + + /** Like [constant CACHE_MODE_IGNORE], but propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_IGNORE_DEEP = 3, + + /** Like [constant CACHE_MODE_REPLACE], but propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_REPLACE_DEEP = 4, + } + } + /** A singleton for loading resource files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceloader.html + */ + class ResourceLoader extends Object { + /** Loads the resource using threads. If [param use_sub_threads] is `true`, multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). + * The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + */ + static load_threaded_request(path: string, type_hint: string = '', use_sub_threads: boolean = false, cache_mode: ResourceLoader.CacheMode = 1): GError + + /** Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [param path]. See [enum ThreadLoadStatus] for possible return values. + * An array variable can optionally be passed via [param progress], and will return a one-element array containing the percentage of completion of the threaded loading. + * + * **Note:** The recommended way of using this method is to call it during different frames (e.g., in [method Node._process], instead of a loop). + */ + static load_threaded_get_status(path: string, progress: GArray = []): ResourceLoader.ThreadLoadStatus + + /** Returns the resource loaded by [method load_threaded_request]. + * If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading. However, it's recommended to use [method load_threaded_get_status] to known when the load has actually completed. + */ + static load_threaded_get(path: string): Resource + + /** Loads a resource at the given [param path], caching the result for further access. + * The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. + * An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. + * The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + * Returns an empty resource if no [ResourceFormatLoader] could handle the file, and prints an error if no file is found at the specified path. + * GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. + * + * **Note:** If [member ProjectSettings.editor/export/convert_text_resources_to_binary] is `true`, [method @GDScript.load] will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set [member ProjectSettings.editor/export/convert_text_resources_to_binary] to `false`. + * + * **Note:** Relative paths will be prefixed with `"res://"` before loading, to avoid unexpected results make sure your paths are absolute. + */ + static load(path: string, type_hint: string = '', cache_mode: ResourceLoader.CacheMode = 1): Resource + + /** Returns the list of recognized extensions for a resource type. */ + static get_recognized_extensions_for_type(type: string): PackedStringArray + + /** Registers a new [ResourceFormatLoader]. The ResourceLoader will use the ResourceFormatLoader as described in [method load]. + * This method is performed implicitly for ResourceFormatLoaders written in GDScript (see [ResourceFormatLoader] for more information). + */ + static add_resource_format_loader(format_loader: ResourceFormatLoader, at_front: boolean = false): void + + /** Unregisters the given [ResourceFormatLoader]. */ + static remove_resource_format_loader(format_loader: ResourceFormatLoader): void + + /** Changes the behavior on missing sub-resources. The default behavior is to abort loading. */ + static set_abort_on_missing_resources(abort: boolean): void + + /** Returns the dependencies for the resource at the given [param path]. + * + * **Note:** The dependencies are returned with slices separated by `::`. You can use [method String.get_slice] to get their components. + * + */ + static get_dependencies(path: string): PackedStringArray + + /** Returns whether a cached resource is available for the given [param path]. + * Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. + */ + static has_cached(path: string): boolean + + /** Returns whether a recognized resource exists for the given [param path]. + * An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. + * + * **Note:** If you use [method Resource.take_over_path], this method will return `true` for the taken path even if the resource wasn't saved (i.e. exists only in resource cache). + */ + static exists(path: string, type_hint: string = ''): boolean + + /** Returns the ID associated with a given resource path, or `-1` when no such ID exists. */ + static get_resource_uid(path: string): int64 + } + // _singleton_class_: ResourceSaver + namespace ResourceSaver { + enum SaverFlags { + /** No resource saving option. */ + FLAG_NONE = 0, + + /** Save the resource with a path relative to the scene which uses it. */ + FLAG_RELATIVE_PATHS = 1, + + /** Bundles external resources. */ + FLAG_BUNDLE_RESOURCES = 2, + + /** Changes the [member Resource.resource_path] of the saved resource to match its new location. */ + FLAG_CHANGE_PATH = 4, + + /** Do not save editor-specific metadata (identified by their `__editor` prefix). */ + FLAG_OMIT_EDITOR_PROPERTIES = 8, + + /** Save as big endian (see [member FileAccess.big_endian]). */ + FLAG_SAVE_BIG_ENDIAN = 16, + + /** Compress the resource on save using [constant FileAccess.COMPRESSION_ZSTD]. Only available for binary resource types. */ + FLAG_COMPRESS = 32, + + /** Take over the paths of the saved subresources (see [method Resource.take_over_path]). */ + FLAG_REPLACE_SUBRESOURCE_PATHS = 64, + } + } + /** A singleton for saving [Resource]s to the filesystem. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourcesaver.html + */ + class ResourceSaver extends Object { + /** Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. If [param path] is empty, [ResourceSaver] will try to use [member Resource.resource_path]. + * The [param flags] bitmask can be specified to customize the save behavior using [enum SaverFlags] flags. + * Returns [constant OK] on success. + * + * **Note:** When the project is running, any generated UID associated with the resource will not be saved as the required code is only executed in editor mode. + */ + static save(resource: Resource, path: string = '', flags: ResourceSaver.SaverFlags = 0): GError + + /** Returns the list of extensions available for saving a resource of a given type. */ + static get_recognized_extensions(type: Resource): PackedStringArray + + /** Registers a new [ResourceFormatSaver]. The ResourceSaver will use the ResourceFormatSaver as described in [method save]. + * This method is performed implicitly for ResourceFormatSavers written in GDScript (see [ResourceFormatSaver] for more information). + */ + static add_resource_format_saver(format_saver: ResourceFormatSaver, at_front: boolean = false): void + + /** Unregisters the given [ResourceFormatSaver]. */ + static remove_resource_format_saver(format_saver: ResourceFormatSaver): void + } + // _singleton_class_: OS + namespace OS { + enum RenderingDriver { + /** The Vulkan rendering driver. It requires Vulkan 1.0 support and automatically uses features from Vulkan 1.1 and 1.2 if available. */ + RENDERING_DRIVER_VULKAN = 0, + + /** The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. */ + RENDERING_DRIVER_OPENGL3 = 1, + + /** The Direct3D 12 rendering driver. */ + RENDERING_DRIVER_D3D12 = 2, + } + enum SystemDir { + /** Refers to the Desktop directory path. */ + SYSTEM_DIR_DESKTOP = 0, + + /** Refers to the DCIM (Digital Camera Images) directory path. */ + SYSTEM_DIR_DCIM = 1, + + /** Refers to the Documents directory path. */ + SYSTEM_DIR_DOCUMENTS = 2, + + /** Refers to the Downloads directory path. */ + SYSTEM_DIR_DOWNLOADS = 3, + + /** Refers to the Movies (or Videos) directory path. */ + SYSTEM_DIR_MOVIES = 4, + + /** Refers to the Music directory path. */ + SYSTEM_DIR_MUSIC = 5, + + /** Refers to the Pictures directory path. */ + SYSTEM_DIR_PICTURES = 6, + + /** Refers to the Ringtones directory path. */ + SYSTEM_DIR_RINGTONES = 7, + } + } + /** Provides access to common operating system functionalities. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_os.html + */ + class OS extends Object { + /** Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size]. + * + * **Note:** Generating large quantities of bytes using this method can result in locking and entropy of lower quality on most platforms. Using [method Crypto.generate_random_bytes] is preferred in most cases. + */ + static get_entropy(size: int64): PackedByteArray + + /** Returns the list of certification authorities trusted by the operating system as a string of concatenated certificates in PEM format. */ + static get_system_ca_certificates(): string + + /** Returns an array of connected MIDI device names, if they exist. Returns an empty array if the system MIDI driver has not previously been initialized with [method open_midi_inputs]. See also [method close_midi_inputs]. + * + * **Note:** This method is implemented on Linux, macOS and Windows. + */ + static get_connected_midi_inputs(): PackedStringArray + + /** Initializes the singleton for the system MIDI driver, allowing Godot to receive [InputEventMIDI]. See also [method get_connected_midi_inputs] and [method close_midi_inputs]. + * + * **Note:** This method is implemented on Linux, macOS and Windows. + */ + static open_midi_inputs(): void + + /** Shuts down the system MIDI driver. Godot will no longer receive [InputEventMIDI]. See also [method open_midi_inputs] and [method get_connected_midi_inputs]. + * + * **Note:** This method is implemented on Linux, macOS and Windows. + */ + static close_midi_inputs(): void + + /** Displays a modal dialog box using the host platform's implementation. The engine execution is blocked until the dialog is closed. */ + static alert(text: string, title: string = 'Alert!'): void + + /** Crashes the engine (or the editor if called within a `@tool` script). See also [method kill]. + * + * **Note:** This method should *only* be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error], or [method alert]. + */ + static crash(message: string): void + + /** Returns the number of *logical* CPU cores available on the host machine. On CPUs with HyperThreading enabled, this number will be greater than the number of *physical* CPU cores. */ + static get_processor_count(): int64 + + /** Returns the full name of the CPU model on the host machine (e.g. `"Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz"`). + * + * **Note:** This method is only implemented on Windows, macOS, Linux and iOS. On Android and Web, [method get_processor_name] returns an empty string. + */ + static get_processor_name(): string + + /** Returns the list of font family names available. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + */ + static get_system_fonts(): PackedStringArray + + /** Returns the path to the system font file with [param font_name] and style. Returns an empty string if no matching fonts found. + * The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + * + * **Note:** Returned font might have different style if the requested style is not available. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + */ + static get_system_font_path(font_name: string, weight: int64 = 400, stretch: int64 = 100, italic: boolean = false): string + + /** Returns an array of the system substitute font file paths, which are similar to the font with [param font_name] and style for the specified text, locale, and script. Returns an empty array if no matching fonts found. + * The following aliases can be used to request default fonts: "sans-serif", "serif", "monospace", "cursive", and "fantasy". + * + * **Note:** Depending on OS, it's not guaranteed that any of the returned fonts will be suitable for rendering specified text. Fonts should be loaded and checked in the order they are returned, and the first suitable one used. + * + * **Note:** Returned fonts might have different style if the requested style is not available or belong to a different font family. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + */ + static get_system_font_path_for_text(font_name: string, text: string, locale: string = '', script: string = '', weight: int64 = 400, stretch: int64 = 100, italic: boolean = false): PackedStringArray + + /** Returns the file path to the current engine executable. + * + * **Note:** On macOS, if you want to launch another instance of Godot, always use [method create_instance] instead of relying on the executable path. + */ + static get_executable_path(): string + + /** Reads a user input string from the standard input (usually the terminal). This operation is *blocking* , which causes the window to freeze if [method read_string_from_stdin] is called on the main thread. The thread calling [method read_string_from_stdin] will block until the program receives a line break in standard input (usually by the user pressing [kbd]Enter[/kbd]). + * + * **Note:** This method is implemented on Linux, macOS and Windows. + * + * **Note:** On exported Windows builds, run the console wrapper executable to access the terminal. Otherwise, the standard input will not work correctly. If you need a single executable with console support, use a custom build compiled with the `windows_subsystem=console` flag. + */ + static read_string_from_stdin(): string + + /** Executes the given process in a *blocking* way. The file specified in [param path] must exist and be executable. The system path resolution will be used. The [param arguments] are used in the given order, separated by spaces, and wrapped in quotes. + * If an [param output] array is provided, the complete shell output of the process is appended to [param output] as a single [String] element. If [param read_stderr] is `true`, the output to the standard error stream is also appended to the array. + * On Windows, if [param open_console] is `true` and the process is a console app, a new terminal window is opened. + * This method returns the exit code of the command, or `-1` if the process fails to execute. + * + * **Note:** The main thread will be blocked until the executed command terminates. Use [Thread] to create a separate thread that will not block the main thread, or use [method create_process] to create a completely independent process. + * For example, to retrieve a list of the working directory's contents: + * + * If you wish to access a shell built-in or execute a composite command, a platform-specific shell can be invoked. For example: + * + * + * **Note:** This method is implemented on Android, Linux, macOS, and Windows. + * + * **Note:** To execute a Windows command interpreter built-in command, specify `cmd.exe` in [param path], `/c` as the first argument, and the desired command as the second argument. + * + * **Note:** To execute a PowerShell built-in command, specify `powershell.exe` in [param path], `-Command` as the first argument, and the desired command as the second argument. + * + * **Note:** To execute a Unix shell built-in command, specify shell executable name in [param path], `-c` as the first argument, and the desired command as the second argument. + * + * **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export. + * + * **Note:** On Android, system commands such as `dumpsys` can only be run on a rooted device. + */ + static execute(path: string, arguments_: PackedStringArray | string[], output: GArray = [], read_stderr: boolean = false, open_console: boolean = false): int64 + + /** Creates a new process that runs independently of Godot with redirected IO. It will not terminate when Godot terminates. The path specified in [param path] must exist and be an executable file or macOS `.app` bundle. The path is resolved based on the current platform. The [param arguments] are used in the given order and separated by a space. + * If the process cannot be created, this method returns an empty [Dictionary]. Otherwise, this method returns a [Dictionary] with the following keys: + * - `"stdio"` - [FileAccess] to access the process stdin and stdout pipes (read/write). + * - `"stderr"` - [FileAccess] to access the process stderr pipe (read only). + * - `"pid"` - Process ID as an [int], which you can use to monitor the process (and potentially terminate it with [method kill]). + * + * **Note:** This method is implemented on Android, Linux, macOS, and Windows. + * + * **Note:** To execute a Windows command interpreter built-in command, specify `cmd.exe` in [param path], `/c` as the first argument, and the desired command as the second argument. + * + * **Note:** To execute a PowerShell built-in command, specify `powershell.exe` in [param path], `-Command` as the first argument, and the desired command as the second argument. + * + * **Note:** To execute a Unix shell built-in command, specify shell executable name in [param path], `-c` as the first argument, and the desired command as the second argument. + * + * **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + */ + static execute_with_pipe(path: string, arguments_: PackedStringArray | string[]): GDictionary + + /** Creates a new process that runs independently of Godot. It will not terminate when Godot terminates. The path specified in [param path] must exist and be an executable file or macOS `.app` bundle. The path is resolved based on the current platform. The [param arguments] are used in the given order and separated by a space. + * On Windows, if [param open_console] is `true` and the process is a console app, a new terminal window will be opened. + * If the process is successfully created, this method returns its process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). Otherwise, this method returns `-1`. + * For example, running another instance of the project: + * + * See [method execute] if you wish to run an external command and retrieve the results. + * + * **Note:** This method is implemented on Android, Linux, macOS, and Windows. + * + * **Note:** On macOS, sandboxed applications are limited to run only embedded helper executables, specified during export or system .app bundle, system .app bundles will ignore arguments. + */ + static create_process(path: string, arguments_: PackedStringArray | string[], open_console: boolean = false): int64 + + /** Creates a new instance of Godot that runs independently. The [param arguments] are used in the given order and separated by a space. + * If the process is successfully created, this method returns the new process' ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process cannot be created, this method returns `-1`. + * See [method create_process] if you wish to run a different process. + * + * **Note:** This method is implemented on Android, Linux, macOS and Windows. + */ + static create_instance(arguments_: PackedStringArray | string[]): int64 + + /** Kill (terminate) the process identified by the given process ID ([param pid]), such as the ID returned by [method execute] in non-blocking mode. See also [method crash]. + * + * **Note:** This method can also be used to kill processes that were not spawned by the engine. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS and Windows. + */ + static kill(pid: int64): GError + + /** Requests the OS to open a resource identified by [param uri] with the most appropriate program. For example: + * - `OS.shell_open("C:\\Users\name\Downloads")` on Windows opens the file explorer at the user's Downloads folder. + * - `OS.shell_open("https://godotengine.org")` opens the default web browser on the official Godot website. + * - `OS.shell_open("mailto:example@example.com")` opens the default email client with the "To" field set to `example@example.com`. See [url=https://datatracker.ietf.org/doc/html/rfc2368]RFC 2368 - The `mailto` URL scheme[/url] for a list of fields that can be added. + * Use [method ProjectSettings.globalize_path] to convert a `res://` or `user://` project path into a system path for use with this method. + * + * **Note:** Use [method String.uri_encode] to encode characters within URLs in a URL-safe, portable way. This is especially required for line breaks. Otherwise, [method shell_open] may not work correctly in a project exported to the Web platform. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux, macOS and Windows. + */ + static shell_open(uri: string): GError + + /** Requests the OS to open the file manager, navigate to the given [param file_or_dir_path] and select the target file or folder. + * If [param open_folder] is `true` and [param file_or_dir_path] is a valid directory path, the OS will open the file manager and navigate to the target folder without selecting anything. + * Use [method ProjectSettings.globalize_path] to convert a `res://` or `user://` project path into a system path to use with this method. + * + * **Note:** This method is currently only implemented on Windows and macOS. On other platforms, it will fallback to [method shell_open] with a directory path of [param file_or_dir_path] prefixed with `file://`. + */ + static shell_show_in_file_manager(file_or_dir_path: string, open_folder: boolean = true): GError + + /** Returns `true` if the child process ID ([param pid]) is still running or `false` if it has terminated. [param pid] must be a valid ID generated from [method create_process]. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS, and Windows. + */ + static is_process_running(pid: int64): boolean + + /** Returns the exit code of a spawned process once it has finished running (see [method is_process_running]). + * Returns `-1` if the [param pid] is not a PID of a spawned child process, the process is still running, or the method is not implemented for the current platform. + * + * **Note:** Returns `-1` if the [param pid] is a macOS bundled app process. + * + * **Note:** This method is implemented on Android, Linux, macOS and Windows. + */ + static get_process_exit_code(pid: int64): int64 + + /** Returns the number used by the host machine to uniquely identify this application. + * + * **Note:** This method is implemented on Android, iOS, Linux, macOS, and Windows. + */ + static get_process_id(): int64 + + /** Returns `true` if the environment variable with the name [param variable] exists. + * + * **Note:** Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. + */ + static has_environment(variable: string): boolean + + /** Returns the value of the given environment variable, or an empty string if [param variable] doesn't exist. + * + * **Note:** Double-check the casing of [param variable]. Environment variable names are case-sensitive on all platforms except Windows. + * + * **Note:** On macOS, applications do not have access to shell environment variables. + */ + static get_environment(variable: string): string + + /** Sets the value of the environment variable [param variable] to [param value]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will *not* persist to processes run after the Godot process was terminated. + * + * **Note:** Environment variable names are case-sensitive on all platforms except Windows. The [param variable] name cannot be empty or include the `=` character. On Windows, there is a 32767 characters limit for the combined length of [param variable], [param value], and the `=` and null terminator characters that will be registered in the environment block. + */ + static set_environment(variable: string, value: string): void + + /** Removes the given environment variable from the current environment, if it exists. The [param variable] name cannot be empty or include the `=` character. The environment variable will be removed for the Godot process and any process executed with [method execute] after running [method unset_environment]. The removal of the environment variable will *not* persist to processes run after the Godot process was terminated. + * + * **Note:** Environment variable names are case-sensitive on all platforms except Windows. + */ + static unset_environment(variable: string): void + + /** Returns the name of the host platform. + * - On Windows, this is `"Windows"`. + * - On macOS, this is `"macOS"`. + * - On Linux-based operating systems, this is `"Linux"`. + * - On BSD-based operating systems, this is `"FreeBSD"`, `"NetBSD"`, `"OpenBSD"`, or `"BSD"` as a fallback. + * - On Android, this is `"Android"`. + * - On iOS, this is `"iOS"`. + * - On Web, this is `"Web"`. + * + * **Note:** Custom builds of the engine may support additional platforms, such as consoles, possibly returning other names. + * + * + * **Note:** On Web platforms, it is still possible to determine the host platform's OS with feature tags. See [method has_feature]. + */ + static get_name(): string + + /** Returns the name of the distribution for Linux and BSD platforms (e.g. "Ubuntu", "Manjaro", "OpenBSD", etc.). + * Returns the same value as [method get_name] for stock Android ROMs, but attempts to return the custom ROM name for popular Android derivatives such as "LineageOS". + * Returns the same value as [method get_name] for other platforms. + * + * **Note:** This method is not supported on the Web platform. It returns an empty string. + */ + static get_distribution_name(): string + + /** Returns the exact production and build version of the operating system. This is different from the branded version used in marketing. This helps to distinguish between different releases of operating systems, including minor versions, and insider and custom builds. + * - For Windows, the major and minor version are returned, as well as the build number. For example, the returned string may look like `10.0.9926` for a build of Windows 10, and it may look like `6.1.7601` for a build of Windows 7 SP1. + * - For rolling distributions, such as Arch Linux, an empty string is returned. + * - For macOS and iOS, the major and minor version are returned, as well as the patch number. + * - For Android, the SDK version and the incremental build number are returned. If it's a custom ROM, it attempts to return its version instead. + * + * **Note:** This method is not supported on the Web platform. It returns an empty string. + */ + static get_version(): string + + /** Returns the command-line arguments passed to the engine. + * Command-line arguments can be written in any form, including both `--key value` and `--key=value` forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. + * You can also incorporate environment variables using the [method get_environment] method. + * You can set [member ProjectSettings.editor/run/main_run_args] to define command-line arguments to be passed by the editor when running the project. + * Here's a minimal example on how to parse command-line arguments into a [Dictionary] using the `--key=value` form for arguments: + * + * + * **Note:** Passing custom user arguments directly is not recommended, as the engine may discard or modify them. Instead, pass the standard UNIX double dash (`--`) and then the custom arguments, which the engine will ignore by design. These can be read via [method get_cmdline_user_args]. + */ + static get_cmdline_args(): PackedStringArray + + /** Returns the command-line user arguments passed to the engine. User arguments are ignored by the engine and reserved for the user. They are passed after the double dash `--` argument. `++` may be used when `--` is intercepted by another program (such as `startx`). + * + * To get all passed arguments, use [method get_cmdline_args]. + */ + static get_cmdline_user_args(): PackedStringArray + + /** Returns the video adapter driver name and version for the user's currently active graphics card, as a [PackedStringArray]. See also [method RenderingServer.get_video_adapter_api_version]. + * The first element holds the driver name, such as `nvidia`, `amdgpu`, etc. + * The second element holds the driver version. For example, on the `nvidia` driver on a Linux/BSD platform, the version is in the format `510.85.02`. For Windows, the driver's format is `31.0.15.1659`. + * + * **Note:** This method is only supported on Linux/BSD and Windows when not running in headless mode. On other platforms, it returns an empty array. + */ + static get_video_adapter_driver_info(): PackedStringArray + + /** If [param restart] is `true`, restarts the project automatically when it is exited with [method SceneTree.quit] or [constant Node.NOTIFICATION_WM_CLOSE_REQUEST]. Command-line [param arguments] can be supplied. To restart the project with the same command line arguments as originally used to run the project, pass [method get_cmdline_args] as the value for [param arguments]. + * This method can be used to apply setting changes that require a restart. See also [method is_restart_on_exit_set] and [method get_restart_on_exit_arguments]. + * + * **Note:** This method is only effective on desktop platforms, and only when the project isn't started from the editor. It will have no effect on mobile and Web platforms, or when the project is started from the editor. + * + * **Note:** If the project process crashes or is *killed* by the user (by sending `SIGKILL` instead of the usual `SIGTERM`), the project won't restart automatically. + */ + static set_restart_on_exit(restart: boolean, arguments_: PackedStringArray | string[] = []): void + + /** Returns `true` if the project will automatically restart when it exits for any reason, `false` otherwise. See also [method set_restart_on_exit] and [method get_restart_on_exit_arguments]. */ + static is_restart_on_exit_set(): boolean + + /** Returns the list of command line arguments that will be used when the project automatically restarts using [method set_restart_on_exit]. See also [method is_restart_on_exit_set]. */ + static get_restart_on_exit_arguments(): PackedStringArray + + /** Delays execution of the current thread by [param usec] microseconds. [param usec] must be greater than or equal to `0`. Otherwise, [method delay_usec] does nothing and prints an error message. + * + * **Note:** [method delay_usec] is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use [method SceneTree.create_timer]. Awaiting with a [SceneTreeTimer] delays the execution of code placed below the `await` without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). + * + * **Note:** When [method delay_usec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_usec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). + */ + static delay_usec(usec: int64): void + + /** Delays execution of the current thread by [param msec] milliseconds. [param msec] must be greater than or equal to `0`. Otherwise, [method delay_msec] does nothing and prints an error message. + * + * **Note:** [method delay_msec] is a *blocking* way to delay code execution. To delay code execution in a non-blocking way, you may use [method SceneTree.create_timer]. Awaiting with [SceneTreeTimer] delays the execution of code placed below the `await` without affecting the rest of the project (or editor, for [EditorPlugin]s and [EditorScript]s). + * + * **Note:** When [method delay_msec] is called on the main thread, it will freeze the project and will prevent it from redrawing and registering input until the delay has passed. When using [method delay_msec] as part of an [EditorPlugin] or [EditorScript], it will freeze the editor but won't freeze the project if it is currently running (since the project is an independent child process). + */ + static delay_msec(msec: int64): void + + /** Returns the host OS locale as a [String] of the form `language_Script_COUNTRY_VARIANT@extra`. Every substring after `language` is optional and may not exist. + * - `language` - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case. + * - [code skip-lint]Script` - 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. + * - `COUNTRY` - 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. + * - `VARIANT` - language variant, region and sort order. The variant can have any number of underscored keywords. + * - `extra` - semicolon separated list of additional key words. This may include currency, calendar, sort order and numbering system information. + * If you want only the language code and not the fully specified locale from the OS, you can use [method get_locale_language]. + */ + static get_locale(): string + + /** Returns the host OS locale's 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url] as a string which should be consistent on all platforms. This is equivalent to extracting the `language` part of the [method get_locale] string. + * This can be used to narrow down fully specified locale strings to only the "common" language code, when you don't need the additional information about country code or variants. For example, for a French Canadian user with `fr_CA` locale, this would return `fr`. + */ + static get_locale_language(): string + + /** Returns the model name of the current device. + * + * **Note:** This method is implemented on Android and iOS. Returns `"GenericDevice"` on unsupported platforms. + */ + static get_model_name(): string + + /** Returns `true` if the `user://` file system is persistent, that is, its state is the same after a player quits and starts the game again. Relevant to the Web platform, where this persistence may be unavailable. */ + static is_userfs_persistent(): boolean + + /** Returns `true` if the engine was executed with the `--verbose` or `-v` command line argument, or if [member ProjectSettings.debug/settings/stdout/verbose_stdout] is `true`. See also [method @GlobalScope.print_verbose]. */ + static is_stdout_verbose(): boolean + + /** Returns `true` if the Godot binary used to run the project is a *debug* export template, or when running in the editor. + * Returns `false` if the Godot binary used to run the project is a *release* export template. + * + * **Note:** To check whether the Godot binary used to run the project is an export template (debug or release), use `OS.has_feature("template")` instead. + */ + static is_debug_build(): boolean + + /** Returns the amount of static memory being used by the program in bytes. Only works in debug builds. */ + static get_static_memory_usage(): int64 + + /** Returns the maximum amount of static memory used. Only works in debug builds. */ + static get_static_memory_peak_usage(): int64 + + /** Returns a [Dictionary] containing information about the current memory with the following entries: + * - `"physical"` - total amount of usable physical memory in bytes. This value can be slightly less than the actual physical memory amount, since it does not include memory reserved by the kernel and devices. + * - `"free"` - amount of physical memory, that can be immediately allocated without disk access or other costly operations, in bytes. The process might be able to allocate more physical memory, but this action will require moving inactive pages to disk, which can be expensive. + * - `"available"` - amount of memory that can be allocated without extending the swap file(s), in bytes. This value includes both physical memory and swap. + * - `"stack"` - size of the current thread stack in bytes. + * + * **Note:** Each entry's value may be `-1` if it is unknown. + */ + static get_memory_info(): GDictionary + + /** Moves the file or directory at the given [param path] to the system's recycle bin. See also [method DirAccess.remove]. + * The method takes only global paths, so you may need to use [method ProjectSettings.globalize_path]. Do not use it for files in `res://` as it will not work in exported projects. + * Returns [constant FAILED] if the file or directory cannot be found, or the system does not support this method. + * + * + * **Note:** This method is implemented on Android, Linux, macOS and Windows. + * + * **Note:** If the user has disabled the recycle bin on their system, the file will be permanently deleted instead. + */ + static move_to_trash(path: string): GError + + /** Returns the absolute directory path where user data is written (the `user://` directory in Godot). The path depends on the project name and [member ProjectSettings.application/config/use_custom_user_dir]. + * - On Windows, this is `%AppData%\Godot\app_userdata\[project_name]`, or `%AppData%\[custom_name]` if `use_custom_user_dir` is set. `%AppData%` expands to `%UserProfile%\AppData\Roaming`. + * - On macOS, this is `~/Library/Application Support/Godot/app_userdata/[project_name]`, or `~/Library/Application Support/[custom_name]` if `use_custom_user_dir` is set. + * - On Linux and BSD, this is `~/.local/share/godot/app_userdata/[project_name]`, or `~/.local/share/[custom_name]` if `use_custom_user_dir` is set. + * - On Android and iOS, this is a sandboxed directory in either internal or external storage, depending on the user's configuration. + * - On Web, this is a virtual directory managed by the browser. + * If the project name is empty, `[project_name]` falls back to `[unnamed project]`. + * Not to be confused with [method get_data_dir], which returns the *global* (non-project-specific) user home directory. + */ + static get_user_data_dir(): string + + /** Returns the path to commonly used folders across different platforms, as defined by [param dir]. See the [enum SystemDir] constants for available locations. + * + * **Note:** This method is implemented on Android, Linux, macOS and Windows. + * + * **Note:** Shared storage is implemented on Android and allows to differentiate between app specific and shared directories, if [param shared_storage] is `true`. Shared directories have additional restrictions on Android. + */ + static get_system_dir(dir: OS.SystemDir, shared_storage: boolean = true): string + + /** Returns the *global* user configuration directory according to the operating system's standards. + * On the Linux/BSD platform, this path can be overridden by setting the `XDG_CONFIG_HOME` environment variable before starting the project. See [url=https://docs.godotengine.org/en/4.3/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. + * Not to be confused with [method get_user_data_dir], which returns the *project-specific* user data path. + */ + static get_config_dir(): string + + /** Returns the *global* user data directory according to the operating system's standards. + * On the Linux/BSD platform, this path can be overridden by setting the `XDG_DATA_HOME` environment variable before starting the project. See [url=https://docs.godotengine.org/en/4.3/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. + * Not to be confused with [method get_user_data_dir], which returns the *project-specific* user data path. + */ + static get_data_dir(): string + + /** Returns the *global* cache data directory according to the operating system's standards. + * On the Linux/BSD platform, this path can be overridden by setting the `XDG_CACHE_HOME` environment variable before starting the project. See [url=https://docs.godotengine.org/en/4.3/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. + * Not to be confused with [method get_user_data_dir], which returns the *project-specific* user data path. + */ + static get_cache_dir(): string + + /** Returns a string that is unique to the device. + * + * **Note:** This string may change without notice if the user reinstalls their operating system, upgrades it, or modifies their hardware. This means it should generally not be used to encrypt persistent data, as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by this method for security purposes. + * + * **Note:** On Web, returns an empty string and generates an error, as this method cannot be implemented for security reasons. + */ + static get_unique_id(): string + + /** Returns the given keycode as a [String]. + * + * See also [method find_keycode_from_string], [member InputEventKey.keycode], and [method InputEventKey.get_keycode_with_modifiers]. + */ + static get_keycode_string(code: Key): string + + /** Returns `true` if the input keycode corresponds to a Unicode character. For a list of codes, see the [enum Key] constants. + * + */ + static is_keycode_unicode(code: int64): boolean + + /** Finds the keycode for the given string. The returned values are equivalent to the [enum Key] constants. + * + * See also [method get_keycode_string]. + */ + static find_keycode_from_string(string_: string): Key + + /** If [param enabled] is `true`, when opening a file for writing, a temporary file is used in its place. When closed, it is automatically applied to the target file. + * This can useful when files may be opened by other applications, such as antiviruses, text editors, or even the Godot editor itself. + */ + static set_use_file_access_save_and_swap(enabled: boolean): void + + /** Assigns the given name to the current thread. Returns [constant ERR_UNAVAILABLE] if unavailable on the current platform. */ + static set_thread_name(name: string): GError + + /** Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. + * + * **Note:** Thread IDs are not deterministic and may be reused across application restarts. + */ + static get_thread_caller_id(): int64 + + /** Returns the ID of the main thread. See [method get_thread_caller_id]. + * + * **Note:** Thread IDs are not deterministic and may be reused across application restarts. + */ + static get_main_thread_id(): int64 + + /** Returns `true` if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/4.3/tutorials/export/feature_tags.html]Feature Tags[/url] documentation for more details. + * + * **Note:** Tag names are case-sensitive. + * + * **Note:** On the Web platform, one of the following additional tags is defined to indicate the host platform: `web_android`, `web_ios`, `web_linuxbsd`, `web_macos`, or `web_windows`. + */ + static has_feature(tag_name: string): boolean + + /** Returns `true` if the application is running in the sandbox. + * + * **Note:** This method is only implemented on macOS and Linux. + */ + static is_sandboxed(): boolean + + /** Requests permission from the OS for the given [param name]. Returns `true` if the permission has been successfully granted. + * + * **Note:** This method is currently only implemented on Android, to specifically request permission for `"RECORD_AUDIO"` by `AudioDriverOpenSL`. + */ + static request_permission(name: string): boolean + + /** Requests *dangerous* permissions from the OS. Returns `true` if permissions have been successfully granted. + * + * **Note:** This method is only implemented on Android. Normal permissions are automatically granted at install time in Android applications. + */ + static request_permissions(): boolean + + /** On Android devices: Returns the list of dangerous permissions that have been granted. + * On macOS: Returns the list of user selected folders accessible to the application (sandboxed applications only). Use the native file dialog to request folder access permission. + */ + static get_granted_permissions(): PackedStringArray + + /** On macOS (sandboxed applications only), this function clears list of user selected folders accessible to the application. */ + static revoke_granted_permissions(): void + + /** If `true`, the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. + * + * **Note:** On start-up, this is the same as [member ProjectSettings.application/run/low_processor_mode]. + */ + get low_processor_usage_mode(): boolean + set low_processor_usage_mode(value: boolean) + + /** The amount of sleeping between frames when the low-processor usage mode is enabled, in microseconds. Higher values will result in lower CPU usage. See also [member low_processor_usage_mode]. + * + * **Note:** On start-up, this is the same as [member ProjectSettings.application/run/low_processor_mode_sleep_usec]. + */ + get low_processor_usage_mode_sleep_usec(): int64 + set low_processor_usage_mode_sleep_usec(value: int64) + + /** If `true`, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This only works on systems where V-Sync is active. + * + * **Note:** On start-up, this is the same as [member ProjectSettings.application/run/delta_smoothing]. + */ + get delta_smoothing(): boolean + set delta_smoothing(value: boolean) + } + // _singleton_class_: Engine + /** Provides access to engine properties. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_engine.html + */ + class Engine extends Object { + /** Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation. */ + static get_physics_interpolation_fraction(): float64 + + /** Returns the total number of frames drawn since the engine started. + * + * **Note:** On headless platforms, or if rendering is disabled with `--disable-render-loop` via command line, this method always returns `0`. See also [method get_process_frames]. + */ + static get_frames_drawn(): int64 + + /** Returns the average frames rendered every second (FPS), also known as the framerate. */ + static get_frames_per_second(): float64 + + /** Returns the total number of frames passed since the engine started. This number is increased every **physics frame**. See also [method get_process_frames]. + * This method can be used to run expensive logic less often without relying on a [Timer]: + * + */ + static get_physics_frames(): int64 + + /** Returns the total number of frames passed since the engine started. This number is increased every **process frame**, regardless of whether the render loop is enabled. See also [method get_frames_drawn] and [method get_physics_frames]. + * This method can be used to run expensive logic less often without relying on a [Timer]: + * + */ + static get_process_frames(): int64 + + /** Returns the instance of the [MainLoop]. This is usually the main [SceneTree] and is the same as [method Node.get_tree]. + * + * **Note:** The type instantiated as the main loop can changed with [member ProjectSettings.application/run/main_loop_type]. + */ + static get_main_loop(): MainLoop + + /** Returns the current engine version information as a [Dictionary] containing the following entries: + * - `major` - Major version number as an int; + * - `minor` - Minor version number as an int; + * - `patch` - Patch version number as an int; + * - `hex` - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below); + * - `status` - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String; + * - `build` - Build name (e.g. "custom_build") as a String; + * - `hash` - Full Git commit hash as a String; + * - `timestamp` - Holds the Git commit date UNIX timestamp in seconds as an int, or `0` if unavailable; + * - `string` - `major`, `minor`, `patch`, `status`, and `build` in a single String. + * The `hex` value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be `0x03010C`. + * + * **Note:** The `hex` value is still an [int] internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code: + * + */ + static get_version_info(): GDictionary + + /** Returns the engine author information as a [Dictionary], where each entry is an [Array] of strings with the names of notable contributors to the Godot Engine: `lead_developers`, `founders`, `project_managers`, and `developers`. */ + static get_author_info(): GDictionary + + /** Returns an [Array] of dictionaries with copyright information for every component of Godot's source code. + * Every [Dictionary] contains a `name` identifier, and a `parts` array of dictionaries. It describes the component in detail with the following entries: + * - `files` - [Array] of file paths from the source code affected by this component; + * - `copyright` - [Array] of owners of this component; + * - `license` - The license applied to this component (such as "[url=https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants]Expat[/url]" or "[url=https://creativecommons.org/licenses/by/4.0/]CC-BY-4.0[/url]"). + */ + static get_copyright_info(): GArray + + /** Returns a [Dictionary] of categorized donor names. Each entry is an [Array] of strings: + * {`platinum_sponsors`, `gold_sponsors`, `silver_sponsors`, `bronze_sponsors`, `mini_sponsors`, `gold_donors`, `silver_donors`, `bronze_donors`} + */ + static get_donor_info(): GDictionary + + /** Returns a [Dictionary] of licenses used by Godot and included third party components. Each entry is a license name (such as "[url=https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants]Expat[/url]") and its associated text. */ + static get_license_info(): GDictionary + + /** Returns the full Godot license text. */ + static get_license_text(): string + + /** Returns the name of the CPU architecture the Godot binary was built for. Possible return values include `"x86_64"`, `"x86_32"`, `"arm64"`, `"arm32"`, `"rv64"`, `"riscv"`, `"ppc64"`, `"ppc"`, `"wasm64"`, and `"wasm32"`. + * To detect whether the current build is 64-bit, you can use the fact that all 64-bit architecture names contain `64` in their name: + * + * + * **Note:** This method does *not* return the name of the system's CPU architecture (like [method OS.get_processor_name]). For example, when running an `x86_32` Godot binary on an `x86_64` system, the returned value will still be `"x86_32"`. + */ + static get_architecture_name(): string + + /** Returns `true` if the engine is inside the fixed physics process step of the main loop. + * + */ + static is_in_physics_frame(): boolean + + /** Returns `true` if a singleton with the given [param name] exists in the global scope. See also [method get_singleton]. + * + * + * **Note:** Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. + */ + static has_singleton(name: StringName): boolean + + /** Returns the global singleton with the given [param name], or `null` if it does not exist. Often used for plugins. See also [method has_singleton] and [method get_singleton_list]. + * + * **Note:** Global singletons are not the same as autoloaded nodes, which are configurable in the project settings. + */ + static get_singleton(name: StringName): Object + + /** Registers the given [Object] [param instance] as a singleton, available globally under [param name]. Useful for plugins. */ + static register_singleton(name: StringName, instance: Object): void + + /** Removes the singleton registered under [param name]. The singleton object is *not* freed. Only works with user-defined singletons registered with [method register_singleton]. */ + static unregister_singleton(name: StringName): void + + /** Returns a list of names of all available global singletons. See also [method get_singleton]. */ + static get_singleton_list(): PackedStringArray + + /** Registers a [ScriptLanguage] instance to be available with `ScriptServer`. + * Returns: + * - [constant OK] on success; + * - [constant ERR_UNAVAILABLE] if `ScriptServer` has reached the limit and cannot register any new language; + * - [constant ERR_ALREADY_EXISTS] if `ScriptServer` already contains a language with similar extension/name/type. + */ + static register_script_language(language: ScriptLanguage): GError + + /** Unregisters the [ScriptLanguage] instance from `ScriptServer`. + * Returns: + * - [constant OK] on success; + * - [constant ERR_DOES_NOT_EXIST] if the language is not registered in `ScriptServer`. + */ + static unregister_script_language(language: ScriptLanguage): GError + + /** Returns the number of available script languages. Use with [method get_script_language]. */ + static get_script_language_count(): int64 + + /** Returns an instance of a [ScriptLanguage] with the given [param index]. */ + static get_script_language(index: int64): ScriptLanguage + + /** Returns `true` if the script is currently running inside the editor, otherwise returns `false`. This is useful for `@tool` scripts to conditionally draw editor helpers, or prevent accidentally running "game" code that would affect the scene state while in the editor: + * + * See [url=https://docs.godotengine.org/en/4.3/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. + * + * **Note:** To detect whether the script is running on an editor *build* (such as when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the `"editor"` argument instead. `OS.has_feature("editor")` evaluate to `true` both when the script is running in the editor and when running the project from the editor, but returns `false` when run from an exported project. + */ + static is_editor_hint(): boolean + + /** Returns the path to the [MovieWriter]'s output file, or an empty string if the engine wasn't started in Movie Maker mode. The default path can be changed in [member ProjectSettings.editor/movie_writer/movie_file]. */ + static get_write_movie_path(): string + + /** If `false`, stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting. + * + * **Note:** This property does not impact the editor's Errors tab when running a project from the editor. + * **Warning:** If set to `false` anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. In a `@tool` script, this will also impact the editor itself. Do *not* report bugs before ensuring error messages are enabled (as they are by default). + */ + get print_error_messages(): boolean + set print_error_messages(value: boolean) + + /** The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to `60` or above, as Godot doesn't interpolate the physics step. As a result, values lower than `60` will look stuttery. This value can be increased to make input more reactive or work around collision tunneling issues, but keep in mind doing so will increase CPU usage. See also [member max_fps] and [member ProjectSettings.physics/common/physics_ticks_per_second]. + * + * **Note:** Only [member max_physics_steps_per_frame] physics ticks may be simulated per rendered frame at most. If more physics ticks have to be simulated per rendered frame to keep up with rendering, the project will appear to slow down (even if `delta` is used consistently in physics calculations). Therefore, it is recommended to also increase [member max_physics_steps_per_frame] if increasing [member physics_ticks_per_second] significantly above its default value. + */ + get physics_ticks_per_second(): int64 + set physics_ticks_per_second(value: int64) + + /** The maximum number of physics steps that can be simulated each rendered frame. + * + * **Note:** The default value is tuned to prevent expensive physics simulations from triggering even more expensive simulations indefinitely. However, the game will appear to slow down if the rendering FPS is less than `1 / max_physics_steps_per_frame` of [member physics_ticks_per_second]. This occurs even if `delta` is consistently used in physics calculations. To avoid this, increase [member max_physics_steps_per_frame] if you have increased [member physics_ticks_per_second] significantly above its default value. + */ + get max_physics_steps_per_frame(): int64 + set max_physics_steps_per_frame(value: int64) + + /** The maximum number of frames that can be rendered every second (FPS). A value of `0` means the framerate is uncapped. + * Limiting the FPS can be useful to reduce the host machine's power consumption, which reduces heat, noise emissions, and improves battery life. + * If [member ProjectSettings.display/window/vsync/vsync_mode] is **Enabled** or **Adaptive**, the setting takes precedence and the max FPS number cannot exceed the monitor's refresh rate. + * If [member ProjectSettings.display/window/vsync/vsync_mode] is **Enabled**, on monitors with variable refresh rate enabled (G-Sync/FreeSync), using an FPS limit a few frames lower than the monitor's refresh rate will [url=https://blurbusters.com/howto-low-lag-vsync-on/]reduce input lag while avoiding tearing[/url]. + * See also [member physics_ticks_per_second] and [member ProjectSettings.application/run/max_fps]. + * + * **Note:** The actual number of frames per second may still be below this value if the CPU or GPU cannot keep up with the project's logic and rendering. + * + * **Note:** If [member ProjectSettings.display/window/vsync/vsync_mode] is **Disabled**, limiting the FPS to a high value that can be consistently reached on the system can reduce input lag compared to an uncapped framerate. Since this works by ensuring the GPU load is lower than 100%, this latency reduction is only effective in GPU-bottlenecked scenarios, not CPU-bottlenecked scenarios. + */ + get max_fps(): int64 + set max_fps(value: int64) + + /** The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to `2.0` the game runs twice as fast, and if set to `0.5` the game runs half as fast. + * This value affects [Timer], [SceneTreeTimer], and all other simulations that make use of `delta` time (such as [method Node._process] and [method Node._physics_process]). + * + * **Note:** It's recommended to keep this property above `0.0`, as the game may behave unexpectedly otherwise. + * + * **Note:** This does not affect audio playback speed. Use [member AudioServer.playback_speed_scale] to adjust audio playback speed independently of [member Engine.time_scale]. + * + * **Note:** This does not automatically adjust [member physics_ticks_per_second]. With values above `1.0` physics simulation may become less precise, as each physics tick will stretch over a larger period of engine time. If you're modifying [member Engine.time_scale] to speed up simulation by a large factor, consider also increasing [member physics_ticks_per_second] to make the simulation more reliable. + */ + get time_scale(): float64 + set time_scale(value: float64) + + /** How much physics ticks are synchronized with real time. If `0` or less, the ticks are fully synchronized. Higher values cause the in-game clock to deviate more from the real clock, but they smooth out framerate jitters. + * + * **Note:** The default value of `0.5` should be good enough for most cases; values above `2` could cause the game to react to dropped frames with a noticeable delay and are not recommended. + * + * **Note:** When using a custom physics interpolation solution, or within a network game, it's recommended to disable the physics jitter fix by setting this property to `0`. + */ + get physics_jitter_fix(): float64 + set physics_jitter_fix(value: float64) + } + // _singleton_class_: ClassDB + /** A class information repository. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_classdb.html + */ + class ClassDB extends Object { + /** Returns the names of all the classes available. */ + static get_class_list(): PackedStringArray + + /** Returns the names of all the classes that directly or indirectly inherit from [param class]. */ + static get_inheriters_from_class(class_: StringName): PackedStringArray + + /** Returns the parent class of [param class]. */ + static get_parent_class(class_: StringName): StringName + + /** Returns whether the specified [param class] is available or not. */ + static class_exists(class_: StringName): boolean + + /** Returns whether [param inherits] is an ancestor of [param class] or not. */ + static is_parent_class(class_: StringName, inherits: StringName): boolean + + /** Returns `true` if objects can be instantiated from the specified [param class], otherwise returns `false`. */ + static can_instantiate(class_: StringName): boolean + + /** Creates an instance of [param class]. */ + static instantiate(class_: StringName): any + + /** Returns whether [param class] or its ancestry has a signal called [param signal] or not. */ + static class_has_signal(class_: StringName, signal: StringName): boolean + + /** Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`. */ + static class_get_signal(class_: StringName, signal: StringName): GDictionary + + /** Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is `false`. Every element of the array is a [Dictionary] as described in [method class_get_signal]. */ + static class_get_signal_list(class_: StringName, no_inheritance: boolean = false): GArray + + /** Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is `false`. */ + static class_get_property_list(class_: StringName, no_inheritance: boolean = false): GArray + + /** Returns the value of [param property] of [param object] or its ancestry. */ + static class_get_property(object: Object, property: StringName): any + + /** Sets [param property] value of [param object] to [param value]. */ + static class_set_property(object: Object, property: StringName, value: any): GError + + /** Returns the default value of [param property] of [param class] or its ancestor classes. */ + static class_get_property_default_value(class_: StringName, property: StringName): any + + /** Returns whether [param class] (or its ancestry if [param no_inheritance] is `false`) has a method called [param method] or not. */ + static class_has_method(class_: StringName, method: StringName, no_inheritance: boolean = false): boolean + + /** Returns the number of arguments of the method [param method] of [param class] or its ancestry if [param no_inheritance] is `false`. */ + static class_get_method_argument_count(class_: StringName, method: StringName, no_inheritance: boolean = false): int64 + + /** Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is `false`. Every element of the array is a [Dictionary] with the following keys: `args`, `default_args`, `flags`, `id`, `name`, `return: (class_name, hint, hint_string, name, type, usage)`. + * + * **Note:** In exported release builds the debug info is not available, so the returned dictionaries will contain only method names. + */ + static class_get_method_list(class_: StringName, no_inheritance: boolean = false): GArray + + /** Returns an array with the names all the integer constants of [param class] or its ancestry. */ + static class_get_integer_constant_list(class_: StringName, no_inheritance: boolean = false): PackedStringArray + + /** Returns whether [param class] or its ancestry has an integer constant called [param name] or not. */ + static class_has_integer_constant(class_: StringName, name: StringName): boolean + + /** Returns the value of the integer constant [param name] of [param class] or its ancestry. Always returns 0 when the constant could not be found. */ + static class_get_integer_constant(class_: StringName, name: StringName): int64 + + /** Returns whether [param class] or its ancestry has an enum called [param name] or not. */ + static class_has_enum(class_: StringName, name: StringName, no_inheritance: boolean = false): boolean + + /** Returns an array with all the enums of [param class] or its ancestry. */ + static class_get_enum_list(class_: StringName, no_inheritance: boolean = false): PackedStringArray + + /** Returns an array with all the keys in [param enum] of [param class] or its ancestry. */ + static class_get_enum_constants(class_: StringName, enum_: StringName, no_inheritance: boolean = false): PackedStringArray + + /** Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to. */ + static class_get_integer_constant_enum(class_: StringName, name: StringName, no_inheritance: boolean = false): StringName + + /** Returns whether [param class] (or its ancestor classes if [param no_inheritance] is `false`) has an enum called [param enum] that is a bitfield. */ + static is_class_enum_bitfield(class_: StringName, enum_: StringName, no_inheritance: boolean = false): boolean + + /** Returns whether this [param class] is enabled or not. */ + static is_class_enabled(class_: StringName): boolean + } + // _singleton_class_: Marshalls + /** Data transformation (marshaling) and encoding helpers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_marshalls.html + */ + class Marshalls extends Object { + /** Returns a Base64-encoded string of the [Variant] [param variant]. If [param full_objects] is `true`, encoding objects is allowed (and can potentially include code). + * Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method. + */ + static variant_to_base64(variant: any, full_objects: boolean = false): string + + /** Returns a decoded [Variant] corresponding to the Base64-encoded string [param base64_str]. If [param allow_objects] is `true`, decoding objects is allowed. + * Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. + * **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + */ + static base64_to_variant(base64_str: string, allow_objects: boolean = false): any + + /** Returns a Base64-encoded string of a given [PackedByteArray]. */ + static raw_to_base64(array: PackedByteArray | byte[] | ArrayBuffer): string + + /** Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [param base64_str]. */ + static base64_to_raw(base64_str: string): PackedByteArray + + /** Returns a Base64-encoded string of the UTF-8 string [param utf8_str]. */ + static utf8_to_base64(utf8_str: string): string + + /** Returns a decoded string corresponding to the Base64-encoded string [param base64_str]. */ + static base64_to_utf8(base64_str: string): string + } + // _singleton_class_: TranslationServer + /** The server responsible for language translations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_translationserver.html + */ + class TranslationServer extends Object { + /** Sets the locale of the project. The [param locale] string will be standardized to match known locales (e.g. `en-US` would be matched to `en_US`). + * If translations have been loaded beforehand for the new locale, they will be applied. + */ + static set_locale(locale: string): void + + /** Returns the current locale of the project. + * See also [method OS.get_locale] and [method OS.get_locale_language] to query the locale of the user system. + */ + static get_locale(): string + + /** Returns the current locale of the editor. + * + * **Note:** When called from an exported project returns the same value as [method get_locale]. + */ + static get_tool_locale(): string + + /** Compares two locales and returns a similarity score between `0` (no match) and `10` (full match). */ + static compare_locales(locale_a: string, locale_b: string): int64 + + /** Returns a [param locale] string standardized to match known locales (e.g. `en-US` would be matched to `en_US`). */ + static standardize_locale(locale: string): string + + /** Returns array of known language codes. */ + static get_all_languages(): PackedStringArray + + /** Returns a readable language name for the [param language] code. */ + static get_language_name(language: string): string + + /** Returns an array of known script codes. */ + static get_all_scripts(): PackedStringArray + + /** Returns a readable script name for the [param script] code. */ + static get_script_name(script: string): string + + /** Returns an array of known country codes. */ + static get_all_countries(): PackedStringArray + + /** Returns a readable country name for the [param country] code. */ + static get_country_name(country: string): string + + /** Returns a locale's language and its variant (e.g. `"en_US"` would return `"English (United States)"`). */ + static get_locale_name(locale: string): string + + /** Returns the current locale's translation for the given message (key) and context. */ + static translate(message: StringName, context: StringName = ''): StringName + + /** Returns the current locale's translation for the given message (key), plural message and context. + * The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. + */ + static translate_plural(message: StringName, plural_message: StringName, n: int64, context: StringName = ''): StringName + + /** Adds a [Translation] resource. */ + static add_translation(translation: Translation): void + + /** Removes the given translation from the server. */ + static remove_translation(translation: Translation): void + + /** Returns the [Translation] instance based on the [param locale] passed in. + * It will return `null` if there is no [Translation] instance that matches the [param locale]. + */ + static get_translation_object(locale: string): Translation + + /** Clears the server from all translations. */ + static clear(): void + + /** Returns an array of all loaded locales of the project. */ + static get_loaded_locales(): PackedStringArray + + /** Reparses the pseudolocalization options and reloads the translation. */ + static reload_pseudolocalization(): void + + /** Returns the pseudolocalized string based on the [param message] passed in. */ + static pseudolocalize(message: StringName): StringName + + /** If `true`, enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details. */ + get pseudolocalization_enabled(): boolean + set pseudolocalization_enabled(value: boolean) + } + // _singleton_class_: Input + namespace Input { + enum MouseMode { + /** Makes the mouse cursor visible if it is hidden. */ + MOUSE_MODE_VISIBLE = 0, + + /** Makes the mouse cursor hidden if it is visible. */ + MOUSE_MODE_HIDDEN = 1, + + /** Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. + * + * **Note:** If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. + */ + MOUSE_MODE_CAPTURED = 2, + + /** Confines the mouse cursor to the game window, and make it visible. */ + MOUSE_MODE_CONFINED = 3, + + /** Confines the mouse cursor to the game window, and make it hidden. */ + MOUSE_MODE_CONFINED_HIDDEN = 4, + } + enum CursorShape { + /** Arrow cursor. Standard, default pointing cursor. */ + CURSOR_ARROW = 0, + + /** I-beam cursor. Usually used to show where the text cursor will appear when the mouse is clicked. */ + CURSOR_IBEAM = 1, + + /** Pointing hand cursor. Usually used to indicate the pointer is over a link or other interactable item. */ + CURSOR_POINTING_HAND = 2, + + /** Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. */ + CURSOR_CROSS = 3, + + /** Wait cursor. Indicates that the application is busy performing an operation, and that it cannot be used during the operation (e.g. something is blocking its main thread). */ + CURSOR_WAIT = 4, + + /** Busy cursor. Indicates that the application is busy performing an operation, and that it is still usable during the operation. */ + CURSOR_BUSY = 5, + + /** Drag cursor. Usually displayed when dragging something. + * + * **Note:** Windows lacks a dragging cursor, so [constant CURSOR_DRAG] is the same as [constant CURSOR_MOVE] for this platform. + */ + CURSOR_DRAG = 6, + + /** Can drop cursor. Usually displayed when dragging something to indicate that it can be dropped at the current position. */ + CURSOR_CAN_DROP = 7, + + /** Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. */ + CURSOR_FORBIDDEN = 8, + + /** Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. */ + CURSOR_VSIZE = 9, + + /** Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. */ + CURSOR_HSIZE = 10, + + /** Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. */ + CURSOR_BDIAGSIZE = 11, + + /** Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. */ + CURSOR_FDIAGSIZE = 12, + + /** Move cursor. Indicates that something can be moved. */ + CURSOR_MOVE = 13, + + /** Vertical split mouse cursor. On Windows, it's the same as [constant CURSOR_VSIZE]. */ + CURSOR_VSPLIT = 14, + + /** Horizontal split mouse cursor. On Windows, it's the same as [constant CURSOR_HSIZE]. */ + CURSOR_HSPLIT = 15, + + /** Help cursor. Usually a question mark. */ + CURSOR_HELP = 16, + } + } + /** A singleton for handling inputs. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_input.html + */ + class Input extends Object { + /** Returns `true` if any action, key, joypad button, or mouse button is being pressed. This will also return `true` if any action is simulated via code by calling [method action_press]. */ + static is_anything_pressed(): boolean + + /** Returns `true` if you are pressing the Latin key in the current keyboard layout. You can pass a [enum Key] constant. + * [method is_key_pressed] is only recommended over [method is_physical_key_pressed] in non-game applications. This ensures that shortcut keys behave as expected depending on the user's keyboard layout, as keyboard shortcuts are generally dependent on the keyboard layout in non-game applications. If in doubt, use [method is_physical_key_pressed]. + * + * **Note:** Due to keyboard ghosting, [method is_key_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + */ + static is_key_pressed(keycode: Key): boolean + + /** Returns `true` if you are pressing the key in the physical location on the 101/102-key US QWERTY keyboard. You can pass a [enum Key] constant. + * [method is_physical_key_pressed] is recommended over [method is_key_pressed] for in-game actions, as it will make [kbd]W[/kbd]/[kbd]A[/kbd]/[kbd]S[/kbd]/[kbd]D[/kbd] layouts work regardless of the user's keyboard layout. [method is_physical_key_pressed] will also ensure that the top row number keys work on any keyboard layout. If in doubt, use [method is_physical_key_pressed]. + * + * **Note:** Due to keyboard ghosting, [method is_physical_key_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + */ + static is_physical_key_pressed(keycode: Key): boolean + + /** Returns `true` if you are pressing the key with the [param keycode] printed on it. You can pass a [enum Key] constant or any Unicode character code. */ + static is_key_label_pressed(keycode: Key): boolean + + /** Returns `true` if you are pressing the mouse button specified with [enum MouseButton]. */ + static is_mouse_button_pressed(button: MouseButton): boolean + + /** Returns `true` if you are pressing the joypad button (see [enum JoyButton]). */ + static is_joy_button_pressed(device: int64, button: JoyButton): boolean + + /** Returns `true` if you are pressing the action event. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + * + * **Note:** Due to keyboard ghosting, [method is_action_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + */ + static is_action_pressed(action: StringName, exact_match: boolean = false): boolean + + /** Returns `true` when the user has *started* pressing the action event in the current frame or physics tick. It will only return `true` on the frame or tick that the user pressed down the button. + * This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + * + * **Note:** Returning `true` does not imply that the action is *still* pressed. An action can be pressed and released again rapidly, and `true` will still be returned so as not to miss input. + * + * **Note:** Due to keyboard ghosting, [method is_action_just_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + * + * **Note:** During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_pressed] instead to query the action state of the current event. + */ + static is_action_just_pressed(action: StringName, exact_match: boolean = false): boolean + + /** Returns `true` when the user *stops* pressing the action event in the current frame or physics tick. It will only return `true` on the frame or tick that the user releases the button. + * + * **Note:** Returning `true` does not imply that the action is *still* not pressed. An action can be released and pressed again rapidly, and `true` will still be returned so as not to miss input. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + * + * **Note:** During input handling (e.g. [method Node._input]), use [method InputEvent.is_action_released] instead to query the action state of the current event. + */ + static is_action_just_released(action: StringName, exact_match: boolean = false): boolean + + /** Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis such as the keyboard, the value returned will be 0 or 1. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + static get_action_strength(action: StringName, exact_match: boolean = false): float64 + + /** Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + static get_action_raw_strength(action: StringName, exact_match: boolean = false): float64 + + /** Get axis input by specifying two actions, one negative and one positive. + * This is a shorthand for writing `Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")`. + */ + static get_axis(negative_action: StringName, positive_action: StringName): float64 + + /** Gets an input vector by specifying four actions for the positive and negative X and Y axes. + * This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement. + * By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1). + */ + static get_vector(negative_x: StringName, positive_x: StringName, negative_y: StringName, positive_y: StringName, deadzone: float64 = -1): Vector2 + + /** Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. */ + static add_joy_mapping(mapping: string, update_existing: boolean = false): void + + /** Removes all mappings from the internal database that match the given GUID. */ + static remove_joy_mapping(guid: string): void + + /** Returns `true` if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. */ + static is_joy_known(device: int64): boolean + + /** Returns the current value of the joypad axis at given index (see [enum JoyAxis]). */ + static get_joy_axis(device: int64, axis: JoyAxis): float64 + + /** Returns the name of the joypad at the specified device index, e.g. `PS4 Controller`. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names. */ + static get_joy_name(device: int64): string + + /** Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. `030000004c050000c405000000010000`. Returns `"Default Gamepad"` otherwise. Godot uses the [url=https://github.com/gabomdq/SDL_GameControllerDB]SDL2 game controller database[/url] to determine gamepad names and mappings based on this GUID. */ + static get_joy_guid(device: int64): string + + /** Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index. + * On Windows the dictionary contains the following fields: + * `xinput_index`: The index of the controller in the XInput system. + * On Linux: + * `raw_name`: The name of the controller as it came from the OS, before getting renamed by the godot controller database. + * `vendor_id`: The USB vendor ID of the device. + * `product_id`: The USB product ID of the device. + * `steam_input_index`: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present. + */ + static get_joy_info(device: int64): GDictionary + + /** Queries whether an input device should be ignored or not. Devices can be ignored by setting the environment variable `SDL_GAMECONTROLLER_IGNORE_DEVICES`. Read the [url=https://wiki.libsdl.org/SDL2]SDL documentation[/url] for more information. + * + * **Note:** Some 3rd party tools can contribute to the list of ignored devices. For example, *SteamInput* creates virtual devices from physical devices for remapping purposes. To avoid handling the same input device twice, the original device is added to the ignore list. + */ + static should_ignore_device(vendor_id: int64, product_id: int64): boolean + + /** Returns an [Array] containing the device IDs of all currently connected joypads. */ + static get_connected_joypads(): GArray + + /** Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. */ + static get_joy_vibration_strength(device: int64): Vector2 + + /** Returns the duration of the current vibration effect in seconds. */ + static get_joy_vibration_duration(device: int64): float64 + + /** Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [param weak_magnitude] is the strength of the weak motor (between 0 and 1) and [param strong_magnitude] is the strength of the strong motor (between 0 and 1). [param duration] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling [method stop_joy_vibration]. + * + * **Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. + * + * **Note:** For macOS, vibration is only supported in macOS 11 and later. + */ + static start_joy_vibration(device: int64, weak_magnitude: float64, strong_magnitude: float64, duration: float64 = 0): void + + /** Stops the vibration of the joypad started with [method start_joy_vibration]. */ + static stop_joy_vibration(device: int64): void + + /** Vibrate the handheld device for the specified duration in milliseconds. + * [param amplitude] is the strength of the vibration, as a value between `0.0` and `1.0`. If set to `-1.0`, the default vibration strength of the device is used. + * + * **Note:** This method is implemented on Android, iOS, and Web. It has no effect on other platforms. + * + * **Note:** For Android, [method vibrate_handheld] requires enabling the `VIBRATE` permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect. + * + * **Note:** For iOS, specifying the duration is only supported in iOS 13 and later. + * + * **Note:** For Web, the amplitude cannot be changed. + * + * **Note:** Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld]. + */ + static vibrate_handheld(duration_ms: int64 = 500, amplitude: float64 = -1): void + + /** Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + * + * **Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. + */ + static get_gravity(): Vector3 + + /** Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + * Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. + * + * **Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. + */ + static get_accelerometer(): Vector3 + + /** Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + * + * **Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. + */ + static get_magnetometer(): Vector3 + + /** Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. + * + * **Note:** This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. + */ + static get_gyroscope(): Vector3 + + /** Sets the gravity value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + * + * **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. + */ + static set_gravity(value: Vector3): void + + /** Sets the acceleration value of the accelerometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + * + * **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. + */ + static set_accelerometer(value: Vector3): void + + /** Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + * + * **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. + */ + static set_magnetometer(value: Vector3): void + + /** Sets the value of the rotation rate of the gyroscope sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC. + * + * **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS. + */ + static set_gyroscope(value: Vector3): void + + /** Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. */ + static get_last_mouse_velocity(): Vector2 + + /** Returns the last mouse velocity in screen coordinates. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. */ + static get_last_mouse_screen_velocity(): Vector2 + + /** Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state]. */ + static get_mouse_button_mask(): MouseButtonMask + + /** Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. + * Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN]. + * + * **Note:** [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. + */ + static warp_mouse(position: Vector2): void + + /** This will simulate pressing the specified action. + * The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. + * + * **Note:** This method will not cause any [method Node._input] calls. It is intended to be used with [method is_action_pressed] and [method is_action_just_pressed]. If you want to simulate `_input`, use [method parse_input_event] instead. + */ + static action_press(action: StringName, strength: float64 = 1): void + + /** If the specified action is already pressed, this will release it. */ + static action_release(action: StringName): void + + /** Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. + * + * **Note:** If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. + * + * **Note:** This method generates an [InputEventMouseMotion] to update cursor immediately. + */ + static set_default_cursor_shape(shape: Input.CursorShape = 0): void + + /** Returns the currently assigned cursor shape (see [enum CursorShape]). */ + static get_current_cursor_shape(): Input.CursorShape + + /** Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing `null` to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. + * [param image] can be either [Texture2D] or [Image] and its size must be lower than or equal to 256×256. To avoid rendering issues, sizes lower than or equal to 128×128 are recommended. + * [param hotspot] must be within [param image]'s size. + * + * **Note:** [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. + * + * **Note:** The **Lossless**, **Lossy** or **Uncompressed** compression modes are recommended. The **Video RAM** compression mode can be used, but it will be decompressed on the CPU, which means loading times are slowed down and no memory is saved compared to lossless modes. + * + * **Note:** On the web platform, the maximum allowed cursor image size is 128×128. Cursor images larger than 32×32 will also only be displayed if the mouse cursor image is entirely located within the page for [url=https://chromestatus.com/feature/5825971391299584]security reasons[/url]. + */ + static set_custom_mouse_cursor(image: Resource, shape: Input.CursorShape = 0, hotspot: Vector2 = Vector2.ZERO): void + + /** Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. + * **Example:** + * + * + * **Note:** Calling this function has no influence on the operating system. So for example sending an [InputEventMouseMotion] will not move the OS mouse cursor to the specified position (use [method warp_mouse] instead) and sending [kbd]Alt/Cmd + Tab[/kbd] as [InputEventKey] won't toggle between active windows. + */ + static parse_input_event(event: InputEvent): void + + /** Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ([member use_accumulated_input]) or agile input flushing ([member ProjectSettings.input_devices/buffering/agile_event_flushing]). + * The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling. + */ + static flush_buffered_events(): void + + /** Controls the mouse mode. See [enum MouseMode] for more information. */ + get mouse_mode(): int64 + set mouse_mode(value: int64) + + /** If `true`, similar input events sent by the operating system are accumulated. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. + * Input accumulation can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. + * + * **Note:** Input accumulation is *enabled* by default. + */ + get use_accumulated_input(): boolean + set use_accumulated_input(value: boolean) + + /** If `true`, sends mouse input events when tapping or swiping on the touchscreen. See also [member ProjectSettings.input_devices/pointing/emulate_mouse_from_touch]. */ + get emulate_mouse_from_touch(): boolean + set emulate_mouse_from_touch(value: boolean) + + /** If `true`, sends touch input events when clicking or dragging the mouse. See also [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse]. */ + get emulate_touch_from_mouse(): boolean + set emulate_touch_from_mouse(value: boolean) + + /** Emitted when a joypad device has been connected or disconnected. */ + static readonly joy_connection_changed: Signal2 + } + // _singleton_class_: InputMap + /** A singleton that manages all [InputEventAction]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputmap.html + */ + class InputMap extends Object { + /** Returns `true` if the [InputMap] has a registered action with the given name. */ + static has_action(action: StringName): boolean + + /** Returns an array of all actions in the [InputMap]. */ + static get_actions(): GArray + + /** Adds an empty action to the [InputMap] with a configurable [param deadzone]. + * An [InputEvent] can then be added to this action with [method action_add_event]. + */ + static add_action(action: StringName, deadzone: float64 = 0.5): void + + /** Removes an action from the [InputMap]. */ + static erase_action(action: StringName): void + + /** Sets a deadzone value for the action. */ + static action_set_deadzone(action: StringName, deadzone: float64): void + + /** Returns a deadzone value for the action. */ + static action_get_deadzone(action: StringName): float64 + + /** Adds an [InputEvent] to an action. This [InputEvent] will trigger the action. */ + static action_add_event(action: StringName, event: InputEvent): void + + /** Returns `true` if the action has the given [InputEvent] associated with it. */ + static action_has_event(action: StringName, event: InputEvent): boolean + + /** Removes an [InputEvent] from an action. */ + static action_erase_event(action: StringName, event: InputEvent): void + + /** Removes all events from an action. */ + static action_erase_events(action: StringName): void + + /** Returns an array of [InputEvent]s associated with a given action. + * + * **Note:** When used in the editor (e.g. a tool script or [EditorPlugin]), this method will return events for the editor action. If you want to access your project's input binds from the editor, read the `input/*` settings from [ProjectSettings]. + */ + static action_get_events(action: StringName): GArray + + /** Returns `true` if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + static event_is_action(event: InputEvent, action: StringName, exact_match: boolean = false): boolean + + /** Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings]. */ + static load_from_project_settings(): void + } + // _singleton_class_: EngineDebugger + /** Exposes the internal debugger. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_enginedebugger.html + */ + class EngineDebugger extends Object { + /** Returns `true` if the debugger is active otherwise `false`. */ + static is_active(): boolean + + /** Registers a profiler with the given [param name]. See [EngineProfiler] for more information. */ + static register_profiler(name: StringName, profiler: EngineProfiler): void + + /** Unregisters a profiler with given [param name]. */ + static unregister_profiler(name: StringName): void + + /** Returns `true` if a profiler with the given name is present and active otherwise `false`. */ + static is_profiling(name: StringName): boolean + + /** Returns `true` if a profiler with the given name is present otherwise `false`. */ + static has_profiler(name: StringName): boolean + + /** Calls the `add` callable of the profiler with given [param name] and [param data]. */ + static profiler_add_frame_data(name: StringName, data: GArray): void + + /** Calls the `toggle` callable of the profiler with given [param name] and [param arguments]. Enables/Disables the same profiler depending on [param enable] argument. */ + static profiler_enable(name: StringName, enable: boolean, arguments_: GArray = []): void + + /** Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable. + * Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return `true` otherwise `false`. + */ + static register_message_capture(name: StringName, callable: Callable): void + + /** Unregisters the message capture with given [param name]. */ + static unregister_message_capture(name: StringName): void + + /** Returns `true` if a capture with the given name is present otherwise `false`. */ + static has_capture(name: StringName): boolean + + /** Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught */ + static line_poll(): void + + /** Sends a message with given [param message] and [param data] array. */ + static send_message(message: string, data: GArray): void + + /** Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint. */ + static debug(can_continue: boolean = true, is_error_breakpoint: boolean = false): void + + /** Starts a debug break in script execution, optionally specifying whether the program can continue based on [param can_continue] and whether the break was due to a breakpoint. */ + static script_debug(language: ScriptLanguage, can_continue: boolean = true, is_error_breakpoint: boolean = false): void + + /** Sets the current debugging lines that remain. */ + static set_lines_left(lines: int64): void + + /** Returns the number of lines that remain. */ + static get_lines_left(): int64 + + /** Sets the current debugging depth. */ + static set_depth(depth: int64): void + + /** Returns the current debug depth. */ + static get_depth(): int64 + + /** Returns `true` if the given [param source] and [param line] represent an existing breakpoint. */ + static is_breakpoint(line: int64, source: StringName): boolean + + /** Returns `true` if the debugger is skipping breakpoints otherwise `false`. */ + static is_skipping_breakpoints(): boolean + + /** Inserts a new breakpoint with the given [param source] and [param line]. */ + static insert_breakpoint(line: int64, source: StringName): void + + /** Removes a breakpoint with the given [param source] and [param line]. */ + static remove_breakpoint(line: int64, source: StringName): void + + /** Clears all breakpoints. */ + static clear_breakpoints(): void + } + // _singleton_class_: Time + namespace Time { + enum Month { + /** The month of January, represented numerically as `01`. */ + MONTH_JANUARY = 1, + + /** The month of February, represented numerically as `02`. */ + MONTH_FEBRUARY = 2, + + /** The month of March, represented numerically as `03`. */ + MONTH_MARCH = 3, + + /** The month of April, represented numerically as `04`. */ + MONTH_APRIL = 4, + + /** The month of May, represented numerically as `05`. */ + MONTH_MAY = 5, + + /** The month of June, represented numerically as `06`. */ + MONTH_JUNE = 6, + + /** The month of July, represented numerically as `07`. */ + MONTH_JULY = 7, + + /** The month of August, represented numerically as `08`. */ + MONTH_AUGUST = 8, + + /** The month of September, represented numerically as `09`. */ + MONTH_SEPTEMBER = 9, + + /** The month of October, represented numerically as `10`. */ + MONTH_OCTOBER = 10, + + /** The month of November, represented numerically as `11`. */ + MONTH_NOVEMBER = 11, + + /** The month of December, represented numerically as `12`. */ + MONTH_DECEMBER = 12, + } + enum Weekday { + /** The day of the week Sunday, represented numerically as `0`. */ + WEEKDAY_SUNDAY = 0, + + /** The day of the week Monday, represented numerically as `1`. */ + WEEKDAY_MONDAY = 1, + + /** The day of the week Tuesday, represented numerically as `2`. */ + WEEKDAY_TUESDAY = 2, + + /** The day of the week Wednesday, represented numerically as `3`. */ + WEEKDAY_WEDNESDAY = 3, + + /** The day of the week Thursday, represented numerically as `4`. */ + WEEKDAY_THURSDAY = 4, + + /** The day of the week Friday, represented numerically as `5`. */ + WEEKDAY_FRIDAY = 5, + + /** The day of the week Saturday, represented numerically as `6`. */ + WEEKDAY_SATURDAY = 6, + } + } + /** A singleton for working with time data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_time.html + */ + class Time extends Object { + /** Converts the given Unix timestamp to a dictionary of keys: `year`, `month`, `day`, `weekday`, `hour`, `minute`, and `second`. + * The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. + */ + static get_datetime_dict_from_unix_time(unix_time_val: int64): GDictionary + + /** Converts the given Unix timestamp to a dictionary of keys: `year`, `month`, `day`, and `weekday`. */ + static get_date_dict_from_unix_time(unix_time_val: int64): GDictionary + + /** Converts the given time to a dictionary of keys: `hour`, `minute`, and `second`. */ + static get_time_dict_from_unix_time(unix_time_val: int64): GDictionary + + /** Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). + * If [param use_space] is `true`, the date and time bits are separated by an empty space character instead of the letter T. + */ + static get_datetime_string_from_unix_time(unix_time_val: int64, use_space: boolean = false): string + + /** Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). */ + static get_date_string_from_unix_time(unix_time_val: int64): string + + /** Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS). */ + static get_time_string_from_unix_time(unix_time_val: int64): string + + /** Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: `year`, `month`, `day`, [code skip-lint]weekday`, `hour`, `minute`, and `second`. + * If [param weekday] is `false`, then the [code skip-lint]weekday` entry is excluded (the calculation is relatively expensive). + * + * **Note:** Any decimal fraction in the time string will be ignored silently. + */ + static get_datetime_dict_from_datetime_string(datetime: string, weekday: boolean): GDictionary + + /** Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). + * The given dictionary can be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, and `second`. Any other entries (including `dst`) are ignored. + * If the dictionary is empty, `0` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). + * If [param use_space] is `true`, the date and time bits are separated by an empty space character instead of the letter T. + */ + static get_datetime_string_from_datetime_dict(datetime: GDictionary, use_space: boolean): string + + /** Converts a dictionary of time values to a Unix timestamp. + * The given dictionary can be populated with the following keys: `year`, `month`, `day`, `hour`, `minute`, and `second`. Any other entries (including `dst`) are ignored. + * If the dictionary is empty, `0` is returned. If some keys are omitted, they default to the equivalent values for the Unix epoch timestamp 0 (1970-01-01 at 00:00:00). + * You can pass the output from [method get_datetime_dict_from_unix_time] directly into this function and get the same as what was put in. + * + * **Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime dictionary. + */ + static get_unix_time_from_datetime_dict(datetime: GDictionary): int64 + + /** Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both. + * + * **Note:** Unix timestamps are often in UTC. This method does not do any timezone conversion, so the timestamp will be in the same timezone as the given datetime string. + * + * **Note:** Any decimal fraction in the time string will be ignored silently. + */ + static get_unix_time_from_datetime_string(datetime: string): int64 + + /** Converts the given timezone offset in minutes to a timezone offset string. For example, -480 returns "-08:00", 345 returns "+05:45", and 0 returns "+00:00". */ + static get_offset_string_from_offset_minutes(offset_minutes: int64): string + + /** Returns the current date as a dictionary of keys: `year`, `month`, `day`, `weekday`, `hour`, `minute`, `second`, and `dst` (Daylight Savings Time). */ + static get_datetime_dict_from_system(utc: boolean = false): GDictionary + + /** Returns the current date as a dictionary of keys: `year`, `month`, `day`, and `weekday`. + * The returned values are in the system's local time when [param utc] is `false`, otherwise they are in UTC. + */ + static get_date_dict_from_system(utc: boolean = false): GDictionary + + /** Returns the current time as a dictionary of keys: `hour`, `minute`, and `second`. + * The returned values are in the system's local time when [param utc] is `false`, otherwise they are in UTC. + */ + static get_time_dict_from_system(utc: boolean = false): GDictionary + + /** Returns the current date and time as an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). + * The returned values are in the system's local time when [param utc] is `false`, otherwise they are in UTC. + * If [param use_space] is `true`, the date and time bits are separated by an empty space character instead of the letter T. + */ + static get_datetime_string_from_system(utc: boolean = false, use_space: boolean = false): string + + /** Returns the current date as an ISO 8601 date string (YYYY-MM-DD). + * The returned values are in the system's local time when [param utc] is `false`, otherwise they are in UTC. + */ + static get_date_string_from_system(utc: boolean = false): string + + /** Returns the current time as an ISO 8601 time string (HH:MM:SS). + * The returned values are in the system's local time when [param utc] is `false`, otherwise they are in UTC. + */ + static get_time_string_from_system(utc: boolean = false): string + + /** Returns the current time zone as a dictionary of keys: `bias` and `name`. + * - `bias` is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC. + * - `name` is the localized name of the time zone, according to the OS locale settings of the current user. + */ + static get_time_zone_from_system(): GDictionary + + /** Returns the current Unix timestamp in seconds based on the system time in UTC. This method is implemented by the operating system and always returns the time in UTC. The Unix timestamp is the number of seconds passed since 1970-01-01 at 00:00:00, the [url=https://en.wikipedia.org/wiki/Unix_time]Unix epoch[/url]. + * + * **Note:** Unlike other methods that use integer timestamps, this method returns the timestamp as a [float] for sub-second precision. + */ + static get_unix_time_from_system(): float64 + + /** Returns the amount of time passed in milliseconds since the engine started. + * Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly 500 million years). + */ + static get_ticks_msec(): int64 + + /** Returns the amount of time passed in microseconds since the engine started. + * Will always be positive or 0 and uses a 64-bit value (it will wrap after roughly half a million years). + */ + static get_ticks_usec(): int64 + } + // _singleton_class_: GDExtensionManager + namespace GDExtensionManager { + enum LoadStatus { + /** The extension has loaded successfully. */ + LOAD_STATUS_OK = 0, + + /** The extension has failed to load, possibly because it does not exist or has missing dependencies. */ + LOAD_STATUS_FAILED = 1, + + /** The extension has already been loaded. */ + LOAD_STATUS_ALREADY_LOADED = 2, + + /** The extension has not been loaded. */ + LOAD_STATUS_NOT_LOADED = 3, + + /** The extension requires the application to restart to fully load. */ + LOAD_STATUS_NEEDS_RESTART = 4, + } + } + /** Provides access to GDExtension functionality. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gdextensionmanager.html + */ + class GDExtensionManager extends Object { + /** Loads an extension by absolute file path. The [param path] needs to point to a valid [GDExtension]. Returns [constant LOAD_STATUS_OK] if successful. */ + static load_extension(path: string): GDExtensionManager.LoadStatus + + /** Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED]. + * + * **Note:** You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED]. + */ + static reload_extension(path: string): GDExtensionManager.LoadStatus + + /** Unloads an extension by file path. The [param path] needs to point to an already loaded [GDExtension], otherwise this method returns [constant LOAD_STATUS_NOT_LOADED]. */ + static unload_extension(path: string): GDExtensionManager.LoadStatus + + /** Returns `true` if the extension at the given file [param path] has already been loaded successfully. See also [method get_loaded_extensions]. */ + static is_extension_loaded(path: string): boolean + + /** Returns the file paths of all currently loaded extensions. */ + static get_loaded_extensions(): PackedStringArray + + /** Returns the [GDExtension] at the given file [param path], or `null` if it has not been loaded or does not exist. */ + static get_extension(path: string): GDExtension + + /** Emitted after the editor has finished reloading one or more extensions. */ + static readonly extensions_reloaded: Signal0 + } + // _singleton_class_: ResourceUID + /** A singleton that manages the unique identifiers of all resources within a project. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceuid.html + */ + class ResourceUID extends Object { + /** The value to use for an invalid UID, for example if the resource could not be loaded. + * Its text representation is `uid://`. + */ + static readonly INVALID_ID = -1 + + /** Converts the given UID to a `uid://` string value. */ + static id_to_text(id: int64): string + + /** Extracts the UID value from the given `uid://` string. */ + static text_to_id(text_id: string): int64 + + /** Generates a random resource UID which is guaranteed to be unique within the list of currently loaded UIDs. + * In order for this UID to be registered, you must call [method add_id] or [method set_id]. + */ + static create_id(): int64 + + /** Returns whether the given UID value is known to the cache. */ + static has_id(id: int64): boolean + + /** Adds a new UID value which is mapped to the given resource path. + * Fails with an error if the UID already exists, so be sure to check [method has_id] beforehand, or use [method set_id] instead. + */ + static add_id(id: int64, path: string): void + + /** Updates the resource path of an existing UID. + * Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand, or use [method add_id] instead. + */ + static set_id(id: int64, path: string): void + + /** Returns the path that the given UID value refers to. + * Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand. + */ + static get_id_path(id: int64): string + + /** Removes a loaded UID value from the cache. + * Fails with an error if the UID does not exist, so be sure to check [method has_id] beforehand. + */ + static remove_id(id: int64): void + } + // _singleton_class_: WorkerThreadPool + /** A singleton that allocates some [Thread]s on startup, used to offload tasks to these threads. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_workerthreadpool.html + */ + class WorkerThreadPool extends Object { + /** Adds [param action] as a task to be executed by a worker thread. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. + * Returns a task ID that can be used by other methods. + * **Warning:** Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up. + */ + static add_task(action: Callable, high_priority: boolean = false, description: string = ''): int64 + + /** Returns `true` if the task with the given ID is completed. + * + * **Note:** You should only call this method between adding the task and awaiting its completion. + */ + static is_task_completed(task_id: int64): boolean + + /** Pauses the thread that calls this method until the task with the given ID is completed. + * Returns [constant @GlobalScope.OK] if the task could be successfully awaited. + * Returns [constant @GlobalScope.ERR_INVALID_PARAMETER] if a task with the passed ID does not exist (maybe because it was already awaited and disposed of). + * Returns [constant @GlobalScope.ERR_BUSY] if the call is made from another running task and, due to task scheduling, there's potential for deadlocking (e.g., the task to await may be at a lower level in the call stack and therefore can't progress). This is an advanced situation that should only matter when some tasks depend on others (in the current implementation, the tricky case is a task trying to wait on an older one). + */ + static wait_for_task_completion(task_id: int64): GError + + /** Adds [param action] as a group task to be executed by the worker threads. The [Callable] will be called a number of times based on [param elements], with the first thread calling it with the value `0` as a parameter, and each consecutive execution incrementing this value by 1 until it reaches `element - 1`. + * The number of threads the task is distributed to is defined by [param tasks_needed], where the default value `-1` means it is distributed to all worker threads. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. + * Returns a group task ID that can be used by other methods. + * **Warning:** Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up. + */ + static add_group_task(action: Callable, elements: int64, tasks_needed: int64 = -1, high_priority: boolean = false, description: string = ''): int64 + + /** Returns `true` if the group task with the given ID is completed. + * + * **Note:** You should only call this method between adding the group task and awaiting its completion. + */ + static is_group_task_completed(group_id: int64): boolean + + /** Returns how many times the [Callable] of the group task with the given ID has already been executed by the worker threads. + * + * **Note:** If a thread has started executing the [Callable] but is yet to finish, it won't be counted. + */ + static get_group_processed_element_count(group_id: int64): int64 + + /** Pauses the thread that calls this method until the group task with the given ID is completed. */ + static wait_for_group_task_completion(group_id: int64): void + } + // _singleton_class_: ThemeDB + /** A singleton that provides access to static information about [Theme] resources used by the engine and by your project. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_themedb.html + */ + class ThemeDB extends Object { + /** Returns a reference to the default engine [Theme]. This theme resource is responsible for the out-of-the-box look of [Control] nodes and cannot be overridden. */ + static get_default_theme(): Theme + + /** Returns a reference to the custom project [Theme]. This theme resources allows to override the default engine theme for every control node in the project. + * To set the project theme, see [member ProjectSettings.gui/theme/custom]. + */ + static get_project_theme(): Theme + + /** The fallback base scale factor of every [Control] node and [Theme] resource. Used when no other value is available to the control. + * See also [member Theme.default_base_scale]. + */ + get fallback_base_scale(): float64 + set fallback_base_scale(value: float64) + + /** The fallback font of every [Control] node and [Theme] resource. Used when no other value is available to the control. + * See also [member Theme.default_font]. + */ + get fallback_font(): Font + set fallback_font(value: Font) + + /** The fallback font size of every [Control] node and [Theme] resource. Used when no other value is available to the control. + * See also [member Theme.default_font_size]. + */ + get fallback_font_size(): int64 + set fallback_font_size(value: int64) + + /** The fallback icon of every [Control] node and [Theme] resource. Used when no other value is available to the control. */ + get fallback_icon(): Texture2D + set fallback_icon(value: Texture2D) + + /** The fallback stylebox of every [Control] node and [Theme] resource. Used when no other value is available to the control. */ + get fallback_stylebox(): StyleBox + set fallback_stylebox(value: StyleBox) + + /** Emitted when one of the fallback values had been changed. Use it to refresh the look of controls that may rely on the fallback theme items. */ + static readonly fallback_changed: Signal0 + } + // _singleton_class_: EditorInterface + /** Godot editor's interface. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorinterface.html + */ + class EditorInterface extends Object { + /** Restarts the editor. This closes the editor and then opens the same project. If [param save] is `true`, the project will be saved before restarting. */ + static restart_editor(save: boolean = true): void + + /** Returns the editor's [EditorCommandPalette] instance. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + static get_command_palette(): EditorCommandPalette + + /** Returns the editor's [EditorFileSystem] instance. */ + static get_resource_filesystem(): EditorFileSystem + + /** Returns the [EditorPaths] singleton. */ + static get_editor_paths(): EditorPaths + + /** Returns the editor's [EditorResourcePreview] instance. */ + static get_resource_previewer(): EditorResourcePreview + + /** Returns the editor's [EditorSelection] instance. */ + static get_selection(): EditorSelection + + /** Returns the editor's [EditorSettings] instance. */ + static get_editor_settings(): EditorSettings + + /** Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s. */ + static make_mesh_previews(meshes: GArray, preview_size: int64): GArray + + /** Sets the enabled status of a plugin. The plugin name is the same as its directory name. */ + static set_plugin_enabled(plugin: string, enabled: boolean): void + + /** Returns `true` if the specified [param plugin] is enabled. The plugin name is the same as its directory name. */ + static is_plugin_enabled(plugin: string): boolean + + /** Returns the editor's [Theme]. + * + * **Note:** When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the `get_theme_*` methods. + */ + static get_editor_theme(): Theme + + /** Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. + * **Warning:** Removing and freeing this node will render the editor useless and may cause a crash. + */ + static get_base_control(): Control + + /** Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement [method EditorPlugin._has_main_screen]. + * + * **Note:** This node is a [VBoxContainer], which means that if you add a [Control] child to it, you need to set the child's [member Control.size_flags_vertical] to [constant Control.SIZE_EXPAND_FILL] to make it use the full available space. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + static get_editor_main_screen(): VBoxContainer + + /** Returns the editor's [ScriptEditor] instance. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + static get_script_editor(): ScriptEditor + + /** Returns the 2D editor [SubViewport]. It does not have a camera. Instead, the view transforms are done directly and can be accessed with [member Viewport.global_canvas_transform]. */ + static get_editor_viewport_2d(): SubViewport + + /** Returns the specified 3D editor [SubViewport], from `0` to `3`. The viewport can be used to access the active editor cameras with [method Viewport.get_camera_3d]. */ + static get_editor_viewport_3d(idx: int64 = 0): SubViewport + + /** Sets the editor's current main screen to the one specified in [param name]. [param name] must match the title of the tab in question exactly (e.g. `2D`, `3D`, [code skip-lint]Script`, or `AssetLib` for default tabs). */ + static set_main_screen_editor(name: string): void + + /** Returns `true` if multiple window support is enabled in the editor. Multiple window support is enabled if *all* of these statements are true: + * - [member EditorSettings.interface/multi_window/enable] is `true`. + * - [member EditorSettings.interface/editor/single_window_mode] is `false`. + * - [member Viewport.gui_embed_subwindows] is `false`. This is forced to `true` on platforms that don't support multiple windows such as Web, or when the `--single-window` [url=https://docs.godotengine.org/en/4.3/tutorials/editor/command_line_tutorial.html]command line argument[/url] is used. + */ + static is_multi_window_enabled(): boolean + + /** Returns the actual scale of the editor UI (`1.0` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. + * + * **Note:** This value is set via the `interface/editor/display_scale` and `interface/editor/custom_display_scale` editor settings. Editor must be restarted for changes to be properly applied. + */ + static get_editor_scale(): float64 + + /** Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive]. The dialog must have no current parent, otherwise the method fails. + * See also [method Window.set_unparent_when_invisible]. + */ + static popup_dialog(dialog: Window, rect: Rect2i = new Rect2i(0, 0, 0, 0)): void + + /** Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered]. The dialog must have no current parent, otherwise the method fails. + * See also [method Window.set_unparent_when_invisible]. + */ + static popup_dialog_centered(dialog: Window, minsize: Vector2i = Vector2i.ZERO): void + + /** Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered_ratio]. The dialog must have no current parent, otherwise the method fails. + * See also [method Window.set_unparent_when_invisible]. + */ + static popup_dialog_centered_ratio(dialog: Window, ratio: float64 = 0.8): void + + /** Pops up the [param dialog] in the editor UI with [method Window.popup_exclusive_centered_clamped]. The dialog must have no current parent, otherwise the method fails. + * See also [method Window.set_unparent_when_invisible]. + */ + static popup_dialog_centered_clamped(dialog: Window, minsize: Vector2i = Vector2i.ZERO, fallback_ratio: float64 = 0.75): void + + /** Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. + * In order to get a reference to the [EditorFeatureProfile], you must load the feature profile using [method EditorFeatureProfile.load_from_file]. + * + * **Note:** Feature profiles created via the user interface are loaded from the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir]. + */ + static get_current_feature_profile(): string + + /** Selects and activates the specified feature profile with the given [param profile_name]. Set [param profile_name] to an empty string to reset to the default feature profile. + * A feature profile can be created programmatically using the [EditorFeatureProfile] class. + * + * **Note:** The feature profile that gets activated must be located in the `feature_profiles` directory, as a file with the `.profile` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using [method EditorPaths.get_config_dir]. + */ + static set_current_feature_profile(profile_name: string): void + + /** Pops up an editor dialog for selecting a [Node] from the edited scene. The [param callback] must take a single argument of type [NodePath]. It is called on the selected [NodePath] or the empty path `^""` if the dialog is canceled. If [param valid_types] is provided, the dialog will only show Nodes that match one of the listed Node types. + * **Example:** + * + */ + static popup_node_selector(callback: Callable, valid_types: GArray = []): void + + /** Pops up an editor dialog for selecting properties from [param object]. The [param callback] must take a single argument of type [NodePath]. It is called on the selected property path (see [method NodePath.get_as_property_path]) or the empty path `^""` if the dialog is canceled. If [param type_filter] is provided, the dialog will only show properties that match one of the listed [enum Variant.Type] values. + * **Example:** + * + */ + static popup_property_selector(object: Object, callback: Callable, type_filter: PackedInt32Array | int32[] = []): void + + /** Returns the editor's [FileSystemDock] instance. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + static get_file_system_dock(): FileSystemDock + + /** Selects the file, with the path provided by [param file], in the FileSystem dock. */ + static select_file(file: string): void + + /** Returns an array containing the paths of the currently selected files (and directories) in the [FileSystemDock]. */ + static get_selected_paths(): PackedStringArray + + /** Returns the current path being viewed in the [FileSystemDock]. */ + static get_current_path(): string + + /** Returns the current directory being viewed in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. */ + static get_current_directory(): string + + /** Returns the editor's [EditorInspector] instance. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + static get_inspector(): EditorInspector + + /** Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is `true`, plugins will not attempt to edit [param object]. */ + static inspect_object(object: Object, for_property: string = '', inspector_only: boolean = false): void + + /** Edits the given [Resource]. If the resource is a [Script] you can also edit it with [method edit_script] to specify the line and column position. */ + static edit_resource(resource: Resource): void + + /** Edits the given [Node]. The node will be also selected if it's inside the scene tree. */ + static edit_node(node: Node): void + + /** Edits the given [Script]. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor. */ + static edit_script(script: Script, line: int64 = -1, column: int64 = 0, grab_focus: boolean = true): void + + /** Opens the scene at the given path. */ + static open_scene_from_path(scene_filepath: string): void + + /** Reloads the scene at the given path. */ + static reload_scene_from_path(scene_filepath: string): void + + /** Returns an [Array] with the file paths of the currently opened scenes. */ + static get_open_scenes(): PackedStringArray + + /** Returns the edited (current) scene's root [Node]. */ + static get_edited_scene_root(): Node + + /** Saves the currently active scene. Returns either [constant OK] or [constant ERR_CANT_CREATE]. */ + static save_scene(): GError + + /** Saves the currently active scene as a file at [param path]. */ + static save_scene_as(path: string, with_preview: boolean = true): void + + /** Saves all opened scenes in the editor. */ + static save_all_scenes(): void + + /** Marks the current scene tab as unsaved. */ + static mark_scene_as_unsaved(): void + + /** Plays the main scene. */ + static play_main_scene(): void + + /** Plays the currently active scene. */ + static play_current_scene(): void + + /** Plays the scene specified by its filepath. */ + static play_custom_scene(scene_filepath: string): void + + /** Stops the scene that is currently playing. */ + static stop_playing_scene(): void + + /** Returns `true` if a scene is currently being played, `false` otherwise. Paused scenes are considered as being played. */ + static is_playing_scene(): boolean + + /** Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. */ + static get_playing_scene(): string + + /** If `true`, enables distraction-free mode which hides side docks to increase the space available for the main view. */ + get distraction_free_mode(): boolean + set distraction_free_mode(value: boolean) + + /** If `true`, the Movie Maker mode is enabled in the editor. See [MovieWriter] for more information. */ + get movie_maker_enabled(): boolean + set movie_maker_enabled(value: boolean) + } + // _singleton_class_: JavaClassWrapper + /** Provides access to the Java Native Interface. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_javaclasswrapper.html + */ + class JavaClassWrapper extends Object { + /** Wraps a class defined in Java, and returns it as a [JavaClass] [Object] type that Godot can interact with. + * + * **Note:** This method only works on Android. On every other platform, this method does nothing and returns an empty [JavaClass]. + */ + static wrap(name: string): JavaClass + } + // _singleton_class_: JavaScriptBridge + /** Singleton that connects the engine with the browser's JavaScript context in Web export. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_javascriptbridge.html + */ + class JavaScriptBridge extends Object { + /** Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code skip-lint]eval()`. + * If [param use_global_execution_context] is `true`, the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. + */ + static eval(code: string, use_global_execution_context: boolean = false): any + + /** Returns an interface to a JavaScript object that can be used by scripts. The [param interface] must be a valid property of the JavaScript `window`. The callback must accept a single [Array] argument, which will contain the JavaScript `arguments`. See [JavaScriptObject] for usage. */ + static get_interface(interface: string): JavaScriptObject + + /** Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage. */ + static create_callback(callable: Callable): JavaScriptObject + + /** Creates a new JavaScript object using the `new` constructor. The [param object] must a valid property of the JavaScript `window`. See [JavaScriptObject] for usage. */ + static create_object(object: string, ...vargargs: any[]): any + + /** Prompts the user to download a file containing the specified [param buffer]. The file will have the given [param name] and [param mime] type. + * + * **Note:** The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [param name]'s extension. + * + * **Note:** Browsers might block the download if [method download_buffer] is not being called from a user interaction (e.g. button click). + * + * **Note:** Browsers might ask the user for permission or block the download if multiple download requests are made in a quick succession. + */ + static download_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer, name: string, mime: string = 'application/octet-stream'): void + + /** Returns `true` if a new version of the progressive web app is waiting to be activated. + * + * **Note:** Only relevant when exported as a Progressive Web App. + */ + static pwa_needs_update(): boolean + + /** Performs the live update of the progressive web app. Forcing the new version to be installed and the page to be reloaded. + * + * **Note:** Your application will be **reloaded in all browser tabs**. + * + * **Note:** Only relevant when exported as a Progressive Web App and [method pwa_needs_update] returns `true`. + */ + static pwa_update(): GError + + /** Force synchronization of the persistent file system (when enabled). + * + * **Note:** This is only useful for modules or extensions that can't use [FileAccess] to write files. + */ + static force_fs_sync(): void + + /** Emitted when an update for this progressive web app has been detected but is waiting to be activated because a previous version is active. See [method pwa_update] to force the update to take place immediately. */ + static readonly pwa_update_available: Signal0 + } + // _singleton_class_: AudioServer + namespace AudioServer { + enum SpeakerMode { + /** Two or fewer speakers were detected. */ + SPEAKER_MODE_STEREO = 0, + + /** A 3.1 channel surround setup was detected. */ + SPEAKER_SURROUND_31 = 1, + + /** A 5.1 channel surround setup was detected. */ + SPEAKER_SURROUND_51 = 2, + + /** A 7.1 channel surround setup was detected. */ + SPEAKER_SURROUND_71 = 3, + } + enum PlaybackType { + /** The playback will be considered of the type declared at [member ProjectSettings.audio/general/default_playback_type]. */ + PLAYBACK_TYPE_DEFAULT = 0, + + /** Force the playback to be considered as a stream. */ + PLAYBACK_TYPE_STREAM = 1, + + /** Force the playback to be considered as a sample. This can provide lower latency and more stable playback (with less risk of audio crackling), at the cost of having less flexibility. + * + * **Note:** Only currently supported on the web platform. + * + * **Note:** [AudioEffect]s are not supported when playback is considered as a sample. + */ + PLAYBACK_TYPE_SAMPLE = 2, + + /** Represents the size of the [enum PlaybackType] enum. */ + PLAYBACK_TYPE_MAX = 3, + } + } + /** Server interface for low-level audio access. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioserver.html + */ + class AudioServer extends Object { + /** Removes the bus at index [param index]. */ + static remove_bus(index: int64): void + + /** Adds a bus at [param at_position]. */ + static add_bus(at_position: int64 = -1): void + + /** Moves the bus from index [param index] to index [param to_index]. */ + static move_bus(index: int64, to_index: int64): void + + /** Sets the name of the bus at index [param bus_idx] to [param name]. */ + static set_bus_name(bus_idx: int64, name: string): void + + /** Returns the name of the bus with the index [param bus_idx]. */ + static get_bus_name(bus_idx: int64): string + + /** Returns the index of the bus with the name [param bus_name]. Returns `-1` if no bus with the specified name exist. */ + static get_bus_index(bus_name: StringName): int64 + + /** Returns the number of channels of the bus at index [param bus_idx]. */ + static get_bus_channels(bus_idx: int64): int64 + + /** Sets the volume of the bus at index [param bus_idx] to [param volume_db]. */ + static set_bus_volume_db(bus_idx: int64, volume_db: float64): void + + /** Returns the volume of the bus at index [param bus_idx] in dB. */ + static get_bus_volume_db(bus_idx: int64): float64 + + /** Connects the output of the bus at [param bus_idx] to the bus named [param send]. */ + static set_bus_send(bus_idx: int64, send: StringName): void + + /** Returns the name of the bus that the bus at index [param bus_idx] sends to. */ + static get_bus_send(bus_idx: int64): StringName + + /** If `true`, the bus at index [param bus_idx] is in solo mode. */ + static set_bus_solo(bus_idx: int64, enable: boolean): void + + /** If `true`, the bus at index [param bus_idx] is in solo mode. */ + static is_bus_solo(bus_idx: int64): boolean + + /** If `true`, the bus at index [param bus_idx] is muted. */ + static set_bus_mute(bus_idx: int64, enable: boolean): void + + /** If `true`, the bus at index [param bus_idx] is muted. */ + static is_bus_mute(bus_idx: int64): boolean + + /** If `true`, the bus at index [param bus_idx] is bypassing effects. */ + static set_bus_bypass_effects(bus_idx: int64, enable: boolean): void + + /** If `true`, the bus at index [param bus_idx] is bypassing effects. */ + static is_bus_bypassing_effects(bus_idx: int64): boolean + + /** Adds an [AudioEffect] effect to the bus [param bus_idx] at [param at_position]. */ + static add_bus_effect(bus_idx: int64, effect: AudioEffect, at_position: int64 = -1): void + + /** Removes the effect at index [param effect_idx] from the bus at index [param bus_idx]. */ + static remove_bus_effect(bus_idx: int64, effect_idx: int64): void + + /** Returns the number of effects on the bus at [param bus_idx]. */ + static get_bus_effect_count(bus_idx: int64): int64 + + /** Returns the [AudioEffect] at position [param effect_idx] in bus [param bus_idx]. */ + static get_bus_effect(bus_idx: int64, effect_idx: int64): AudioEffect + + /** Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel). */ + static get_bus_effect_instance(bus_idx: int64, effect_idx: int64, channel: int64 = 0): AudioEffectInstance + + /** Swaps the position of two effects in bus [param bus_idx]. */ + static swap_bus_effects(bus_idx: int64, effect_idx: int64, by_effect_idx: int64): void + + /** If `true`, the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled. */ + static set_bus_effect_enabled(bus_idx: int64, effect_idx: int64, enabled: boolean): void + + /** If `true`, the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled. */ + static is_bus_effect_enabled(bus_idx: int64, effect_idx: int64): boolean + + /** Returns the peak volume of the left speaker at bus index [param bus_idx] and channel index [param channel]. */ + static get_bus_peak_volume_left_db(bus_idx: int64, channel: int64): float64 + + /** Returns the peak volume of the right speaker at bus index [param bus_idx] and channel index [param channel]. */ + static get_bus_peak_volume_right_db(bus_idx: int64, channel: int64): float64 + + /** Locks the audio driver's main loop. + * + * **Note:** Remember to unlock it afterwards. + */ + static lock(): void + + /** Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) */ + static unlock(): void + + /** Returns the speaker configuration. */ + static get_speaker_mode(): AudioServer.SpeakerMode + + /** Returns the sample rate at the output of the [AudioServer]. */ + static get_mix_rate(): float64 + + /** Returns the names of all audio output devices detected on the system. */ + static get_output_device_list(): PackedStringArray + + /** Returns the relative time until the next mix occurs. */ + static get_time_to_next_mix(): float64 + + /** Returns the relative time since the last mix occurred. */ + static get_time_since_last_mix(): float64 + + /** Returns the audio driver's effective output latency. This is based on [member ProjectSettings.audio/driver/output_latency], but the exact returned value will differ depending on the operating system and audio driver. + * + * **Note:** This can be expensive; it is not recommended to call [method get_output_latency] every frame. + */ + static get_output_latency(): float64 + + /** Returns the names of all audio input devices detected on the system. + * + * **Note:** [member ProjectSettings.audio/driver/enable_input] must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. + */ + static get_input_device_list(): PackedStringArray + + /** Overwrites the currently used [AudioBusLayout]. */ + static set_bus_layout(bus_layout: AudioBusLayout): void + + /** Generates an [AudioBusLayout] using the available buses and effects. */ + static generate_bus_layout(): AudioBusLayout + + /** If set to `true`, all instances of [AudioStreamPlayback] will call [method AudioStreamPlayback._tag_used_streams] every mix step. + * + * **Note:** This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews. + */ + static set_enable_tagging_used_audio_streams(enable: boolean): void + + /** If `true`, the stream is registered as a sample. The engine will not have to register it before playing the sample. + * If `false`, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with [method register_stream_as_sample]. + */ + static is_stream_registered_as_sample(stream: AudioStream): boolean + + /** Forces the registration of a stream as a sample. + * + * **Note:** Lag spikes may occur when calling this method, especially on single-threaded builds. It is suggested to call this method while loading assets, where the lag spike could be masked, instead of registering the sample right before it needs to be played. + */ + static register_stream_as_sample(stream: AudioStream): void + + /** Number of available audio buses. */ + get bus_count(): int64 + set bus_count(value: int64) + + /** Name of the current device for audio output (see [method get_output_device_list]). On systems with multiple audio outputs (such as analog, USB and HDMI audio), this can be used to select the audio output device. The value `"Default"` will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to `"Default"`. */ + get output_device(): string + set output_device(value: string) + + /** Name of the current device for audio input (see [method get_input_device_list]). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value `"Default"` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to `"Default"`. + * + * **Note:** [member ProjectSettings.audio/driver/enable_input] must be `true` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. + */ + get input_device(): string + set input_device(value: string) + + /** Scales the rate at which audio is played (i.e. setting it to `0.5` will make the audio be played at half its speed). See also [member Engine.time_scale] to affect the general simulation speed, which is independent from [member AudioServer.playback_speed_scale]. */ + get playback_speed_scale(): float64 + set playback_speed_scale(value: float64) + + /** Emitted when an audio bus is added, deleted, or moved. */ + static readonly bus_layout_changed: Signal0 + + /** Emitted when the audio bus at [param bus_index] is renamed from [param old_name] to [param new_name]. */ + static readonly bus_renamed: Signal3 + } + // _singleton_class_: CameraServer + namespace CameraServer { + enum FeedImage { + /** The RGBA camera image. */ + FEED_RGBA_IMAGE = 0, + + /** The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image. */ + FEED_YCBCR_IMAGE = 0, + + /** The Y component camera image. */ + FEED_Y_IMAGE = 0, + + /** The CbCr component camera image. */ + FEED_CBCR_IMAGE = 1, + } + } + /** Server keeping track of different cameras accessible in Godot. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cameraserver.html + */ + class CameraServer extends Object { + /** Returns the [CameraFeed] corresponding to the camera with the given [param index]. */ + static get_feed(index: int64): CameraFeed + + /** Returns the number of [CameraFeed]s registered. */ + static get_feed_count(): int64 + + /** Returns an array of [CameraFeed]s. */ + static feeds(): GArray + + /** Adds the camera [param feed] to the camera server. */ + static add_feed(feed: CameraFeed): void + + /** Removes the specified camera [param feed]. */ + static remove_feed(feed: CameraFeed): void + + /** Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in). */ + static readonly camera_feed_added: Signal1 + + /** Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged). */ + static readonly camera_feed_removed: Signal1 + } + // _singleton_class_: DisplayServer + namespace DisplayServer { + enum Feature { + /** Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. **macOS** */ + FEATURE_GLOBAL_MENU = 0, + + /** Display server supports multiple windows that can be moved outside of the main window. **Windows, macOS, Linux (X11)** */ + FEATURE_SUBWINDOWS = 1, + + /** Display server supports touchscreen input. **Windows, Linux (X11), Android, iOS, Web** */ + FEATURE_TOUCHSCREEN = 2, + + /** Display server supports mouse input. **Windows, macOS, Linux (X11/Wayland), Android, Web** */ + FEATURE_MOUSE = 3, + + /** Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. **Windows, macOS, Linux (X11/Wayland)** */ + FEATURE_MOUSE_WARP = 4, + + /** Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** */ + FEATURE_CLIPBOARD = 5, + + /** Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. **Android, iOS, Web** */ + FEATURE_VIRTUAL_KEYBOARD = 6, + + /** Display server supports setting the mouse cursor shape to be different from the default. **Windows, macOS, Linux (X11/Wayland), Android, Web** */ + FEATURE_CURSOR_SHAPE = 7, + + /** Display server supports setting the mouse cursor shape to a custom image. **Windows, macOS, Linux (X11/Wayland), Web** */ + FEATURE_CUSTOM_CURSOR_SHAPE = 8, + + /** Display server supports spawning text dialogs using the operating system's native look-and-feel. See [method dialog_show]. **Windows, macOS** */ + FEATURE_NATIVE_DIALOG = 9, + + /** Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. **Windows, macOS, Linux (X11)** */ + FEATURE_IME = 10, + + /** Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)** */ + FEATURE_WINDOW_TRANSPARENCY = 11, + + /** Display server supports querying the operating system's display scale factor. This allows for *reliable* automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, Linux (Wayland), macOS** */ + FEATURE_HIDPI = 12, + + /** Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS, Linux (X11)** */ + FEATURE_ICON = 13, + + /** Display server supports changing the window icon (usually displayed in the top-left corner). **Windows, macOS** */ + FEATURE_NATIVE_ICON = 14, + + /** Display server supports changing the screen orientation. **Android, iOS** */ + FEATURE_ORIENTATION = 15, + + /** Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). **Windows, macOS, Linux (X11/Wayland)** */ + FEATURE_SWAP_BUFFERS = 16, + + /** Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. **Linux (X11/Wayland)** */ + FEATURE_CLIPBOARD_PRIMARY = 18, + + /** Display server supports text-to-speech. See `tts_*` methods. **Windows, macOS, Linux (X11/Wayland), Android, iOS, Web** */ + FEATURE_TEXT_TO_SPEECH = 19, + + /** Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. **macOS** */ + FEATURE_EXTEND_TO_TITLE = 20, + + /** Display server supports reading screen pixels. See [method screen_get_pixel]. */ + FEATURE_SCREEN_CAPTURE = 21, + + /** Display server supports application status indicators. */ + FEATURE_STATUS_INDICATOR = 22, + + /** Display server supports native help system search callbacks. See [method help_set_search_callbacks]. */ + FEATURE_NATIVE_HELP = 23, + + /** Display server supports spawning text input dialogs using the operating system's native look-and-feel. See [method dialog_input_text]. **Windows, macOS** */ + FEATURE_NATIVE_DIALOG_INPUT = 24, + + /** Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See [method file_dialog_show] and [method file_dialog_with_options_show]. **Windows, macOS, Linux (X11/Wayland)** */ + FEATURE_NATIVE_DIALOG_FILE = 25, + } + enum MouseMode { + /** Makes the mouse cursor visible if it is hidden. */ + MOUSE_MODE_VISIBLE = 0, + + /** Makes the mouse cursor hidden if it is visible. */ + MOUSE_MODE_HIDDEN = 1, + + /** Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. + * + * **Note:** If you want to process the mouse's movement in this mode, you need to use [member InputEventMouseMotion.relative]. + */ + MOUSE_MODE_CAPTURED = 2, + + /** Confines the mouse cursor to the game window, and make it visible. */ + MOUSE_MODE_CONFINED = 3, + + /** Confines the mouse cursor to the game window, and make it hidden. */ + MOUSE_MODE_CONFINED_HIDDEN = 4, + } + enum ScreenOrientation { + /** Default landscape orientation. */ + SCREEN_LANDSCAPE = 0, + + /** Default portrait orientation. */ + SCREEN_PORTRAIT = 1, + + /** Reverse landscape orientation (upside down). */ + SCREEN_REVERSE_LANDSCAPE = 2, + + /** Reverse portrait orientation (upside down). */ + SCREEN_REVERSE_PORTRAIT = 3, + + /** Automatic landscape orientation (default or reverse depending on sensor). */ + SCREEN_SENSOR_LANDSCAPE = 4, + + /** Automatic portrait orientation (default or reverse depending on sensor). */ + SCREEN_SENSOR_PORTRAIT = 5, + + /** Automatic landscape or portrait orientation (default or reverse depending on sensor). */ + SCREEN_SENSOR = 6, + } + enum VirtualKeyboardType { + /** Default text virtual keyboard. */ + KEYBOARD_TYPE_DEFAULT = 0, + + /** Multiline virtual keyboard. */ + KEYBOARD_TYPE_MULTILINE = 1, + + /** Virtual number keypad, useful for PIN entry. */ + KEYBOARD_TYPE_NUMBER = 2, + + /** Virtual number keypad, useful for entering fractional numbers. */ + KEYBOARD_TYPE_NUMBER_DECIMAL = 3, + + /** Virtual phone number keypad. */ + KEYBOARD_TYPE_PHONE = 4, + + /** Virtual keyboard with additional keys to assist with typing email addresses. */ + KEYBOARD_TYPE_EMAIL_ADDRESS = 5, + + /** Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + * + * **Note:** This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT]. + */ + KEYBOARD_TYPE_PASSWORD = 6, + + /** Virtual keyboard with additional keys to assist with typing URLs. */ + KEYBOARD_TYPE_URL = 7, + } + enum CursorShape { + /** Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit]. */ + CURSOR_ARROW = 0, + + /** I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit]. */ + CURSOR_IBEAM = 1, + + /** Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or a URL tag in a [RichTextLabel]. */ + CURSOR_POINTING_HAND = 2, + + /** Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. */ + CURSOR_CROSS = 3, + + /** Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY]. */ + CURSOR_WAIT = 4, + + /** Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT]. */ + CURSOR_BUSY = 5, + + /** Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP]. */ + CURSOR_DRAG = 6, + + /** "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG]. */ + CURSOR_CAN_DROP = 7, + + /** Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event. */ + CURSOR_FORBIDDEN = 8, + + /** Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT]. */ + CURSOR_VSIZE = 9, + + /** Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT]. */ + CURSOR_HSIZE = 10, + + /** Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. */ + CURSOR_BDIAGSIZE = 11, + + /** Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. */ + CURSOR_FDIAGSIZE = 12, + + /** Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse. */ + CURSOR_MOVE = 13, + + /** Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE]. */ + CURSOR_VSPLIT = 14, + + /** Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE]. */ + CURSOR_HSPLIT = 15, + + /** Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. */ + CURSOR_HELP = 16, + + /** Represents the size of the [enum CursorShape] enum. */ + CURSOR_MAX = 17, + } + enum FileDialogMode { + /** The native file dialog allows selecting one, and only one file. */ + FILE_DIALOG_MODE_OPEN_FILE = 0, + + /** The native file dialog allows selecting multiple files. */ + FILE_DIALOG_MODE_OPEN_FILES = 1, + + /** The native file dialog only allows selecting a directory, disallowing the selection of any file. */ + FILE_DIALOG_MODE_OPEN_DIR = 2, + + /** The native file dialog allows selecting one file or directory. */ + FILE_DIALOG_MODE_OPEN_ANY = 3, + + /** The native file dialog will warn when a file exists. */ + FILE_DIALOG_MODE_SAVE_FILE = 4, + } + enum WindowMode { + /** Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen). */ + WINDOW_MODE_WINDOWED = 0, + + /** Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. */ + WINDOW_MODE_MINIMIZED = 1, + + /** Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. */ + WINDOW_MODE_MAXIMIZED = 2, + + /** Full screen mode with full multi-window support. + * Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + * **On Windows:** Multi-window full-screen mode has a 1px border of the [member ProjectSettings.rendering/environment/defaults/default_clear_color] color. + * **On macOS:** A new desktop is used to display the running project. + * + * **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/4.3/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. + */ + WINDOW_MODE_FULLSCREEN = 3, + + /** A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). + * Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. + * **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. + * **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. + * **On Linux (X11):** Exclusive full screen mode bypasses compositor. + * + * **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/4.3/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. + */ + WINDOW_MODE_EXCLUSIVE_FULLSCREEN = 4, + } + enum WindowFlags { + /** The window can't be resized by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows. */ + WINDOW_FLAG_RESIZE_DISABLED = 0, + + /** The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. */ + WINDOW_FLAG_BORDERLESS = 1, + + /** The window is floating on top of all other windows. This flag is ignored for full-screen windows. */ + WINDOW_FLAG_ALWAYS_ON_TOP = 2, + + /** The window background can be transparent. + * + * **Note:** This flag has no effect if [method is_window_transparency_available] returns `false`. + * + * **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. + */ + WINDOW_FLAG_TRANSPARENT = 3, + + /** The window can't be focused. No-focus window will ignore all input, except mouse clicks. */ + WINDOW_FLAG_NO_FOCUS = 4, + + /** Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [method window_set_transient]). */ + WINDOW_FLAG_POPUP = 5, + + /** Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. + * Use [method window_set_window_buttons_offset] to adjust minimize/maximize/close buttons offset. + * Use [method window_get_safe_title_margins] to determine area under the title bar that is not covered by decorations. + * + * **Note:** This flag is implemented only on macOS. + */ + WINDOW_FLAG_EXTEND_TO_TITLE = 6, + + /** All mouse events are passed to the underlying window of the same application. */ + WINDOW_FLAG_MOUSE_PASSTHROUGH = 7, + + /** Max value of the [enum WindowFlags]. */ + WINDOW_FLAG_MAX = 8, + } + enum WindowEvent { + /** Sent when the mouse pointer enters the window. */ + WINDOW_EVENT_MOUSE_ENTER = 0, + + /** Sent when the mouse pointer exits the window. */ + WINDOW_EVENT_MOUSE_EXIT = 1, + + /** Sent when the window grabs focus. */ + WINDOW_EVENT_FOCUS_IN = 2, + + /** Sent when the window loses focus. */ + WINDOW_EVENT_FOCUS_OUT = 3, + + /** Sent when the user has attempted to close the window (e.g. close button is pressed). */ + WINDOW_EVENT_CLOSE_REQUEST = 4, + + /** Sent when the device "Back" button is pressed. + * + * **Note:** This event is implemented only on Android. + */ + WINDOW_EVENT_GO_BACK_REQUEST = 5, + + /** Sent when the window is moved to the display with different DPI, or display DPI is changed. + * + * **Note:** This flag is implemented only on macOS. + */ + WINDOW_EVENT_DPI_CHANGE = 6, + + /** Sent when the window title bar decoration is changed (e.g. [constant WINDOW_FLAG_EXTEND_TO_TITLE] is set or window entered/exited full screen mode). + * + * **Note:** This flag is implemented only on macOS. + */ + WINDOW_EVENT_TITLEBAR_CHANGE = 7, + } + enum VSyncMode { + /** No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of [member Engine.max_fps]). */ + VSYNC_DISABLED = 0, + + /** Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]). */ + VSYNC_ENABLED = 1, + + /** Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of [member Engine.max_fps]). Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method. */ + VSYNC_ADAPTIVE = 2, + + /** Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of [member Engine.max_fps]). + * Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered. Behaves like [constant VSYNC_ENABLED] when using the Compatibility rendering method. + */ + VSYNC_MAILBOX = 3, + } + enum HandleType { + /** Display handle: + * - Linux (X11): `X11::Display*` for the display. + * - Android: `EGLDisplay` for the display. + */ + DISPLAY_HANDLE = 0, + + /** Window handle: + * - Windows: `HWND` for the window. + * - Linux (X11): `X11::Window*` for the window. + * - macOS: `NSWindow*` for the window. + * - iOS: `UIViewController*` for the view controller. + * - Android: `jObject` for the activity. + */ + WINDOW_HANDLE = 1, + + /** Window view: + * - Windows: `HDC` for the window (only with the GL Compatibility renderer). + * - macOS: `NSView*` for the window main view. + * - iOS: `UIView*` for the window main view. + */ + WINDOW_VIEW = 2, + + /** OpenGL context (only with the GL Compatibility renderer): + * - Windows: `HGLRC` for the window (native GL), or `EGLContext` for the window (ANGLE). + * - Linux (X11): `GLXContext*` for the window. + * - macOS: `NSOpenGLContext*` for the window (native GL), or `EGLContext` for the window (ANGLE). + * - Android: `EGLContext` for the window. + */ + OPENGL_CONTEXT = 3, + } + enum TTSUtteranceEvent { + /** Utterance has begun to be spoken. */ + TTS_UTTERANCE_STARTED = 0, + + /** Utterance was successfully finished. */ + TTS_UTTERANCE_ENDED = 1, + + /** Utterance was canceled, or TTS service was unable to process it. */ + TTS_UTTERANCE_CANCELED = 2, + + /** Utterance reached a word or sentence boundary. */ + TTS_UTTERANCE_BOUNDARY = 3, + } + } + /** A server interface for low-level window management. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_displayserver.html + */ + class DisplayServer extends Object { + /** Represents the screen containing the mouse pointer. + * + * **Note:** On Linux (Wayland), this constant always represents the screen at index `0`. + */ + static readonly SCREEN_WITH_MOUSE_FOCUS = -4 + + /** Represents the screen containing the window with the keyboard focus. + * + * **Note:** On Linux (Wayland), this constant always represents the screen at index `0`. + */ + static readonly SCREEN_WITH_KEYBOARD_FOCUS = -3 + + /** Represents the primary screen. + * + * **Note:** On Linux (Wayland), this constant always represents the screen at index `0`. + */ + static readonly SCREEN_PRIMARY = -2 + + /** Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. + * + * **Note:** On Linux (Wayland), this constant always represents the screen at index `0`. + */ + static readonly SCREEN_OF_MAIN_WINDOW = -1 + + /** The ID of the main window spawned by the engine, which can be passed to methods expecting a `window_id`. */ + static readonly MAIN_WINDOW_ID = 0 + + /** The ID that refers to a nonexistent window. This is returned by some [DisplayServer] methods if no window matches the requested result. */ + static readonly INVALID_WINDOW_ID = -1 + + /** The ID that refers to a nonexistent application status indicator. */ + static readonly INVALID_INDICATOR_ID = -1 + + /** Returns `true` if the specified [param feature] is supported by the current [DisplayServer], `false` otherwise. */ + static has_feature(feature: DisplayServer.Feature): boolean + + /** Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (currently X11 and Wayland). + * The names of built-in display servers are `Windows`, `macOS`, `X11` (Linux), `Wayland` (Linux), `Android`, `iOS`, `web` (HTML5), and `headless` (when started with the `--headless` [url=https://docs.godotengine.org/en/4.3/tutorials/editor/command_line_tutorial.html]command line argument[/url]). + */ + static get_name(): string + + /** Sets native help system search callbacks. + * [param search_callback] has the following arguments: `String search_string, int result_limit` and return a [Dictionary] with "key, display name" pairs for the search results. Called when the user enters search terms in the `Help` menu. + * [param action_callback] has the following arguments: `String key`. Called when the user selects a search result in the `Help` menu. + * + * **Note:** This method is implemented only on macOS. + */ + static help_set_search_callbacks(search_callback: Callable, action_callback: Callable): void + + /** Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments. */ + static global_menu_set_popup_callbacks(menu_root: string, open_callback: Callable, close_callback: Callable): void + + /** Adds an item that will act as a submenu of the global menu [param menu_root]. The [param submenu] argument is the ID of the global menu root that will be shown when the item is clicked. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_submenu_item(menu_root: string, label: string, submenu: string, index: int64 = -1): int64 + + /** Adds a new item with text [param label] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_item(menu_root: string, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new checkable item with text [param label] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_check_item(menu_root: string, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_icon_item(menu_root: string, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_icon_check_item(menu_root: string, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_radio_check_item(menu_root: string, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_icon_radio_check_item(menu_root: string, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new item with text [param label] to the global menu with ID [param menu_root]. + * Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** By default, there's no indication of the current item state, it should be changed manually. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_multistate_item(menu_root: string, label: string, max_states: int64, default_state: int64, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a separator between items to the global menu with ID [param menu_root]. Separators also occupy an index. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_add_separator(menu_root: string, index: int64 = -1): int64 + + /** Returns the index of the item with the specified [param text]. Indices are automatically assigned to each item by the engine, and cannot be set manually. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_index_from_text(menu_root: string, text: string): int64 + + /** Returns the index of the item with the specified [param tag]. Indices are automatically assigned to each item by the engine, and cannot be set manually. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_index_from_tag(menu_root: string, tag: any): int64 + + /** Returns `true` if the item at index [param idx] is checked. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_is_item_checked(menu_root: string, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_is_item_checkable(menu_root: string, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] has radio button-style checkability. + * + * **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_is_item_radio_checkable(menu_root: string, idx: int64): boolean + + /** Returns the callback of the item at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_callback(menu_root: string, idx: int64): Callable + + /** Returns the callback of the item accelerator at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_key_callback(menu_root: string, idx: int64): Callable + + /** Returns the metadata of the specified item, which might be of any type. You can set it with [method global_menu_set_item_tag], which provides a simple way of assigning context data to items. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_tag(menu_root: string, idx: int64): any + + /** Returns the text of the item at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_text(menu_root: string, idx: int64): string + + /** Returns the submenu ID of the item at index [param idx]. See [method global_menu_add_submenu_item] for more info on how to add a submenu. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_submenu(menu_root: string, idx: int64): string + + /** Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_accelerator(menu_root: string, idx: int64): Key + + /** Returns `true` if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked. + * See [method global_menu_set_item_disabled] for more info on how to disable an item. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_is_item_disabled(menu_root: string, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] is hidden. + * See [method global_menu_set_item_hidden] for more info on how to hide an item. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_is_item_hidden(menu_root: string, idx: int64): boolean + + /** Returns the tooltip associated with the specified index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_tooltip(menu_root: string, idx: int64): string + + /** Returns the state of a multistate item. See [method global_menu_add_multistate_item] for details. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_state(menu_root: string, idx: int64): int64 + + /** Returns number of states of a multistate item. See [method global_menu_add_multistate_item] for details. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_max_states(menu_root: string, idx: int64): int64 + + /** Returns the icon of the item at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_icon(menu_root: string, idx: int64): Texture2D + + /** Returns the horizontal offset of the item at the given [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_indentation_level(menu_root: string, idx: int64): int64 + + /** Sets the checkstate status of the item at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_checked(menu_root: string, idx: int64, checked: boolean): void + + /** Sets whether the item at index [param idx] has a checkbox. If `false`, sets the type of the item to plain text. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_checkable(menu_root: string, idx: int64, checkable: boolean): void + + /** Sets the type of the item at the specified index [param idx] to radio button. If `false`, sets the type of the item to plain text. + * + * **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_radio_checkable(menu_root: string, idx: int64, checkable: boolean): void + + /** Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed. + * + * **Note:** The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_callback(menu_root: string, idx: int64, callback: Callable): void + + /** Sets the callback of the item at index [param idx]. The callback is emitted when an item is hovered. + * + * **Note:** The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_hover_callbacks(menu_root: string, idx: int64, callback: Callable): void + + /** Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated. + * + * **Note:** The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_key_callback(menu_root: string, idx: int64, key_callback: Callable): void + + /** Sets the metadata of an item, which may be of any type. You can later get it with [method global_menu_get_item_tag], which provides a simple way of assigning context data to items. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_tag(menu_root: string, idx: int64, tag: any): void + + /** Sets the text of the item at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_text(menu_root: string, idx: int64, text: string): void + + /** Sets the submenu of the item at index [param idx]. The submenu is the ID of a global menu root that would be shown when the item is clicked. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_submenu(menu_root: string, idx: int64, submenu: string): void + + /** Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_accelerator(menu_root: string, idx: int64, keycode: Key): void + + /** Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_disabled(menu_root: string, idx: int64, disabled: boolean): void + + /** Hides/shows the item at index [param idx]. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_hidden(menu_root: string, idx: int64, hidden: boolean): void + + /** Sets the [String] tooltip of the item at the specified index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_tooltip(menu_root: string, idx: int64, tooltip: string): void + + /** Sets the state of a multistate item. See [method global_menu_add_multistate_item] for details. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_state(menu_root: string, idx: int64, state: int64): void + + /** Sets number of state of a multistate item. See [method global_menu_add_multistate_item] for details. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_max_states(menu_root: string, idx: int64, max_states: int64): void + + /** Replaces the [Texture2D] icon of the specified [param idx]. + * + * **Note:** This method is implemented only on macOS. + * + * **Note:** This method is not supported by macOS "_dock" menu items. + */ + static global_menu_set_item_icon(menu_root: string, idx: int64, icon: Texture2D): void + + /** Sets the horizontal offset of the item at the given [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_set_item_indentation_level(menu_root: string, idx: int64, level: int64): void + + /** Returns number of items in the global menu with ID [param menu_root]. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_item_count(menu_root: string): int64 + + /** Removes the item at index [param idx] from the global menu [param menu_root]. + * + * **Note:** The indices of items after the removed item will be shifted by one. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_remove_item(menu_root: string, idx: int64): void + + /** Removes all items from the global menu with ID [param menu_root]. + * + * **Note:** This method is implemented only on macOS. + * **Supported system menu IDs:** + * [codeblock lang=text] + * "_main" - Main menu (macOS). + * "_dock" - Dock popup menu (macOS). + * "_apple" - Apple menu (macOS, custom items added before "Services"). + * "_window" - Window menu (macOS, custom items added after "Bring All to Front"). + * "_help" - Help menu (macOS). + * [/codeblock] + */ + static global_menu_clear(menu_root: string): void + + /** Returns Dictionary of supported system menu IDs and names. + * + * **Note:** This method is implemented only on macOS. + */ + static global_menu_get_system_menu_roots(): GDictionary + + /** Returns `true` if the synthesizer is generating speech, or have utterance waiting in the queue. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_is_speaking(): boolean + + /** Returns `true` if the synthesizer is in a paused state. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_is_paused(): boolean + + /** Returns an [Array] of voice information dictionaries. + * Each [Dictionary] contains two [String] entries: + * - `name` is voice name. + * - `id` is voice identifier. + * - `language` is language code in `lang_Variant` format. The `lang` part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant` part is an engine-dependent string describing country, region or/and dialect. + * Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_get_voices(): GArray + + /** Returns an [PackedStringArray] of voice identifiers for the [param language]. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_get_voices_for_language(language: string): PackedStringArray + + /** Adds an utterance to the queue. If [param interrupt] is `true`, the queue is cleared first. + * - [param voice] identifier is one of the `"id"` values returned by [method tts_get_voices] or one of the values returned by [method tts_get_voices_for_language]. + * - [param volume] ranges from `0` (lowest) to `100` (highest). + * - [param pitch] ranges from `0.0` (lowest) to `2.0` (highest), `1.0` is default pitch for the current voice. + * - [param rate] ranges from `0.1` (lowest) to `10.0` (highest), `1.0` is a normal speaking rate. Other values act as a percentage relative. + * - [param utterance_id] is passed as a parameter to the callback functions. + * + * **Note:** On Windows and Linux (X11/Wayland), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. + * + * **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_speak(text: string, voice: string, volume: int64 = 50, pitch: float64 = 1, rate: float64 = 1, utterance_id: int64 = 0, interrupt: boolean = false): void + + /** Puts the synthesizer into a paused state. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_pause(): void + + /** Resumes the synthesizer if it was paused. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_resume(): void + + /** Stops synthesis in progress and removes all utterances from the queue. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_stop(): void + + /** Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. + * - [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance ID. + * - [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance ID. + * + * **Note:** The granularity of the boundary callbacks is engine dependent. + * + * **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. + * + * **Note:** [member ProjectSettings.audio/general/text_to_speech] should be `true` to use text-to-speech. + */ + static tts_set_utterance_callback(event: DisplayServer.TTSUtteranceEvent, callable: Callable): void + static _tts_post_utterance_event(event: DisplayServer.TTSUtteranceEvent, id: int64, char_pos: int64): void + + /** Returns `true` if OS supports dark mode. + * + * **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + */ + static is_dark_mode_supported(): boolean + + /** Returns `true` if OS is using dark mode. + * + * **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + */ + static is_dark_mode(): boolean + + /** Returns OS theme accent color. Returns `Color(0, 0, 0, 0)`, if accent color is unknown. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_accent_color(): Color + + /** Returns the OS theme base color (default control background). Returns `Color(0, 0, 0, 0)` if the base color is unknown. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_base_color(): Color + + /** Sets the [param callable] that should be called when system theme settings are changed. Callback method should have zero arguments. + * + * **Note:** This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). + */ + static set_system_theme_change_callback(callable: Callable): void + + /** Sets the current mouse mode. See also [method mouse_get_mode]. */ + static mouse_set_mode(mouse_mode: DisplayServer.MouseMode): void + + /** Returns the current mouse mode. See also [method mouse_set_mode]. */ + static mouse_get_mode(): DisplayServer.MouseMode + + /** Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window. + * + * **Note:** [method warp_mouse] is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. + */ + static warp_mouse(position: Vector2i): void + + /** Returns the mouse cursor's current position in screen coordinates. */ + static mouse_get_position(): Vector2i + + /** Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask]. */ + static mouse_get_button_state(): MouseButtonMask + + /** Sets the user's clipboard content to the given string. */ + static clipboard_set(clipboard: string): void + + /** Returns the user's clipboard as a string if possible. */ + static clipboard_get(): string + + /** Returns the user's clipboard as an image if possible. + * + * **Note:** This method uses the copied pixel data, e.g. from a image editing software or a web browser, not an image file copied from file explorer. + */ + static clipboard_get_image(): Image + + /** Returns `true` if there is a text content on the user's clipboard. */ + static clipboard_has(): boolean + + /** Returns `true` if there is an image content on the user's clipboard. */ + static clipboard_has_image(): boolean + + /** Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + * + * **Note:** This method is only implemented on Linux (X11/Wayland). + */ + static clipboard_set_primary(clipboard_primary: string): void + + /** Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + * + * **Note:** This method is only implemented on Linux (X11/Wayland). + */ + static clipboard_get_primary(): string + + /** Returns an [Array] of [Rect2], each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also [method get_display_safe_area]. + * + * **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. + */ + static get_display_cutouts(): GArray + + /** Returns the unobscured area of the display where interactive controls should be rendered. See also [method get_display_cutouts]. */ + static get_display_safe_area(): Rect2i + + /** Returns the number of displays available. */ + static get_screen_count(): int64 + + /** Returns index of the primary screen. */ + static get_primary_screen(): int64 + + /** Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. */ + static get_keyboard_focus_screen(): int64 + + /** Returns index of the screen which contains specified rectangle. */ + static get_screen_from_rect(rect: Rect2): int64 + + /** Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + * [codeblock lang=text] + * * (0, 0) +-------+ + * | | + * +-------------+ | | + * | | | | + * | | | | + * +-------------+ +-------+ + * [/codeblock] + * See also [method screen_get_size]. + * + * **Note:** On Linux (Wayland) this method always returns `(0, 0)`. + */ + static screen_get_position(screen: int64 = -1): Vector2i + + /** Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect]. */ + static screen_get_size(screen: int64 = -1): Vector2i + + /** Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size]. */ + static screen_get_usable_rect(screen: int64 = -1): Rect2i + + /** Returns the dots per inch density of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. + * + * **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used. + * + * **Note:** On Android devices, the actual screen densities are grouped into six generalized densities: + * [codeblock lang=text] + * ldpi - 120 dpi + * mdpi - 160 dpi + * hdpi - 240 dpi + * xhdpi - 320 dpi + * xxhdpi - 480 dpi + * xxxhdpi - 640 dpi + * [/codeblock] + * + * **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns `72` on unsupported platforms. + */ + static screen_get_dpi(screen: int64 = -1): int64 + + /** Returns the scale factor of the specified screen by index. + * + * **Note:** On macOS, the returned value is `2.0` for hiDPI (Retina) screens, and `1.0` for all other cases. + * + * **Note:** On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. `1.25` would get rounded up to `2.0`). + * + * **Note:** This method is implemented only on macOS and Linux (Wayland). + */ + static screen_get_scale(screen: int64 = -1): float64 + + /** Returns `true` if touch events are available (Android or iOS), the capability is detected on the Web platform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is `true`. */ + static is_touchscreen_available(): boolean + + /** Returns the greatest scale factor of all screens. + * + * **Note:** On macOS returned value is `2.0` if there is at least one hiDPI (Retina) screen in the system, and `1.0` in all other cases. + * + * **Note:** This method is implemented only on macOS. + */ + static screen_get_max_scale(): float64 + + /** Returns the current refresh rate of the specified screen. If [param screen] is [constant SCREEN_OF_MAIN_WINDOW] (the default value), a screen with the main window will be used. + * + * **Note:** Returns `-1.0` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, [method screen_get_refresh_rate] will always return `-1.0` as there is no way to retrieve the refresh rate on that platform. + * To fallback to a default refresh rate if the method fails, try: + * + */ + static screen_get_refresh_rate(screen: int64 = -1): float64 + + /** Returns color of the display pixel at the [param position]. + * + * **Note:** This method is implemented on Linux (X11), macOS, and Windows. + * + * **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + */ + static screen_get_pixel(position: Vector2i): Color + + /** Returns screenshot of the [param screen]. + * + * **Note:** This method is implemented on Linux (X11), macOS, and Windows. + * + * **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + */ + static screen_get_image(screen: int64 = -1): Image + + /** Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation]. + * + * **Note:** On iOS, this method has no effect if [member ProjectSettings.display/window/handheld/orientation] is not set to [constant SCREEN_SENSOR]. + */ + static screen_set_orientation(orientation: DisplayServer.ScreenOrientation, screen: int64 = -1): void + + /** Returns the [param screen]'s current orientation. See also [method screen_set_orientation]. + * + * **Note:** This method is implemented on Android and iOS. + */ + static screen_get_orientation(screen: int64 = -1): DisplayServer.ScreenOrientation + + /** Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on]. */ + static screen_set_keep_on(enable: boolean): void + + /** Returns `true` if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on]. */ + static screen_is_kept_on(): boolean + + /** Returns the list of Godot window IDs belonging to this process. + * + * **Note:** Native dialogs are not included in this list. + */ + static get_window_list(): PackedInt32Array + + /** Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + * [codeblock lang=text] + * * (0, 0) +-------+ + * | | + * +-------------+ | | + * | | | | + * | | | | + * +-------------+ +-------+ + * [/codeblock] + */ + static get_window_at_screen_position(position: Vector2i): int64 + + /** Returns internal structure pointers for use in plugins. + * + * **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS, and Windows. + */ + static window_get_native_handle(handle_type: DisplayServer.HandleType, window_id: int64 = 0): int64 + + /** Returns ID of the active popup window, or [constant INVALID_WINDOW_ID] if there is none. */ + static window_get_active_popup(): int64 + + /** Sets the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. Clicking this area will not auto-close this popup. */ + static window_set_popup_safe_rect(window: int64, rect: Rect2i): void + + /** Returns the bounding box of control, or menu item that was used to open the popup window, in the screen coordinate system. */ + static window_get_popup_safe_rect(window: int64): Rect2i + + /** Sets the title of the given window to [param title]. + * + * **Note:** It's recommended to change this value using [member Window.title] instead. + * + * **Note:** Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. + */ + static window_set_title(title: string, window_id: int64 = 0): void + + /** Returns the estimated window title bar size (including text and window buttons) for the window specified by [param window_id] (in pixels). This method does not change the window title. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static window_get_title_size(title: string, window_id: int64 = 0): Vector2i + + /** Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. + * Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). + * + * + * **Note:** On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. + * + * **Note:** This method is implemented on Linux (X11), macOS and Windows. + */ + static window_set_mouse_passthrough(region: PackedVector2Array | Vector2[], window_id: int64 = 0): void + + /** Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen]. */ + static window_get_current_screen(window_id: int64 = 0): int64 + + /** Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen]. */ + static window_set_current_screen(screen: int64, window_id: int64 = 0): void + + /** Returns the position of the client area of the given window on the screen. */ + static window_get_position(window_id: int64 = 0): Vector2i + + /** Returns the position of the given window on the screen including the borders drawn by the operating system. See also [method window_get_position]. */ + static window_get_position_with_decorations(window_id: int64 = 0): Vector2i + + /** Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + * [codeblock lang=text] + * * (0, 0) +-------+ + * | | + * +-------------+ | | + * | | | | + * | | | | + * +-------------+ +-------+ + * [/codeblock] + * See also [method window_get_position] and [method window_set_size]. + * + * **Note:** It's recommended to change this value using [member Window.position] instead. + * + * **Note:** On Linux (Wayland): this method is a no-op. + */ + static window_set_position(position: Vector2i, window_id: int64 = 0): void + + /** Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_size_with_decorations], [method window_set_size] and [method window_get_position]. */ + static window_get_size(window_id: int64 = 0): Vector2i + + /** Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position]. + * + * **Note:** It's recommended to change this value using [member Window.size] instead. + */ + static window_set_size(size: Vector2i, window_id: int64 = 0): void + + /** Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized. + * **Warning:** Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. + */ + static window_set_rect_changed_callback(callback: Callable, window_id: int64 = 0): void + + /** Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id]. + * **Warning:** Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. + */ + static window_set_window_event_callback(callback: Callable, window_id: int64 = 0): void + + /** Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id]. + * **Warning:** Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. + */ + static window_set_input_event_callback(callback: Callable, window_id: int64 = 0): void + + /** Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id]. + * **Warning:** Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. + */ + static window_set_input_text_callback(callback: Callable, window_id: int64 = 0): void + + /** Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id]. [param callback] should take one [PackedStringArray] argument, which is the list of dropped files. + * **Warning:** Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. + * + * **Note:** This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web. + */ + static window_set_drop_files_callback(callback: Callable, window_id: int64 = 0): void + + /** Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to. */ + static window_get_attached_instance_id(window_id: int64 = 0): int64 + + /** Returns the window's maximum size (in pixels). See also [method window_set_max_size]. */ + static window_get_max_size(window_id: int64 = 0): Vector2i + + /** Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_max_size]. + * + * **Note:** It's recommended to change this value using [member Window.max_size] instead. + * + * **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. + */ + static window_set_max_size(max_size: Vector2i, window_id: int64 = 0): void + + /** Returns the window's minimum size (in pixels). See also [method window_set_min_size]. */ + static window_get_min_size(window_id: int64 = 0): Vector2i + + /** Sets the minimum size for the given window to [param min_size] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_min_size]. + * + * **Note:** It's recommended to change this value using [member Window.min_size] instead. + * + * **Note:** By default, the main window has a minimum size of `Vector2i(64, 64)`. This prevents issues that can arise when the window is resized to a near-zero size. + * + * **Note:** Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. + */ + static window_set_min_size(min_size: Vector2i, window_id: int64 = 0): void + + /** Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size]. */ + static window_get_size_with_decorations(window_id: int64 = 0): Vector2i + + /** Returns the mode of the given window. */ + static window_get_mode(window_id: int64 = 0): DisplayServer.WindowMode + + /** Sets window mode for the given window to [param mode]. See [enum WindowMode] for possible values and how each mode behaves. + * + * **Note:** Setting the window to full screen forcibly sets the borderless flag to `true`, so make sure to set it back to `false` when not wanted. + */ + static window_set_mode(mode: DisplayServer.WindowMode, window_id: int64 = 0): void + + /** Enables or disables the given window's given [param flag]. See [enum WindowFlags] for possible values and their behavior. */ + static window_set_flag(flag: DisplayServer.WindowFlags, enabled: boolean, window_id: int64 = 0): void + + /** Returns the current value of the given window's [param flag]. */ + static window_get_flag(flag: DisplayServer.WindowFlags, window_id: int64 = 0): boolean + + /** When [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set, set offset to the center of the first titlebar button. + * + * **Note:** This flag is implemented only on macOS. + */ + static window_set_window_buttons_offset(offset: Vector2i, window_id: int64 = 0): void + + /** Returns left margins (`x`), right margins (`y`) and height (`z`) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set. */ + static window_get_safe_title_margins(window_id: int64 = 0): Vector3i + + /** Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system. */ + static window_request_attention(window_id: int64 = 0): void + + /** Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows. */ + static window_move_to_foreground(window_id: int64 = 0): void + + /** Returns `true` if the window specified by [param window_id] is focused. */ + static window_is_focused(window_id: int64 = 0): boolean + + /** Returns `true` if anything can be drawn in the window specified by [param window_id], `false` otherwise. Using the `--disable-render-loop` command line argument or a headless build will return `false`. */ + static window_can_draw(window_id: int64 = 0): boolean + + /** Sets window transient parent. Transient window is will be destroyed with its transient parent and will return focus to their parent when closed. The transient window is displayed on top of a non-exclusive full-screen parent window. Transient windows can't enter full-screen mode. + * + * **Note:** It's recommended to change this value using [member Window.transient] instead. + * + * **Note:** The behavior might be different depending on the platform. + */ + static window_set_transient(window_id: int64, parent_window_id: int64): void + + /** If set to `true`, this window will always stay on top of its parent window, parent window will ignore input while this window is opened. + * + * **Note:** On macOS, exclusive windows are confined to the same space (virtual desktop or screen) as the parent window. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static window_set_exclusive(window_id: int64, exclusive: boolean): void + + /** Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position]. */ + static window_set_ime_active(active: boolean, window_id: int64 = 0): void + + /** Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to `true` for the specified [param window_id]. */ + static window_set_ime_position(position: Vector2i, window_id: int64 = 0): void + + /** Sets the V-Sync mode of the given window. See also [member ProjectSettings.display/window/vsync/vsync_mode]. + * See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. + * Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED] if the desired mode is not supported. + * + * **Note:** V-Sync modes other than [constant VSYNC_ENABLED] are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + */ + static window_set_vsync_mode(vsync_mode: DisplayServer.VSyncMode, window_id: int64 = 0): void + + /** Returns the V-Sync mode of the given window. */ + static window_get_vsync_mode(window_id: int64 = 0): DisplayServer.VSyncMode + + /** Returns `true` if the given window can be maximized (the maximize button is enabled). */ + static window_is_maximize_allowed(window_id: int64 = 0): boolean + + /** Returns `true`, if double-click on a window title should maximize it. + * + * **Note:** This method is implemented only on macOS. + */ + static window_maximize_on_title_dbl_click(): boolean + + /** Returns `true`, if double-click on a window title should minimize it. + * + * **Note:** This method is implemented only on macOS. + */ + static window_minimize_on_title_dbl_click(): boolean + + /** Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s `x` component being the caret position and `y` being the length of the selection. + * + * **Note:** This method is implemented only on macOS. + */ + static ime_get_selection(): Vector2i + + /** Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window. + * + * **Note:** This method is implemented only on macOS. + */ + static ime_get_text(): string + + /** Shows the virtual keyboard if the platform has one. + * [param existing_text] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + * [param position] parameter is the screen space [Rect2] of the edited text. + * [param type] parameter allows configuring which type of virtual keyboard to show. + * [param max_length] limits the number of characters that can be entered if different from `-1`. + * [param cursor_start] can optionally define the current text cursor position if [param cursor_end] is not set. + * [param cursor_start] and [param cursor_end] can optionally define the current text selection. + * + * **Note:** This method is implemented on Android, iOS and Web. + */ + static virtual_keyboard_show(existing_text: string, position: Rect2 = new Rect2(0, 0, 0, 0), type: DisplayServer.VirtualKeyboardType = 0, max_length: int64 = -1, cursor_start: int64 = -1, cursor_end: int64 = -1): void + + /** Hides the virtual keyboard if it is shown, does nothing otherwise. */ + static virtual_keyboard_hide(): void + + /** Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. */ + static virtual_keyboard_get_height(): int64 + + /** Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image]. */ + static cursor_set_shape(shape: DisplayServer.CursorShape): void + + /** Returns the default mouse cursor shape set by [method cursor_set_shape]. */ + static cursor_get_shape(): DisplayServer.CursorShape + + /** Sets a custom mouse cursor image for the given [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. + * [param cursor] can be either a [Texture2D] or an [Image], and it should not be larger than 256×256 to display correctly. Optionally, [param hotspot] can be set to offset the image's position relative to the click point. By default, [param hotspot] is set to the top-left corner of the image. See also [method cursor_set_shape]. + */ + static cursor_set_custom_image(cursor: Resource, shape: DisplayServer.CursorShape = 0, hotspot: Vector2 = Vector2.ZERO): void + + /** Returns `true` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok]. + * + * **Note:** This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. + */ + static get_swap_cancel_ok(): boolean + + /** Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. + * + * **Note:** This method is implemented only on Windows. + */ + static enable_for_stealing_focus(process_id: int64): void + + /** Shows a text dialog which uses the operating system's native look-and-feel. [param callback] should accept a single [int] parameter which corresponds to the index of the pressed button. + * + * **Note:** This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature. Supported platforms include macOS and Windows. + */ + static dialog_show(title: string, description: string, buttons: PackedStringArray | string[], callback: Callable): GError + + /** Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] should accept a single [String] parameter which contains the text field's contents. + * + * **Note:** This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_INPUT] feature. Supported platforms include macOS and Windows. + */ + static dialog_input_text(title: string, description: string, existing_text: string, callback: Callable): GError + + /** Displays OS native dialog for selecting files or directories in the file system. + * Each filter string in the [param filters] array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. See also [member FileDialog.filters]. + * Callbacks have the following arguments: `status: bool, selected_paths: PackedStringArray, selected_filter_index: int`. + * + * **Note:** This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_FILE] feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + * + * **Note:** [param current_directory] might be ignored. + * + * **Note:** On Linux, [param show_hidden] is ignored. + * + * **Note:** On macOS, native file dialogs have no title. + * + * **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks. + */ + static file_dialog_show(title: string, current_directory: string, filename: string, show_hidden: boolean, mode: DisplayServer.FileDialogMode, filters: PackedStringArray | string[], callback: Callable): GError + + /** Displays OS native dialog for selecting files or directories in the file system with additional user selectable options. + * Each filter string in the [param filters] array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. See also [member FileDialog.filters]. + * [param options] is array of [Dictionary]s with the following keys: + * - `"name"` - option's name [String]. + * - `"values"` - [PackedStringArray] of values. If empty, boolean option (check box) is used. + * - `"default"` - default selected option index ([int]) or default boolean value ([bool]). + * Callbacks have the following arguments: `status: bool, selected_paths: PackedStringArray, selected_filter_index: int, selected_option: Dictionary`. + * + * **Note:** This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG_FILE] feature. Supported platforms include Linux (X11/Wayland), Windows, and macOS. + * + * **Note:** [param current_directory] might be ignored. + * + * **Note:** On Linux (X11), [param show_hidden] is ignored. + * + * **Note:** On macOS, native file dialogs have no title. + * + * **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks. + */ + static file_dialog_with_options_show(title: string, current_directory: string, root: string, filename: string, show_hidden: boolean, mode: DisplayServer.FileDialogMode, filters: PackedStringArray | string[], options: GArray, callback: Callable): GError + + /** Returns the number of keyboard layouts. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_get_layout_count(): int64 + + /** Returns active keyboard layout index. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows. + */ + static keyboard_get_current_layout(): int64 + + /** Sets the active keyboard layout. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_set_current_layout(index: int64): void + + /** Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index]. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_get_layout_language(index: int64): string + + /** Returns the localized name of the keyboard layout at position [param index]. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_get_layout_name(index: int64): string + + /** Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_get_keycode_from_physical(keycode: Key): Key + + /** Converts a physical (US QWERTY) [param keycode] to localized label printed on the key in the active keyboard layout. + * + * **Note:** This method is implemented on Linux (X11/Wayland), macOS and Windows. + */ + static keyboard_get_label_from_physical(keycode: Key): Key + + /** Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input]. */ + static process_events(): void + + /** Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events]. + * + * **Note:** This method is implemented on Windows and macOS. + */ + static force_process_and_drop_events(): void + + /** Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at [param filename] must be in `.ico` format on Windows or `.icns` on macOS. By using specially crafted `.ico` or `.icns` icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead. + * + * **Note:** Requires support for [constant FEATURE_NATIVE_ICON]. + */ + static set_native_icon(filename: string): void + + /** Sets the window icon (usually displayed in the top-left corner) with an [Image]. To use icons in the operating system's native format, use [method set_native_icon] instead. + * + * **Note:** Requires support for [constant FEATURE_ICON]. + */ + static set_icon(image: Image): void + + /** Creates a new application status indicator with the specified icon, tooltip, and activation callback. + * [param callback] should take two arguments: the pressed mouse button (one of the [enum MouseButton] constants) and the click position in screen coordinates (a [Vector2i]). + */ + static create_status_indicator(icon: Texture2D, tooltip: string, callback: Callable): int64 + + /** Sets the application status indicator icon. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static status_indicator_set_icon(id: int64, icon: Texture2D): void + + /** Sets the application status indicator tooltip. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static status_indicator_set_tooltip(id: int64, tooltip: string): void + + /** Sets the application status indicator native popup menu. + * + * **Note:** On macOS, the menu is activated by any mouse button. Its activation callback is *not* triggered. + * + * **Note:** On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered. + * + * **Note:** Native popup is only supported if [NativeMenu] supports the [constant NativeMenu.FEATURE_POPUP_MENU] feature. + */ + static status_indicator_set_menu(id: int64, menu_rid: RID): void + + /** Sets the application status indicator activation callback. [param callback] should take two arguments: [int] mouse button index (one of [enum MouseButton] values) and [Vector2i] click position in screen coordinates. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static status_indicator_set_callback(id: int64, callback: Callable): void + + /** Returns the rectangle for the given status indicator [param id] in screen coordinates. If the status indicator is not visible, returns an empty [Rect2]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static status_indicator_get_rect(id: int64): Rect2 + + /** Removes the application status indicator. */ + static delete_status_indicator(id: int64): void + + /** Returns the total number of available tablet drivers. + * + * **Note:** This method is implemented only on Windows. + */ + static tablet_get_driver_count(): int64 + + /** Returns the tablet driver name for the given index. + * + * **Note:** This method is implemented only on Windows. + */ + static tablet_get_driver_name(idx: int64): string + + /** Returns current active tablet driver name. + * + * **Note:** This method is implemented only on Windows. + */ + static tablet_get_current_driver(): string + + /** Set active tablet driver name. + * Supported drivers: + * - `winink`: Windows Ink API, default (Windows 8.1+ required). + * - `wintab`: Wacom Wintab API (compatible device driver required). + * - `dummy`: Dummy driver, tablet input is disabled. + * + * **Note:** This method is implemented only on Windows. + */ + static tablet_set_current_driver(name: string): void + + /** Returns `true` if the window background can be made transparent. This method returns `false` if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to `false`, or if transparency is not supported by the renderer or OS compositor. */ + static is_window_transparency_available(): boolean + + /** Registers an [Object] which represents an additional output that will be rendered too, beyond normal windows. The [Object] is only used as an identifier, which can be later passed to [method unregister_additional_output]. + * This can be used to prevent Godot from skipping rendering when no normal windows are visible. + */ + static register_additional_output(object: Object): void + + /** Unregisters an [Object] representing an additional output, that was registered via [method register_additional_output]. */ + static unregister_additional_output(object: Object): void + + /** Returns `true` if any additional outputs have been registered via [method register_additional_output]. */ + static has_additional_outputs(): boolean + } + // _singleton_class_: NativeMenu + namespace NativeMenu { + enum Feature { + /** [NativeMenu] supports native global main menu. */ + FEATURE_GLOBAL_MENU = 0, + + /** [NativeMenu] supports native popup menus. */ + FEATURE_POPUP_MENU = 1, + + /** [NativeMenu] supports menu open and close callbacks. */ + FEATURE_OPEN_CLOSE_CALLBACK = 2, + + /** [NativeMenu] supports menu item hover callback. */ + FEATURE_HOVER_CALLBACK = 3, + + /** [NativeMenu] supports menu item accelerator/key callback. */ + FEATURE_KEY_CALLBACK = 4, + } + enum SystemMenus { + /** Invalid special system menu ID. */ + INVALID_MENU_ID = 0, + + /** Global main menu ID. */ + MAIN_MENU_ID = 1, + + /** Application (first menu after "Apple" menu on macOS) menu ID. */ + APPLICATION_MENU_ID = 2, + + /** "Window" menu ID (on macOS this menu includes standard window control items and a list of open windows). */ + WINDOW_MENU_ID = 3, + + /** "Help" menu ID (on macOS this menu includes help search bar). */ + HELP_MENU_ID = 4, + + /** Dock icon right-click menu ID (on macOS this menu include standard application control items and a list of open windows). */ + DOCK_MENU_ID = 5, + } + } + /** A server interface for OS native menus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_nativemenu.html + */ + class NativeMenu extends Object { + /** Returns `true` if the specified [param feature] is supported by the current [NativeMenu], `false` otherwise. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static has_feature(feature: NativeMenu.Feature): boolean + + /** Returns `true` if a special system menu is supported. + * + * **Note:** This method is implemented only on macOS. + */ + static has_system_menu(menu_id: NativeMenu.SystemMenus): boolean + + /** Returns RID of a special system menu. + * + * **Note:** This method is implemented only on macOS. + */ + static get_system_menu(menu_id: NativeMenu.SystemMenus): RID + + /** Returns readable name of a special system menu. + * + * **Note:** This method is implemented only on macOS. + */ + static get_system_menu_name(menu_id: NativeMenu.SystemMenus): string + + /** Creates a new global menu object. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static create_menu(): RID + + /** Returns `true` if [param rid] is valid global menu. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static has_menu(rid: RID): boolean + + /** Frees a global menu object created by this [NativeMenu]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static free_menu(rid: RID): void + + /** Returns global menu size. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_size(rid: RID): Vector2 + + /** Shows the global menu at [param position] in the screen coordinates. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static popup(rid: RID, position: Vector2i): void + + /** Sets the menu text layout direction from right-to-left if [param is_rtl] is `true`. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_interface_direction(rid: RID, is_rtl: boolean): void + + /** Registers callable to emit after the menu is closed. + * + * **Note:** This method is implemented only on macOS. + */ + static set_popup_open_callback(rid: RID, callback: Callable): void + + /** Returns global menu open callback. + * b]Note:** This method is implemented only on macOS. + */ + static get_popup_open_callback(rid: RID): Callable + + /** Registers callable to emit when the menu is about to show. + * + * **Note:** The OS can simulate menu opening to track menu item changes and global shortcuts, in which case the corresponding close callback is not triggered. Use [method is_opened] to check if the menu is currently opened. + * + * **Note:** This method is implemented only on macOS. + */ + static set_popup_close_callback(rid: RID, callback: Callable): void + + /** Returns global menu close callback. + * b]Note:** This method is implemented only on macOS. + */ + static get_popup_close_callback(rid: RID): Callable + + /** Sets the minimum width of the global menu. + * + * **Note:** This method is implemented only on macOS. + */ + static set_minimum_width(rid: RID, width: float64): void + + /** Returns global menu minimum width. + * + * **Note:** This method is implemented only on macOS. + */ + static get_minimum_width(rid: RID): float64 + + /** Returns `true` if the menu is currently opened. + * + * **Note:** This method is implemented only on macOS. + */ + static is_opened(rid: RID): boolean + + /** Adds an item that will act as a submenu of the global menu [param rid]. The [param submenu_rid] argument is the RID of the global menu that will be shown when the item is clicked. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static add_submenu_item(rid: RID, label: string, submenu_rid: RID, tag: any = {}, index: int64 = -1): int64 + + /** Adds a new item with text [param label] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_item(rid: RID, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new checkable item with text [param label] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_check_item(rid: RID, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new item with text [param label] and icon [param icon] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_icon_item(rid: RID, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new checkable item with text [param label] and icon [param icon] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_icon_check_item(rid: RID, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new radio-checkable item with text [param label] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_radio_check_item(rid: RID, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu [param rid]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_icon_radio_check_item(rid: RID, icon: Texture2D, label: string, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a new item with text [param label] to the global menu [param rid]. + * Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state]. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** By default, there's no indication of the current item state, it should be changed manually. + * + * **Note:** The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** On Windows, [param accelerator] and [param key_callback] are ignored. + */ + static add_multistate_item(rid: RID, label: string, max_states: int64, default_state: int64, callback: Callable = new Callable(), key_callback: Callable = new Callable(), tag: any = {}, accelerator: Key = 0, index: int64 = -1): int64 + + /** Adds a separator between items to the global menu [param rid]. Separators also occupy an index. + * Returns index of the inserted item, it's not guaranteed to be the same as [param index] value. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static add_separator(rid: RID, index: int64 = -1): int64 + + /** Returns the index of the item with the specified [param text]. Indices are automatically assigned to each item by the engine, and cannot be set manually. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static find_item_index_with_text(rid: RID, text: string): int64 + + /** Returns the index of the item with the specified [param tag]. Indices are automatically assigned to each item by the engine, and cannot be set manually. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static find_item_index_with_tag(rid: RID, tag: any): int64 + + /** Returns the index of the item with the submenu specified by [param submenu_rid]. Indices are automatically assigned to each item by the engine, and cannot be set manually. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static find_item_index_with_submenu(rid: RID, submenu_rid: RID): int64 + + /** Returns `true` if the item at index [param idx] is checked. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static is_item_checked(rid: RID, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] is checkable in some way, i.e. if it has a checkbox or radio button. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static is_item_checkable(rid: RID, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] has radio button-style checkability. + * + * **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static is_item_radio_checkable(rid: RID, idx: int64): boolean + + /** Returns the callback of the item at index [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_callback(rid: RID, idx: int64): Callable + + /** Returns the callback of the item accelerator at index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static get_item_key_callback(rid: RID, idx: int64): Callable + + /** Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_tag], which provides a simple way of assigning context data to items. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_tag(rid: RID, idx: int64): any + + /** Returns the text of the item at index [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_text(rid: RID, idx: int64): string + + /** Returns the submenu ID of the item at index [param idx]. See [method add_submenu_item] for more info on how to add a submenu. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_submenu(rid: RID, idx: int64): RID + + /** Returns the accelerator of the item at index [param idx]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. + * + * **Note:** This method is implemented only on macOS. + */ + static get_item_accelerator(rid: RID, idx: int64): Key + + /** Returns `true` if the item at index [param idx] is disabled. When it is disabled it can't be selected, or its action invoked. + * See [method set_item_disabled] for more info on how to disable an item. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static is_item_disabled(rid: RID, idx: int64): boolean + + /** Returns `true` if the item at index [param idx] is hidden. + * See [method set_item_hidden] for more info on how to hide an item. + * + * **Note:** This method is implemented only on macOS. + */ + static is_item_hidden(rid: RID, idx: int64): boolean + + /** Returns the tooltip associated with the specified index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static get_item_tooltip(rid: RID, idx: int64): string + + /** Returns the state of a multistate item. See [method add_multistate_item] for details. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_state(rid: RID, idx: int64): int64 + + /** Returns number of states of a multistate item. See [method add_multistate_item] for details. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_max_states(rid: RID, idx: int64): int64 + + /** Returns the icon of the item at index [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_icon(rid: RID, idx: int64): Texture2D + + /** Returns the horizontal offset of the item at the given [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static get_item_indentation_level(rid: RID, idx: int64): int64 + + /** Sets the checkstate status of the item at index [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_checked(rid: RID, idx: int64, checked: boolean): void + + /** Sets whether the item at index [param idx] has a checkbox. If `false`, sets the type of the item to plain text. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_checkable(rid: RID, idx: int64, checkable: boolean): void + + /** Sets the type of the item at the specified index [param idx] to radio button. If `false`, sets the type of the item to plain text. + * + * **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_radio_checkable(rid: RID, idx: int64, checkable: boolean): void + + /** Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed. + * + * **Note:** The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_callback(rid: RID, idx: int64, callback: Callable): void + + /** Sets the callback of the item at index [param idx]. The callback is emitted when an item is hovered. + * + * **Note:** The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_hover_callbacks(rid: RID, idx: int64, callback: Callable): void + + /** Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated. + * + * **Note:** The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the `tag` parameter when the menu item was created. + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_key_callback(rid: RID, idx: int64, key_callback: Callable): void + + /** Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_tag], which provides a simple way of assigning context data to items. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_tag(rid: RID, idx: int64, tag: any): void + + /** Sets the text of the item at index [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_text(rid: RID, idx: int64, text: string): void + + /** Sets the submenu RID of the item at index [param idx]. The submenu is a global menu that would be shown when the item is clicked. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_submenu(rid: RID, idx: int64, submenu_rid: RID): void + + /** Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_accelerator(rid: RID, idx: int64, keycode: Key): void + + /** Enables/disables the item at index [param idx]. When it is disabled, it can't be selected and its action can't be invoked. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_disabled(rid: RID, idx: int64, disabled: boolean): void + + /** Hides/shows the item at index [param idx]. When it is hidden, an item does not appear in a menu and its action cannot be invoked. + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_hidden(rid: RID, idx: int64, hidden: boolean): void + + /** Sets the [String] tooltip of the item at the specified index [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_tooltip(rid: RID, idx: int64, tooltip: string): void + + /** Sets the state of a multistate item. See [method add_multistate_item] for details. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_state(rid: RID, idx: int64, state: int64): void + + /** Sets number of state of a multistate item. See [method add_multistate_item] for details. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static set_item_max_states(rid: RID, idx: int64, max_states: int64): void + + /** Replaces the [Texture2D] icon of the specified [param idx]. + * + * **Note:** This method is implemented on macOS and Windows. + * + * **Note:** This method is not supported by macOS Dock menu items. + */ + static set_item_icon(rid: RID, idx: int64, icon: Texture2D): void + + /** Sets the horizontal offset of the item at the given [param idx]. + * + * **Note:** This method is implemented only on macOS. + */ + static set_item_indentation_level(rid: RID, idx: int64, level: int64): void + + /** Returns number of items in the global menu [param rid]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static get_item_count(rid: RID): int64 + + /** Return `true` is global menu is a special system menu. + * + * **Note:** This method is implemented only on macOS. + */ + static is_system_menu(rid: RID): boolean + + /** Removes the item at index [param idx] from the global menu [param rid]. + * + * **Note:** The indices of items after the removed item will be shifted by one. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static remove_item(rid: RID, idx: int64): void + + /** Removes all items from the global menu [param rid]. + * + * **Note:** This method is implemented on macOS and Windows. + */ + static clear(rid: RID): void + } + // _singleton_class_: NavigationServer2D + /** A server interface for low-level 2D navigation access. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationserver2d.html + */ + class NavigationServer2D extends Object { + /** Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. */ + static get_maps(): GArray + + /** Create a new map. */ + static map_create(): RID + + /** Sets the map active. */ + static map_set_active(map: RID, active: boolean): void + + /** Returns true if the map is active. */ + static map_is_active(map: RID): boolean + + /** Sets the map cell size used to rasterize the navigation mesh vertices. Must match with the cell size of the used navigation meshes. */ + static map_set_cell_size(map: RID, cell_size: float64): void + + /** Returns the map cell size used to rasterize the navigation mesh vertices. */ + static map_get_cell_size(map: RID): float64 + + /** Set the navigation [param map] edge connection use. If [param enabled] is `true`, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static map_set_use_edge_connections(map: RID, enabled: boolean): void + + /** Returns whether the navigation [param map] allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static map_get_use_edge_connections(map: RID): boolean + + /** Set the map edge connection margin used to weld the compatible region edges. */ + static map_set_edge_connection_margin(map: RID, margin: float64): void + + /** Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. */ + static map_get_edge_connection_margin(map: RID): float64 + + /** Set the map's link connection radius used to connect links to navigation polygons. */ + static map_set_link_connection_radius(map: RID, radius: float64): void + + /** Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. */ + static map_get_link_connection_radius(map: RID): float64 + + /** Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path. */ + static map_get_path(map: RID, origin: Vector2, destination: Vector2, optimize: boolean, navigation_layers: int64 = 1): PackedVector2Array + + /** Returns the point closest to the provided [param to_point] on the navigation mesh surface. */ + static map_get_closest_point(map: RID, to_point: Vector2): Vector2 + + /** Returns the owner region RID for the point returned by [method map_get_closest_point]. */ + static map_get_closest_point_owner(map: RID, to_point: Vector2): RID + + /** Returns all navigation link [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_links(map: RID): GArray + + /** Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_regions(map: RID): GArray + + /** Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_agents(map: RID): GArray + + /** Returns all navigation obstacle [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_obstacles(map: RID): GArray + + /** This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + * Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + * Avoidance processing and dispatch of the `safe_velocity` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. + * + * **Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + */ + static map_force_update(map: RID): void + + /** Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + * + * **Note:** The iteration id will wrap back to 1 after reaching its range limit. + */ + static map_get_iteration_id(map: RID): int64 + + /** Returns a random position picked from all map region polygons with matching [param navigation_layers]. + * If [param uniformly] is `true`, all map regions, polygons, and faces are weighted by their surface area (slower). + * If [param uniformly] is `false`, just a random region and a random polygon are picked (faster). + */ + static map_get_random_point(map: RID, navigation_layers: int64, uniformly: boolean): Vector2 + + /** Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters2D]. Updates the provided [NavigationPathQueryResult2D] result object with the path among other results requested by the query. */ + static query_path(parameters: NavigationPathQueryParameters2D, result: NavigationPathQueryResult2D): void + + /** Creates a new region. */ + static region_create(): RID + + /** If [param enabled] is `true` the specified [param region] will contribute to its current navigation map. */ + static region_set_enabled(region: RID, enabled: boolean): void + + /** Returns `true` if the specified [param region] is enabled. */ + static region_get_enabled(region: RID): boolean + + /** If [param enabled] is `true`, the navigation [param region] will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static region_set_use_edge_connections(region: RID, enabled: boolean): void + + /** Returns whether the navigation [param region] is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static region_get_use_edge_connections(region: RID): boolean + + /** Sets the [param enter_cost] for this [param region]. */ + static region_set_enter_cost(region: RID, enter_cost: float64): void + + /** Returns the enter cost of this [param region]. */ + static region_get_enter_cost(region: RID): float64 + + /** Sets the [param travel_cost] for this [param region]. */ + static region_set_travel_cost(region: RID, travel_cost: float64): void + + /** Returns the travel cost of this [param region]. */ + static region_get_travel_cost(region: RID): float64 + + /** Set the `ObjectID` of the object which manages this region. */ + static region_set_owner_id(region: RID, owner_id: int64): void + + /** Returns the `ObjectID` of the object which manages this region. */ + static region_get_owner_id(region: RID): int64 + + /** Returns `true` if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + * If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + * + * **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + */ + static region_owns_point(region: RID, point: Vector2): boolean + + /** Sets the map for the region. */ + static region_set_map(region: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param region] is currently assigned to. */ + static region_get_map(region: RID): RID + + /** Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). */ + static region_set_navigation_layers(region: RID, navigation_layers: int64): void + + /** Returns the region's navigation layers. */ + static region_get_navigation_layers(region: RID): int64 + + /** Sets the global transformation for the region. */ + static region_set_transform(region: RID, transform: Transform2D): void + + /** Returns the global transformation of this [param region]. */ + static region_get_transform(region: RID): Transform2D + + /** Sets the [param navigation_polygon] for the region. */ + static region_set_navigation_polygon(region: RID, navigation_polygon: NavigationPolygon): void + + /** Returns how many connections this [param region] has with other regions in the map. */ + static region_get_connections_count(region: RID): int64 + + /** Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. */ + static region_get_connection_pathway_start(region: RID, connection: int64): Vector2 + + /** Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. */ + static region_get_connection_pathway_end(region: RID, connection: int64): Vector2 + + /** Returns a random position picked from all region polygons with matching [param navigation_layers]. + * If [param uniformly] is `true`, all region polygons and faces are weighted by their surface area (slower). + * If [param uniformly] is `false`, just a random polygon and face is picked (faster). + */ + static region_get_random_point(region: RID, navigation_layers: int64, uniformly: boolean): Vector2 + + /** Create a new link between two positions on a map. */ + static link_create(): RID + + /** Sets the navigation map [RID] for the link. */ + static link_set_map(link: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param link] is currently assigned to. */ + static link_get_map(link: RID): RID + + /** If [param enabled] is `true`, the specified [param link] will contribute to its current navigation map. */ + static link_set_enabled(link: RID, enabled: boolean): void + + /** Returns `true` if the specified [param link] is enabled. */ + static link_get_enabled(link: RID): boolean + + /** Sets whether this [param link] can be travelled in both directions. */ + static link_set_bidirectional(link: RID, bidirectional: boolean): void + + /** Returns whether this [param link] can be travelled in both directions. */ + static link_is_bidirectional(link: RID): boolean + + /** Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]). */ + static link_set_navigation_layers(link: RID, navigation_layers: int64): void + + /** Returns the navigation layers for this [param link]. */ + static link_get_navigation_layers(link: RID): int64 + + /** Sets the entry position for this [param link]. */ + static link_set_start_position(link: RID, position: Vector2): void + + /** Returns the starting position of this [param link]. */ + static link_get_start_position(link: RID): Vector2 + + /** Sets the exit position for the [param link]. */ + static link_set_end_position(link: RID, position: Vector2): void + + /** Returns the ending position of this [param link]. */ + static link_get_end_position(link: RID): Vector2 + + /** Sets the [param enter_cost] for this [param link]. */ + static link_set_enter_cost(link: RID, enter_cost: float64): void + + /** Returns the enter cost of this [param link]. */ + static link_get_enter_cost(link: RID): float64 + + /** Sets the [param travel_cost] for this [param link]. */ + static link_set_travel_cost(link: RID, travel_cost: float64): void + + /** Returns the travel cost of this [param link]. */ + static link_get_travel_cost(link: RID): float64 + + /** Set the `ObjectID` of the object which manages this link. */ + static link_set_owner_id(link: RID, owner_id: int64): void + + /** Returns the `ObjectID` of the object which manages this link. */ + static link_get_owner_id(link: RID): int64 + + /** Creates the agent. */ + static agent_create(): RID + + /** If [param enabled] is `true`, the specified [param agent] uses avoidance. */ + static agent_set_avoidance_enabled(agent: RID, enabled: boolean): void + + /** Return `true` if the specified [param agent] uses avoidance. */ + static agent_get_avoidance_enabled(agent: RID): boolean + + /** Puts the agent in the map. */ + static agent_set_map(agent: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param agent] is currently assigned to. */ + static agent_get_map(agent: RID): RID + + /** If [param paused] is true the specified [param agent] will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. */ + static agent_set_paused(agent: RID, paused: boolean): void + + /** Returns `true` if the specified [param agent] is paused. */ + static agent_get_paused(agent: RID): boolean + + /** Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. */ + static agent_set_neighbor_distance(agent: RID, distance: float64): void + + /** Returns the maximum distance to other agents the specified [param agent] takes into account in the navigation. */ + static agent_get_neighbor_distance(agent: RID): float64 + + /** Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. */ + static agent_set_max_neighbors(agent: RID, count: int64): void + + /** Returns the maximum number of other agents the specified [param agent] takes into account in the navigation. */ + static agent_get_max_neighbors(agent: RID): int64 + + /** The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + static agent_set_time_horizon_agents(agent: RID, time_horizon: float64): void + + /** Returns the minimal amount of time for which the specified [param agent]'s velocities that are computed by the simulation are safe with respect to other agents. */ + static agent_get_time_horizon_agents(agent: RID): float64 + + /** The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + static agent_set_time_horizon_obstacles(agent: RID, time_horizon: float64): void + + /** Returns the minimal amount of time for which the specified [param agent]'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. */ + static agent_get_time_horizon_obstacles(agent: RID): float64 + + /** Sets the radius of the agent. */ + static agent_set_radius(agent: RID, radius: float64): void + + /** Returns the radius of the specified [param agent]. */ + static agent_get_radius(agent: RID): float64 + + /** Sets the maximum speed of the agent. Must be positive. */ + static agent_set_max_speed(agent: RID, max_speed: float64): void + + /** Returns the maximum speed of the specified [param agent]. */ + static agent_get_max_speed(agent: RID): float64 + + /** Replaces the internal velocity in the collision avoidance simulation with [param velocity] for the specified [param agent]. When an agent is teleported to a new position far away this function should be used in the same frame. If called frequently this function can get agents stuck. */ + static agent_set_velocity_forced(agent: RID, velocity: Vector2): void + + /** Sets [param velocity] as the new wanted velocity for the specified [param agent]. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position far away use [method agent_set_velocity_forced] instead to reset the internal velocity state. */ + static agent_set_velocity(agent: RID, velocity: Vector2): void + + /** Returns the velocity of the specified [param agent]. */ + static agent_get_velocity(agent: RID): Vector2 + + /** Sets the position of the agent in world space. */ + static agent_set_position(agent: RID, position: Vector2): void + + /** Returns the position of the specified [param agent] in world space. */ + static agent_get_position(agent: RID): Vector2 + + /** Returns true if the map got changed the previous frame. */ + static agent_is_map_changed(agent: RID): boolean + + /** Sets the callback [Callable] that gets called after each avoidance processing step for the [param agent]. The calculated `safe_velocity` will be dispatched with a signal to the object just before the physics calculations. + * + * **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_avoidance_callback] again with an empty [Callable]. + */ + static agent_set_avoidance_callback(agent: RID, callback: Callable): void + + /** Return `true` if the specified [param agent] has an avoidance callback. */ + static agent_has_avoidance_callback(agent: RID): boolean + + /** Set the agent's `avoidance_layers` bitmask. */ + static agent_set_avoidance_layers(agent: RID, layers: int64): void + + /** Returns the `avoidance_layers` bitmask of the specified [param agent]. */ + static agent_get_avoidance_layers(agent: RID): int64 + + /** Set the agent's `avoidance_mask` bitmask. */ + static agent_set_avoidance_mask(agent: RID, mask: int64): void + + /** Returns the `avoidance_mask` bitmask of the specified [param agent]. */ + static agent_get_avoidance_mask(agent: RID): int64 + + /** Set the agent's `avoidance_priority` with a [param priority] between 0.0 (lowest priority) to 1.0 (highest priority). + * The specified [param agent] does not adjust the velocity for other agents that would match the `avoidance_mask` but have a lower `avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + */ + static agent_set_avoidance_priority(agent: RID, priority: float64): void + + /** Returns the `avoidance_priority` of the specified [param agent]. */ + static agent_get_avoidance_priority(agent: RID): float64 + + /** Creates a new navigation obstacle. */ + static obstacle_create(): RID + + /** If [param enabled] is `true`, the provided [param obstacle] affects avoidance using agents. */ + static obstacle_set_avoidance_enabled(obstacle: RID, enabled: boolean): void + + /** Returns `true` if the provided [param obstacle] has avoidance enabled. */ + static obstacle_get_avoidance_enabled(obstacle: RID): boolean + + /** Sets the navigation map [RID] for the obstacle. */ + static obstacle_set_map(obstacle: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param obstacle] is currently assigned to. */ + static obstacle_get_map(obstacle: RID): RID + + /** If [param paused] is true the specified [param obstacle] will not be processed, e.g. affect avoidance velocities. */ + static obstacle_set_paused(obstacle: RID, paused: boolean): void + + /** Returns `true` if the specified [param obstacle] is paused. */ + static obstacle_get_paused(obstacle: RID): boolean + + /** Sets the radius of the dynamic obstacle. */ + static obstacle_set_radius(obstacle: RID, radius: float64): void + + /** Returns the radius of the specified dynamic [param obstacle]. */ + static obstacle_get_radius(obstacle: RID): float64 + + /** Sets [param velocity] of the dynamic [param obstacle]. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. */ + static obstacle_set_velocity(obstacle: RID, velocity: Vector2): void + + /** Returns the velocity of the specified dynamic [param obstacle]. */ + static obstacle_get_velocity(obstacle: RID): Vector2 + + /** Sets the position of the obstacle in world space. */ + static obstacle_set_position(obstacle: RID, position: Vector2): void + + /** Returns the position of the specified [param obstacle] in world space. */ + static obstacle_get_position(obstacle: RID): Vector2 + + /** Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. */ + static obstacle_set_vertices(obstacle: RID, vertices: PackedVector2Array | Vector2[]): void + + /** Returns the outline vertices for the specified [param obstacle]. */ + static obstacle_get_vertices(obstacle: RID): PackedVector2Array + + /** Set the obstacles's `avoidance_layers` bitmask. */ + static obstacle_set_avoidance_layers(obstacle: RID, layers: int64): void + + /** Returns the `avoidance_layers` bitmask of the specified [param obstacle]. */ + static obstacle_get_avoidance_layers(obstacle: RID): int64 + + /** Parses the [SceneTree] for source geometry according to the properties of [param navigation_polygon]. Updates the provided [param source_geometry_data] resource with the resulting data. The resource can then be used to bake a navigation mesh with [method bake_from_source_geometry_data]. After the process is finished the optional [param callback] will be called. + * + * **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + * **Performance:** While convenient, reading data arrays from [Mesh] resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the [RenderingServer] in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + */ + static parse_source_geometry_data(navigation_polygon: NavigationPolygon, source_geometry_data: NavigationMeshSourceGeometryData2D, root_node: Node, callback: Callable = new Callable()): void + + /** Bakes the provided [param navigation_polygon] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called. */ + static bake_from_source_geometry_data(navigation_polygon: NavigationPolygon, source_geometry_data: NavigationMeshSourceGeometryData2D, callback: Callable = new Callable()): void + + /** Bakes the provided [param navigation_polygon] with the data from the provided [param source_geometry_data] as an async task running on a background thread. After the process is finished the optional [param callback] will be called. */ + static bake_from_source_geometry_data_async(navigation_polygon: NavigationPolygon, source_geometry_data: NavigationMeshSourceGeometryData2D, callback: Callable = new Callable()): void + + /** Returns `true` when the provided navigation polygon is being baked on a background thread. */ + static is_baking_navigation_polygon(navigation_polygon: NavigationPolygon): boolean + + /** Creates a new source geometry parser. If a [Callable] is set for the parser with [method source_geometry_parser_set_callback] the callback will be called for every single node that gets parsed whenever [method parse_source_geometry_data] is used. */ + static source_geometry_parser_create(): RID + + /** Sets the [param callback] [Callable] for the specific source geometry [param parser]. The [Callable] will receive a call with the following parameters: + * - `navigation_mesh` - The [NavigationPolygon] reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + * - `source_geometry_data` - The [NavigationMeshSourceGeometryData2D] reference. Add custom source geometry for navigation mesh baking to this object. + * - `node` - The [Node] that is parsed. + */ + static source_geometry_parser_set_callback(parser: RID, callback: Callable): void + + /** Returns a simplified version of [param path] with less critical path points removed. The simplification amount is in worlds units and controlled by [param epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + static simplify_path(path: PackedVector2Array | Vector2[], epsilon: float64): PackedVector2Array + + /** Destroys the given RID. */ + static free_rid(rid: RID): void + + /** If `true` enables debug mode on the NavigationServer. */ + static set_debug_enabled(enabled: boolean): void + + /** Returns `true` when the NavigationServer has debug enabled. */ + static get_debug_enabled(): boolean + + /** Emitted when a navigation map is updated, when a region moves or is modified. */ + static readonly map_changed: Signal1 + + /** Emitted when navigation debug settings are changed. Only available in debug builds. */ + static readonly navigation_debug_changed: Signal0 + } + // _singleton_class_: NavigationServer3D + namespace NavigationServer3D { + enum ProcessInfo { + /** Constant to get the number of active navigation maps. */ + INFO_ACTIVE_MAPS = 0, + + /** Constant to get the number of active navigation regions. */ + INFO_REGION_COUNT = 1, + + /** Constant to get the number of active navigation agents processing avoidance. */ + INFO_AGENT_COUNT = 2, + + /** Constant to get the number of active navigation links. */ + INFO_LINK_COUNT = 3, + + /** Constant to get the number of navigation mesh polygons. */ + INFO_POLYGON_COUNT = 4, + + /** Constant to get the number of navigation mesh polygon edges. */ + INFO_EDGE_COUNT = 5, + + /** Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap. */ + INFO_EDGE_MERGE_COUNT = 6, + + /** Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity. */ + INFO_EDGE_CONNECTION_COUNT = 7, + + /** Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links. */ + INFO_EDGE_FREE_COUNT = 8, + } + } + /** A server interface for low-level 3D navigation access. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationserver3d.html + */ + class NavigationServer3D extends Object { + /** Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. */ + static get_maps(): GArray + + /** Create a new map. */ + static map_create(): RID + + /** Sets the map active. */ + static map_set_active(map: RID, active: boolean): void + + /** Returns true if the map is active. */ + static map_is_active(map: RID): boolean + + /** Sets the map up direction. */ + static map_set_up(map: RID, up: Vector3): void + + /** Returns the map's up direction. */ + static map_get_up(map: RID): Vector3 + + /** Sets the map cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size of the used navigation meshes. */ + static map_set_cell_size(map: RID, cell_size: float64): void + + /** Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane. */ + static map_get_cell_size(map: RID): float64 + + /** Sets the map cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height of the used navigation meshes. */ + static map_set_cell_height(map: RID, cell_height: float64): void + + /** Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis. */ + static map_get_cell_height(map: RID): float64 + + /** Set the map's internal merge rasterizer cell scale used to control merging sensitivity. */ + static map_set_merge_rasterizer_cell_scale(map: RID, scale: float64): void + + /** Returns map's internal merge rasterizer cell scale. */ + static map_get_merge_rasterizer_cell_scale(map: RID): float64 + + /** Set the navigation [param map] edge connection use. If [param enabled] is `true`, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static map_set_use_edge_connections(map: RID, enabled: boolean): void + + /** Returns true if the navigation [param map] allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static map_get_use_edge_connections(map: RID): boolean + + /** Set the map edge connection margin used to weld the compatible region edges. */ + static map_set_edge_connection_margin(map: RID, margin: float64): void + + /** Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. */ + static map_get_edge_connection_margin(map: RID): float64 + + /** Set the map's link connection radius used to connect links to navigation polygons. */ + static map_set_link_connection_radius(map: RID, radius: float64): void + + /** Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to. */ + static map_get_link_connection_radius(map: RID): float64 + + /** Returns the navigation path to reach the destination from the origin. [param navigation_layers] is a bitmask of all region navigation layers that are allowed to be in the path. */ + static map_get_path(map: RID, origin: Vector3, destination: Vector3, optimize: boolean, navigation_layers: int64 = 1): PackedVector3Array + + /** Returns the closest point between the navigation surface and the segment. */ + static map_get_closest_point_to_segment(map: RID, start: Vector3, end: Vector3, use_collision: boolean = false): Vector3 + + /** Returns the point closest to the provided [param to_point] on the navigation mesh surface. */ + static map_get_closest_point(map: RID, to_point: Vector3): Vector3 + + /** Returns the normal for the point returned by [method map_get_closest_point]. */ + static map_get_closest_point_normal(map: RID, to_point: Vector3): Vector3 + + /** Returns the owner region RID for the point returned by [method map_get_closest_point]. */ + static map_get_closest_point_owner(map: RID, to_point: Vector3): RID + + /** Returns all navigation link [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_links(map: RID): GArray + + /** Returns all navigation regions [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_regions(map: RID): GArray + + /** Returns all navigation agents [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_agents(map: RID): GArray + + /** Returns all navigation obstacle [RID]s that are currently assigned to the requested navigation [param map]. */ + static map_get_obstacles(map: RID): GArray + + /** This function immediately forces synchronization of the specified navigation [param map] [RID]. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed). + * Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update. + * Avoidance processing and dispatch of the `safe_velocity` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame. + * + * **Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight. + */ + static map_force_update(map: RID): void + + /** Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized. + * + * **Note:** The iteration id will wrap back to 1 after reaching its range limit. + */ + static map_get_iteration_id(map: RID): int64 + + /** Returns a random position picked from all map region polygons with matching [param navigation_layers]. + * If [param uniformly] is `true`, all map regions, polygons, and faces are weighted by their surface area (slower). + * If [param uniformly] is `false`, just a random region and a random polygon are picked (faster). + */ + static map_get_random_point(map: RID, navigation_layers: int64, uniformly: boolean): Vector3 + + /** Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters3D]. Updates the provided [NavigationPathQueryResult3D] result object with the path among other results requested by the query. */ + static query_path(parameters: NavigationPathQueryParameters3D, result: NavigationPathQueryResult3D): void + + /** Creates a new region. */ + static region_create(): RID + + /** If [param enabled] is `true`, the specified [param region] will contribute to its current navigation map. */ + static region_set_enabled(region: RID, enabled: boolean): void + + /** Returns `true` if the specified [param region] is enabled. */ + static region_get_enabled(region: RID): boolean + + /** If [param enabled] is `true`, the navigation [param region] will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static region_set_use_edge_connections(region: RID, enabled: boolean): void + + /** Returns true if the navigation [param region] is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + static region_get_use_edge_connections(region: RID): boolean + + /** Sets the [param enter_cost] for this [param region]. */ + static region_set_enter_cost(region: RID, enter_cost: float64): void + + /** Returns the enter cost of this [param region]. */ + static region_get_enter_cost(region: RID): float64 + + /** Sets the [param travel_cost] for this [param region]. */ + static region_set_travel_cost(region: RID, travel_cost: float64): void + + /** Returns the travel cost of this [param region]. */ + static region_get_travel_cost(region: RID): float64 + + /** Set the `ObjectID` of the object which manages this region. */ + static region_set_owner_id(region: RID, owner_id: int64): void + + /** Returns the `ObjectID` of the object which manages this region. */ + static region_get_owner_id(region: RID): int64 + + /** Returns `true` if the provided [param point] in world space is currently owned by the provided navigation [param region]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region. + * If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer. + * + * **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. + */ + static region_owns_point(region: RID, point: Vector3): boolean + + /** Sets the map for the region. */ + static region_set_map(region: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param region] is currently assigned to. */ + static region_get_map(region: RID): RID + + /** Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). */ + static region_set_navigation_layers(region: RID, navigation_layers: int64): void + + /** Returns the region's navigation layers. */ + static region_get_navigation_layers(region: RID): int64 + + /** Sets the global transformation for the region. */ + static region_set_transform(region: RID, transform: Transform3D): void + + /** Returns the global transformation of this [param region]. */ + static region_get_transform(region: RID): Transform3D + + /** Sets the navigation mesh for the region. */ + static region_set_navigation_mesh(region: RID, navigation_mesh: NavigationMesh): void + + /** Bakes the [param navigation_mesh] with bake source geometry collected starting from the [param root_node]. */ + static region_bake_navigation_mesh(navigation_mesh: NavigationMesh, root_node: Node): void + + /** Returns how many connections this [param region] has with other regions in the map. */ + static region_get_connections_count(region: RID): int64 + + /** Returns the starting point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. */ + static region_get_connection_pathway_start(region: RID, connection: int64): Vector3 + + /** Returns the ending point of a connection door. [param connection] is an index between 0 and the return value of [method region_get_connections_count]. */ + static region_get_connection_pathway_end(region: RID, connection: int64): Vector3 + + /** Returns a random position picked from all region polygons with matching [param navigation_layers]. + * If [param uniformly] is `true`, all region polygons and faces are weighted by their surface area (slower). + * If [param uniformly] is `false`, just a random polygon and face is picked (faster). + */ + static region_get_random_point(region: RID, navigation_layers: int64, uniformly: boolean): Vector3 + + /** Create a new link between two positions on a map. */ + static link_create(): RID + + /** Sets the navigation map [RID] for the link. */ + static link_set_map(link: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param link] is currently assigned to. */ + static link_get_map(link: RID): RID + + /** If [param enabled] is `true`, the specified [param link] will contribute to its current navigation map. */ + static link_set_enabled(link: RID, enabled: boolean): void + + /** Returns `true` if the specified [param link] is enabled. */ + static link_get_enabled(link: RID): boolean + + /** Sets whether this [param link] can be travelled in both directions. */ + static link_set_bidirectional(link: RID, bidirectional: boolean): void + + /** Returns whether this [param link] can be travelled in both directions. */ + static link_is_bidirectional(link: RID): boolean + + /** Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]). */ + static link_set_navigation_layers(link: RID, navigation_layers: int64): void + + /** Returns the navigation layers for this [param link]. */ + static link_get_navigation_layers(link: RID): int64 + + /** Sets the entry position for this [param link]. */ + static link_set_start_position(link: RID, position: Vector3): void + + /** Returns the starting position of this [param link]. */ + static link_get_start_position(link: RID): Vector3 + + /** Sets the exit position for the [param link]. */ + static link_set_end_position(link: RID, position: Vector3): void + + /** Returns the ending position of this [param link]. */ + static link_get_end_position(link: RID): Vector3 + + /** Sets the [param enter_cost] for this [param link]. */ + static link_set_enter_cost(link: RID, enter_cost: float64): void + + /** Returns the enter cost of this [param link]. */ + static link_get_enter_cost(link: RID): float64 + + /** Sets the [param travel_cost] for this [param link]. */ + static link_set_travel_cost(link: RID, travel_cost: float64): void + + /** Returns the travel cost of this [param link]. */ + static link_get_travel_cost(link: RID): float64 + + /** Set the `ObjectID` of the object which manages this link. */ + static link_set_owner_id(link: RID, owner_id: int64): void + + /** Returns the `ObjectID` of the object which manages this link. */ + static link_get_owner_id(link: RID): int64 + + /** Creates the agent. */ + static agent_create(): RID + + /** If [param enabled] is `true`, the provided [param agent] calculates avoidance. */ + static agent_set_avoidance_enabled(agent: RID, enabled: boolean): void + + /** Returns `true` if the provided [param agent] has avoidance enabled. */ + static agent_get_avoidance_enabled(agent: RID): boolean + + /** Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled. + * If `true` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, underwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's. + * If `false` the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance. + */ + static agent_set_use_3d_avoidance(agent: RID, enabled: boolean): void + + /** Returns `true` if the provided [param agent] uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). */ + static agent_get_use_3d_avoidance(agent: RID): boolean + + /** Puts the agent in the map. */ + static agent_set_map(agent: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param agent] is currently assigned to. */ + static agent_get_map(agent: RID): RID + + /** If [param paused] is true the specified [param agent] will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks. */ + static agent_set_paused(agent: RID, paused: boolean): void + + /** Returns `true` if the specified [param agent] is paused. */ + static agent_get_paused(agent: RID): boolean + + /** Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. */ + static agent_set_neighbor_distance(agent: RID, distance: float64): void + + /** Returns the maximum distance to other agents the specified [param agent] takes into account in the navigation. */ + static agent_get_neighbor_distance(agent: RID): float64 + + /** Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. */ + static agent_set_max_neighbors(agent: RID, count: int64): void + + /** Returns the maximum number of other agents the specified [param agent] takes into account in the navigation. */ + static agent_get_max_neighbors(agent: RID): int64 + + /** The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + static agent_set_time_horizon_agents(agent: RID, time_horizon: float64): void + + /** Returns the minimal amount of time for which the specified [param agent]'s velocities that are computed by the simulation are safe with respect to other agents. */ + static agent_get_time_horizon_agents(agent: RID): float64 + + /** The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + static agent_set_time_horizon_obstacles(agent: RID, time_horizon: float64): void + + /** Returns the minimal amount of time for which the specified [param agent]'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles. */ + static agent_get_time_horizon_obstacles(agent: RID): float64 + + /** Sets the radius of the agent. */ + static agent_set_radius(agent: RID, radius: float64): void + + /** Returns the radius of the specified [param agent]. */ + static agent_get_radius(agent: RID): float64 + + /** Updates the provided [param agent] [param height]. */ + static agent_set_height(agent: RID, height: float64): void + + /** Returns the `height` of the specified [param agent]. */ + static agent_get_height(agent: RID): float64 + + /** Sets the maximum speed of the agent. Must be positive. */ + static agent_set_max_speed(agent: RID, max_speed: float64): void + + /** Returns the maximum speed of the specified [param agent]. */ + static agent_get_max_speed(agent: RID): float64 + + /** Replaces the internal velocity in the collision avoidance simulation with [param velocity] for the specified [param agent]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. */ + static agent_set_velocity_forced(agent: RID, velocity: Vector3): void + + /** Sets [param velocity] as the new wanted velocity for the specified [param agent]. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use [method agent_set_velocity_forced] as well to reset the internal simulation velocity. */ + static agent_set_velocity(agent: RID, velocity: Vector3): void + + /** Returns the velocity of the specified [param agent]. */ + static agent_get_velocity(agent: RID): Vector3 + + /** Sets the position of the agent in world space. */ + static agent_set_position(agent: RID, position: Vector3): void + + /** Returns the position of the specified [param agent] in world space. */ + static agent_get_position(agent: RID): Vector3 + + /** Returns true if the map got changed the previous frame. */ + static agent_is_map_changed(agent: RID): boolean + + /** Sets the callback [Callable] that gets called after each avoidance processing step for the [param agent]. The calculated `safe_velocity` will be dispatched with a signal to the object just before the physics calculations. + * + * **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_avoidance_callback] again with an empty [Callable]. + */ + static agent_set_avoidance_callback(agent: RID, callback: Callable): void + + /** Return `true` if the specified [param agent] has an avoidance callback. */ + static agent_has_avoidance_callback(agent: RID): boolean + + /** Set the agent's `avoidance_layers` bitmask. */ + static agent_set_avoidance_layers(agent: RID, layers: int64): void + + /** Returns the `avoidance_layers` bitmask of the specified [param agent]. */ + static agent_get_avoidance_layers(agent: RID): int64 + + /** Set the agent's `avoidance_mask` bitmask. */ + static agent_set_avoidance_mask(agent: RID, mask: int64): void + + /** Returns the `avoidance_mask` bitmask of the specified [param agent]. */ + static agent_get_avoidance_mask(agent: RID): int64 + + /** Set the agent's `avoidance_priority` with a [param priority] between 0.0 (lowest priority) to 1.0 (highest priority). + * The specified [param agent] does not adjust the velocity for other agents that would match the `avoidance_mask` but have a lower `avoidance_priority`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. + */ + static agent_set_avoidance_priority(agent: RID, priority: float64): void + + /** Returns the `avoidance_priority` of the specified [param agent]. */ + static agent_get_avoidance_priority(agent: RID): float64 + + /** Creates a new obstacle. */ + static obstacle_create(): RID + + /** If [param enabled] is `true`, the provided [param obstacle] affects avoidance using agents. */ + static obstacle_set_avoidance_enabled(obstacle: RID, enabled: boolean): void + + /** Returns `true` if the provided [param obstacle] has avoidance enabled. */ + static obstacle_get_avoidance_enabled(obstacle: RID): boolean + + /** Sets if the [param obstacle] uses the 2D avoidance or the 3D avoidance while avoidance is enabled. */ + static obstacle_set_use_3d_avoidance(obstacle: RID, enabled: boolean): void + + /** Returns `true` if the provided [param obstacle] uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z). */ + static obstacle_get_use_3d_avoidance(obstacle: RID): boolean + + /** Assigns the [param obstacle] to a navigation map. */ + static obstacle_set_map(obstacle: RID, map: RID): void + + /** Returns the navigation map [RID] the requested [param obstacle] is currently assigned to. */ + static obstacle_get_map(obstacle: RID): RID + + /** If [param paused] is true the specified [param obstacle] will not be processed, e.g. affect avoidance velocities. */ + static obstacle_set_paused(obstacle: RID, paused: boolean): void + + /** Returns `true` if the specified [param obstacle] is paused. */ + static obstacle_get_paused(obstacle: RID): boolean + + /** Sets the radius of the dynamic obstacle. */ + static obstacle_set_radius(obstacle: RID, radius: float64): void + + /** Returns the radius of the specified dynamic [param obstacle]. */ + static obstacle_get_radius(obstacle: RID): float64 + + /** Sets the [param height] for the [param obstacle]. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance. */ + static obstacle_set_height(obstacle: RID, height: float64): void + + /** Returns the `height` of the specified [param obstacle]. */ + static obstacle_get_height(obstacle: RID): float64 + + /** Sets [param velocity] of the dynamic [param obstacle]. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle. */ + static obstacle_set_velocity(obstacle: RID, velocity: Vector3): void + + /** Returns the velocity of the specified dynamic [param obstacle]. */ + static obstacle_get_velocity(obstacle: RID): Vector3 + + /** Updates the [param position] in world space for the [param obstacle]. */ + static obstacle_set_position(obstacle: RID, position: Vector3): void + + /** Returns the position of the specified [param obstacle] in world space. */ + static obstacle_get_position(obstacle: RID): Vector3 + + /** Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. */ + static obstacle_set_vertices(obstacle: RID, vertices: PackedVector3Array | Vector3[]): void + + /** Returns the outline vertices for the specified [param obstacle]. */ + static obstacle_get_vertices(obstacle: RID): PackedVector3Array + + /** Set the obstacles's `avoidance_layers` bitmask. */ + static obstacle_set_avoidance_layers(obstacle: RID, layers: int64): void + + /** Returns the `avoidance_layers` bitmask of the specified [param obstacle]. */ + static obstacle_get_avoidance_layers(obstacle: RID): int64 + + /** Parses the [SceneTree] for source geometry according to the properties of [param navigation_mesh]. Updates the provided [param source_geometry_data] resource with the resulting data. The resource can then be used to bake a navigation mesh with [method bake_from_source_geometry_data]. After the process is finished the optional [param callback] will be called. + * + * **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe. + * **Performance:** While convenient, reading data arrays from [Mesh] resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the [RenderingServer] in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code. + */ + static parse_source_geometry_data(navigation_mesh: NavigationMesh, source_geometry_data: NavigationMeshSourceGeometryData3D, root_node: Node, callback: Callable = new Callable()): void + + /** Bakes the provided [param navigation_mesh] with the data from the provided [param source_geometry_data]. After the process is finished the optional [param callback] will be called. */ + static bake_from_source_geometry_data(navigation_mesh: NavigationMesh, source_geometry_data: NavigationMeshSourceGeometryData3D, callback: Callable = new Callable()): void + + /** Bakes the provided [param navigation_mesh] with the data from the provided [param source_geometry_data] as an async task running on a background thread. After the process is finished the optional [param callback] will be called. */ + static bake_from_source_geometry_data_async(navigation_mesh: NavigationMesh, source_geometry_data: NavigationMeshSourceGeometryData3D, callback: Callable = new Callable()): void + + /** Returns `true` when the provided navigation mesh is being baked on a background thread. */ + static is_baking_navigation_mesh(navigation_mesh: NavigationMesh): boolean + + /** Creates a new source geometry parser. If a [Callable] is set for the parser with [method source_geometry_parser_set_callback] the callback will be called for every single node that gets parsed whenever [method parse_source_geometry_data] is used. */ + static source_geometry_parser_create(): RID + + /** Sets the [param callback] [Callable] for the specific source geometry [param parser]. The [Callable] will receive a call with the following parameters: + * - `navigation_mesh` - The [NavigationMesh] reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh. + * - `source_geometry_data` - The [NavigationMeshSourceGeometryData3D] reference. Add custom source geometry for navigation mesh baking to this object. + * - `node` - The [Node] that is parsed. + */ + static source_geometry_parser_set_callback(parser: RID, callback: Callable): void + + /** Returns a simplified version of [param path] with less critical path points removed. The simplification amount is in worlds units and controlled by [param epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + static simplify_path(path: PackedVector3Array | Vector3[], epsilon: float64): PackedVector3Array + + /** Destroys the given RID. */ + static free_rid(rid: RID): void + + /** Control activation of this server. */ + static set_active(active: boolean): void + + /** If `true` enables debug mode on the NavigationServer. */ + static set_debug_enabled(enabled: boolean): void + + /** Returns `true` when the NavigationServer has debug enabled. */ + static get_debug_enabled(): boolean + + /** Returns information about the current state of the NavigationServer. See [enum ProcessInfo] for a list of available states. */ + static get_process_info(process_info: NavigationServer3D.ProcessInfo): int64 + + /** Emitted when a navigation map is updated, when a region moves or is modified. */ + static readonly map_changed: Signal1 + + /** Emitted when navigation debug settings are changed. Only available in debug builds. */ + static readonly navigation_debug_changed: Signal0 + + /** Emitted when avoidance debug settings are changed. Only available in debug builds. */ + static readonly avoidance_debug_changed: Signal0 + } + // _singleton_class_: RenderingServer + namespace RenderingServer { + enum TextureLayeredType { + /** Array of 2-dimensional textures (see [Texture2DArray]). */ + TEXTURE_LAYERED_2D_ARRAY = 0, + + /** Cubemap texture (see [Cubemap]). */ + TEXTURE_LAYERED_CUBEMAP = 1, + + /** Array of cubemap textures (see [CubemapArray]). */ + TEXTURE_LAYERED_CUBEMAP_ARRAY = 2, + } + enum CubeMapLayer { + /** Left face of a [Cubemap]. */ + CUBEMAP_LAYER_LEFT = 0, + + /** Right face of a [Cubemap]. */ + CUBEMAP_LAYER_RIGHT = 1, + + /** Bottom face of a [Cubemap]. */ + CUBEMAP_LAYER_BOTTOM = 2, + + /** Top face of a [Cubemap]. */ + CUBEMAP_LAYER_TOP = 3, + + /** Front face of a [Cubemap]. */ + CUBEMAP_LAYER_FRONT = 4, + + /** Back face of a [Cubemap]. */ + CUBEMAP_LAYER_BACK = 5, + } + enum ShaderMode { + /** Shader is a 3D shader. */ + SHADER_SPATIAL = 0, + + /** Shader is a 2D shader. */ + SHADER_CANVAS_ITEM = 1, + + /** Shader is a particle shader (can be used in both 2D and 3D). */ + SHADER_PARTICLES = 2, + + /** Shader is a 3D sky shader. */ + SHADER_SKY = 3, + + /** Shader is a 3D fog shader. */ + SHADER_FOG = 4, + + /** Represents the size of the [enum ShaderMode] enum. */ + SHADER_MAX = 5, + } + enum ArrayType { + /** Array is a vertex position array. */ + ARRAY_VERTEX = 0, + + /** Array is a normal array. */ + ARRAY_NORMAL = 1, + + /** Array is a tangent array. */ + ARRAY_TANGENT = 2, + + /** Array is a vertex color array. */ + ARRAY_COLOR = 3, + + /** Array is a UV coordinates array. */ + ARRAY_TEX_UV = 4, + + /** Array is a UV coordinates array for the second set of UV coordinates. */ + ARRAY_TEX_UV2 = 5, + + /** Array is a custom data array for the first set of custom data. */ + ARRAY_CUSTOM0 = 6, + + /** Array is a custom data array for the second set of custom data. */ + ARRAY_CUSTOM1 = 7, + + /** Array is a custom data array for the third set of custom data. */ + ARRAY_CUSTOM2 = 8, + + /** Array is a custom data array for the fourth set of custom data. */ + ARRAY_CUSTOM3 = 9, + + /** Array contains bone information. */ + ARRAY_BONES = 10, + + /** Array is weight information. */ + ARRAY_WEIGHTS = 11, + + /** Array is an index array. */ + ARRAY_INDEX = 12, + + /** Represents the size of the [enum ArrayType] enum. */ + ARRAY_MAX = 13, + } + enum ArrayCustomFormat { + /** Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, unsigned floating-point in the `[0.0, 1.0]` range. */ + ARRAY_CUSTOM_RGBA8_UNORM = 0, + + /** Custom data array contains 8-bit-per-channel red/green/blue/alpha color data. Values are normalized, signed floating-point in the `[-1.0, 1.0]` range. */ + ARRAY_CUSTOM_RGBA8_SNORM = 1, + + /** Custom data array contains 16-bit-per-channel red/green color data. Values are floating-point in half precision. */ + ARRAY_CUSTOM_RG_HALF = 2, + + /** Custom data array contains 16-bit-per-channel red/green/blue/alpha color data. Values are floating-point in half precision. */ + ARRAY_CUSTOM_RGBA_HALF = 3, + + /** Custom data array contains 32-bit-per-channel red color data. Values are floating-point in single precision. */ + ARRAY_CUSTOM_R_FLOAT = 4, + + /** Custom data array contains 32-bit-per-channel red/green color data. Values are floating-point in single precision. */ + ARRAY_CUSTOM_RG_FLOAT = 5, + + /** Custom data array contains 32-bit-per-channel red/green/blue color data. Values are floating-point in single precision. */ + ARRAY_CUSTOM_RGB_FLOAT = 6, + + /** Custom data array contains 32-bit-per-channel red/green/blue/alpha color data. Values are floating-point in single precision. */ + ARRAY_CUSTOM_RGBA_FLOAT = 7, + + /** Represents the size of the [enum ArrayCustomFormat] enum. */ + ARRAY_CUSTOM_MAX = 8, + } + enum ArrayFormat { + /** Flag used to mark a vertex position array. */ + ARRAY_FORMAT_VERTEX = 1, + + /** Flag used to mark a normal array. */ + ARRAY_FORMAT_NORMAL = 2, + + /** Flag used to mark a tangent array. */ + ARRAY_FORMAT_TANGENT = 4, + + /** Flag used to mark a vertex color array. */ + ARRAY_FORMAT_COLOR = 8, + + /** Flag used to mark a UV coordinates array. */ + ARRAY_FORMAT_TEX_UV = 16, + + /** Flag used to mark a UV coordinates array for the second UV coordinates. */ + ARRAY_FORMAT_TEX_UV2 = 32, + + /** Flag used to mark an array of custom per-vertex data for the first set of custom data. */ + ARRAY_FORMAT_CUSTOM0 = 64, + + /** Flag used to mark an array of custom per-vertex data for the second set of custom data. */ + ARRAY_FORMAT_CUSTOM1 = 128, + + /** Flag used to mark an array of custom per-vertex data for the third set of custom data. */ + ARRAY_FORMAT_CUSTOM2 = 256, + + /** Flag used to mark an array of custom per-vertex data for the fourth set of custom data. */ + ARRAY_FORMAT_CUSTOM3 = 512, + + /** Flag used to mark a bone information array. */ + ARRAY_FORMAT_BONES = 1024, + + /** Flag used to mark a weights array. */ + ARRAY_FORMAT_WEIGHTS = 2048, + + /** Flag used to mark an index array. */ + ARRAY_FORMAT_INDEX = 4096, + ARRAY_FORMAT_BLEND_SHAPE_MASK = 7, + ARRAY_FORMAT_CUSTOM_BASE = 13, + ARRAY_FORMAT_CUSTOM_BITS = 3, + ARRAY_FORMAT_CUSTOM0_SHIFT = 13, + ARRAY_FORMAT_CUSTOM1_SHIFT = 16, + ARRAY_FORMAT_CUSTOM2_SHIFT = 19, + ARRAY_FORMAT_CUSTOM3_SHIFT = 22, + ARRAY_FORMAT_CUSTOM_MASK = 7, + ARRAY_COMPRESS_FLAGS_BASE = 25, + + /** Flag used to mark that the array contains 2D vertices. */ + ARRAY_FLAG_USE_2D_VERTICES = 33554432, + ARRAY_FLAG_USE_DYNAMIC_UPDATE = 67108864, + + /** Flag used to mark that the array uses 8 bone weights instead of 4. */ + ARRAY_FLAG_USE_8_BONE_WEIGHTS = 134217728, + + /** Flag used to mark that the mesh does not have a vertex array and instead will infer vertex positions in the shader using indices and other information. */ + ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 268435456, + + /** Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. */ + ARRAY_FLAG_COMPRESS_ATTRIBUTES = 536870912, + + /** Flag used to mark the start of the bits used to store the mesh version. */ + ARRAY_FLAG_FORMAT_VERSION_BASE = 35, + + /** Flag used to shift a mesh format int to bring the version into the lowest digits. */ + ARRAY_FLAG_FORMAT_VERSION_SHIFT = 35, + + /** Flag used to record the format used by prior mesh versions before the introduction of a version. */ + ARRAY_FLAG_FORMAT_VERSION_1 = 0, + + /** Flag used to record the second iteration of the mesh version flag. The primary difference between this and [constant ARRAY_FLAG_FORMAT_VERSION_1] is that this version supports [constant ARRAY_FLAG_COMPRESS_ATTRIBUTES] and in this version vertex positions are de-interleaved from normals and tangents. */ + ARRAY_FLAG_FORMAT_VERSION_2 = 34359738368, + + /** Flag used to record the current version that the engine expects. Currently this is the same as [constant ARRAY_FLAG_FORMAT_VERSION_2]. */ + ARRAY_FLAG_FORMAT_CURRENT_VERSION = 34359738368, + + /** Flag used to isolate the bits used for mesh version after using [constant ARRAY_FLAG_FORMAT_VERSION_SHIFT] to shift them into place. */ + ARRAY_FLAG_FORMAT_VERSION_MASK = 255, + } + enum PrimitiveType { + /** Primitive to draw consists of points. */ + PRIMITIVE_POINTS = 0, + + /** Primitive to draw consists of lines. */ + PRIMITIVE_LINES = 1, + + /** Primitive to draw consists of a line strip from start to end. */ + PRIMITIVE_LINE_STRIP = 2, + + /** Primitive to draw consists of triangles. */ + PRIMITIVE_TRIANGLES = 3, + + /** Primitive to draw consists of a triangle strip (the last 3 vertices are always combined to make a triangle). */ + PRIMITIVE_TRIANGLE_STRIP = 4, + + /** Represents the size of the [enum PrimitiveType] enum. */ + PRIMITIVE_MAX = 5, + } + enum BlendShapeMode { + /** Blend shapes are normalized. */ + BLEND_SHAPE_MODE_NORMALIZED = 0, + + /** Blend shapes are relative to base weight. */ + BLEND_SHAPE_MODE_RELATIVE = 1, + } + enum MultimeshTransformFormat { + /** Use [Transform2D] to store MultiMesh transform. */ + MULTIMESH_TRANSFORM_2D = 0, + + /** Use [Transform3D] to store MultiMesh transform. */ + MULTIMESH_TRANSFORM_3D = 1, + } + enum LightProjectorFilter { + /** Nearest-neighbor filter for light projectors (use for pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. */ + LIGHT_PROJECTOR_FILTER_NEAREST = 0, + + /** Linear filter for light projectors (use for non-pixel art light projectors). No mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. */ + LIGHT_PROJECTOR_FILTER_LINEAR = 1, + + /** Nearest-neighbor filter for light projectors (use for pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. */ + LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS = 2, + + /** Linear filter for light projectors (use for non-pixel art light projectors). Isotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. */ + LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS = 3, + + /** Nearest-neighbor filter for light projectors (use for pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4, + + /** Linear filter for light projectors (use for non-pixel art light projectors). Anisotropic mipmaps are used for rendering, which means light projectors at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5, + } + enum LightType { + /** Directional (sun/moon) light (see [DirectionalLight3D]). */ + LIGHT_DIRECTIONAL = 0, + + /** Omni light (see [OmniLight3D]). */ + LIGHT_OMNI = 1, + + /** Spot light (see [SpotLight3D]). */ + LIGHT_SPOT = 2, + } + enum LightParam { + /** The light's energy multiplier. */ + LIGHT_PARAM_ENERGY = 0, + + /** The light's indirect energy multiplier (final indirect energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_INDIRECT_ENERGY]). */ + LIGHT_PARAM_INDIRECT_ENERGY = 1, + + /** The light's volumetric fog energy multiplier (final volumetric fog energy is [constant LIGHT_PARAM_ENERGY] * [constant LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY]). */ + LIGHT_PARAM_VOLUMETRIC_FOG_ENERGY = 2, + + /** The light's influence on specularity. */ + LIGHT_PARAM_SPECULAR = 3, + + /** The light's range. */ + LIGHT_PARAM_RANGE = 4, + + /** The size of the light when using spot light or omni light. The angular size of the light when using directional light. */ + LIGHT_PARAM_SIZE = 5, + + /** The light's attenuation. */ + LIGHT_PARAM_ATTENUATION = 6, + + /** The spotlight's angle. */ + LIGHT_PARAM_SPOT_ANGLE = 7, + + /** The spotlight's attenuation. */ + LIGHT_PARAM_SPOT_ATTENUATION = 8, + + /** The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). */ + LIGHT_PARAM_SHADOW_MAX_DISTANCE = 9, + + /** Proportion of shadow atlas occupied by the first split. */ + LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET = 10, + + /** Proportion of shadow atlas occupied by the second split. */ + LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET = 11, + + /** Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. */ + LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET = 12, + + /** Proportion of shadow max distance where the shadow will start to fade out. */ + LIGHT_PARAM_SHADOW_FADE_START = 13, + + /** Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. */ + LIGHT_PARAM_SHADOW_NORMAL_BIAS = 14, + + /** Bias the shadow lookup to fix self-shadowing artifacts. */ + LIGHT_PARAM_SHADOW_BIAS = 15, + + /** Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to `0` turns off the pancaking effect. */ + LIGHT_PARAM_SHADOW_PANCAKE_SIZE = 16, + + /** The light's shadow opacity. Values lower than `1.0` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. */ + LIGHT_PARAM_SHADOW_OPACITY = 17, + + /** Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. */ + LIGHT_PARAM_SHADOW_BLUR = 18, + LIGHT_PARAM_TRANSMITTANCE_BIAS = 19, + + /** Constant representing the intensity of the light, measured in Lumens when dealing with a [SpotLight3D] or [OmniLight3D], or measured in Lux with a [DirectionalLight3D]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`. */ + LIGHT_PARAM_INTENSITY = 20, + + /** Represents the size of the [enum LightParam] enum. */ + LIGHT_PARAM_MAX = 21, + } + enum LightBakeMode { + /** Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. */ + LIGHT_BAKE_DISABLED = 0, + + /** Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. */ + LIGHT_BAKE_STATIC = 1, + + /** Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant LIGHT_BAKE_STATIC]. This has a greater performance cost compared to [constant LIGHT_BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights]. */ + LIGHT_BAKE_DYNAMIC = 2, + } + enum LightOmniShadowMode { + /** Use a dual paraboloid shadow map for omni lights. */ + LIGHT_OMNI_SHADOW_DUAL_PARABOLOID = 0, + + /** Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. */ + LIGHT_OMNI_SHADOW_CUBE = 1, + } + enum LightDirectionalShadowMode { + /** Use orthogonal shadow projection for directional light. */ + LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL = 0, + + /** Use 2 splits for shadow projection when using directional light. */ + LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS = 1, + + /** Use 4 splits for shadow projection when using directional light. */ + LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS = 2, + } + enum LightDirectionalSkyMode { + /** Use DirectionalLight3D in both sky rendering and scene lighting. */ + LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_AND_SKY = 0, + + /** Only use DirectionalLight3D in scene lighting. */ + LIGHT_DIRECTIONAL_SKY_MODE_LIGHT_ONLY = 1, + + /** Only use DirectionalLight3D in sky rendering. */ + LIGHT_DIRECTIONAL_SKY_MODE_SKY_ONLY = 2, + } + enum ShadowQuality { + /** Lowest shadow filtering quality (fastest). Soft shadows are not available with this quality setting, which means the [member Light3D.shadow_blur] property is ignored if [member Light3D.light_size] and [member Light3D.light_angular_distance] is `0.0`. + * + * **Note:** The variable shadow blur performed by [member Light3D.light_size] and [member Light3D.light_angular_distance] is still effective when using hard shadow filtering. In this case, [member Light3D.shadow_blur] *is* taken into account. However, the results will not be blurred, instead the blur amount is treated as a maximum radius for the penumbra. + */ + SHADOW_QUALITY_HARD = 0, + + /** Very low shadow filtering quality (faster). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 0.75× to avoid introducing too much noise. This division only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`). */ + SHADOW_QUALITY_SOFT_VERY_LOW = 1, + + /** Low shadow filtering quality (fast). */ + SHADOW_QUALITY_SOFT_LOW = 2, + + /** Medium low shadow filtering quality (average). */ + SHADOW_QUALITY_SOFT_MEDIUM = 3, + + /** High low shadow filtering quality (slow). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 1.5× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`). */ + SHADOW_QUALITY_SOFT_HIGH = 4, + + /** Highest low shadow filtering quality (slowest). When using this quality setting, [member Light3D.shadow_blur] is automatically multiplied by 2× to better make use of the high sample count. This increased blur also improves the stability of dynamic object shadows. This multiplier only applies to lights whose [member Light3D.light_size] or [member Light3D.light_angular_distance] is `0.0`). */ + SHADOW_QUALITY_SOFT_ULTRA = 5, + + /** Represents the size of the [enum ShadowQuality] enum. */ + SHADOW_QUALITY_MAX = 6, + } + enum ReflectionProbeUpdateMode { + /** Reflection probe will update reflections once and then stop. */ + REFLECTION_PROBE_UPDATE_ONCE = 0, + + /** Reflection probe will update each frame. This mode is necessary to capture moving objects. */ + REFLECTION_PROBE_UPDATE_ALWAYS = 1, + } + enum ReflectionProbeAmbientMode { + /** Do not apply any ambient lighting inside the reflection probe's box defined by its size. */ + REFLECTION_PROBE_AMBIENT_DISABLED = 0, + + /** Apply automatically-sourced environment lighting inside the reflection probe's box defined by its size. */ + REFLECTION_PROBE_AMBIENT_ENVIRONMENT = 1, + + /** Apply custom ambient lighting inside the reflection probe's box defined by its size. See [method reflection_probe_set_ambient_color] and [method reflection_probe_set_ambient_energy]. */ + REFLECTION_PROBE_AMBIENT_COLOR = 2, + } + enum DecalTexture { + /** Albedo texture slot in a decal ([member Decal.texture_albedo]). */ + DECAL_TEXTURE_ALBEDO = 0, + + /** Normal map texture slot in a decal ([member Decal.texture_normal]). */ + DECAL_TEXTURE_NORMAL = 1, + + /** Occlusion/Roughness/Metallic texture slot in a decal ([member Decal.texture_orm]). */ + DECAL_TEXTURE_ORM = 2, + + /** Emission texture slot in a decal ([member Decal.texture_emission]). */ + DECAL_TEXTURE_EMISSION = 3, + + /** Represents the size of the [enum DecalTexture] enum. */ + DECAL_TEXTURE_MAX = 4, + } + enum DecalFilter { + /** Nearest-neighbor filter for decals (use for pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look sharp but grainy. This has roughly the same performance cost as using mipmaps. */ + DECAL_FILTER_NEAREST = 0, + + /** Linear filter for decals (use for non-pixel art decals). No mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as using mipmaps. */ + DECAL_FILTER_LINEAR = 1, + + /** Nearest-neighbor filter for decals (use for pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. */ + DECAL_FILTER_NEAREST_MIPMAPS = 2, + + /** Linear filter for decals (use for non-pixel art decals). Isotropic mipmaps are used for rendering, which means decals at a distance will look smooth but blurry. This has roughly the same performance cost as not using mipmaps. */ + DECAL_FILTER_LINEAR_MIPMAPS = 3, + + /** Nearest-neighbor filter for decals (use for pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + DECAL_FILTER_NEAREST_MIPMAPS_ANISOTROPIC = 4, + + /** Linear filter for decals (use for non-pixel art decals). Anisotropic mipmaps are used for rendering, which means decals at a distance will look smooth and sharp when viewed from oblique angles. This looks better compared to isotropic mipmaps, but is slower. The level of anisotropic filtering is defined by [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC = 5, + } + enum VoxelGIQuality { + /** Low [VoxelGI] rendering quality using 4 cones. */ + VOXEL_GI_QUALITY_LOW = 0, + + /** High [VoxelGI] rendering quality using 6 cones. */ + VOXEL_GI_QUALITY_HIGH = 1, + } + enum ParticlesMode { + /** 2D particles. */ + PARTICLES_MODE_2D = 0, + + /** 3D particles. */ + PARTICLES_MODE_3D = 1, + } + enum ParticlesTransformAlign { + PARTICLES_TRANSFORM_ALIGN_DISABLED = 0, + PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD = 1, + PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY = 2, + PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY = 3, + } + enum ParticlesDrawOrder { + /** Draw particles in the order that they appear in the particles array. */ + PARTICLES_DRAW_ORDER_INDEX = 0, + + /** Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front. */ + PARTICLES_DRAW_ORDER_LIFETIME = 1, + + /** Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front. */ + PARTICLES_DRAW_ORDER_REVERSE_LIFETIME = 2, + + /** Sort particles based on their distance to the camera. */ + PARTICLES_DRAW_ORDER_VIEW_DEPTH = 3, + } + enum ParticlesCollisionType { + PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT = 0, + PARTICLES_COLLISION_TYPE_BOX_ATTRACT = 1, + PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT = 2, + PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE = 3, + PARTICLES_COLLISION_TYPE_BOX_COLLIDE = 4, + PARTICLES_COLLISION_TYPE_SDF_COLLIDE = 5, + PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE = 6, + } + enum ParticlesCollisionHeightfieldResolution { + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256 = 0, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512 = 1, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024 = 2, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048 = 3, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096 = 4, + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192 = 5, + + /** Represents the size of the [enum ParticlesCollisionHeightfieldResolution] enum. */ + PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX = 6, + } + enum FogVolumeShape { + /** [FogVolume] will be shaped like an ellipsoid (stretched sphere). */ + FOG_VOLUME_SHAPE_ELLIPSOID = 0, + + /** [FogVolume] will be shaped like a cone pointing upwards (in local coordinates). The cone's angle is set automatically to fill the size. The cone will be adjusted to fit within the size. Rotate the [FogVolume] node to reorient the cone. Non-uniform scaling via size is not supported (scale the [FogVolume] node instead). */ + FOG_VOLUME_SHAPE_CONE = 1, + + /** [FogVolume] will be shaped like an upright cylinder (in local coordinates). Rotate the [FogVolume] node to reorient the cylinder. The cylinder will be adjusted to fit within the size. Non-uniform scaling via size is not supported (scale the [FogVolume] node instead). */ + FOG_VOLUME_SHAPE_CYLINDER = 2, + + /** [FogVolume] will be shaped like a box. */ + FOG_VOLUME_SHAPE_BOX = 3, + + /** [FogVolume] will have no shape, will cover the whole world and will not be culled. */ + FOG_VOLUME_SHAPE_WORLD = 4, + + /** Represents the size of the [enum FogVolumeShape] enum. */ + FOG_VOLUME_SHAPE_MAX = 5, + } + enum ViewportScaling3DMode { + /** Use bilinear scaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will result in undersampling while values greater than `1.0` will result in supersampling. A value of `1.0` disables scaling. */ + VIEWPORT_SCALING_3D_MODE_BILINEAR = 0, + + /** Use AMD FidelityFX Super Resolution 1.0 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will be result in the viewport being upscaled using FSR. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling. */ + VIEWPORT_SCALING_3D_MODE_FSR = 1, + + /** Use AMD FidelityFX Super Resolution 2.2 upscaling for the viewport's 3D buffer. The amount of scaling can be set using [member Viewport.scaling_3d_scale]. Values less than `1.0` will be result in the viewport being upscaled using FSR2. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` will use FSR2 at native resolution as a TAA solution. */ + VIEWPORT_SCALING_3D_MODE_FSR2 = 2, + + /** Represents the size of the [enum ViewportScaling3DMode] enum. */ + VIEWPORT_SCALING_3D_MODE_MAX = 3, + } + enum ViewportUpdateMode { + /** Do not update the viewport's render target. */ + VIEWPORT_UPDATE_DISABLED = 0, + + /** Update the viewport's render target once, then switch to [constant VIEWPORT_UPDATE_DISABLED]. */ + VIEWPORT_UPDATE_ONCE = 1, + + /** Update the viewport's render target only when it is visible. This is the default value. */ + VIEWPORT_UPDATE_WHEN_VISIBLE = 2, + + /** Update the viewport's render target only when its parent is visible. */ + VIEWPORT_UPDATE_WHEN_PARENT_VISIBLE = 3, + + /** Always update the viewport's render target. */ + VIEWPORT_UPDATE_ALWAYS = 4, + } + enum ViewportClearMode { + /** Always clear the viewport's render target before drawing. */ + VIEWPORT_CLEAR_ALWAYS = 0, + + /** Never clear the viewport's render target. */ + VIEWPORT_CLEAR_NEVER = 1, + + /** Clear the viewport's render target on the next frame, then switch to [constant VIEWPORT_CLEAR_NEVER]. */ + VIEWPORT_CLEAR_ONLY_NEXT_FRAME = 2, + } + enum ViewportEnvironmentMode { + /** Disable rendering of 3D environment over 2D canvas. */ + VIEWPORT_ENVIRONMENT_DISABLED = 0, + + /** Enable rendering of 3D environment over 2D canvas. */ + VIEWPORT_ENVIRONMENT_ENABLED = 1, + + /** Inherit enable/disable value from parent. If the topmost parent is also set to [constant VIEWPORT_ENVIRONMENT_INHERIT], then this has the same behavior as [constant VIEWPORT_ENVIRONMENT_ENABLED]. */ + VIEWPORT_ENVIRONMENT_INHERIT = 2, + + /** Represents the size of the [enum ViewportEnvironmentMode] enum. */ + VIEWPORT_ENVIRONMENT_MAX = 3, + } + enum ViewportSDFOversize { + /** Do not oversize the 2D signed distance field. Occluders may disappear when touching the viewport's edges, and [GPUParticles3D] collision may stop working earlier than intended. This has the lowest GPU requirements. */ + VIEWPORT_SDF_OVERSIZE_100_PERCENT = 0, + + /** 2D signed distance field covers 20% of the viewport's size outside the viewport on each side (top, right, bottom, left). */ + VIEWPORT_SDF_OVERSIZE_120_PERCENT = 1, + + /** 2D signed distance field covers 50% of the viewport's size outside the viewport on each side (top, right, bottom, left). */ + VIEWPORT_SDF_OVERSIZE_150_PERCENT = 2, + + /** 2D signed distance field covers 100% of the viewport's size outside the viewport on each side (top, right, bottom, left). This has the highest GPU requirements. */ + VIEWPORT_SDF_OVERSIZE_200_PERCENT = 3, + + /** Represents the size of the [enum ViewportSDFOversize] enum. */ + VIEWPORT_SDF_OVERSIZE_MAX = 4, + } + enum ViewportSDFScale { + /** Full resolution 2D signed distance field scale. This has the highest GPU requirements. */ + VIEWPORT_SDF_SCALE_100_PERCENT = 0, + + /** Half resolution 2D signed distance field scale on each axis (25% of the viewport pixel count). */ + VIEWPORT_SDF_SCALE_50_PERCENT = 1, + + /** Quarter resolution 2D signed distance field scale on each axis (6.25% of the viewport pixel count). This has the lowest GPU requirements. */ + VIEWPORT_SDF_SCALE_25_PERCENT = 2, + + /** Represents the size of the [enum ViewportSDFScale] enum. */ + VIEWPORT_SDF_SCALE_MAX = 3, + } + enum ViewportMSAA { + /** Multisample antialiasing for 3D is disabled. This is the default value, and also the fastest setting. */ + VIEWPORT_MSAA_DISABLED = 0, + + /** Multisample antialiasing uses 2 samples per pixel for 3D. This has a moderate impact on performance. */ + VIEWPORT_MSAA_2X = 1, + + /** Multisample antialiasing uses 4 samples per pixel for 3D. This has a high impact on performance. */ + VIEWPORT_MSAA_4X = 2, + + /** Multisample antialiasing uses 8 samples per pixel for 3D. This has a very high impact on performance. Likely unsupported on low-end and older hardware. */ + VIEWPORT_MSAA_8X = 3, + + /** Represents the size of the [enum ViewportMSAA] enum. */ + VIEWPORT_MSAA_MAX = 4, + } + enum ViewportScreenSpaceAA { + /** Do not perform any antialiasing in the full screen post-process. */ + VIEWPORT_SCREEN_SPACE_AA_DISABLED = 0, + + /** Use fast approximate antialiasing. FXAA is a popular screen-space antialiasing method, which is fast but will make the image look blurry, especially at lower resolutions. It can still work relatively well at large resolutions such as 1440p and 4K. */ + VIEWPORT_SCREEN_SPACE_AA_FXAA = 1, + + /** Represents the size of the [enum ViewportScreenSpaceAA] enum. */ + VIEWPORT_SCREEN_SPACE_AA_MAX = 2, + } + enum ViewportOcclusionCullingBuildQuality { + /** Low occlusion culling BVH build quality (as defined by Embree). Results in the lowest CPU usage, but least effective culling. */ + VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW = 0, + + /** Medium occlusion culling BVH build quality (as defined by Embree). */ + VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM = 1, + + /** High occlusion culling BVH build quality (as defined by Embree). Results in the highest CPU usage, but most effective culling. */ + VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH = 2, + } + enum ViewportRenderInfo { + /** Number of objects drawn in a single frame. */ + VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME = 0, + + /** Number of points, lines, or triangles drawn in a single frame. */ + VIEWPORT_RENDER_INFO_PRIMITIVES_IN_FRAME = 1, + + /** Number of draw calls during this frame. */ + VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME = 2, + + /** Represents the size of the [enum ViewportRenderInfo] enum. */ + VIEWPORT_RENDER_INFO_MAX = 3, + } + enum ViewportRenderInfoType { + /** Visible render pass (excluding shadows). */ + VIEWPORT_RENDER_INFO_TYPE_VISIBLE = 0, + + /** Shadow render pass. Objects will be rendered several times depending on the number of amounts of lights with shadows and the number of directional shadow splits. */ + VIEWPORT_RENDER_INFO_TYPE_SHADOW = 1, + + /** Canvas item rendering. This includes all 2D rendering. */ + VIEWPORT_RENDER_INFO_TYPE_CANVAS = 2, + + /** Represents the size of the [enum ViewportRenderInfoType] enum. */ + VIEWPORT_RENDER_INFO_TYPE_MAX = 3, + } + enum ViewportDebugDraw { + /** Debug draw is disabled. Default setting. */ + VIEWPORT_DEBUG_DRAW_DISABLED = 0, + + /** Objects are displayed without light information. */ + VIEWPORT_DEBUG_DRAW_UNSHADED = 1, + + /** Objects are displayed with only light information. */ + VIEWPORT_DEBUG_DRAW_LIGHTING = 2, + + /** Objects are displayed semi-transparent with additive blending so you can see where they are drawing over top of one another. A higher overdraw (represented by brighter colors) means you are wasting performance on drawing pixels that are being hidden behind others. + * + * **Note:** When using this debug draw mode, custom shaders will be ignored. This means vertex displacement won't be visible anymore. + */ + VIEWPORT_DEBUG_DRAW_OVERDRAW = 3, + + /** Debug draw draws objects in wireframe. */ + VIEWPORT_DEBUG_DRAW_WIREFRAME = 4, + + /** Normal buffer is drawn instead of regular scene so you can see the per-pixel normals that will be used by post-processing effects. */ + VIEWPORT_DEBUG_DRAW_NORMAL_BUFFER = 5, + + /** Objects are displayed with only the albedo value from [VoxelGI]s. */ + VIEWPORT_DEBUG_DRAW_VOXEL_GI_ALBEDO = 6, + + /** Objects are displayed with only the lighting value from [VoxelGI]s. */ + VIEWPORT_DEBUG_DRAW_VOXEL_GI_LIGHTING = 7, + + /** Objects are displayed with only the emission color from [VoxelGI]s. */ + VIEWPORT_DEBUG_DRAW_VOXEL_GI_EMISSION = 8, + + /** Draws the shadow atlas that stores shadows from [OmniLight3D]s and [SpotLight3D]s in the upper left quadrant of the [Viewport]. */ + VIEWPORT_DEBUG_DRAW_SHADOW_ATLAS = 9, + + /** Draws the shadow atlas that stores shadows from [DirectionalLight3D]s in the upper left quadrant of the [Viewport]. + * The slice of the camera frustum related to the shadow map cascade is superimposed to visualize coverage. The color of each slice matches the colors used for [constant VIEWPORT_DEBUG_DRAW_PSSM_SPLITS]. When shadow cascades are blended the overlap is taken into account when drawing the frustum slices. + * The last cascade shows all frustum slices to illustrate the coverage of all slices. + */ + VIEWPORT_DEBUG_DRAW_DIRECTIONAL_SHADOW_ATLAS = 10, + + /** Draws the estimated scene luminance. This is a 1×1 texture that is generated when autoexposure is enabled to control the scene's exposure. */ + VIEWPORT_DEBUG_DRAW_SCENE_LUMINANCE = 11, + + /** Draws the screen space ambient occlusion texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssao_enabled] set in your [WorldEnvironment]. */ + VIEWPORT_DEBUG_DRAW_SSAO = 12, + + /** Draws the screen space indirect lighting texture instead of the scene so that you can clearly see how it is affecting objects. In order for this display mode to work, you must have [member Environment.ssil_enabled] set in your [WorldEnvironment]. */ + VIEWPORT_DEBUG_DRAW_SSIL = 13, + + /** Colors each PSSM split for the [DirectionalLight3D]s in the scene a different color so you can see where the splits are. In order they will be colored red, green, blue, yellow. */ + VIEWPORT_DEBUG_DRAW_PSSM_SPLITS = 14, + + /** Draws the decal atlas that stores decal textures from [Decal]s. */ + VIEWPORT_DEBUG_DRAW_DECAL_ATLAS = 15, + + /** Draws SDFGI cascade data. This is the data structure that is used to bounce lighting against and create reflections. */ + VIEWPORT_DEBUG_DRAW_SDFGI = 16, + + /** Draws SDFGI probe data. This is the data structure that is used to give indirect lighting dynamic objects moving within the scene. */ + VIEWPORT_DEBUG_DRAW_SDFGI_PROBES = 17, + + /** Draws the global illumination buffer ([VoxelGI] or SDFGI). */ + VIEWPORT_DEBUG_DRAW_GI_BUFFER = 18, + + /** Disable mesh LOD. All meshes are drawn with full detail, which can be used to compare performance. */ + VIEWPORT_DEBUG_DRAW_DISABLE_LOD = 19, + + /** Draws the [OmniLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. */ + VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS = 20, + + /** Draws the [SpotLight3D] cluster. Clustering determines where lights are positioned in screen-space, which allows the engine to only process these portions of the screen for lighting. */ + VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS = 21, + + /** Draws the [Decal] cluster. Clustering determines where decals are positioned in screen-space, which allows the engine to only process these portions of the screen for decals. */ + VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS = 22, + + /** Draws the [ReflectionProbe] cluster. Clustering determines where reflection probes are positioned in screen-space, which allows the engine to only process these portions of the screen for reflection probes. */ + VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES = 23, + + /** Draws the occlusion culling buffer. This low-resolution occlusion culling buffer is rasterized on the CPU and is used to check whether instances are occluded by other objects. */ + VIEWPORT_DEBUG_DRAW_OCCLUDERS = 24, + + /** Draws the motion vectors buffer. This is used by temporal antialiasing to correct for motion that occurs during gameplay. */ + VIEWPORT_DEBUG_DRAW_MOTION_VECTORS = 25, + + /** Internal buffer is drawn instead of regular scene so you can see the per-pixel output that will be used by post-processing effects. */ + VIEWPORT_DEBUG_DRAW_INTERNAL_BUFFER = 26, + } + enum ViewportVRSMode { + /** Variable rate shading is disabled. */ + VIEWPORT_VRS_DISABLED = 0, + + /** Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. */ + VIEWPORT_VRS_TEXTURE = 1, + + /** Variable rate shading texture is supplied by the primary [XRInterface]. Note that this may override the update mode. */ + VIEWPORT_VRS_XR = 2, + + /** Represents the size of the [enum ViewportVRSMode] enum. */ + VIEWPORT_VRS_MAX = 3, + } + enum ViewportVRSUpdateMode { + /** The input texture for variable rate shading will not be processed. */ + VIEWPORT_VRS_UPDATE_DISABLED = 0, + + /** The input texture for variable rate shading will be processed once. */ + VIEWPORT_VRS_UPDATE_ONCE = 1, + + /** The input texture for variable rate shading will be processed each frame. */ + VIEWPORT_VRS_UPDATE_ALWAYS = 2, + + /** Represents the size of the [enum ViewportVRSUpdateMode] enum. */ + VIEWPORT_VRS_UPDATE_MAX = 3, + } + enum SkyMode { + /** Automatically selects the appropriate process mode based on your sky shader. If your shader uses `TIME` or `POSITION`, this will use [constant SKY_MODE_REALTIME]. If your shader uses any of the `LIGHT_*` variables or any custom uniforms, this uses [constant SKY_MODE_INCREMENTAL]. Otherwise, this defaults to [constant SKY_MODE_QUALITY]. */ + SKY_MODE_AUTOMATIC = 0, + + /** Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant SKY_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples]. */ + SKY_MODE_QUALITY = 1, + + /** Uses the same high quality importance sampling to process the radiance map as [constant SKY_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly. */ + SKY_MODE_INCREMENTAL = 2, + + /** Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality]. + * + * **Note:** The fast filtering algorithm is limited to 256×256 cubemaps, so [method sky_set_radiance_size] must be set to `256`. Otherwise, a warning is printed and the overridden radiance size is ignored. + */ + SKY_MODE_REALTIME = 3, + } + enum CompositorEffectFlags { + /** The rendering effect requires the color buffer to be resolved if MSAA is enabled. */ + COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_COLOR = 1, + + /** The rendering effect requires the depth buffer to be resolved if MSAA is enabled. */ + COMPOSITOR_EFFECT_FLAG_ACCESS_RESOLVED_DEPTH = 2, + + /** The rendering effect requires motion vectors to be produced. */ + COMPOSITOR_EFFECT_FLAG_NEEDS_MOTION_VECTORS = 4, + + /** The rendering effect requires normals and roughness g-buffer to be produced (Forward+ only). */ + COMPOSITOR_EFFECT_FLAG_NEEDS_ROUGHNESS = 8, + + /** The rendering effect requires specular data to be separated out (Forward+ only). */ + COMPOSITOR_EFFECT_FLAG_NEEDS_SEPARATE_SPECULAR = 16, + } + enum CompositorEffectCallbackType { + /** The callback is called before our opaque rendering pass, but after depth prepass (if applicable). */ + COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_OPAQUE = 0, + + /** The callback is called after our opaque rendering pass, but before our sky is rendered. */ + COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_OPAQUE = 1, + + /** The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). */ + COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_SKY = 2, + + /** The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. */ + COMPOSITOR_EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT = 3, + + /** The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. */ + COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT = 4, + COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY = -1, + } + enum EnvironmentBG { + /** Use the clear color as background. */ + ENV_BG_CLEAR_COLOR = 0, + + /** Use a specified color as the background. */ + ENV_BG_COLOR = 1, + + /** Use a sky resource for the background. */ + ENV_BG_SKY = 2, + + /** Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. */ + ENV_BG_CANVAS = 3, + + /** Do not clear the background, use whatever was rendered last frame as the background. */ + ENV_BG_KEEP = 4, + + /** Displays a camera feed in the background. */ + ENV_BG_CAMERA_FEED = 5, + + /** Represents the size of the [enum EnvironmentBG] enum. */ + ENV_BG_MAX = 6, + } + enum EnvironmentAmbientSource { + /** Gather ambient light from whichever source is specified as the background. */ + ENV_AMBIENT_SOURCE_BG = 0, + + /** Disable ambient light. */ + ENV_AMBIENT_SOURCE_DISABLED = 1, + + /** Specify a specific [Color] for ambient light. */ + ENV_AMBIENT_SOURCE_COLOR = 2, + + /** Gather ambient light from the [Sky] regardless of what the background is. */ + ENV_AMBIENT_SOURCE_SKY = 3, + } + enum EnvironmentReflectionSource { + /** Use the background for reflections. */ + ENV_REFLECTION_SOURCE_BG = 0, + + /** Disable reflections. */ + ENV_REFLECTION_SOURCE_DISABLED = 1, + + /** Use the [Sky] for reflections regardless of what the background is. */ + ENV_REFLECTION_SOURCE_SKY = 2, + } + enum EnvironmentGlowBlendMode { + /** Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. */ + ENV_GLOW_BLEND_MODE_ADDITIVE = 0, + + /** Screen glow blending mode. Increases brightness, used frequently with bloom. */ + ENV_GLOW_BLEND_MODE_SCREEN = 1, + + /** Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). */ + ENV_GLOW_BLEND_MODE_SOFTLIGHT = 2, + + /** Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. */ + ENV_GLOW_BLEND_MODE_REPLACE = 3, + + /** Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. */ + ENV_GLOW_BLEND_MODE_MIX = 4, + } + enum EnvironmentFogMode { + /** Use a physically-based fog model defined primarily by fog density. */ + ENV_FOG_MODE_EXPONENTIAL = 0, + + /** Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. */ + ENV_FOG_MODE_DEPTH = 1, + } + enum EnvironmentToneMapper { + /** Output color as they came in. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. */ + ENV_TONE_MAPPER_LINEAR = 0, + + /** Use the Reinhard tonemapper. Performs a variation on rendered pixels' colors by this formula: `color = color / (1 + color)`. This avoids clipping bright highlights, but the resulting image can look a bit dull. */ + ENV_TONE_MAPPER_REINHARD = 1, + + /** Use the filmic tonemapper. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant ENV_TONE_MAPPER_REINHARD]. */ + ENV_TONE_MAPPER_FILMIC = 2, + + /** Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant ENV_TONE_MAPPER_REINHARD] and [constant ENV_TONE_MAPPER_FILMIC]. + * + * **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. + */ + ENV_TONE_MAPPER_ACES = 3, + } + enum EnvironmentSSRRoughnessQuality { + /** Lowest quality of roughness filter for screen-space reflections. Rough materials will not have blurrier screen-space reflections compared to smooth (non-rough) materials. This is the fastest option. */ + ENV_SSR_ROUGHNESS_QUALITY_DISABLED = 0, + + /** Low quality of roughness filter for screen-space reflections. */ + ENV_SSR_ROUGHNESS_QUALITY_LOW = 1, + + /** Medium quality of roughness filter for screen-space reflections. */ + ENV_SSR_ROUGHNESS_QUALITY_MEDIUM = 2, + + /** High quality of roughness filter for screen-space reflections. This is the slowest option. */ + ENV_SSR_ROUGHNESS_QUALITY_HIGH = 3, + } + enum EnvironmentSSAOQuality { + /** Lowest quality of screen-space ambient occlusion. */ + ENV_SSAO_QUALITY_VERY_LOW = 0, + + /** Low quality screen-space ambient occlusion. */ + ENV_SSAO_QUALITY_LOW = 1, + + /** Medium quality screen-space ambient occlusion. */ + ENV_SSAO_QUALITY_MEDIUM = 2, + + /** High quality screen-space ambient occlusion. */ + ENV_SSAO_QUALITY_HIGH = 3, + + /** Highest quality screen-space ambient occlusion. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. */ + ENV_SSAO_QUALITY_ULTRA = 4, + } + enum EnvironmentSSILQuality { + /** Lowest quality of screen-space indirect lighting. */ + ENV_SSIL_QUALITY_VERY_LOW = 0, + + /** Low quality screen-space indirect lighting. */ + ENV_SSIL_QUALITY_LOW = 1, + + /** High quality screen-space indirect lighting. */ + ENV_SSIL_QUALITY_MEDIUM = 2, + + /** High quality screen-space indirect lighting. */ + ENV_SSIL_QUALITY_HIGH = 3, + + /** Highest quality screen-space indirect lighting. Uses the adaptive target setting which can be dynamically adjusted to smoothly balance performance and visual quality. */ + ENV_SSIL_QUALITY_ULTRA = 4, + } + enum EnvironmentSDFGIYScale { + /** Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. */ + ENV_SDFGI_Y_SCALE_50_PERCENT = 0, + + /** Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. */ + ENV_SDFGI_Y_SCALE_75_PERCENT = 1, + + /** Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. */ + ENV_SDFGI_Y_SCALE_100_PERCENT = 2, + } + enum EnvironmentSDFGIRayCount { + /** Throw 4 rays per frame when converging SDFGI. This has the lowest GPU requirements, but creates the most noisy result. */ + ENV_SDFGI_RAY_COUNT_4 = 0, + + /** Throw 8 rays per frame when converging SDFGI. */ + ENV_SDFGI_RAY_COUNT_8 = 1, + + /** Throw 16 rays per frame when converging SDFGI. */ + ENV_SDFGI_RAY_COUNT_16 = 2, + + /** Throw 32 rays per frame when converging SDFGI. */ + ENV_SDFGI_RAY_COUNT_32 = 3, + + /** Throw 64 rays per frame when converging SDFGI. */ + ENV_SDFGI_RAY_COUNT_64 = 4, + + /** Throw 96 rays per frame when converging SDFGI. This has high GPU requirements. */ + ENV_SDFGI_RAY_COUNT_96 = 5, + + /** Throw 128 rays per frame when converging SDFGI. This has very high GPU requirements, but creates the least noisy result. */ + ENV_SDFGI_RAY_COUNT_128 = 6, + + /** Represents the size of the [enum EnvironmentSDFGIRayCount] enum. */ + ENV_SDFGI_RAY_COUNT_MAX = 7, + } + enum EnvironmentSDFGIFramesToConverge { + /** Converge SDFGI over 5 frames. This is the most responsive, but creates the most noisy result with a given ray count. */ + ENV_SDFGI_CONVERGE_IN_5_FRAMES = 0, + + /** Configure SDFGI to fully converge over 10 frames. */ + ENV_SDFGI_CONVERGE_IN_10_FRAMES = 1, + + /** Configure SDFGI to fully converge over 15 frames. */ + ENV_SDFGI_CONVERGE_IN_15_FRAMES = 2, + + /** Configure SDFGI to fully converge over 20 frames. */ + ENV_SDFGI_CONVERGE_IN_20_FRAMES = 3, + + /** Configure SDFGI to fully converge over 25 frames. */ + ENV_SDFGI_CONVERGE_IN_25_FRAMES = 4, + + /** Configure SDFGI to fully converge over 30 frames. This is the least responsive, but creates the least noisy result with a given ray count. */ + ENV_SDFGI_CONVERGE_IN_30_FRAMES = 5, + + /** Represents the size of the [enum EnvironmentSDFGIFramesToConverge] enum. */ + ENV_SDFGI_CONVERGE_MAX = 6, + } + enum EnvironmentSDFGIFramesToUpdateLight { + /** Update indirect light from dynamic lights in SDFGI over 1 frame. This is the most responsive, but has the highest GPU requirements. */ + ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME = 0, + + /** Update indirect light from dynamic lights in SDFGI over 2 frames. */ + ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES = 1, + + /** Update indirect light from dynamic lights in SDFGI over 4 frames. */ + ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES = 2, + + /** Update indirect light from dynamic lights in SDFGI over 8 frames. */ + ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES = 3, + + /** Update indirect light from dynamic lights in SDFGI over 16 frames. This is the least responsive, but has the lowest GPU requirements. */ + ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES = 4, + + /** Represents the size of the [enum EnvironmentSDFGIFramesToUpdateLight] enum. */ + ENV_SDFGI_UPDATE_LIGHT_MAX = 5, + } + enum SubSurfaceScatteringQuality { + /** Disables subsurface scattering entirely, even on materials that have [member BaseMaterial3D.subsurf_scatter_enabled] set to `true`. This has the lowest GPU requirements. */ + SUB_SURFACE_SCATTERING_QUALITY_DISABLED = 0, + + /** Low subsurface scattering quality. */ + SUB_SURFACE_SCATTERING_QUALITY_LOW = 1, + + /** Medium subsurface scattering quality. */ + SUB_SURFACE_SCATTERING_QUALITY_MEDIUM = 2, + + /** High subsurface scattering quality. This has the highest GPU requirements. */ + SUB_SURFACE_SCATTERING_QUALITY_HIGH = 3, + } + enum DOFBokehShape { + /** Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. */ + DOF_BOKEH_BOX = 0, + + /** Calculates DOF blur using a hexagon shaped filter. */ + DOF_BOKEH_HEXAGON = 1, + + /** Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). */ + DOF_BOKEH_CIRCLE = 2, + } + enum DOFBlurQuality { + /** Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. */ + DOF_BLUR_QUALITY_VERY_LOW = 0, + + /** Low quality DOF blur. */ + DOF_BLUR_QUALITY_LOW = 1, + + /** Medium quality DOF blur. */ + DOF_BLUR_QUALITY_MEDIUM = 2, + + /** Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. */ + DOF_BLUR_QUALITY_HIGH = 3, + } + enum InstanceType { + /** The instance does not have a type. */ + INSTANCE_NONE = 0, + + /** The instance is a mesh. */ + INSTANCE_MESH = 1, + + /** The instance is a multimesh. */ + INSTANCE_MULTIMESH = 2, + + /** The instance is a particle emitter. */ + INSTANCE_PARTICLES = 3, + + /** The instance is a GPUParticles collision shape. */ + INSTANCE_PARTICLES_COLLISION = 4, + + /** The instance is a light. */ + INSTANCE_LIGHT = 5, + + /** The instance is a reflection probe. */ + INSTANCE_REFLECTION_PROBE = 6, + + /** The instance is a decal. */ + INSTANCE_DECAL = 7, + + /** The instance is a VoxelGI. */ + INSTANCE_VOXEL_GI = 8, + + /** The instance is a lightmap. */ + INSTANCE_LIGHTMAP = 9, + + /** The instance is an occlusion culling occluder. */ + INSTANCE_OCCLUDER = 10, + + /** The instance is a visible on-screen notifier. */ + INSTANCE_VISIBLITY_NOTIFIER = 11, + + /** The instance is a fog volume. */ + INSTANCE_FOG_VOLUME = 12, + + /** Represents the size of the [enum InstanceType] enum. */ + INSTANCE_MAX = 13, + + /** A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). */ + INSTANCE_GEOMETRY_MASK = 14, + } + enum InstanceFlags { + /** Allows the instance to be used in baked lighting. */ + INSTANCE_FLAG_USE_BAKED_LIGHT = 0, + + /** Allows the instance to be used with dynamic global illumination. */ + INSTANCE_FLAG_USE_DYNAMIC_GI = 1, + + /** When set, manually requests to draw geometry on next frame. */ + INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = 2, + + /** Always draw, even if the instance would be culled by occlusion culling. Does not affect view frustum culling. */ + INSTANCE_FLAG_IGNORE_OCCLUSION_CULLING = 3, + + /** Represents the size of the [enum InstanceFlags] enum. */ + INSTANCE_FLAG_MAX = 4, + } + enum ShadowCastingSetting { + /** Disable shadows from this instance. */ + SHADOW_CASTING_SETTING_OFF = 0, + + /** Cast shadows from this instance. */ + SHADOW_CASTING_SETTING_ON = 1, + + /** Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. */ + SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2, + + /** Only render the shadows from the object. The object itself will not be drawn. */ + SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3, + } + enum VisibilityRangeFadeMode { + /** Disable visibility range fading for the given instance. */ + VISIBILITY_RANGE_FADE_DISABLED = 0, + + /** Fade-out the given instance when it approaches its visibility range limits. */ + VISIBILITY_RANGE_FADE_SELF = 1, + + /** Fade-in the given instance's dependencies when reaching its visibility range limits. */ + VISIBILITY_RANGE_FADE_DEPENDENCIES = 2, + } + enum BakeChannels { + /** Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains albedo color in the `.rgb` channels and alpha in the `.a` channel. */ + BAKE_CHANNEL_ALBEDO_ALPHA = 0, + + /** Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains the per-pixel normal of the object in the `.rgb` channels and nothing in the `.a` channel. The per-pixel normal is encoded as `normal * 0.5 + 0.5`. */ + BAKE_CHANNEL_NORMAL = 1, + + /** Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBA8] and contains ambient occlusion (from material and decals only) in the `.r` channel, roughness in the `.g` channel, metallic in the `.b` channel and sub surface scattering amount in the `.a` channel. */ + BAKE_CHANNEL_ORM = 2, + + /** Index of [Image] in array of [Image]s returned by [method bake_render_uv2]. Image uses [constant Image.FORMAT_RGBAH] and contains emission color in the `.rgb` channels and nothing in the `.a` channel. */ + BAKE_CHANNEL_EMISSION = 3, + } + enum CanvasTextureChannel { + /** Diffuse canvas texture ([member CanvasTexture.diffuse_texture]). */ + CANVAS_TEXTURE_CHANNEL_DIFFUSE = 0, + + /** Normal map canvas texture ([member CanvasTexture.normal_texture]). */ + CANVAS_TEXTURE_CHANNEL_NORMAL = 1, + + /** Specular map canvas texture ([member CanvasTexture.specular_texture]). */ + CANVAS_TEXTURE_CHANNEL_SPECULAR = 2, + } + enum NinePatchAxisMode { + /** The nine patch gets stretched where needed. */ + NINE_PATCH_STRETCH = 0, + + /** The nine patch gets filled with tiles where needed. */ + NINE_PATCH_TILE = 1, + + /** The nine patch gets filled with tiles where needed and stretches them a bit if needed. */ + NINE_PATCH_TILE_FIT = 2, + } + enum CanvasItemTextureFilter { + /** Uses the default filter mode for this [Viewport]. */ + CANVAS_ITEM_TEXTURE_FILTER_DEFAULT = 0, + + /** The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). */ + CANVAS_ITEM_TEXTURE_FILTER_NEAREST = 1, + + /** The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). */ + CANVAS_ITEM_TEXTURE_FILTER_LINEAR = 2, + + /** The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance. + * Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + */ + CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3, + + /** The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance. + * Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + */ + CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 4, + + /** The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + * + * **Note:** This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case. + */ + CANVAS_ITEM_TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 5, + + /** The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + * + * **Note:** This texture filter is rarely useful in 2D projects. [constant CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case. + */ + CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 6, + + /** Max value for [enum CanvasItemTextureFilter] enum. */ + CANVAS_ITEM_TEXTURE_FILTER_MAX = 7, + } + enum CanvasItemTextureRepeat { + /** Uses the default repeat mode for this [Viewport]. */ + CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT = 0, + + /** Disables textures repeating. Instead, when reading UVs outside the 0-1 range, the value will be clamped to the edge of the texture, resulting in a stretched out look at the borders of the texture. */ + CANVAS_ITEM_TEXTURE_REPEAT_DISABLED = 1, + + /** Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. */ + CANVAS_ITEM_TEXTURE_REPEAT_ENABLED = 2, + + /** Flip the texture when repeating so that the edge lines up instead of abruptly changing. */ + CANVAS_ITEM_TEXTURE_REPEAT_MIRROR = 3, + + /** Max value for [enum CanvasItemTextureRepeat] enum. */ + CANVAS_ITEM_TEXTURE_REPEAT_MAX = 4, + } + enum CanvasGroupMode { + /** Child draws over parent and is not clipped. */ + CANVAS_GROUP_MODE_DISABLED = 0, + + /** Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. */ + CANVAS_GROUP_MODE_CLIP_ONLY = 1, + + /** Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. */ + CANVAS_GROUP_MODE_CLIP_AND_DRAW = 2, + CANVAS_GROUP_MODE_TRANSPARENT = 3, + } + enum CanvasLightMode { + /** 2D point light (see [PointLight2D]). */ + CANVAS_LIGHT_MODE_POINT = 0, + + /** 2D directional (sun/moon) light (see [DirectionalLight2D]). */ + CANVAS_LIGHT_MODE_DIRECTIONAL = 1, + } + enum CanvasLightBlendMode { + /** Adds light color additive to the canvas. */ + CANVAS_LIGHT_BLEND_MODE_ADD = 0, + + /** Adds light color subtractive to the canvas. */ + CANVAS_LIGHT_BLEND_MODE_SUB = 1, + + /** The light adds color depending on transparency. */ + CANVAS_LIGHT_BLEND_MODE_MIX = 2, + } + enum CanvasLightShadowFilter { + /** Do not apply a filter to canvas light shadows. */ + CANVAS_LIGHT_FILTER_NONE = 0, + + /** Use PCF5 filtering to filter canvas light shadows. */ + CANVAS_LIGHT_FILTER_PCF5 = 1, + + /** Use PCF13 filtering to filter canvas light shadows. */ + CANVAS_LIGHT_FILTER_PCF13 = 2, + + /** Max value of the [enum CanvasLightShadowFilter] enum. */ + CANVAS_LIGHT_FILTER_MAX = 3, + } + enum CanvasOccluderPolygonCullMode { + /** Culling of the canvas occluder is disabled. */ + CANVAS_OCCLUDER_POLYGON_CULL_DISABLED = 0, + + /** Culling of the canvas occluder is clockwise. */ + CANVAS_OCCLUDER_POLYGON_CULL_CLOCKWISE = 1, + + /** Culling of the canvas occluder is counterclockwise. */ + CANVAS_OCCLUDER_POLYGON_CULL_COUNTER_CLOCKWISE = 2, + } + enum GlobalShaderParameterType { + /** Boolean global shader parameter (`global uniform bool ...`). */ + GLOBAL_VAR_TYPE_BOOL = 0, + + /** 2-dimensional boolean vector global shader parameter (`global uniform bvec2 ...`). */ + GLOBAL_VAR_TYPE_BVEC2 = 1, + + /** 3-dimensional boolean vector global shader parameter (`global uniform bvec3 ...`). */ + GLOBAL_VAR_TYPE_BVEC3 = 2, + + /** 4-dimensional boolean vector global shader parameter (`global uniform bvec4 ...`). */ + GLOBAL_VAR_TYPE_BVEC4 = 3, + + /** Integer global shader parameter (`global uniform int ...`). */ + GLOBAL_VAR_TYPE_INT = 4, + + /** 2-dimensional integer vector global shader parameter (`global uniform ivec2 ...`). */ + GLOBAL_VAR_TYPE_IVEC2 = 5, + + /** 3-dimensional integer vector global shader parameter (`global uniform ivec3 ...`). */ + GLOBAL_VAR_TYPE_IVEC3 = 6, + + /** 4-dimensional integer vector global shader parameter (`global uniform ivec4 ...`). */ + GLOBAL_VAR_TYPE_IVEC4 = 7, + + /** 2-dimensional integer rectangle global shader parameter (`global uniform ivec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_IVEC4] in shader code, but exposed as a [Rect2i] in the editor UI. */ + GLOBAL_VAR_TYPE_RECT2I = 8, + + /** Unsigned integer global shader parameter (`global uniform uint ...`). */ + GLOBAL_VAR_TYPE_UINT = 9, + + /** 2-dimensional unsigned integer vector global shader parameter (`global uniform uvec2 ...`). */ + GLOBAL_VAR_TYPE_UVEC2 = 10, + + /** 3-dimensional unsigned integer vector global shader parameter (`global uniform uvec3 ...`). */ + GLOBAL_VAR_TYPE_UVEC3 = 11, + + /** 4-dimensional unsigned integer vector global shader parameter (`global uniform uvec4 ...`). */ + GLOBAL_VAR_TYPE_UVEC4 = 12, + + /** Single-precision floating-point global shader parameter (`global uniform float ...`). */ + GLOBAL_VAR_TYPE_FLOAT = 13, + + /** 2-dimensional floating-point vector global shader parameter (`global uniform vec2 ...`). */ + GLOBAL_VAR_TYPE_VEC2 = 14, + + /** 3-dimensional floating-point vector global shader parameter (`global uniform vec3 ...`). */ + GLOBAL_VAR_TYPE_VEC3 = 15, + + /** 4-dimensional floating-point vector global shader parameter (`global uniform vec4 ...`). */ + GLOBAL_VAR_TYPE_VEC4 = 16, + + /** Color global shader parameter (`global uniform vec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Color] in the editor UI. */ + GLOBAL_VAR_TYPE_COLOR = 17, + + /** 2-dimensional floating-point rectangle global shader parameter (`global uniform vec4 ...`). Equivalent to [constant GLOBAL_VAR_TYPE_VEC4] in shader code, but exposed as a [Rect2] in the editor UI. */ + GLOBAL_VAR_TYPE_RECT2 = 18, + + /** 2×2 matrix global shader parameter (`global uniform mat2 ...`). Exposed as a [PackedInt32Array] in the editor UI. */ + GLOBAL_VAR_TYPE_MAT2 = 19, + + /** 3×3 matrix global shader parameter (`global uniform mat3 ...`). Exposed as a [Basis] in the editor UI. */ + GLOBAL_VAR_TYPE_MAT3 = 20, + + /** 4×4 matrix global shader parameter (`global uniform mat4 ...`). Exposed as a [Projection] in the editor UI. */ + GLOBAL_VAR_TYPE_MAT4 = 21, + + /** 2-dimensional transform global shader parameter (`global uniform mat2x3 ...`). Exposed as a [Transform2D] in the editor UI. */ + GLOBAL_VAR_TYPE_TRANSFORM_2D = 22, + + /** 3-dimensional transform global shader parameter (`global uniform mat3x4 ...`). Exposed as a [Transform3D] in the editor UI. */ + GLOBAL_VAR_TYPE_TRANSFORM = 23, + + /** 2D sampler global shader parameter (`global uniform sampler2D ...`). Exposed as a [Texture2D] in the editor UI. */ + GLOBAL_VAR_TYPE_SAMPLER2D = 24, + + /** 2D sampler array global shader parameter (`global uniform sampler2DArray ...`). Exposed as a [Texture2DArray] in the editor UI. */ + GLOBAL_VAR_TYPE_SAMPLER2DARRAY = 25, + + /** 3D sampler global shader parameter (`global uniform sampler3D ...`). Exposed as a [Texture3D] in the editor UI. */ + GLOBAL_VAR_TYPE_SAMPLER3D = 26, + + /** Cubemap sampler global shader parameter (`global uniform samplerCube ...`). Exposed as a [Cubemap] in the editor UI. */ + GLOBAL_VAR_TYPE_SAMPLERCUBE = 27, + + /** Represents the size of the [enum GlobalShaderParameterType] enum. */ + GLOBAL_VAR_TYPE_MAX = 28, + } + enum RenderingInfo { + /** Number of objects rendered in the current 3D scene. This varies depending on camera position and rotation. */ + RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME = 0, + + /** Number of points, lines, or triangles rendered in the current 3D scene. This varies depending on camera position and rotation. */ + RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME = 1, + + /** Number of draw calls performed to render in the current 3D scene. This varies depending on camera position and rotation. */ + RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME = 2, + + /** Texture memory used (in bytes). */ + RENDERING_INFO_TEXTURE_MEM_USED = 3, + + /** Buffer memory used (in bytes). This includes vertex data, uniform buffers, and many miscellaneous buffer types used internally. */ + RENDERING_INFO_BUFFER_MEM_USED = 4, + + /** Video memory used (in bytes). When using the Forward+ or mobile rendering backends, this is always greater than the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED], since there is miscellaneous data not accounted for by those two metrics. When using the GL Compatibility backend, this is equal to the sum of [constant RENDERING_INFO_TEXTURE_MEM_USED] and [constant RENDERING_INFO_BUFFER_MEM_USED]. */ + RENDERING_INFO_VIDEO_MEM_USED = 5, + } + enum Features { + FEATURE_SHADERS = 0, + FEATURE_MULTITHREADED = 1, + } + } + /** Server for anything visible. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderingserver.html + */ + class RenderingServer extends Object { + /** Marks an error that shows that the index array is empty. */ + static readonly NO_INDEX_ARRAY = -1 + + /** Number of weights/bones per vertex. */ + static readonly ARRAY_WEIGHTS_SIZE = 4 + + /** The minimum Z-layer for canvas items. */ + static readonly CANVAS_ITEM_Z_MIN = -4096 + + /** The maximum Z-layer for canvas items. */ + static readonly CANVAS_ITEM_Z_MAX = 4096 + + /** The maximum number of glow levels that can be used with the glow post-processing effect. */ + static readonly MAX_GLOW_LEVELS = 7 + static readonly MAX_CURSORS = 8 + + /** The maximum number of directional lights that can be rendered at a given time in 2D. */ + static readonly MAX_2D_DIRECTIONAL_LIGHTS = 8 + + /** The maximum number of surfaces a mesh can have. */ + static readonly MAX_MESH_SURFACES = 256 + + /** The minimum renderpriority of all materials. */ + static readonly MATERIAL_RENDER_PRIORITY_MIN = -128 + + /** The maximum renderpriority of all materials. */ + static readonly MATERIAL_RENDER_PRIORITY_MAX = 127 + + /** The number of custom data arrays available ([constant ARRAY_CUSTOM0], [constant ARRAY_CUSTOM1], [constant ARRAY_CUSTOM2], [constant ARRAY_CUSTOM3]). */ + static readonly ARRAY_CUSTOM_COUNT = 4 + static readonly PARTICLES_EMIT_FLAG_POSITION = 1 + static readonly PARTICLES_EMIT_FLAG_ROTATION_SCALE = 2 + static readonly PARTICLES_EMIT_FLAG_VELOCITY = 4 + static readonly PARTICLES_EMIT_FLAG_COLOR = 8 + static readonly PARTICLES_EMIT_FLAG_CUSTOM = 16 + + /** Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [Texture2D]. + * + * **Note:** Not to be confused with [method RenderingDevice.texture_create], which creates the graphics API's own texture type as opposed to the Godot-specific [Texture2D] resource. + */ + static texture_2d_create(image: Image): RID + + /** Creates a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [TextureLayered]. + */ + static texture_2d_layered_create(layers: GArray, layered_type: RenderingServer.TextureLayeredType): RID + + /** + * **Note:** The equivalent resource is [Texture3D]. + */ + static texture_3d_create(format: Image.Format, width: int64, height: int64, depth: int64, mipmaps: boolean, data: GArray): RID + + /** This method does nothing and always returns an invalid [RID]. */ + static texture_proxy_create(base: RID): RID + + /** Updates the texture specified by the [param texture] [RID] with the data in [param image]. A [param layer] must also be specified, which should be `0` when updating a single-layer texture ([Texture2D]). + * + * **Note:** The [param image] must have the same width, height and format as the current [param texture] data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height or format, use [method texture_replace] instead. + */ + static texture_2d_update(texture: RID, image: Image, layer: int64): void + + /** Updates the texture specified by the [param texture] [RID]'s data with the data in [param data]. All the texture's layers must be replaced at once. + * + * **Note:** The [param texture] must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use [method texture_replace] instead. + */ + static texture_3d_update(texture: RID, data: GArray): void + + /** This method does nothing. */ + static texture_proxy_update(texture: RID, proxy_to: RID): void + + /** Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions, although it does nothing when used. See also [method texture_2d_layered_placeholder_create] + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [PlaceholderTexture2D]. + */ + static texture_2d_placeholder_create(): RID + + /** Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_2d_layered_*` RenderingServer functions, although it does nothing when used. See also [method texture_2d_placeholder_create]. + * + * **Note:** The equivalent resource is [PlaceholderTextureLayered]. + */ + static texture_2d_layered_placeholder_create(layered_type: RenderingServer.TextureLayeredType): RID + + /** Creates a placeholder for a 3-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_3d_*` RenderingServer functions, although it does nothing when used. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [PlaceholderTexture3D]. + */ + static texture_3d_placeholder_create(): RID + + /** Returns an [Image] instance from the given [param texture] [RID]. + * Example of getting the test texture from [method get_test_texture] and applying it to a [Sprite2D] node: + * + */ + static texture_2d_get(texture: RID): Image + + /** Returns an [Image] instance from the given [param texture] [RID] and [param layer]. */ + static texture_2d_layer_get(texture: RID, layer: int64): Image + + /** Returns 3D texture data as an array of [Image]s for the specified texture [RID]. */ + static texture_3d_get(texture: RID): GArray + + /** Replaces [param texture]'s texture data by the texture specified by the [param by_texture] RID, without changing [param texture]'s RID. */ + static texture_replace(texture: RID, by_texture: RID): void + static texture_set_size_override(texture: RID, width: int64, height: int64): void + static texture_set_path(texture: RID, path: string): void + static texture_get_path(texture: RID): string + + /** Returns the format for the texture. */ + static texture_get_format(texture: RID): Image.Format + static texture_set_force_redraw_if_visible(texture: RID, enable: boolean): void + + /** Creates a new texture object based on a texture created directly on the [RenderingDevice]. If the texture contains layers, [param layer_type] is used to define the layer type. */ + static texture_rd_create(rd_texture: RID, layer_type: RenderingServer.TextureLayeredType = 0): RID + + /** Returns a texture [RID] that can be used with [RenderingDevice]. */ + static texture_get_rd_texture(texture: RID, srgb: boolean = false): RID + + /** Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. + * + * **Note:** This function returns a `uint64_t` which internally maps to a `GLuint` (OpenGL) or `VkImage` (Vulkan). + */ + static texture_get_native_handle(texture: RID, srgb: boolean = false): int64 + + /** Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `shader_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [Shader]. + */ + static shader_create(): RID + + /** Sets the shader's source code (which triggers recompilation after being changed). */ + static shader_set_code(shader: RID, code: string): void + + /** Sets the path hint for the specified shader. This should generally match the [Shader] resource's [member Resource.resource_path]. */ + static shader_set_path_hint(shader: RID, path: string): void + + /** Returns a shader's source code as a string. */ + static shader_get_code(shader: RID): string + + /** Returns the parameters of a shader. */ + static get_shader_parameter_list(shader: RID): GArray + + /** Returns the default value for the specified shader uniform. This is usually the value written in the shader source code. */ + static shader_get_parameter_default(shader: RID, name: StringName): any + + /** Sets a shader's default texture. Overwrites the texture given by name. + * + * **Note:** If the sampler array is used use [param index] to access the specified texture. + */ + static shader_set_default_texture_parameter(shader: RID, name: StringName, texture: RID, index: int64 = 0): void + + /** Returns a default texture from a shader searched by name. + * + * **Note:** If the sampler array is used use [param index] to access the specified texture. + */ + static shader_get_default_texture_parameter(shader: RID, name: StringName, index: int64 = 0): RID + + /** Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `material_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [Material]. + */ + static material_create(): RID + + /** Sets a shader material's shader. */ + static material_set_shader(shader_material: RID, shader: RID): void + + /** Sets a material's parameter. */ + static material_set_param(material: RID, parameter: StringName, value: any): void + + /** Returns the value of a certain material's parameter. */ + static material_get_param(material: RID, parameter: StringName): any + + /** Sets a material's render priority. */ + static material_set_render_priority(material: RID, priority: int64): void + + /** Sets an object's next material. */ + static material_set_next_pass(material: RID, next_material: RID): void + static mesh_create_from_surfaces(surfaces: GArray, blend_shape_count: int64 = 0): RID + + /** Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent resource is [Mesh]. + */ + static mesh_create(): RID + + /** Returns the offset of a given attribute by [param array_index] in the start of its respective buffer. */ + static mesh_surface_get_format_offset(format: RenderingServer.ArrayFormat, vertex_count: int64, array_index: int64): int64 + + /** Returns the stride of the vertex positions for a mesh with given [param format]. Note importantly that vertex positions are stored consecutively and are not interleaved with the other attributes in the vertex buffer (normals and tangents). */ + static mesh_surface_get_format_vertex_stride(format: RenderingServer.ArrayFormat, vertex_count: int64): int64 + + /** Returns the stride of the combined normals and tangents for a mesh with given [param format]. Note importantly that, while normals and tangents are in the vertex buffer with vertices, they are only interleaved with each other and so have a different stride than vertex positions. */ + static mesh_surface_get_format_normal_tangent_stride(format: RenderingServer.ArrayFormat, vertex_count: int64): int64 + + /** Returns the stride of the attribute buffer for a mesh with given [param format]. */ + static mesh_surface_get_format_attribute_stride(format: RenderingServer.ArrayFormat, vertex_count: int64): int64 + + /** Returns the stride of the skin buffer for a mesh with given [param format]. */ + static mesh_surface_get_format_skin_stride(format: RenderingServer.ArrayFormat, vertex_count: int64): int64 + static mesh_add_surface(mesh: RID, surface: GDictionary): void + static mesh_add_surface_from_arrays(mesh: RID, primitive: RenderingServer.PrimitiveType, arrays: GArray, blend_shapes: GArray = [], lods: GDictionary = new GDictionary(), compress_format: RenderingServer.ArrayFormat = 0): void + + /** Returns a mesh's blend shape count. */ + static mesh_get_blend_shape_count(mesh: RID): int64 + + /** Sets a mesh's blend shape mode. */ + static mesh_set_blend_shape_mode(mesh: RID, mode: RenderingServer.BlendShapeMode): void + + /** Returns a mesh's blend shape mode. */ + static mesh_get_blend_shape_mode(mesh: RID): RenderingServer.BlendShapeMode + + /** Sets a mesh's surface's material. */ + static mesh_surface_set_material(mesh: RID, surface: int64, material: RID): void + + /** Returns a mesh's surface's material. */ + static mesh_surface_get_material(mesh: RID, surface: int64): RID + static mesh_get_surface(mesh: RID, surface: int64): GDictionary + + /** Returns a mesh's surface's buffer arrays. */ + static mesh_surface_get_arrays(mesh: RID, surface: int64): GArray + + /** Returns a mesh's surface's arrays for blend shapes. */ + static mesh_surface_get_blend_shape_arrays(mesh: RID, surface: int64): GArray + + /** Returns a mesh's number of surfaces. */ + static mesh_get_surface_count(mesh: RID): int64 + + /** Sets a mesh's custom aabb. */ + static mesh_set_custom_aabb(mesh: RID, aabb: AABB): void + + /** Returns a mesh's custom aabb. */ + static mesh_get_custom_aabb(mesh: RID): AABB + + /** Removes all surfaces from a mesh. */ + static mesh_clear(mesh: RID): void + static mesh_surface_update_vertex_region(mesh: RID, surface: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + static mesh_surface_update_attribute_region(mesh: RID, surface: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + static mesh_surface_update_skin_region(mesh: RID, surface: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + static mesh_set_shadow_mesh(mesh: RID, shadow_mesh: RID): void + + /** Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all `multimesh_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent resource is [MultiMesh]. + */ + static multimesh_create(): RID + static multimesh_allocate_data(multimesh: RID, instances: int64, transform_format: RenderingServer.MultimeshTransformFormat, color_format: boolean = false, custom_data_format: boolean = false): void + + /** Returns the number of instances allocated for this multimesh. */ + static multimesh_get_instance_count(multimesh: RID): int64 + + /** Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. */ + static multimesh_set_mesh(multimesh: RID, mesh: RID): void + + /** Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. */ + static multimesh_instance_set_transform(multimesh: RID, index: int64, transform: Transform3D): void + + /** Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. */ + static multimesh_instance_set_transform_2d(multimesh: RID, index: int64, transform: Transform2D): void + + /** Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. */ + static multimesh_instance_set_color(multimesh: RID, index: int64, color: Color): void + + /** Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a `vec4` in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. */ + static multimesh_instance_set_custom_data(multimesh: RID, index: int64, custom_data: Color): void + + /** Returns the RID of the mesh that will be used in drawing this multimesh. */ + static multimesh_get_mesh(multimesh: RID): RID + + /** Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. */ + static multimesh_get_aabb(multimesh: RID): AABB + + /** Sets the custom AABB for this MultiMesh resource. */ + static multimesh_set_custom_aabb(multimesh: RID, aabb: AABB): void + + /** Returns the custom AABB defined for this MultiMesh resource. */ + static multimesh_get_custom_aabb(multimesh: RID): AABB + + /** Returns the [Transform3D] of the specified instance. */ + static multimesh_instance_get_transform(multimesh: RID, index: int64): Transform3D + + /** Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. */ + static multimesh_instance_get_transform_2d(multimesh: RID, index: int64): Transform2D + + /** Returns the color by which the specified instance will be modulated. */ + static multimesh_instance_get_color(multimesh: RID, index: int64): Color + + /** Returns the custom data associated with the specified instance. */ + static multimesh_instance_get_custom_data(multimesh: RID, index: int64): Color + + /** Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. */ + static multimesh_set_visible_instances(multimesh: RID, visible: int64): void + + /** Returns the number of visible instances for this multimesh. */ + static multimesh_get_visible_instances(multimesh: RID): int64 + + /** Set the entire data to use for drawing the [param multimesh] at once to [param buffer] (such as instance transforms and colors). [param buffer]'s size must match the number of instances multiplied by the per-instance data size (which depends on the enabled MultiMesh fields). Otherwise, an error message is printed and nothing is rendered. See also [method multimesh_get_buffer]. + * The per-instance data size and expected data order is: + * [codeblock lang=text] + * 2D: + * - Position: 8 floats (8 floats for Transform2D) + * - Position + Vertex color: 12 floats (8 floats for Transform2D, 4 floats for Color) + * - Position + Custom data: 12 floats (8 floats for Transform2D, 4 floats of custom data) + * - Position + Vertex color + Custom data: 16 floats (8 floats for Transform2D, 4 floats for Color, 4 floats of custom data) + * 3D: + * - Position: 12 floats (12 floats for Transform3D) + * - Position + Vertex color: 16 floats (12 floats for Transform3D, 4 floats for Color) + * - Position + Custom data: 16 floats (12 floats for Transform3D, 4 floats of custom data) + * - Position + Vertex color + Custom data: 20 floats (12 floats for Transform3D, 4 floats for Color, 4 floats of custom data) + * [/codeblock] + */ + static multimesh_set_buffer(multimesh: RID, buffer: PackedFloat32Array | float32[]): void + + /** Returns the MultiMesh data (such as instance transforms, colors, etc.). See [method multimesh_set_buffer] for details on the returned data. + * + * **Note:** If the buffer is in the engine's internal cache, it will have to be fetched from GPU memory and possibly decompressed. This means [method multimesh_get_buffer] is potentially a slow operation and should be avoided whenever possible. + */ + static multimesh_get_buffer(multimesh: RID): PackedFloat32Array + + /** Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `skeleton_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + */ + static skeleton_create(): RID + static skeleton_allocate_data(skeleton: RID, bones: int64, is_2d_skeleton: boolean = false): void + + /** Returns the number of bones allocated for this skeleton. */ + static skeleton_get_bone_count(skeleton: RID): int64 + + /** Sets the [Transform3D] for a specific bone of this skeleton. */ + static skeleton_bone_set_transform(skeleton: RID, bone: int64, transform: Transform3D): void + + /** Returns the [Transform3D] set for a specific bone of this skeleton. */ + static skeleton_bone_get_transform(skeleton: RID, bone: int64): Transform3D + + /** Sets the [Transform2D] for a specific bone of this skeleton. */ + static skeleton_bone_set_transform_2d(skeleton: RID, bone: int64, transform: Transform2D): void + + /** Returns the [Transform2D] set for a specific bone of this skeleton. */ + static skeleton_bone_get_transform_2d(skeleton: RID, bone: int64): Transform2D + static skeleton_set_base_transform_2d(skeleton: RID, base_transform: Transform2D): void + + /** Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent node is [DirectionalLight3D]. + */ + static directional_light_create(): RID + + /** Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent node is [OmniLight3D]. + */ + static omni_light_create(): RID + + /** Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. + */ + static spot_light_create(): RID + + /** Sets the color of the light. Equivalent to [member Light3D.light_color]. */ + static light_set_color(light: RID, color: Color): void + + /** Sets the specified 3D light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param]. */ + static light_set_param(light: RID, param: RenderingServer.LightParam, value: float64): void + + /** If `true`, light will cast shadows. Equivalent to [member Light3D.shadow_enabled]. */ + static light_set_shadow(light: RID, enabled: boolean): void + + /** Sets the projector texture to use for the specified 3D light. Equivalent to [member Light3D.light_projector]. */ + static light_set_projector(light: RID, texture: RID): void + + /** If `true`, the 3D light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative]. */ + static light_set_negative(light: RID, enable: boolean): void + + /** Sets the cull mask for this 3D light. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask]. */ + static light_set_cull_mask(light: RID, mask: int64): void + + /** Sets the distance fade for this 3D light. This acts as a form of level of detail (LOD) and can be used to improve performance. Equivalent to [member Light3D.distance_fade_enabled], [member Light3D.distance_fade_begin], [member Light3D.distance_fade_shadow], and [member Light3D.distance_fade_length]. */ + static light_set_distance_fade(decal: RID, enabled: boolean, begin: float64, shadow: float64, length: float64): void + + /** If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face]. */ + static light_set_reverse_cull_face_mode(light: RID, enabled: boolean): void + + /** Sets the bake mode to use for the specified 3D light. Equivalent to [member Light3D.light_bake_mode]. */ + static light_set_bake_mode(light: RID, bake_mode: RenderingServer.LightBakeMode): void + + /** Sets the maximum SDFGI cascade in which the 3D light's indirect lighting is rendered. Higher values allow the light to be rendered in SDFGI further away from the camera. */ + static light_set_max_sdfgi_cascade(light: RID, cascade: int64): void + + /** Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. */ + static light_omni_set_shadow_mode(light: RID, mode: RenderingServer.LightOmniShadowMode): void + + /** Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. */ + static light_directional_set_shadow_mode(light: RID, mode: RenderingServer.LightDirectionalShadowMode): void + + /** If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits]. */ + static light_directional_set_blend_splits(light: RID, enable: boolean): void + + /** If `true`, this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. */ + static light_directional_set_sky_mode(light: RID, mode: RenderingServer.LightDirectionalSkyMode): void + + /** Sets the texture filter mode to use when rendering light projectors. This parameter is global and cannot be set on a per-light basis. */ + static light_projectors_set_filter(filter: RenderingServer.LightProjectorFilter): void + + /** Sets the filter quality for omni and spot light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/positional_shadow/soft_shadow_filter_quality]. This parameter is global and cannot be set on a per-viewport basis. */ + static positional_soft_shadow_filter_set_quality(quality: RenderingServer.ShadowQuality): void + + /** Sets the filter [param quality] for directional light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/directional_shadow/soft_shadow_filter_quality]. This parameter is global and cannot be set on a per-viewport basis. */ + static directional_soft_shadow_filter_set_quality(quality: RenderingServer.ShadowQuality): void + + /** Sets the [param size] of the directional light shadows in 3D. See also [member ProjectSettings.rendering/lights_and_shadows/directional_shadow/size]. This parameter is global and cannot be set on a per-viewport basis. */ + static directional_shadow_atlas_set_size(size: int64, is_16bits: boolean): void + + /** Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `reflection_probe_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent node is [ReflectionProbe]. + */ + static reflection_probe_create(): RID + + /** Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. */ + static reflection_probe_set_update_mode(probe: RID, mode: RenderingServer.ReflectionProbeUpdateMode): void + + /** Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. */ + static reflection_probe_set_intensity(probe: RID, intensity: float64): void + + /** Sets the reflection probe's ambient light mode. Equivalent to [member ReflectionProbe.ambient_mode]. */ + static reflection_probe_set_ambient_mode(probe: RID, mode: RenderingServer.ReflectionProbeAmbientMode): void + + /** Sets the reflection probe's custom ambient light color. Equivalent to [member ReflectionProbe.ambient_color]. */ + static reflection_probe_set_ambient_color(probe: RID, color: Color): void + + /** Sets the reflection probe's custom ambient light energy. Equivalent to [member ReflectionProbe.ambient_color_energy]. */ + static reflection_probe_set_ambient_energy(probe: RID, energy: float64): void + + /** Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. */ + static reflection_probe_set_max_distance(probe: RID, distance: float64): void + + /** Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.size]. */ + static reflection_probe_set_size(probe: RID, size: Vector3): void + + /** Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. */ + static reflection_probe_set_origin_offset(probe: RID, offset: Vector3): void + + /** If `true`, reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior]. */ + static reflection_probe_set_as_interior(probe: RID, enable: boolean): void + + /** If `true`, uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. */ + static reflection_probe_set_enable_box_projection(probe: RID, enable: boolean): void + + /** If `true`, computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. */ + static reflection_probe_set_enable_shadows(probe: RID, enable: boolean): void + + /** Sets the render cull mask for this reflection probe. Only instances with a matching layer will be reflected by this probe. Equivalent to [member ReflectionProbe.cull_mask]. */ + static reflection_probe_set_cull_mask(probe: RID, layers: int64): void + + /** Sets the render reflection mask for this reflection probe. Only instances with a matching layer will have reflections applied from this probe. Equivalent to [member ReflectionProbe.reflection_mask]. */ + static reflection_probe_set_reflection_mask(probe: RID, layers: int64): void + + /** Sets the resolution to use when rendering the specified reflection probe. The [param resolution] is specified for each cubemap face: for instance, specifying `512` will allocate 6 faces of 512×512 each (plus mipmaps for roughness levels). */ + static reflection_probe_set_resolution(probe: RID, resolution: int64): void + + /** Sets the mesh level of detail to use in the reflection probe rendering. Higher values will use less detailed versions of meshes that have LOD variations generated, which can improve performance. Equivalent to [member ReflectionProbe.mesh_lod_threshold]. */ + static reflection_probe_set_mesh_lod_threshold(probe: RID, pixels: float64): void + + /** Creates a decal and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `decal_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this decal to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent node is [Decal]. + */ + static decal_create(): RID + + /** Sets the [param size] of the decal specified by the [param decal] RID. Equivalent to [member Decal.size]. */ + static decal_set_size(decal: RID, size: Vector3): void + + /** Sets the [param texture] in the given texture [param type] slot for the specified decal. Equivalent to [method Decal.set_texture]. */ + static decal_set_texture(decal: RID, type: RenderingServer.DecalTexture, texture: RID): void + + /** Sets the emission [param energy] in the decal specified by the [param decal] RID. Equivalent to [member Decal.emission_energy]. */ + static decal_set_emission_energy(decal: RID, energy: float64): void + + /** Sets the [param albedo_mix] in the decal specified by the [param decal] RID. Equivalent to [member Decal.albedo_mix]. */ + static decal_set_albedo_mix(decal: RID, albedo_mix: float64): void + + /** Sets the color multiplier in the decal specified by the [param decal] RID to [param color]. Equivalent to [member Decal.modulate]. */ + static decal_set_modulate(decal: RID, color: Color): void + + /** Sets the cull [param mask] in the decal specified by the [param decal] RID. Equivalent to [member Decal.cull_mask]. */ + static decal_set_cull_mask(decal: RID, mask: int64): void + + /** Sets the distance fade parameters in the decal specified by the [param decal] RID. Equivalent to [member Decal.distance_fade_enabled], [member Decal.distance_fade_begin] and [member Decal.distance_fade_length]. */ + static decal_set_distance_fade(decal: RID, enabled: boolean, begin: float64, length: float64): void + + /** Sets the upper fade ([param above]) and lower fade ([param below]) in the decal specified by the [param decal] RID. Equivalent to [member Decal.upper_fade] and [member Decal.lower_fade]. */ + static decal_set_fade(decal: RID, above: float64, below: float64): void + + /** Sets the normal [param fade] in the decal specified by the [param decal] RID. Equivalent to [member Decal.normal_fade]. */ + static decal_set_normal_fade(decal: RID, fade: float64): void + + /** Sets the texture [param filter] mode to use when rendering decals. This parameter is global and cannot be set on a per-decal basis. */ + static decals_set_filter(filter: RenderingServer.DecalFilter): void + + /** If [param half_resolution] is `true`, renders [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) buffers at halved resolution on each axis (e.g. 960×540 when the viewport size is 1920×1080). This improves performance significantly when VoxelGI or SDFGI is enabled, at the cost of artifacts that may be visible on polygon edges. The loss in quality becomes less noticeable as the viewport resolution increases. [LightmapGI] rendering is not affected by this setting. Equivalent to [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution]. */ + static gi_set_use_half_resolution(half_resolution: boolean): void + + /** Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `voxel_gi_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [VoxelGI]. + */ + static voxel_gi_create(): RID + static voxel_gi_allocate_data(voxel_gi: RID, to_cell_xform: Transform3D, aabb: AABB, octree_size: Vector3i, octree_cells: PackedByteArray | byte[] | ArrayBuffer, data_cells: PackedByteArray | byte[] | ArrayBuffer, distance_field: PackedByteArray | byte[] | ArrayBuffer, level_counts: PackedInt32Array | int32[]): void + static voxel_gi_get_octree_size(voxel_gi: RID): Vector3i + static voxel_gi_get_octree_cells(voxel_gi: RID): PackedByteArray + static voxel_gi_get_data_cells(voxel_gi: RID): PackedByteArray + static voxel_gi_get_distance_field(voxel_gi: RID): PackedByteArray + static voxel_gi_get_level_counts(voxel_gi: RID): PackedInt32Array + static voxel_gi_get_to_cell_xform(voxel_gi: RID): Transform3D + + /** Sets the [member VoxelGIData.dynamic_range] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_dynamic_range(voxel_gi: RID, range: float64): void + + /** Sets the [member VoxelGIData.propagation] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_propagation(voxel_gi: RID, amount: float64): void + + /** Sets the [member VoxelGIData.energy] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_energy(voxel_gi: RID, energy: float64): void + + /** Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure]. */ + static voxel_gi_set_baked_exposure_normalization(voxel_gi: RID, baked_exposure: float64): void + + /** Sets the [member VoxelGIData.bias] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_bias(voxel_gi: RID, bias: float64): void + + /** Sets the [member VoxelGIData.normal_bias] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_normal_bias(voxel_gi: RID, bias: float64): void + + /** Sets the [member VoxelGIData.interior] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_interior(voxel_gi: RID, enable: boolean): void + + /** Sets the [member VoxelGIData.use_two_bounces] value to use on the specified [param voxel_gi]'s [RID]. */ + static voxel_gi_set_use_two_bounces(voxel_gi: RID, enable: boolean): void + + /** Sets the [member ProjectSettings.rendering/global_illumination/voxel_gi/quality] value to use when rendering. This parameter is global and cannot be set on a per-VoxelGI basis. */ + static voxel_gi_set_quality(quality: RenderingServer.VoxelGIQuality): void + + /** Creates a new lightmap global illumination instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `lightmap_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [LightmapGI]. + */ + static lightmap_create(): RID + + /** Set the textures on the given [param lightmap] GI instance to the texture array pointed to by the [param light] RID. If the lightmap texture was baked with [member LightmapGI.directional] set to `true`, then [param uses_sh] must also be `true`. */ + static lightmap_set_textures(lightmap: RID, light: RID, uses_sh: boolean): void + static lightmap_set_probe_bounds(lightmap: RID, bounds: AABB): void + static lightmap_set_probe_interior(lightmap: RID, interior: boolean): void + static lightmap_set_probe_capture_data(lightmap: RID, points: PackedVector3Array | Vector3[], point_sh: PackedColorArray | Color[], tetrahedra: PackedInt32Array | int32[], bsp_tree: PackedInt32Array | int32[]): void + static lightmap_get_probe_capture_points(lightmap: RID): PackedVector3Array + static lightmap_get_probe_capture_sh(lightmap: RID): PackedColorArray + static lightmap_get_probe_capture_tetrahedra(lightmap: RID): PackedInt32Array + static lightmap_get_probe_capture_bsp_tree(lightmap: RID): PackedInt32Array + + /** Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see [method camera_attributes_set_exposure]. */ + static lightmap_set_baked_exposure_normalization(lightmap: RID, baked_exposure: float64): void + static lightmap_set_probe_capture_update_speed(speed: float64): void + + /** Creates a GPU-based particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `particles_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent nodes are [GPUParticles2D] and [GPUParticles3D]. + * + * **Note:** All `particles_*` methods only apply to GPU-based particles, not CPU-based particles. [CPUParticles2D] and [CPUParticles3D] do not have equivalent RenderingServer functions available, as these use [MultiMeshInstance2D] and [MultiMeshInstance3D] under the hood (see `multimesh_*` methods). + */ + static particles_create(): RID + + /** Sets whether the GPU particles specified by the [param particles] RID should be rendered in 2D or 3D according to [param mode]. */ + static particles_set_mode(particles: RID, mode: RenderingServer.ParticlesMode): void + + /** If `true`, particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting]. */ + static particles_set_emitting(particles: RID, emitting: boolean): void + + /** Returns `true` if particles are currently set to emitting. */ + static particles_get_emitting(particles: RID): boolean + + /** Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount]. */ + static particles_set_amount(particles: RID, amount: int64): void + + /** Sets the amount ratio for particles to be emitted. Equivalent to [member GPUParticles3D.amount_ratio]. */ + static particles_set_amount_ratio(particles: RID, ratio: float64): void + + /** Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime]. */ + static particles_set_lifetime(particles: RID, lifetime: float64): void + + /** If `true`, particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot]. */ + static particles_set_one_shot(particles: RID, one_shot: boolean): void + + /** Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess]. */ + static particles_set_pre_process_time(particles: RID, time: float64): void + + /** Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness]. */ + static particles_set_explosiveness_ratio(particles: RID, ratio: float64): void + + /** Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness]. */ + static particles_set_randomness_ratio(particles: RID, ratio: float64): void + + /** Sets the value that informs a [ParticleProcessMaterial] to rush all particles towards the end of their lifetime. */ + static particles_set_interp_to_end(particles: RID, factor: float64): void + + /** Sets the velocity of a particle node, that will be used by [member ParticleProcessMaterial.inherit_velocity_ratio]. */ + static particles_set_emitter_velocity(particles: RID, velocity: Vector3): void + + /** Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb]. */ + static particles_set_custom_aabb(particles: RID, aabb: AABB): void + + /** Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale]. */ + static particles_set_speed_scale(particles: RID, scale: float64): void + + /** If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to [member GPUParticles3D.local_coords]. */ + static particles_set_use_local_coordinates(particles: RID, enable: boolean): void + + /** Sets the material for processing the particles. + * + * **Note:** This is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material]. + */ + static particles_set_process_material(particles: RID, material: RID): void + + /** Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps]. */ + static particles_set_fixed_fps(particles: RID, fps: int64): void + static particles_set_interpolate(particles: RID, enable: boolean): void + + /** If `true`, uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta]. */ + static particles_set_fractional_delta(particles: RID, enable: boolean): void + static particles_set_collision_base_size(particles: RID, size: float64): void + static particles_set_transform_align(particles: RID, align: RenderingServer.ParticlesTransformAlign): void + + /** If [param enable] is `true`, enables trails for the [param particles] with the specified [param length_sec] in seconds. Equivalent to [member GPUParticles3D.trail_enabled] and [member GPUParticles3D.trail_lifetime]. */ + static particles_set_trails(particles: RID, enable: boolean, length_sec: float64): void + static particles_set_trail_bind_poses(particles: RID, bind_poses: GArray): void + + /** Returns `true` if particles are not emitting and particles are set to inactive. */ + static particles_is_inactive(particles: RID): boolean + + /** Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. */ + static particles_request_process(particles: RID): void + + /** Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart]. */ + static particles_restart(particles: RID): void + static particles_set_subemitter(particles: RID, subemitter_particles: RID): void + + /** Manually emits particles from the [param particles] instance. */ + static particles_emit(particles: RID, transform: Transform3D, velocity: Vector3, color: Color, custom: Color, emit_flags: int64): void + + /** Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member GPUParticles3D.draw_order]. */ + static particles_set_draw_order(particles: RID, order: RenderingServer.ParticlesDrawOrder): void + + /** Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes]. */ + static particles_set_draw_passes(particles: RID, count: int64): void + + /** Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4]. */ + static particles_set_draw_pass_mesh(particles: RID, pass: int64, mesh: RID): void + + /** Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method GPUParticles3D.capture_aabb]. */ + static particles_get_current_aabb(particles: RID): AABB + + /** Sets the [Transform3D] that will be used by the particles when they first emit. */ + static particles_set_emission_transform(particles: RID, transform: Transform3D): void + + /** Creates a new 3D GPU particle collision or attractor and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `particles_collision_*` RenderingServer functions. + * + * **Note:** The equivalent nodes are [GPUParticlesCollision3D] and [GPUParticlesAttractor3D]. + */ + static particles_collision_create(): RID + + /** Sets the collision or attractor shape [param type] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID. */ + static particles_collision_set_collision_type(particles_collision: RID, type: RenderingServer.ParticlesCollisionType): void + + /** Sets the cull [param mask] for the 3D GPU particles collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollision3D.cull_mask] or [member GPUParticlesAttractor3D.cull_mask] depending on the [param particles_collision] type. */ + static particles_collision_set_cull_mask(particles_collision: RID, mask: int64): void + + /** Sets the [param radius] for the 3D GPU particles sphere collision or attractor specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSphere3D.radius] or [member GPUParticlesAttractorSphere3D.radius] depending on the [param particles_collision] type. */ + static particles_collision_set_sphere_radius(particles_collision: RID, radius: float64): void + + /** Sets the [param extents] for the 3D GPU particles collision by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionBox3D.size], [member GPUParticlesCollisionSDF3D.size], [member GPUParticlesCollisionHeightField3D.size], [member GPUParticlesAttractorBox3D.size] or [member GPUParticlesAttractorVectorField3D.size] depending on the [param particles_collision] type. */ + static particles_collision_set_box_extents(particles_collision: RID, extents: Vector3): void + + /** Sets the [param strength] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.strength]. */ + static particles_collision_set_attractor_strength(particles_collision: RID, strength: float64): void + + /** Sets the directionality [param amount] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.directionality]. */ + static particles_collision_set_attractor_directionality(particles_collision: RID, amount: float64): void + + /** Sets the attenuation [param curve] for the 3D GPU particles attractor specified by the [param particles_collision] RID. Only used for attractors, not colliders. Equivalent to [member GPUParticlesAttractor3D.attenuation]. */ + static particles_collision_set_attractor_attenuation(particles_collision: RID, curve: float64): void + + /** Sets the signed distance field [param texture] for the 3D GPU particles collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionSDF3D.texture] or [member GPUParticlesAttractorVectorField3D.texture] depending on the [param particles_collision] type. */ + static particles_collision_set_field_texture(particles_collision: RID, texture: RID): void + + /** Requests an update for the 3D GPU particle collision heightfield. This may be automatically called by the 3D GPU particle collision heightfield depending on its [member GPUParticlesCollisionHeightField3D.update_mode]. */ + static particles_collision_height_field_update(particles_collision: RID): void + + /** Sets the heightmap [param resolution] for the 3D GPU particles heightfield collision specified by the [param particles_collision] RID. Equivalent to [member GPUParticlesCollisionHeightField3D.resolution]. */ + static particles_collision_set_height_field_resolution(particles_collision: RID, resolution: RenderingServer.ParticlesCollisionHeightfieldResolution): void + + /** Creates a new fog volume and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `fog_volume_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [FogVolume]. + */ + static fog_volume_create(): RID + + /** Sets the shape of the fog volume to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. */ + static fog_volume_set_shape(fog_volume: RID, shape: RenderingServer.FogVolumeShape): void + + /** Sets the size of the fog volume when shape is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. */ + static fog_volume_set_size(fog_volume: RID, size: Vector3): void + + /** Sets the [Material] of the fog volume. Can be either a [FogMaterial] or a custom [ShaderMaterial]. */ + static fog_volume_set_material(fog_volume: RID, material: RID): void + + /** Creates a new 3D visibility notifier object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `visibility_notifier_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. + * + * **Note:** The equivalent node is [VisibleOnScreenNotifier3D]. + */ + static visibility_notifier_create(): RID + static visibility_notifier_set_aabb(notifier: RID, aabb: AABB): void + static visibility_notifier_set_callbacks(notifier: RID, enter_callable: Callable, exit_callable: Callable): void + + /** Creates an occluder instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `occluder_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [Occluder3D] (not to be confused with the [OccluderInstance3D] node). + */ + static occluder_create(): RID + + /** Sets the mesh data for the given occluder RID, which controls the shape of the occlusion culling that will be performed. */ + static occluder_set_mesh(occluder: RID, vertices: PackedVector3Array | Vector3[], indices: PackedInt32Array | int32[]): void + + /** Creates a 3D camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [Camera3D]. + */ + static camera_create(): RID + + /** Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. */ + static camera_set_perspective(camera: RID, fovy_degrees: float64, z_near: float64, z_far: float64): void + + /** Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. */ + static camera_set_orthogonal(camera: RID, size: float64, z_near: float64, z_far: float64): void + + /** Sets camera to use frustum projection. This mode allows adjusting the [param offset] argument to create "tilted frustum" effects. */ + static camera_set_frustum(camera: RID, size: float64, offset: Vector2, z_near: float64, z_far: float64): void + + /** Sets [Transform3D] of camera. */ + static camera_set_transform(camera: RID, transform: Transform3D): void + + /** Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask]. */ + static camera_set_cull_mask(camera: RID, layers: int64): void + + /** Sets the environment used by this camera. Equivalent to [member Camera3D.environment]. */ + static camera_set_environment(camera: RID, env: RID): void + + /** Sets the camera_attributes created with [method camera_attributes_create] to the given camera. */ + static camera_set_camera_attributes(camera: RID, effects: RID): void + + /** Sets the compositor used by this camera. Equivalent to [member Camera3D.compositor]. */ + static camera_set_compositor(camera: RID, compositor: RID): void + + /** If `true`, preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If `false`, preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT]. */ + static camera_set_use_vertical_aspect(camera: RID, enable: boolean): void + + /** Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `viewport_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [Viewport]. + */ + static viewport_create(): RID + + /** If `true`, the viewport uses augmented or virtual reality technologies. See [XRInterface]. */ + static viewport_set_use_xr(viewport: RID, use_xr: boolean): void + + /** Sets the viewport's width and height in pixels. */ + static viewport_set_size(viewport: RID, width: int64, height: int64): void + + /** If `true`, sets the viewport active, else sets it inactive. */ + static viewport_set_active(viewport: RID, active: boolean): void + + /** Sets the viewport's parent to the viewport specified by the [param parent_viewport] RID. */ + static viewport_set_parent_viewport(viewport: RID, parent_viewport: RID): void + + /** Copies the viewport to a region of the screen specified by [param rect]. If [method viewport_set_render_direct_to_screen] is `true`, then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. + * For example, you can set the root viewport to not render at all with the following code: + * FIXME: The method seems to be non-existent. + * + * Using this can result in significant optimization, especially on lower-end devices. However, it comes at the cost of having to manage your viewports manually. For further optimization, see [method viewport_set_render_direct_to_screen]. + */ + static viewport_attach_to_screen(viewport: RID, rect: Rect2 = new Rect2(0, 0, 0, 0), screen: int64 = 0): void + + /** If `true`, render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the screen_texture. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. */ + static viewport_set_render_direct_to_screen(viewport: RID, enabled: boolean): void + + /** Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport]. */ + static viewport_set_canvas_cull_mask(viewport: RID, canvas_cull_mask: int64): void + + /** Sets the 3D resolution scaling mode. Bilinear scaling renders at different resolution to either undersample or supersample the viewport. FidelityFX Super Resolution 1.0, abbreviated to FSR, is an upscaling technology that produces high quality images at fast framerates by using a spatially aware upscaling algorithm. FSR is slightly more expensive than bilinear, but it produces significantly higher image quality. FSR should be used where possible. */ + static viewport_set_scaling_3d_mode(viewport: RID, scaling_3d_mode: RenderingServer.ViewportScaling3DMode): void + + /** Scales the 3D render buffer based on the viewport size uses an image filter specified in [enum ViewportScaling3DMode] to scale the output image to the full viewport size. Values lower than `1.0` can be used to speed up 3D rendering at the cost of quality (undersampling). Values greater than `1.0` are only valid for bilinear mode and can be used to improve 3D rendering quality at a high performance cost (supersampling). See also [enum ViewportMSAA] for multi-sample antialiasing, which is significantly cheaper but only smoothens the edges of polygons. + * When using FSR upscaling, AMD recommends exposing the following values as preset options to users "Ultra Quality: 0.77", "Quality: 0.67", "Balanced: 0.59", "Performance: 0.5" instead of exposing the entire scale. + */ + static viewport_set_scaling_3d_scale(viewport: RID, scale: float64): void + + /** Determines how sharp the upscaled image will be when using the FSR upscaling mode. Sharpness halves with every whole number. Values go from 0.0 (sharpest) to 2.0. Values above 2.0 won't make a visible difference. */ + static viewport_set_fsr_sharpness(viewport: RID, sharpness: float64): void + + /** Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between `-0.75` and `0.0`. Enabling temporal antialiasing ([member ProjectSettings.rendering/anti_aliasing/quality/use_taa]) can help reduce the graininess visible when using negative mipmap bias. + * + * **Note:** When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is `-log2(1.0 / scale) + mipmap_bias`. + */ + static viewport_set_texture_mipmap_bias(viewport: RID, mipmap_bias: float64): void + + /** Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options. */ + static viewport_set_update_mode(viewport: RID, update_mode: RenderingServer.ViewportUpdateMode): void + + /** Returns the viewport's update mode. See [enum ViewportUpdateMode] constants for options. + * **Warning:** Calling this from any thread other than the rendering thread will be detrimental to performance. + */ + static viewport_get_update_mode(viewport: RID): RenderingServer.ViewportUpdateMode + + /** Sets the clear mode of a viewport. See [enum ViewportClearMode] for options. */ + static viewport_set_clear_mode(viewport: RID, clear_mode: RenderingServer.ViewportClearMode): void + + /** Returns the render target for the viewport. */ + static viewport_get_render_target(viewport: RID): RID + + /** Returns the viewport's last rendered frame. */ + static viewport_get_texture(viewport: RID): RID + + /** If `true`, the viewport's 3D elements are not rendered. */ + static viewport_set_disable_3d(viewport: RID, disable: boolean): void + + /** If `true`, the viewport's canvas (i.e. 2D and GUI elements) is not rendered. */ + static viewport_set_disable_2d(viewport: RID, disable: boolean): void + + /** Sets the viewport's environment mode which allows enabling or disabling rendering of 3D environment over 2D canvas. When disabled, 2D will not be affected by the environment. When enabled, 2D will be affected by the environment if the environment background mode is [constant ENV_BG_CANVAS]. The default behavior is to inherit the setting from the viewport's parent. If the topmost parent is also set to [constant VIEWPORT_ENVIRONMENT_INHERIT], then the behavior will be the same as if it was set to [constant VIEWPORT_ENVIRONMENT_ENABLED]. */ + static viewport_set_environment_mode(viewport: RID, mode: RenderingServer.ViewportEnvironmentMode): void + + /** Sets a viewport's camera. */ + static viewport_attach_camera(viewport: RID, camera: RID): void + + /** Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas, etc. */ + static viewport_set_scenario(viewport: RID, scenario: RID): void + + /** Sets a viewport's canvas. */ + static viewport_attach_canvas(viewport: RID, canvas: RID): void + + /** Detaches a viewport from a canvas. */ + static viewport_remove_canvas(viewport: RID, canvas: RID): void + + /** If `true`, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when [Camera2D] smoothing is enabled. Equivalent to [member ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel]. */ + static viewport_set_snap_2d_transforms_to_pixel(viewport: RID, enabled: boolean): void + + /** If `true`, canvas item vertices (i.e. polygon points) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when [Camera2D] smoothing is enabled. Equivalent to [member ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel]. */ + static viewport_set_snap_2d_vertices_to_pixel(viewport: RID, enabled: boolean): void + + /** Sets the default texture filtering mode for the specified [param viewport] RID. See [enum CanvasItemTextureFilter] for options. */ + static viewport_set_default_canvas_item_texture_filter(viewport: RID, filter: RenderingServer.CanvasItemTextureFilter): void + + /** Sets the default texture repeat mode for the specified [param viewport] RID. See [enum CanvasItemTextureRepeat] for options. */ + static viewport_set_default_canvas_item_texture_repeat(viewport: RID, repeat: RenderingServer.CanvasItemTextureRepeat): void + + /** Sets the transformation of a viewport's canvas. */ + static viewport_set_canvas_transform(viewport: RID, canvas: RID, offset: Transform2D): void + + /** Sets the stacking order for a viewport's canvas. + * [param layer] is the actual canvas layer, while [param sublayer] specifies the stacking order of the canvas among those in the same layer. + */ + static viewport_set_canvas_stacking(viewport: RID, canvas: RID, layer: int64, sublayer: int64): void + + /** If `true`, the viewport renders its background as transparent. */ + static viewport_set_transparent_background(viewport: RID, enabled: boolean): void + + /** Sets the viewport's global transformation matrix. */ + static viewport_set_global_canvas_transform(viewport: RID, transform: Transform2D): void + + /** Sets the viewport's 2D signed distance field [member ProjectSettings.rendering/2d/sdf/oversize] and [member ProjectSettings.rendering/2d/sdf/scale]. This is used when sampling the signed distance field in [CanvasItem] shaders as well as [GPUParticles2D] collision. This is *not* used by SDFGI in 3D rendering. */ + static viewport_set_sdf_oversize_and_scale(viewport: RID, oversize: RenderingServer.ViewportSDFOversize, scale: RenderingServer.ViewportSDFScale): void + + /** Sets the [param size] of the shadow atlas's images (used for omni and spot lights) on the viewport specified by the [param viewport] RID. The value is rounded up to the nearest power of 2. If [param use_16_bits] is `true`, use 16 bits for the omni/spot shadow depth map. Enabling this results in shadows having less precision and may result in shadow acne, but can lead to performance improvements on some devices. + * + * **Note:** If this is set to `0`, no positional shadows will be visible at all. This can improve performance significantly on low-end systems by reducing both the CPU and GPU load (as fewer draw calls are needed to draw the scene without shadows). + */ + static viewport_set_positional_shadow_atlas_size(viewport: RID, size: int64, use_16_bits: boolean = false): void + + /** Sets the number of subdivisions to use in the specified shadow atlas [param quadrant] for omni and spot shadows. See also [method Viewport.set_positional_shadow_atlas_quadrant_subdiv]. */ + static viewport_set_positional_shadow_atlas_quadrant_subdivision(viewport: RID, quadrant: int64, subdivision: int64): void + + /** Sets the multisample anti-aliasing mode for 3D on the specified [param viewport] RID. See [enum ViewportMSAA] for options. */ + static viewport_set_msaa_3d(viewport: RID, msaa: RenderingServer.ViewportMSAA): void + + /** Sets the multisample anti-aliasing mode for 2D/Canvas on the specified [param viewport] RID. See [enum ViewportMSAA] for options. */ + static viewport_set_msaa_2d(viewport: RID, msaa: RenderingServer.ViewportMSAA): void + + /** If `true`, 2D rendering will use a high dynamic range (HDR) format framebuffer matching the bit depth of the 3D framebuffer. When using the Forward+ renderer this will be an `RGBA16` framebuffer, while when using the Mobile renderer it will be an `RGB10_A2` framebuffer. Additionally, 2D rendering will take place in linear color space and will be converted to sRGB space immediately before blitting to the screen (if the Viewport is attached to the screen). Practically speaking, this means that the end result of the Viewport will not be clamped into the `0-1` range and can be used in 3D rendering without color space adjustments. This allows 2D rendering to take advantage of effects requiring high dynamic range (e.g. 2D glow) as well as substantially improves the appearance of effects requiring highly detailed gradients. This setting has the same effect as [member Viewport.use_hdr_2d]. + * + * **Note:** This setting will have no effect when using the GL Compatibility renderer as the GL Compatibility renderer always renders in low dynamic range for performance reasons. + */ + static viewport_set_use_hdr_2d(viewport: RID, enabled: boolean): void + + /** Sets the viewport's screen-space antialiasing mode. */ + static viewport_set_screen_space_aa(viewport: RID, mode: RenderingServer.ViewportScreenSpaceAA): void + + /** If `true`, use Temporal Anti-Aliasing. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_taa]. */ + static viewport_set_use_taa(viewport: RID, enable: boolean): void + + /** If `true`, enables debanding on the specified viewport. Equivalent to [member ProjectSettings.rendering/anti_aliasing/quality/use_debanding]. */ + static viewport_set_use_debanding(viewport: RID, enable: boolean): void + + /** If `true`, enables occlusion culling on the specified viewport. Equivalent to [member ProjectSettings.rendering/occlusion_culling/use_occlusion_culling]. */ + static viewport_set_use_occlusion_culling(viewport: RID, enable: boolean): void + + /** Sets the [member ProjectSettings.rendering/occlusion_culling/occlusion_rays_per_thread] to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. */ + static viewport_set_occlusion_rays_per_thread(rays_per_thread: int64): void + + /** Sets the [member ProjectSettings.rendering/occlusion_culling/bvh_build_quality] to use for occlusion culling. This parameter is global and cannot be set on a per-viewport basis. */ + static viewport_set_occlusion_culling_build_quality(quality: RenderingServer.ViewportOcclusionCullingBuildQuality): void + + /** Returns a statistic about the rendering engine which can be used for performance profiling. This is separated into render pass [param type]s, each of them having the same [param info]s you can query (different passes will return different values). See [enum RenderingServer.ViewportRenderInfoType] for a list of render pass types and [enum RenderingServer.ViewportRenderInfo] for a list of information that can be queried. + * See also [method get_rendering_info], which returns global information across all viewports. + * + * **Note:** Viewport rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method viewport_get_render_info] returns `0`. To print rendering information in `_ready()` successfully, use the following: + * + */ + static viewport_get_render_info(viewport: RID, type: RenderingServer.ViewportRenderInfoType, info: RenderingServer.ViewportRenderInfo): int64 + + /** Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. */ + static viewport_set_debug_draw(viewport: RID, draw: RenderingServer.ViewportDebugDraw): void + + /** Sets the measurement for the given [param viewport] RID (obtained using [method Viewport.get_viewport_rid]). Once enabled, [method viewport_get_measured_render_time_cpu] and [method viewport_get_measured_render_time_gpu] will return values greater than `0.0` when queried with the given [param viewport]. */ + static viewport_set_measure_render_time(viewport: RID, enable: boolean): void + + /** Returns the CPU time taken to render the last frame in milliseconds. This *only* includes time spent in rendering-related operations; scripts' `_process` functions and other engine subsystems are not included in this readout. To get a complete readout of CPU time spent to render the scene, sum the render times of all viewports that are drawn every frame plus [method get_frame_setup_time_cpu]. Unlike [method Engine.get_frames_per_second], this method will accurately reflect CPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu]. + * + * **Note:** Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns `0.0`. + */ + static viewport_get_measured_render_time_cpu(viewport: RID): float64 + + /** Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike [method Engine.get_frames_per_second], this method accurately reflects GPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu]. + * + * **Note:** Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns `0.0`. + * + * **Note:** When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using [method viewport_get_measured_render_time_gpu]. This behavior can be overridden in the graphics driver settings at the cost of higher power usage. + */ + static viewport_get_measured_render_time_gpu(viewport: RID): float64 + + /** Sets the Variable Rate Shading (VRS) mode for the viewport. If the GPU does not support VRS, this property is ignored. Equivalent to [member ProjectSettings.rendering/vrs/mode]. */ + static viewport_set_vrs_mode(viewport: RID, mode: RenderingServer.ViewportVRSMode): void + + /** Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. + * If set to [constant RenderingServer.VIEWPORT_VRS_UPDATE_ONCE], the input texture is copied once and the mode is changed to [constant RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED]. + */ + static viewport_set_vrs_update_mode(viewport: RID, mode: RenderingServer.ViewportVRSUpdateMode): void + + /** The texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. Equivalent to [member ProjectSettings.rendering/vrs/texture]. */ + static viewport_set_vrs_texture(viewport: RID, texture: RID): void + + /** Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `sky_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + */ + static sky_create(): RID + + /** Sets the [param radiance_size] of the sky specified by the [param sky] RID (in pixels). Equivalent to [member Sky.radiance_size]. */ + static sky_set_radiance_size(sky: RID, radiance_size: int64): void + + /** Sets the process [param mode] of the sky specified by the [param sky] RID. Equivalent to [member Sky.process_mode]. */ + static sky_set_mode(sky: RID, mode: RenderingServer.SkyMode): void + + /** Sets the material that the sky uses to render the background, ambient and reflection maps. */ + static sky_set_material(sky: RID, material: RID): void + + /** Generates and returns an [Image] containing the radiance map for the specified [param sky] RID. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is `true`, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also [method environment_bake_panorama]. + * + * **Note:** The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. [param energy] values above `1.0` can be used to brighten the resulting image. + * + * **Note:** [param size] should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than [member Sky.radiance_size], as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. + */ + static sky_bake_panorama(sky: RID, energy: float64, bake_irradiance: boolean, size: Vector2i): Image + + /** Creates a new rendering effect and adds it to the RenderingServer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + */ + static compositor_effect_create(): RID + + /** Enables/disables this rendering effect. */ + static compositor_effect_set_enabled(effect: RID, enabled: boolean): void + + /** Sets the callback type ([param callback_type]) and callback method([param callback]) for this rendering effect. */ + static compositor_effect_set_callback(effect: RID, callback_type: RenderingServer.CompositorEffectCallbackType, callback: Callable): void + + /** Sets the flag ([param flag]) for this rendering effect to `true` or `false` ([param set]). */ + static compositor_effect_set_flag(effect: RID, flag: RenderingServer.CompositorEffectFlags, set: boolean): void + + /** Creates a new compositor and adds it to the RenderingServer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + */ + static compositor_create(): RID + + /** Sets the compositor effects for the specified compositor RID. [param effects] should be an array containing RIDs created with [method compositor_effect_create]. */ + static compositor_set_compositor_effects(compositor: RID, effects: GArray): void + + /** Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `environment_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [Environment]. + */ + static environment_create(): RID + + /** Sets the environment's background mode. Equivalent to [member Environment.background_mode]. */ + static environment_set_background(env: RID, bg: RenderingServer.EnvironmentBG): void + + /** Sets the [Sky] to be used as the environment's background when using *BGMode* sky. Equivalent to [member Environment.sky]. */ + static environment_set_sky(env: RID, sky: RID): void + + /** Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov]. */ + static environment_set_sky_custom_fov(env: RID, scale: float64): void + + /** Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. */ + static environment_set_sky_orientation(env: RID, orientation: Basis): void + + /** Color displayed for clear areas of the scene. Only effective if using the [constant ENV_BG_COLOR] background mode. */ + static environment_set_bg_color(env: RID, color: Color): void + + /** Sets the intensity of the background color. */ + static environment_set_bg_energy(env: RID, multiplier: float64, exposure_value: float64): void + + /** Sets the maximum layer to use if using Canvas background mode. */ + static environment_set_canvas_max_layer(env: RID, max_layer: int64): void + + /** Sets the values to be used for ambient light rendering. See [Environment] for more details. */ + static environment_set_ambient_light(env: RID, color: Color, ambient: RenderingServer.EnvironmentAmbientSource = 0, energy: float64 = 1, sky_contibution: float64 = 0, reflection_source: RenderingServer.EnvironmentReflectionSource = 0): void + + /** Configures glow for the specified environment RID. See `glow_*` properties in [Environment] for more information. */ + static environment_set_glow(env: RID, enable: boolean, levels: PackedFloat32Array | float32[], intensity: float64, strength: float64, mix: float64, bloom_threshold: float64, blend_mode: RenderingServer.EnvironmentGlowBlendMode, hdr_bleed_threshold: float64, hdr_bleed_scale: float64, hdr_luminance_cap: float64, glow_map_strength: float64, glow_map: RID): void + + /** Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. */ + static environment_set_tonemap(env: RID, tone_mapper: RenderingServer.EnvironmentToneMapper, exposure: float64, white: float64): void + + /** Sets the values to be used with the "adjustments" post-process effect. See [Environment] for more details. */ + static environment_set_adjustment(env: RID, enable: boolean, brightness: float64, contrast: float64, saturation: float64, use_1d_color_correction: boolean, color_correction: RID): void + + /** Sets the variables to be used with the screen-space reflections (SSR) post-process effect. See [Environment] for more details. */ + static environment_set_ssr(env: RID, enable: boolean, max_steps: int64, fade_in: float64, fade_out: float64, depth_tolerance: float64): void + + /** Sets the variables to be used with the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details. */ + static environment_set_ssao(env: RID, enable: boolean, radius: float64, intensity: float64, power: float64, detail: float64, horizon: float64, sharpness: float64, light_affect: float64, ao_channel_affect: float64): void + + /** Configures fog for the specified environment RID. See `fog_*` properties in [Environment] for more information. */ + static environment_set_fog(env: RID, enable: boolean, light_color: Color, light_energy: float64, sun_scatter: float64, density: float64, height: float64, height_density: float64, aerial_perspective: float64, sky_affect: float64, fog_mode: RenderingServer.EnvironmentFogMode = 0): void + + /** Configures signed distance field global illumination for the specified environment RID. See `sdfgi_*` properties in [Environment] for more information. */ + static environment_set_sdfgi(env: RID, enable: boolean, cascades: int64, min_cell_size: float64, y_scale: RenderingServer.EnvironmentSDFGIYScale, use_occlusion: boolean, bounce_feedback: float64, read_sky: boolean, energy: float64, normal_bias: float64, probe_bias: float64): void + + /** Sets the variables to be used with the volumetric fog post-process effect. See [Environment] for more details. */ + static environment_set_volumetric_fog(env: RID, enable: boolean, density: float64, albedo: Color, emission: Color, emission_energy: float64, anisotropy: float64, length: float64, p_detail_spread: float64, gi_inject: float64, temporal_reprojection: boolean, temporal_reprojection_amount: float64, ambient_inject: float64, sky_affect: float64): void + + /** If [param enable] is `true`, enables bicubic upscaling for glow which improves quality at the cost of performance. Equivalent to [member ProjectSettings.rendering/environment/glow/upscale_mode]. */ + static environment_glow_set_use_bicubic_upscale(enable: boolean): void + static environment_set_ssr_roughness_quality(quality: RenderingServer.EnvironmentSSRRoughnessQuality): void + + /** Sets the quality level of the screen-space ambient occlusion (SSAO) post-process effect. See [Environment] for more details. */ + static environment_set_ssao_quality(quality: RenderingServer.EnvironmentSSAOQuality, half_size: boolean, adaptive_target: float64, blur_passes: int64, fadeout_from: float64, fadeout_to: float64): void + + /** Sets the quality level of the screen-space indirect lighting (SSIL) post-process effect. See [Environment] for more details. */ + static environment_set_ssil_quality(quality: RenderingServer.EnvironmentSSILQuality, half_size: boolean, adaptive_target: float64, blur_passes: int64, fadeout_from: float64, fadeout_to: float64): void + + /** Sets the number of rays to throw per frame when computing signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/probe_ray_count]. */ + static environment_set_sdfgi_ray_count(ray_count: RenderingServer.EnvironmentSDFGIRayCount): void + + /** Sets the number of frames to use for converging signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_converge]. */ + static environment_set_sdfgi_frames_to_converge(frames: RenderingServer.EnvironmentSDFGIFramesToConverge): void + + /** Sets the update speed for dynamic lights' indirect lighting when computing signed distance field global illumination. Equivalent to [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights]. */ + static environment_set_sdfgi_frames_to_update_light(frames: RenderingServer.EnvironmentSDFGIFramesToUpdateLight): void + + /** Sets the resolution of the volumetric fog's froxel buffer. [param size] is modified by the screen's aspect ratio and then used to set the width and height of the buffer. While [param depth] is directly used to set the depth of the buffer. */ + static environment_set_volumetric_fog_volume_size(size: int64, depth: int64): void + + /** Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts. */ + static environment_set_volumetric_fog_filter_active(active: boolean): void + + /** Generates and returns an [Image] containing the radiance map for the specified [param environment] RID's sky. This supports built-in sky material and custom sky shaders. If [param bake_irradiance] is `true`, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also [method sky_bake_panorama]. + * + * **Note:** The image is saved in linear color space without any tonemapping performed, which means it will look too dark if viewed directly in an image editor. + * + * **Note:** [param size] should be a 2:1 aspect ratio for the generated panorama to have square pixels. For radiance maps, there is no point in using a height greater than [member Sky.radiance_size], as it won't increase detail. Irradiance maps only contain low-frequency data, so there is usually no point in going past a size of 128×64 pixels when saving an irradiance map. + */ + static environment_bake_panorama(environment: RID, bake_irradiance: boolean, size: Vector2i): Image + + /** Sets the screen-space roughness limiter parameters, such as whether it should be enabled and its thresholds. Equivalent to [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/enabled], [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/amount] and [member ProjectSettings.rendering/anti_aliasing/screen_space_roughness_limiter/limit]. */ + static screen_space_roughness_limiter_set_active(enable: boolean, amount: float64, limit: float64): void + + /** Sets [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality] to use when rendering materials that have subsurface scattering enabled. */ + static sub_surface_scattering_set_quality(quality: RenderingServer.SubSurfaceScatteringQuality): void + + /** Sets the [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale] and [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale] to use when rendering materials that have subsurface scattering enabled. */ + static sub_surface_scattering_set_scale(scale: float64, depth_scale: float64): void + + /** Creates a camera attributes object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `camera_attributes_` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [CameraAttributes]. + */ + static camera_attributes_create(): RID + + /** Sets the quality level of the DOF blur effect to one of the options in [enum DOFBlurQuality]. [param use_jitter] can be used to jitter samples taken during the blur pass to hide artifacts at the cost of looking more fuzzy. */ + static camera_attributes_set_dof_blur_quality(quality: RenderingServer.DOFBlurQuality, use_jitter: boolean): void + + /** Sets the shape of the DOF bokeh pattern. Different shapes may be used to achieve artistic effect, or to meet performance targets. For more detail on available options see [enum DOFBokehShape]. */ + static camera_attributes_set_dof_blur_bokeh_shape(shape: RenderingServer.DOFBokehShape): void + + /** Sets the parameters to use with the DOF blur effect. These parameters take on the same meaning as their counterparts in [CameraAttributesPractical]. */ + static camera_attributes_set_dof_blur(camera_attributes: RID, far_enable: boolean, far_distance: float64, far_transition: float64, near_enable: boolean, near_distance: float64, near_transition: float64, amount: float64): void + + /** Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. + * The normalization factor can be calculated from exposure value (EV100) as follows: + * + * The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: + * + */ + static camera_attributes_set_exposure(camera_attributes: RID, multiplier: float64, normalization: float64): void + + /** Sets the parameters to use with the auto-exposure effect. These parameters take on the same meaning as their counterparts in [CameraAttributes] and [CameraAttributesPractical]. */ + static camera_attributes_set_auto_exposure(camera_attributes: RID, enable: boolean, min_sensitivity: float64, max_sensitivity: float64, speed: float64, scale: float64): void + + /** Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `scenario_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * The scenario is the 3D world that all the visual instances exist in. + */ + static scenario_create(): RID + + /** Sets the environment that will be used with this scenario. See also [Environment]. */ + static scenario_set_environment(scenario: RID, environment: RID): void + + /** Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. */ + static scenario_set_fallback_environment(scenario: RID, environment: RID): void + + /** Sets the camera attributes ([param effects]) that will be used with this scenario. See also [CameraAttributes]. */ + static scenario_set_camera_attributes(scenario: RID, effects: RID): void + + /** Sets the compositor ([param compositor]) that will be used with this scenario. See also [Compositor]. */ + static scenario_set_compositor(scenario: RID, compositor: RID): void + + /** Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. This is a shorthand for using [method instance_create] and setting the base and scenario manually. + */ + static instance_create2(base: RID, scenario: RID): RID + + /** Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `instance_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, reflection probes and decals need to be associated with an instance to be visible in the scenario using [method instance_set_base]. + * + * **Note:** The equivalent node is [VisualInstance3D]. + */ + static instance_create(): RID + + /** Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, particle system, reflection probe, decal, lightmap, voxel GI and visibility notifiers are all types that can be set as the base of an instance in order to be displayed in the scenario. */ + static instance_set_base(instance: RID, base: RID): void + + /** Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. */ + static instance_set_scenario(instance: RID, scenario: RID): void + + /** Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. */ + static instance_set_layer_mask(instance: RID, mask: int64): void + + /** Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. */ + static instance_set_pivot_data(instance: RID, sorting_offset: float64, use_aabb_center: boolean): void + + /** Sets the world space transform of the instance. Equivalent to [member Node3D.global_transform]. */ + static instance_set_transform(instance: RID, transform: Transform3D): void + + /** Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. */ + static instance_attach_object_instance_id(instance: RID, id: int64): void + + /** Sets the weight for a given blend shape associated with this instance. */ + static instance_set_blend_shape_weight(instance: RID, shape: int64, weight: float64): void + + /** Sets the override material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_override_material]. */ + static instance_set_surface_override_material(instance: RID, surface: int64, material: RID): void + + /** Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible]. */ + static instance_set_visible(instance: RID, visible: boolean): void + + /** Sets the transparency for the given geometry instance. Equivalent to [member GeometryInstance3D.transparency]. + * A transparency of `0.0` is fully opaque, while `1.0` is fully transparent. Values greater than `0.0` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [param transparency] to a value greater than `0.0` (exclusive) will *not* disable shadow rendering. + * In spatial shaders, `1.0 - transparency` is set as the default value of the `ALPHA` built-in. + * + * **Note:** [param transparency] is clamped between `0.0` and `1.0`, so this property cannot be used to make transparent materials more opaque than they originally are. + */ + static instance_geometry_set_transparency(instance: RID, transparency: float64): void + + /** Sets a custom AABB to use when culling objects from the view frustum. Equivalent to setting [member GeometryInstance3D.custom_aabb]. */ + static instance_set_custom_aabb(instance: RID, aabb: AABB): void + + /** Attaches a skeleton to an instance. Removes the previous skeleton from the instance. */ + static instance_attach_skeleton(instance: RID, skeleton: RID): void + + /** Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin]. */ + static instance_set_extra_visibility_margin(instance: RID, margin: float64): void + + /** Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent]. */ + static instance_set_visibility_parent(instance: RID, parent: RID): void + + /** If `true`, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as [member GeometryInstance3D.ignore_occlusion_culling], which only ignores occlusion culling and leaves frustum culling intact. */ + static instance_set_ignore_culling(instance: RID, enabled: boolean): void + + /** Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. */ + static instance_geometry_set_flag(instance: RID, flag: RenderingServer.InstanceFlags, enabled: boolean): void + + /** Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. */ + static instance_geometry_set_cast_shadows_setting(instance: RID, shadow_casting_setting: RenderingServer.ShadowCastingSetting): void + + /** Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. */ + static instance_geometry_set_material_override(instance: RID, material: RID): void + + /** Sets a material that will be rendered for all surfaces on top of active materials for the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_overlay]. */ + static instance_geometry_set_material_overlay(instance: RID, material: RID): void + + /** Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties. */ + static instance_geometry_set_visibility_range(instance: RID, min: float64, max: float64, min_margin: float64, max_margin: float64, fade_mode: RenderingServer.VisibilityRangeFadeMode): void + + /** Sets the lightmap GI instance to use for the specified 3D geometry instance. The lightmap UV scale for the specified instance (equivalent to [member GeometryInstance3D.gi_lightmap_scale]) and lightmap atlas slice must also be specified. */ + static instance_geometry_set_lightmap(instance: RID, lightmap: RID, lightmap_uv_scale: Rect2, lightmap_slice: int64): void + + /** Sets the level of detail bias to use when rendering the specified 3D geometry instance. Higher values result in higher detail from further away. Equivalent to [member GeometryInstance3D.lod_bias]. */ + static instance_geometry_set_lod_bias(instance: RID, lod_bias: float64): void + + /** Sets the per-instance shader uniform on the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.set_instance_shader_parameter]. */ + static instance_geometry_set_shader_parameter(instance: RID, parameter: StringName, value: any): void + + /** Returns the value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter]. + * + * **Note:** Per-instance shader parameter names are case-sensitive. + */ + static instance_geometry_get_shader_parameter(instance: RID, parameter: StringName): any + + /** Returns the default value of the per-instance shader uniform from the specified 3D geometry instance. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter]. */ + static instance_geometry_get_shader_parameter_default_value(instance: RID, parameter: StringName): any + + /** Returns a dictionary of per-instance shader uniform names of the per-instance shader uniform from the specified 3D geometry instance. The returned dictionary is in PropertyInfo format, with the keys `name`, `class_name`, `type`, `hint`, `hint_string` and `usage`. Equivalent to [method GeometryInstance3D.get_instance_shader_parameter]. */ + static instance_geometry_get_shader_parameter_list(instance: RID): GArray + + /** Returns an array of object IDs intersecting with the provided AABB. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + * **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + */ + static instances_cull_aabb(aabb: AABB, scenario: RID = new RID()): PackedInt64Array + + /** Returns an array of object IDs intersecting with the provided 3D ray. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + * **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + */ + static instances_cull_ray(from: Vector3, to: Vector3, scenario: RID = new RID()): PackedInt64Array + + /** Returns an array of object IDs intersecting with the provided convex shape. Only 3D nodes that inherit from [VisualInstance3D] are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. + * **Warning:** This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + */ + static instances_cull_convex(convex: GArray, scenario: RID = new RID()): PackedInt64Array + + /** Bakes the material data of the Mesh passed in the [param base] parameter with optional [param material_overrides] to a set of [Image]s of size [param image_size]. Returns an array of [Image]s containing material properties as specified in [enum BakeChannels]. */ + static bake_render_uv2(base: RID, material_overrides: GArray, image_size: Vector2i): GArray + + /** Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * Canvas has no [Resource] or [Node] equivalent. + */ + static canvas_create(): RID + + /** A copy of the canvas item will be drawn with a local offset of the [param mirroring]. + * + * **Note:** This is equivalent to calling [method canvas_set_item_repeat] like `canvas_set_item_repeat(item, mirroring, 1)`, with an additional check ensuring [param canvas] is a parent of [param item]. + */ + static canvas_set_item_mirroring(canvas: RID, item: RID, mirroring: Vector2): void + + /** A copy of the canvas item will be drawn with a local offset of the [param repeat_size] by the number of times of the [param repeat_times]. As the [param repeat_times] increases, the copies will spread away from the origin texture. */ + static canvas_set_item_repeat(item: RID, repeat_size: Vector2, repeat_times: int64): void + + /** Modulates all colors in the given canvas. */ + static canvas_set_modulate(canvas: RID, color: Color): void + static canvas_set_disable_scale(disable: boolean): void + + /** Creates a canvas texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_texture_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. See also [method texture_2d_create]. + * + * **Note:** The equivalent resource is [CanvasTexture] and is only meant to be used in 2D rendering, not 3D. + */ + static canvas_texture_create(): RID + + /** Sets the [param channel]'s [param texture] for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.diffuse_texture], [member CanvasTexture.normal_texture] and [member CanvasTexture.specular_texture]. */ + static canvas_texture_set_channel(canvas_texture: RID, channel: RenderingServer.CanvasTextureChannel, texture: RID): void + + /** Sets the [param base_color] and [param shininess] to use for the canvas texture specified by the [param canvas_texture] RID. Equivalent to [member CanvasTexture.specular_color] and [member CanvasTexture.specular_shininess]. */ + static canvas_texture_set_shading_parameters(canvas_texture: RID, base_color: Color, shininess: float64): void + + /** Sets the texture [param filter] mode to use for the canvas texture specified by the [param canvas_texture] RID. */ + static canvas_texture_set_texture_filter(canvas_texture: RID, filter: RenderingServer.CanvasItemTextureFilter): void + + /** Sets the texture [param repeat] mode to use for the canvas texture specified by the [param canvas_texture] RID. */ + static canvas_texture_set_texture_repeat(canvas_texture: RID, repeat: RenderingServer.CanvasItemTextureRepeat): void + + /** Creates a new CanvasItem instance and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all `canvas_item_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [CanvasItem]. + */ + static canvas_item_create(): RID + + /** Sets a parent [CanvasItem] to the [CanvasItem]. The item will inherit transform, modulation and visibility from its parent, like [CanvasItem] nodes in the scene tree. */ + static canvas_item_set_parent(item: RID, parent: RID): void + + /** Sets the default texture filter mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_filter]. */ + static canvas_item_set_default_texture_filter(item: RID, filter: RenderingServer.CanvasItemTextureFilter): void + + /** Sets the default texture repeat mode for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.texture_repeat]. */ + static canvas_item_set_default_texture_repeat(item: RID, repeat: RenderingServer.CanvasItemTextureRepeat): void + + /** Sets the visibility of the [CanvasItem]. */ + static canvas_item_set_visible(item: RID, visible: boolean): void + + /** Sets the light [param mask] for the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.light_mask]. */ + static canvas_item_set_light_mask(item: RID, mask: int64): void + + /** Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem]. */ + static canvas_item_set_visibility_layer(item: RID, visibility_layer: int64): void + + /** Sets the [param transform] of the canvas item specified by the [param item] RID. This affects where and how the item will be drawn. Child canvas items' transforms are multiplied by their parent's transform. Equivalent to [member Node2D.transform]. */ + static canvas_item_set_transform(item: RID, transform: Transform2D): void + + /** If [param clip] is `true`, makes the canvas item specified by the [param item] RID not draw anything outside of its rect's coordinates. This clipping is fast, but works only with axis-aligned rectangles. This means that rotation is ignored by the clipping rectangle. For more advanced clipping shapes, use [method canvas_item_set_canvas_group_mode] instead. + * + * **Note:** The equivalent node functionality is found in [member Label.clip_text], [RichTextLabel] (always enabled) and more. + */ + static canvas_item_set_clip(item: RID, clip: boolean): void + + /** If [param enabled] is `true`, enables multichannel signed distance field rendering mode for the canvas item specified by the [param item] RID. This is meant to be used for font rendering, or with specially generated images using [url=https://github.com/Chlumsky/msdfgen]msdfgen[/url]. */ + static canvas_item_set_distance_field_mode(item: RID, enabled: boolean): void + + /** If [param use_custom_rect] is `true`, sets the custom visibility rectangle (used for culling) to [param rect] for the canvas item specified by [param item]. Setting a custom visibility rect can reduce CPU load when drawing lots of 2D instances. If [param use_custom_rect] is `false`, automatically computes a visibility rectangle based on the canvas item's draw commands. */ + static canvas_item_set_custom_rect(item: RID, use_custom_rect: boolean, rect: Rect2 = new Rect2(0, 0, 0, 0)): void + + /** Multiplies the color of the canvas item specified by the [param item] RID, while affecting its children. See also [method canvas_item_set_self_modulate]. Equivalent to [member CanvasItem.modulate]. */ + static canvas_item_set_modulate(item: RID, color: Color): void + + /** Multiplies the color of the canvas item specified by the [param item] RID, without affecting its children. See also [method canvas_item_set_modulate]. Equivalent to [member CanvasItem.self_modulate]. */ + static canvas_item_set_self_modulate(item: RID, color: Color): void + + /** If [param enabled] is `true`, draws the canvas item specified by the [param item] RID behind its parent. Equivalent to [member CanvasItem.show_behind_parent]. */ + static canvas_item_set_draw_behind_parent(item: RID, enabled: boolean): void + + /** If [param interpolated] is `true`, turns on physics interpolation for the canvas item. */ + static canvas_item_set_interpolated(item: RID, interpolated: boolean): void + + /** Prevents physics interpolation for the current physics tick. + * This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + */ + static canvas_item_reset_physics_interpolation(item: RID): void + + /** Transforms both the current and previous stored transform for a canvas item. + * This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. + */ + static canvas_item_transform_physics_interpolation(item: RID, transform: Transform2D): void + + /** Draws a line on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_line]. */ + static canvas_item_add_line(item: RID, from: Vector2, to: Vector2, color: Color, width: float64 = -1, antialiased: boolean = false): void + + /** Draws a 2D polyline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_polyline] and [method CanvasItem.draw_polyline_colors]. */ + static canvas_item_add_polyline(item: RID, points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], width: float64 = -1, antialiased: boolean = false): void + + /** Draws a 2D multiline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multiline] and [method CanvasItem.draw_multiline_colors]. */ + static canvas_item_add_multiline(item: RID, points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], width: float64 = -1, antialiased: boolean = false): void + + /** Draws a rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_rect]. */ + static canvas_item_add_rect(item: RID, rect: Rect2, color: Color, antialiased: boolean = false): void + + /** Draws a circle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_circle]. */ + static canvas_item_add_circle(item: RID, pos: Vector2, radius: float64, color: Color, antialiased: boolean = false): void + + /** Draws a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect] and [method Texture2D.draw_rect]. */ + static canvas_item_add_texture_rect(item: RID, rect: Rect2, texture: RID, tile: boolean = false, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false): void + + /** See also [method CanvasItem.draw_msdf_texture_rect_region]. */ + static canvas_item_add_msdf_texture_rect_region(item: RID, rect: Rect2, texture: RID, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1), outline_size: int64 = 0, px_range: float64 = 1, scale: float64 = 1): void + + /** See also [method CanvasItem.draw_lcd_texture_rect_region]. */ + static canvas_item_add_lcd_texture_rect_region(item: RID, rect: Rect2, texture: RID, src_rect: Rect2, modulate: Color): void + + /** Draws the specified region of a 2D textured rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_texture_rect_region] and [method Texture2D.draw_rect_region]. */ + static canvas_item_add_texture_rect_region(item: RID, rect: Rect2, texture: RID, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false, clip_uv: boolean = true): void + + /** Draws a nine-patch rectangle on the [CanvasItem] pointed to by the [param item] [RID]. */ + static canvas_item_add_nine_patch(item: RID, rect: Rect2, source: Rect2, texture: RID, topleft: Vector2, bottomright: Vector2, x_axis_mode: RenderingServer.NinePatchAxisMode = 0, y_axis_mode: RenderingServer.NinePatchAxisMode = 0, draw_center: boolean = true, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a 2D primitive on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_primitive]. */ + static canvas_item_add_primitive(item: RID, points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], uvs: PackedVector2Array | Vector2[], texture: RID): void + + /** Draws a 2D polygon on the [CanvasItem] pointed to by the [param item] [RID]. If you need more flexibility (such as being able to use bones), use [method canvas_item_add_triangle_array] instead. See also [method CanvasItem.draw_polygon]. */ + static canvas_item_add_polygon(item: RID, points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], uvs: PackedVector2Array | Vector2[] = [], texture: RID = new RID()): void + + /** Draws a triangle array on the [CanvasItem] pointed to by the [param item] [RID]. This is internally used by [Line2D] and [StyleBoxFlat] for rendering. [method canvas_item_add_triangle_array] is highly flexible, but more complex to use than [method canvas_item_add_polygon]. + * + * **Note:** [param count] is unused and can be left unspecified. + */ + static canvas_item_add_triangle_array(item: RID, indices: PackedInt32Array | int32[], points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], uvs: PackedVector2Array | Vector2[] = [], bones: PackedInt32Array | int32[] = [], weights: PackedFloat32Array | float32[] = [], texture: RID = new RID(), count: int64 = -1): void + + /** Draws a mesh created with [method mesh_create] with given [param transform], [param modulate] color, and [param texture]. This is used internally by [MeshInstance2D]. */ + static canvas_item_add_mesh(item: RID, mesh: RID, transform: Transform2D = new Transform2D(), modulate: Color = new Color(1, 1, 1, 1), texture: RID = new RID()): void + + /** Draws a 2D [MultiMesh] on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multimesh]. */ + static canvas_item_add_multimesh(item: RID, mesh: RID, texture: RID = new RID()): void + + /** Draws particles on the [CanvasItem] pointed to by the [param item] [RID]. */ + static canvas_item_add_particles(item: RID, particles: RID, texture: RID): void + + /** Sets a [Transform2D] that will be used to transform subsequent canvas item commands. */ + static canvas_item_add_set_transform(item: RID, transform: Transform2D): void + + /** If [param ignore] is `true`, ignore clipping on items drawn with this canvas item until this is called again with [param ignore] set to false. */ + static canvas_item_add_clip_ignore(item: RID, ignore: boolean): void + + /** Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. */ + static canvas_item_add_animation_slice(item: RID, animation_length: float64, slice_begin: float64, slice_end: float64, offset: float64 = 0): void + + /** If [param enabled] is `true`, child nodes with the lowest Y position are drawn before those with a higher Y position. Y-sorting only affects children that inherit from the canvas item specified by the [param item] RID, not the canvas item itself. Equivalent to [member CanvasItem.y_sort_enabled]. */ + static canvas_item_set_sort_children_by_y(item: RID, enabled: boolean): void + + /** Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first). */ + static canvas_item_set_z_index(item: RID, z_index: int64): void + + /** If this is enabled, the Z index of the parent will be added to the children's Z index. */ + static canvas_item_set_z_as_relative_to_parent(item: RID, enabled: boolean): void + + /** Sets the [CanvasItem] to copy a rect to the backbuffer. */ + static canvas_item_set_copy_to_backbuffer(item: RID, enabled: boolean, rect: Rect2): void + + /** Clears the [CanvasItem] and removes all commands in it. */ + static canvas_item_clear(item: RID): void + + /** Sets the index for the [CanvasItem]. */ + static canvas_item_set_draw_index(item: RID, index: int64): void + + /** Sets a new [param material] to the canvas item specified by the [param item] RID. Equivalent to [member CanvasItem.material]. */ + static canvas_item_set_material(item: RID, material: RID): void + + /** Sets if the [CanvasItem] uses its parent's material. */ + static canvas_item_set_use_parent_material(item: RID, enabled: boolean): void + + /** Sets the given [CanvasItem] as visibility notifier. [param area] defines the area of detecting visibility. [param enter_callable] is called when the [CanvasItem] enters the screen, [param exit_callable] is called when the [CanvasItem] exits the screen. If [param enable] is `false`, the item will no longer function as notifier. + * This method can be used to manually mimic [VisibleOnScreenNotifier2D]. + */ + static canvas_item_set_visibility_notifier(item: RID, enable: boolean, area: Rect2, enter_callable: Callable, exit_callable: Callable): void + + /** Sets the canvas group mode used during 2D rendering for the canvas item specified by the [param item] RID. For faster but more limited clipping, use [method canvas_item_set_clip] instead. + * + * **Note:** The equivalent node functionality is found in [CanvasGroup] and [member CanvasItem.clip_children]. + */ + static canvas_item_set_canvas_group_mode(item: RID, mode: RenderingServer.CanvasGroupMode, clear_margin: float64 = 5, fit_empty: boolean = false, fit_margin: float64 = 0, blur_mipmaps: boolean = false): void + + /** Returns the bounding rectangle for a canvas item in local space, as calculated by the renderer. This bound is used internally for culling. + * **Warning:** This function is intended for debugging in the editor, and will pass through and return a zero [Rect2] in exported projects. + */ + static debug_canvas_item_get_rect(item: RID): Rect2 + + /** Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [Light2D]. + */ + static canvas_light_create(): RID + + /** Attaches the canvas light to the canvas. Removes it from its previous canvas. */ + static canvas_light_attach_to_canvas(light: RID, canvas: RID): void + + /** Enables or disables a canvas light. */ + static canvas_light_set_enabled(light: RID, enabled: boolean): void + + /** Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale]. */ + static canvas_light_set_texture_scale(light: RID, scale: float64): void + + /** Sets the canvas light's [Transform2D]. */ + static canvas_light_set_transform(light: RID, transform: Transform2D): void + + /** Sets the texture to be used by a [PointLight2D]. Equivalent to [member PointLight2D.texture]. */ + static canvas_light_set_texture(light: RID, texture: RID): void + + /** Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset]. */ + static canvas_light_set_texture_offset(light: RID, offset: Vector2): void + + /** Sets the color for a light. */ + static canvas_light_set_color(light: RID, color: Color): void + + /** Sets a canvas light's height. */ + static canvas_light_set_height(light: RID, height: float64): void + + /** Sets a canvas light's energy. */ + static canvas_light_set_energy(light: RID, energy: float64): void + + /** Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. */ + static canvas_light_set_z_range(light: RID, min_z: int64, max_z: int64): void + + /** The layer range that gets rendered with this light. */ + static canvas_light_set_layer_range(light: RID, min_layer: int64, max_layer: int64): void + + /** The light mask. See [LightOccluder2D] for more information on light masks. */ + static canvas_light_set_item_cull_mask(light: RID, mask: int64): void + + /** The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks. */ + static canvas_light_set_item_shadow_cull_mask(light: RID, mask: int64): void + + /** The mode of the light, see [enum CanvasLightMode] constants. */ + static canvas_light_set_mode(light: RID, mode: RenderingServer.CanvasLightMode): void + + /** Enables or disables the canvas light's shadow. */ + static canvas_light_set_shadow_enabled(light: RID, enabled: boolean): void + + /** Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. */ + static canvas_light_set_shadow_filter(light: RID, filter: RenderingServer.CanvasLightShadowFilter): void + + /** Sets the color of the canvas light's shadow. */ + static canvas_light_set_shadow_color(light: RID, color: Color): void + + /** Smoothens the shadow. The lower, the smoother. */ + static canvas_light_set_shadow_smooth(light: RID, smooth: float64): void + + /** Sets the blend mode for the given canvas light. See [enum CanvasLightBlendMode] for options. Equivalent to [member Light2D.blend_mode]. */ + static canvas_light_set_blend_mode(light: RID, mode: RenderingServer.CanvasLightBlendMode): void + + /** If [param interpolated] is `true`, turns on physics interpolation for the canvas light. */ + static canvas_light_set_interpolated(light: RID, interpolated: boolean): void + + /** Prevents physics interpolation for the current physics tick. + * This is useful when moving a canvas item to a new location, to give an instantaneous change rather than interpolation from the previous location. + */ + static canvas_light_reset_physics_interpolation(light: RID): void + + /** Transforms both the current and previous stored transform for a canvas light. + * This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin. + */ + static canvas_light_transform_physics_interpolation(light: RID, transform: Transform2D): void + + /** Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_light_occluder_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent node is [LightOccluder2D]. + */ + static canvas_light_occluder_create(): RID + + /** Attaches a light occluder to the canvas. Removes it from its previous canvas. */ + static canvas_light_occluder_attach_to_canvas(occluder: RID, canvas: RID): void + + /** Enables or disables light occluder. */ + static canvas_light_occluder_set_enabled(occluder: RID, enabled: boolean): void + + /** Sets a light occluder's polygon. */ + static canvas_light_occluder_set_polygon(occluder: RID, polygon: RID): void + static canvas_light_occluder_set_as_sdf_collision(occluder: RID, enable: boolean): void + + /** Sets a light occluder's [Transform2D]. */ + static canvas_light_occluder_set_transform(occluder: RID, transform: Transform2D): void + + /** The light mask. See [LightOccluder2D] for more information on light masks. */ + static canvas_light_occluder_set_light_mask(occluder: RID, mask: int64): void + + /** If [param interpolated] is `true`, turns on physics interpolation for the light occluder. */ + static canvas_light_occluder_set_interpolated(occluder: RID, interpolated: boolean): void + + /** Prevents physics interpolation for the current physics tick. + * This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location. + */ + static canvas_light_occluder_reset_physics_interpolation(occluder: RID): void + + /** Transforms both the current and previous stored transform for a light occluder. + * This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. + */ + static canvas_light_occluder_transform_physics_interpolation(occluder: RID, transform: Transform2D): void + + /** Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `canvas_occluder_polygon_*` RenderingServer functions. + * Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method. + * + * **Note:** The equivalent resource is [OccluderPolygon2D]. + */ + static canvas_occluder_polygon_create(): RID + + /** Sets the shape of the occluder polygon. */ + static canvas_occluder_polygon_set_shape(occluder_polygon: RID, shape: PackedVector2Array | Vector2[], closed: boolean): void + + /** Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. */ + static canvas_occluder_polygon_set_cull_mode(occluder_polygon: RID, mode: RenderingServer.CanvasOccluderPolygonCullMode): void + + /** Sets the [member ProjectSettings.rendering/2d/shadow_atlas/size] to use for [Light2D] shadow rendering (in pixels). The value is rounded up to the nearest power of 2. */ + static canvas_set_shadow_texture_size(size: int64): void + + /** Creates a new global shader uniform. + * + * **Note:** Global shader parameter names are case-sensitive. + */ + static global_shader_parameter_add(name: StringName, type: RenderingServer.GlobalShaderParameterType, default_value: any): void + + /** Removes the global shader uniform specified by [param name]. */ + static global_shader_parameter_remove(name: StringName): void + + /** Returns the list of global shader uniform names. + * + * **Note:** [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + */ + static global_shader_parameter_get_list(): GArray + + /** Sets the global shader uniform [param name] to [param value]. */ + static global_shader_parameter_set(name: StringName, value: any): void + + /** Overrides the global shader uniform [param name] with [param value]. Equivalent to the [ShaderGlobalsOverride] node. */ + static global_shader_parameter_set_override(name: StringName, value: any): void + + /** Returns the value of the global shader uniform specified by [param name]. + * + * **Note:** [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + */ + static global_shader_parameter_get(name: StringName): any + + /** Returns the type associated to the global shader uniform specified by [param name]. + * + * **Note:** [method global_shader_parameter_get] has a large performance penalty as the rendering thread needs to synchronize with the calling thread, which is slow. Do not use this method during gameplay to avoid stuttering. If you need to read values in a script after setting them, consider creating an autoload where you store the values you need to query at the same time you're setting them as global parameters. + */ + static global_shader_parameter_get_type(name: StringName): RenderingServer.GlobalShaderParameterType + + /** Tries to free an object in the RenderingServer. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingServer directly. */ + static free_rid(rid: RID): void + + /** Schedules a callback to the given callable after a frame has been drawn. */ + static request_frame_drawn_callback(callable: Callable): void + + /** Returns `true` if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens. */ + static has_changed(): boolean + + /** Returns a statistic about the rendering engine which can be used for performance profiling. See [enum RenderingServer.RenderingInfo] for a list of values that can be queried. See also [method viewport_get_render_info], which returns information specific to a viewport. + * + * **Note:** Only 3D rendering is currently taken into account by some of these values, such as the number of draw calls. + * + * **Note:** Rendering information is not available until at least 2 frames have been rendered by the engine. If rendering information is not available, [method get_rendering_info] returns `0`. To print rendering information in `_ready()` successfully, use the following: + * + */ + static get_rendering_info(info: RenderingServer.RenderingInfo): int64 + + /** Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). + * + * **Note:** When running a headless or server binary, this function returns an empty string. + * + * **Note:** On the web platform, some browsers such as Firefox may report a different, fixed GPU name such as "GeForce GTX 980" (regardless of the user's actual GPU model). This is done to make fingerprinting more difficult. + */ + static get_video_adapter_name(): string + + /** Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). + * + * **Note:** When running a headless or server binary, this function returns an empty string. + */ + static get_video_adapter_vendor(): string + + /** Returns the type of the video adapter. Since dedicated graphics cards from a given generation will *usually* be significantly faster than integrated graphics made in the same generation, the device type can be used as a basis for automatic graphics settings adjustment. However, this is not always true, so make sure to provide users with a way to manually override graphics settings. + * + * **Note:** When using the OpenGL backend or when running in headless mode, this function always returns [constant RenderingDevice.DEVICE_TYPE_OTHER]. + */ + static get_video_adapter_type(): RenderingDevice.DeviceType + + /** Returns the version of the graphics video adapter *currently in use* (e.g. "1.2.189" for Vulkan, "3.3.0 NVIDIA 510.60.02" for OpenGL). This version may be different from the actual latest version supported by the hardware, as Godot may not always request the latest version. See also [method OS.get_video_adapter_driver_info]. + * + * **Note:** When running a headless or server binary, this function returns an empty string. + */ + static get_video_adapter_api_version(): string + + /** Returns a mesh of a sphere with the given number of horizontal subdivisions, vertical subdivisions and radius. See also [method get_test_cube]. */ + static make_sphere_mesh(latitudes: int64, longitudes: int64, radius: float64): RID + + /** Returns the RID of the test cube. This mesh will be created and returned on the first call to [method get_test_cube], then it will be cached for subsequent calls. See also [method make_sphere_mesh]. */ + static get_test_cube(): RID + + /** Returns the RID of a 256×256 texture with a testing pattern on it (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_test_texture], then it will be cached for subsequent calls. See also [method get_white_texture]. + * Example of getting the test texture and applying it to a [Sprite2D] node: + * + */ + static get_test_texture(): RID + + /** Returns the ID of a 4×4 white texture (in [constant Image.FORMAT_RGB8] format). This texture will be created and returned on the first call to [method get_white_texture], then it will be cached for subsequent calls. See also [method get_test_texture]. + * Example of getting the white texture and applying it to a [Sprite2D] node: + * + */ + static get_white_texture(): RID + + /** Sets a boot image. The color defines the background color. If [param scale] is `true`, the image will be scaled to fit the screen size. If [param use_filter] is `true`, the image will be scaled with linear interpolation. If [param use_filter] is `false`, the image will be scaled with nearest-neighbor interpolation. */ + static set_boot_image(image: Image, color: Color, scale: boolean, use_filter: boolean = true): void + + /** Returns the default clear color which is used when a specific clear color has not been selected. See also [method set_default_clear_color]. */ + static get_default_clear_color(): Color + + /** Sets the default clear color which is used when a specific clear color has not been selected. See also [method get_default_clear_color]. */ + static set_default_clear_color(color: Color): void + + /** Returns `true` if the OS supports a certain [param feature]. Features might be `s3tc`, `etc`, and `etc2`. */ + static has_os_feature(feature: string): boolean + + /** This method is currently unimplemented and does nothing if called with [param generate] set to `true`. */ + static set_debug_generate_wireframes(generate: boolean): void + + /** Returns the time taken to setup rendering on the CPU in milliseconds. This value is shared across all viewports and does *not* require [method viewport_set_measure_render_time] to be enabled on a viewport to be queried. See also [method viewport_get_measured_render_time_cpu]. */ + static get_frame_setup_time_cpu(): float64 + + /** Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. */ + static force_sync(): void + + /** Forces redrawing of all viewports at once. Must be called from the main thread. */ + static force_draw(swap_buffers: boolean = true, frame_step: float64 = 0): void + + /** Returns the global RenderingDevice. + * + * **Note:** When using the OpenGL backend or when running in headless mode, this function always returns `null`. + */ + static get_rendering_device(): RenderingDevice + + /** Creates a RenderingDevice that can be used to do draw and compute operations on a separate thread. Cannot draw to the screen nor share data with the global RenderingDevice. + * + * **Note:** When using the OpenGL backend or when running in headless mode, this function always returns `null`. + */ + static create_local_rendering_device(): RenderingDevice + + /** Returns `true` if our code is currently executing on the rendering thread. */ + static is_on_render_thread(): boolean + + /** As the RenderingServer actual logic may run on an separate thread, accessing its internals from the main (or any other) thread will result in errors. To make it easier to run code that can safely access the rendering internals (such as [RenderingDevice] and similar RD classes), push a callable via this function so it will be executed on the render thread. */ + static call_on_render_thread(callable: Callable): void + + /** This method does nothing and always returns `false`. */ + static has_feature(feature: RenderingServer.Features): boolean + + /** If `false`, disables rendering completely, but the engine logic is still being processed. You can call [method force_draw] to draw a frame even with rendering disabled. */ + get render_loop_enabled(): boolean + set render_loop_enabled(value: boolean) + + /** Emitted at the beginning of the frame, before the RenderingServer updates all the Viewports. */ + static readonly frame_pre_draw: Signal0 + + /** Emitted at the end of the frame, after the RenderingServer has finished updating all the Viewports. */ + static readonly frame_post_draw: Signal0 + } + // _singleton_class_: PhysicsServer2D + namespace PhysicsServer2D { + enum SpaceParameter { + /** Constant to set/get the maximum distance a pair of bodies has to move before their collision status has to be recalculated. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_recycle_radius]. */ + SPACE_PARAM_CONTACT_RECYCLE_RADIUS = 0, + + /** Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_max_separation]. */ + SPACE_PARAM_CONTACT_MAX_SEPARATION = 1, + + /** Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. The default value of this parameter is [member ProjectSettings.physics/2d/solver/contact_max_allowed_penetration]. */ + SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION = 2, + + /** Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. The default value of this parameter is [member ProjectSettings.physics/2d/solver/default_contact_bias]. */ + SPACE_PARAM_CONTACT_DEFAULT_BIAS = 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. The default value of this parameter is [member ProjectSettings.physics/2d/sleep_threshold_linear]. */ + SPACE_PARAM_BODY_LINEAR_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. The default value of this parameter is [member ProjectSettings.physics/2d/sleep_threshold_angular]. */ + SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD = 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. The default value of this parameter is [member ProjectSettings.physics/2d/time_before_sleep]. */ + SPACE_PARAM_BODY_TIME_TO_SLEEP = 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. The default value of this parameter is [member ProjectSettings.physics/2d/solver/default_constraint_bias]. */ + SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS = 7, + + /** Constant to set/get the number of solver iterations for all contacts and constraints. The greater the number of iterations, the more accurate the collisions will be. However, a greater number of iterations requires more CPU power, which can decrease performance. The default value of this parameter is [member ProjectSettings.physics/2d/solver/solver_iterations]. */ + SPACE_PARAM_SOLVER_ITERATIONS = 8, + } + enum ShapeType { + /** This is the constant for creating world boundary shapes. A world boundary shape is an *infinite* line with an origin point, and a normal. Thus, it can be used for front/behind checks. */ + SHAPE_WORLD_BOUNDARY = 0, + + /** This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. */ + SHAPE_SEPARATION_RAY = 1, + + /** This is the constant for creating segment shapes. A segment shape is a *finite* line from a point A to a point B. It can be checked for intersections. */ + SHAPE_SEGMENT = 2, + + /** 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_CIRCLE = 3, + + /** 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_RECTANGLE = 4, + + /** 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_CAPSULE = 5, + + /** 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. */ + SHAPE_CONVEX_POLYGON = 6, + + /** 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_CONCAVE_POLYGON = 7, + + /** This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. */ + SHAPE_CUSTOM = 8, + } + enum AreaParameter { + /** Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED]. */ + AREA_PARAM_GRAVITY_OVERRIDE_MODE = 0, + + /** Constant to set/get gravity strength in an area. The default value of this parameter is `9.80665`. */ + AREA_PARAM_GRAVITY = 1, + + /** Constant to set/get gravity vector/center in an area. The default value of this parameter is `Vector2(0, -1)`. */ + AREA_PARAM_GRAVITY_VECTOR = 2, + + /** Constant to set/get whether the gravity vector of an area is a direction, or a center point. The default value of this parameter is `false`. */ + AREA_PARAM_GRAVITY_IS_POINT = 3, + + /** Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by [constant AREA_PARAM_GRAVITY]. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on. + * The above is true only when the unit distance is a positive number. When the unit distance is set to 0.0, the gravity will be constant regardless of distance. The default value of this parameter is `0.0`. + */ + AREA_PARAM_GRAVITY_POINT_UNIT_DISTANCE = 4, + + /** Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED]. */ + AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE = 5, + + /** Constant to set/get the linear damping factor of an area. The default value of this parameter is `0.1`. */ + AREA_PARAM_LINEAR_DAMP = 6, + + /** Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. The default value of this parameter is [constant AREA_SPACE_OVERRIDE_DISABLED]. */ + AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE = 7, + + /** Constant to set/get the angular damping factor of an area. The default value of this parameter is `1.0`. */ + AREA_PARAM_ANGULAR_DAMP = 8, + + /** Constant to set/get the priority (order of processing) of an area. The default value of this parameter is `0`. */ + AREA_PARAM_PRIORITY = 9, + } + enum AreaSpaceOverrideMode { + /** 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_DISABLED = 0, + + /** 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 = 1, + + /** 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_COMBINE_REPLACE = 2, + + /** This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. */ + AREA_SPACE_OVERRIDE_REPLACE = 3, + + /** This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. */ + AREA_SPACE_OVERRIDE_REPLACE_COMBINE = 4, + } + enum BodyMode { + /** Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. */ + BODY_MODE_STATIC = 0, + + /** Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. */ + BODY_MODE_KINEMATIC = 1, + + /** Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. */ + BODY_MODE_RIGID = 2, + + /** Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. */ + BODY_MODE_RIGID_LINEAR = 3, + } + enum BodyParameter { + /** Constant to set/get a body's bounce factor. The default value of this parameter is `0.0`. */ + BODY_PARAM_BOUNCE = 0, + + /** Constant to set/get a body's friction. The default value of this parameter is `1.0`. */ + BODY_PARAM_FRICTION = 1, + + /** Constant to set/get a body's mass. The default value of this parameter is `1.0`. If the body's mode is set to [constant BODY_MODE_RIGID], then setting this parameter will have the following additional effects: + * - If the parameter [constant BODY_PARAM_CENTER_OF_MASS] has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes. + * - If the parameter [constant BODY_PARAM_INERTIA] is set to a value `<= 0.0`, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass. + */ + BODY_PARAM_MASS = 2, + + /** Constant to set/get a body's inertia. The default value of this parameter is `0.0`. If the body's inertia is set to a value `<= 0.0`, then the inertia will be recalculated based on the body's shapes, mass, and center of mass. */ + BODY_PARAM_INERTIA = 3, + + /** Constant to set/get a body's center of mass position in the body's local coordinate system. The default value of this parameter is `Vector2(0,0)`. If this parameter is never set explicitly, then it is recalculated based on the body's shapes when setting the parameter [constant BODY_PARAM_MASS] or when calling [method body_set_space]. */ + BODY_PARAM_CENTER_OF_MASS = 4, + + /** Constant to set/get a body's gravity multiplier. The default value of this parameter is `1.0`. */ + BODY_PARAM_GRAVITY_SCALE = 5, + + /** Constant to set/get a body's linear damping mode. See [enum BodyDampMode] for possible values. The default value of this parameter is [constant BODY_DAMP_MODE_COMBINE]. */ + BODY_PARAM_LINEAR_DAMP_MODE = 6, + + /** Constant to set/get a body's angular damping mode. See [enum BodyDampMode] for possible values. The default value of this parameter is [constant BODY_DAMP_MODE_COMBINE]. */ + BODY_PARAM_ANGULAR_DAMP_MODE = 7, + + /** Constant to set/get a body's linear damping factor. The default value of this parameter is `0.0`. */ + BODY_PARAM_LINEAR_DAMP = 8, + + /** Constant to set/get a body's angular damping factor. The default value of this parameter is `0.0`. */ + BODY_PARAM_ANGULAR_DAMP = 9, + + /** Represents the size of the [enum BodyParameter] enum. */ + BODY_PARAM_MAX = 10, + } + enum BodyDampMode { + /** The body's damping value is added to any value set in areas or the default value. */ + BODY_DAMP_MODE_COMBINE = 0, + + /** The body's damping value replaces any value set in areas or the default value. */ + BODY_DAMP_MODE_REPLACE = 1, + } + enum BodyState { + /** Constant to set/get the current transform matrix of the body. */ + BODY_STATE_TRANSFORM = 0, + + /** Constant to set/get the current linear velocity of the body. */ + BODY_STATE_LINEAR_VELOCITY = 1, + + /** Constant to set/get the current angular velocity of the body. */ + BODY_STATE_ANGULAR_VELOCITY = 2, + + /** Constant to sleep/wake up a body, or to get whether it is sleeping. */ + BODY_STATE_SLEEPING = 3, + + /** Constant to set/get whether the body can sleep. */ + BODY_STATE_CAN_SLEEP = 4, + } + enum JointType { + /** Constant to create pin joints. */ + JOINT_TYPE_PIN = 0, + + /** Constant to create groove joints. */ + JOINT_TYPE_GROOVE = 1, + + /** Constant to create damped spring joints. */ + JOINT_TYPE_DAMPED_SPRING = 2, + + /** Represents the size of the [enum JointType] enum. */ + JOINT_TYPE_MAX = 3, + } + enum JointParam { + /** Constant to set/get how fast the joint pulls the bodies back to satisfy the joint constraint. The lower the value, the more the two bodies can pull on the joint. The default value of this parameter is `0.0`. + * + * **Note:** In Godot Physics, this parameter is only used for pin joints and groove joints. + */ + JOINT_PARAM_BIAS = 0, + + /** Constant to set/get the maximum speed with which the joint can apply corrections. The default value of this parameter is `3.40282e+38`. + * + * **Note:** In Godot Physics, this parameter is only used for groove joints. + */ + JOINT_PARAM_MAX_BIAS = 1, + + /** Constant to set/get the maximum force that the joint can use to act on the two bodies. The default value of this parameter is `3.40282e+38`. + * + * **Note:** In Godot Physics, this parameter is only used for groove joints. + */ + JOINT_PARAM_MAX_FORCE = 2, + } + enum PinJointParam { + /** Constant to set/get a how much the bond of the pin joint can flex. The default value of this parameter is `0.0`. */ + PIN_JOINT_SOFTNESS = 0, + + /** The maximum rotation around the pin. */ + PIN_JOINT_LIMIT_UPPER = 1, + + /** The minimum rotation around the pin. */ + PIN_JOINT_LIMIT_LOWER = 2, + + /** Target speed for the motor. In radians per second. */ + PIN_JOINT_MOTOR_TARGET_VELOCITY = 3, + } + enum PinJointFlag { + /** If `true`, the pin has a maximum and a minimum rotation. */ + PIN_JOINT_FLAG_ANGULAR_LIMIT_ENABLED = 0, + + /** If `true`, a motor turns the pin. */ + PIN_JOINT_FLAG_MOTOR_ENABLED = 1, + } + enum DampedSpringParam { + /** Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. The default value of this parameter is the distance between the joint's anchor points. */ + DAMPED_SPRING_REST_LENGTH = 0, + + /** Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. The default value of this parameter is `20.0`. */ + DAMPED_SPRING_STIFFNESS = 1, + + /** Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). The default value of this parameter is `1.5`. */ + DAMPED_SPRING_DAMPING = 2, + } + enum CCDMode { + /** Disables continuous collision detection. This is the fastest way to detect body collisions, but it can miss small and/or fast-moving objects. */ + CCD_MODE_DISABLED = 0, + + /** Enables continuous collision detection by raycasting. It is faster than shapecasting, but less precise. */ + CCD_MODE_CAST_RAY = 1, + + /** Enables continuous collision detection by shapecasting. It is the slowest CCD method, and the most precise. */ + CCD_MODE_CAST_SHAPE = 2, + } + enum AreaBodyStatus { + /** The value of the first parameter and area callback function receives, when an object enters one of its shapes. */ + AREA_BODY_ADDED = 0, + + /** The value of the first parameter and area callback function receives, when an object exits one of its shapes. */ + AREA_BODY_REMOVED = 1, + } + enum ProcessInfo { + /** Constant to get the number of objects that are not sleeping. */ + INFO_ACTIVE_OBJECTS = 0, + + /** Constant to get the number of possible collisions. */ + INFO_COLLISION_PAIRS = 1, + + /** Constant to get the number of space regions where a collision could occur. */ + INFO_ISLAND_COUNT = 2, + } + } + /** A server interface for low-level 2D physics access. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver2d.html + */ + class PhysicsServer2D extends Object { + /** Creates a 2D world boundary shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's normal direction and distance properties. */ + static world_boundary_shape_create(): RID + + /** Creates a 2D separation ray shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the shape's `length` and `slide_on_slope` properties. */ + static separation_ray_shape_create(): RID + + /** Creates a 2D segment shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the segment's start and end points. */ + static segment_shape_create(): RID + + /** Creates a 2D circle shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the circle's radius. */ + static circle_shape_create(): RID + + /** Creates a 2D rectangle shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the rectangle's half-extents. */ + static rectangle_shape_create(): RID + + /** Creates a 2D capsule shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the capsule's height and radius. */ + static capsule_shape_create(): RID + + /** Creates a 2D convex polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the convex polygon's points. */ + static convex_polygon_shape_create(): RID + + /** Creates a 2D concave polygon shape in the physics server, and returns the [RID] that identifies it. Use [method shape_set_data] to set the concave polygon's segments. */ + static concave_polygon_shape_create(): RID + + /** Sets the shape data that defines the configuration of the shape. The [param data] to be passed depends on the shape's type (see [method shape_get_type]): + * - [constant SHAPE_WORLD_BOUNDARY]: an array of length two containing a [Vector2] `normal` direction and a [float] distance `d`, + * - [constant SHAPE_SEPARATION_RAY]: a dictionary containing the key `length` with a [float] value and the key `slide_on_slope` with a [bool] value, + * - [constant SHAPE_SEGMENT]: a [Rect2] `rect` containing the first point of the segment in `rect.position` and the second point of the segment in `rect.size`, + * - [constant SHAPE_CIRCLE]: a [float] `radius`, + * - [constant SHAPE_RECTANGLE]: a [Vector2] `half_extents`, + * - [constant SHAPE_CAPSULE]: an array of length two (or a [Vector2]) containing a [float] `height` and a [float] `radius`, + * - [constant SHAPE_CONVEX_POLYGON]: either a [PackedVector2Array] of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a [PackedFloat32Array] of length divisible by four so that every 4-tuple of [float]s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point, + * - [constant SHAPE_CONCAVE_POLYGON]: a [PackedVector2Array] of length divisible by two (each pair of points forms one segment). + * **Warning:** In the case of [constant SHAPE_CONVEX_POLYGON], this method does not check if the points supplied actually form a convex polygon (unlike the [member CollisionPolygon2D.polygon] property). + */ + static shape_set_data(shape: RID, data: any): void + + /** Returns the shape's type (see [enum ShapeType]). */ + static shape_get_type(shape: RID): PhysicsServer2D.ShapeType + + /** Returns the shape data that defines the configuration of the shape, such as the half-extents of a rectangle or the segments of a concave shape. See [method shape_set_data] for the precise format of this data in each case. */ + static shape_get_data(shape: RID): any + + /** Creates a 2D space in the physics server, and returns the [RID] that identifies it. A space contains bodies and areas, and controls the stepping of the physics simulation of the objects in it. */ + static space_create(): RID + + /** Activates or deactivates the space. If [param active] is `false`, then the physics server will not do anything with this space in its physics step. */ + static space_set_active(space: RID, active: boolean): void + + /** Returns `true` if the space is active. */ + static space_is_active(space: RID): boolean + + /** Sets the value of the given space parameter. See [enum SpaceParameter] for the list of available parameters. */ + static space_set_param(space: RID, param: PhysicsServer2D.SpaceParameter, value: float64): void + + /** Returns the value of the given space parameter. See [enum SpaceParameter] for the list of available parameters. */ + static space_get_param(space: RID, param: PhysicsServer2D.SpaceParameter): float64 + + /** Returns the state of a space, a [PhysicsDirectSpaceState2D]. This object can be used for collision/intersection queries. */ + static space_get_direct_state(space: RID): PhysicsDirectSpaceState2D + + /** Creates a 2D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and `monitorable` set to `false`. + * Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable]. + */ + static area_create(): RID + + /** Adds the area to the given space, after removing the area from the previously assigned space (if any). + * + * **Note:** To remove an area from a space without immediately adding it back elsewhere, use `PhysicsServer2D.area_set_space(area, RID())`. + */ + static area_set_space(area: RID, space: RID): void + + /** Returns the [RID] of the space assigned to the area. Returns an empty [RID] if no space is assigned. */ + static area_get_space(area: RID): RID + + /** Adds a shape to the area, with the given local transform. The shape (together with its [param transform] and [param disabled] properties) is added to an array of shapes, and the shapes of an area are usually referenced by their index in this array. */ + static area_add_shape(area: RID, shape: RID, transform: Transform2D = new Transform2D(), disabled: boolean = false): void + + /** Replaces the area's shape at the given index by another shape, while not affecting the `transform` and `disabled` properties at the same index. */ + static area_set_shape(area: RID, shape_idx: int64, shape: RID): void + + /** Sets the local transform matrix of the area's shape with the given index. */ + static area_set_shape_transform(area: RID, shape_idx: int64, transform: Transform2D): void + + /** Sets the disabled property of the area's shape with the given index. If [param disabled] is `true`, then the shape will not detect any other shapes entering or exiting it. */ + static area_set_shape_disabled(area: RID, shape_idx: int64, disabled: boolean): void + + /** Returns the number of shapes added to the area. */ + static area_get_shape_count(area: RID): int64 + + /** Returns the [RID] of the shape with the given index in the area's array of shapes. */ + static area_get_shape(area: RID, shape_idx: int64): RID + + /** Returns the local transform matrix of the shape with the given index in the area's array of shapes. */ + static area_get_shape_transform(area: RID, shape_idx: int64): Transform2D + + /** Removes the shape with the given index from the area's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the area's shapes which used to have indices higher than [param shape_idx] will have their index decreased by one. */ + static area_remove_shape(area: RID, shape_idx: int64): void + + /** Removes all shapes from the area. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. */ + static area_clear_shapes(area: RID): void + + /** Assigns the area to one or many physics layers, via a bitmask. */ + static area_set_collision_layer(area: RID, layer: int64): void + + /** Returns the physics layer or layers the area belongs to, as a bitmask. */ + static area_get_collision_layer(area: RID): int64 + + /** Sets which physics layers the area will monitor, via a bitmask. */ + static area_set_collision_mask(area: RID, mask: int64): void + + /** Returns the physics layer or layers the area can contact with, as a bitmask. */ + static area_get_collision_mask(area: RID): int64 + + /** Sets the value of the given area parameter. See [enum AreaParameter] for the list of available parameters. */ + static area_set_param(area: RID, param: PhysicsServer2D.AreaParameter, value: any): void + + /** Sets the transform matrix of the area. */ + static area_set_transform(area: RID, transform: Transform2D): void + + /** Returns the value of the given area parameter. See [enum AreaParameter] for the list of available parameters. */ + static area_get_param(area: RID, param: PhysicsServer2D.AreaParameter): any + + /** Returns the transform matrix of the area. */ + static area_get_transform(area: RID): Transform2D + + /** Attaches the `ObjectID` of an [Object] to the area. Use [method Object.get_instance_id] to get the `ObjectID` of a [CollisionObject2D]. */ + static area_attach_object_instance_id(area: RID, id: int64): void + + /** Returns the `ObjectID` attached to the area. Use [method @GlobalScope.instance_from_id] to retrieve an [Object] from a nonzero `ObjectID`. */ + static area_get_object_instance_id(area: RID): int64 + + /** Attaches the `ObjectID` of a canvas to the area. Use [method Object.get_instance_id] to get the `ObjectID` of a [CanvasLayer]. */ + static area_attach_canvas_instance_id(area: RID, id: int64): void + + /** Returns the `ObjectID` of the canvas attached to the area. Use [method @GlobalScope.instance_from_id] to retrieve a [CanvasLayer] from a nonzero `ObjectID`. */ + static area_get_canvas_instance_id(area: RID): int64 + + /** Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + * 1. an integer `status`: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other body shape entered or exited the area, + * 2. an [RID] `body_rid`: the [RID] of the body that entered or exited the area, + * 3. an integer `instance_id`: the `ObjectID` attached to the body, + * 4. an integer `body_shape_idx`: the index of the shape of the body that entered or exited the area, + * 5. an integer `self_shape_idx`: the index of the shape of the area where the body entered or exited. + * By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. + */ + static area_set_monitor_callback(area: RID, callback: Callable): void + + /** Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: + * 1. an integer `status`: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other area's shape entered or exited the area, + * 2. an [RID] `area_rid`: the [RID] of the other area that entered or exited the area, + * 3. an integer `instance_id`: the `ObjectID` attached to the other area, + * 4. an integer `area_shape_idx`: the index of the shape of the other area that entered or exited the area, + * 5. an integer `self_shape_idx`: the index of the shape of the area where the other area entered or exited. + * By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. + */ + static area_set_area_monitor_callback(area: RID, callback: Callable): void + + /** Sets whether the area is monitorable or not. If [param monitorable] is `true`, the area monitoring callback of other areas will be called when this area enters or exits them. */ + static area_set_monitorable(area: RID, monitorable: boolean): void + + /** Creates a 2D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and body mode set to [constant BODY_MODE_RIGID]. + * Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space. + */ + static body_create(): RID + + /** Adds the body to the given space, after removing the body from the previously assigned space (if any). If the body's mode is set to [constant BODY_MODE_RIGID], then adding the body to a space will have the following additional effects: + * - If the parameter [constant BODY_PARAM_CENTER_OF_MASS] has never been set explicitly, then the value of that parameter will be recalculated based on the body's shapes. + * - If the parameter [constant BODY_PARAM_INERTIA] is set to a value `<= 0.0`, then the value of that parameter will be recalculated based on the body's shapes, mass, and center of mass. + * + * **Note:** To remove a body from a space without immediately adding it back elsewhere, use `PhysicsServer2D.body_set_space(body, RID())`. + */ + static body_set_space(body: RID, space: RID): void + + /** Returns the [RID] of the space assigned to the body. Returns an empty [RID] if no space is assigned. */ + static body_get_space(body: RID): RID + + /** Sets the body's mode. See [enum BodyMode] for the list of available modes. */ + static body_set_mode(body: RID, mode: PhysicsServer2D.BodyMode): void + + /** Returns the body's mode (see [enum BodyMode]). */ + static body_get_mode(body: RID): PhysicsServer2D.BodyMode + + /** Adds a shape to the area, with the given local transform. The shape (together with its [param transform] and [param disabled] properties) is added to an array of shapes, and the shapes of a body are usually referenced by their index in this array. */ + static body_add_shape(body: RID, shape: RID, transform: Transform2D = new Transform2D(), disabled: boolean = false): void + + /** Replaces the body's shape at the given index by another shape, while not affecting the `transform`, `disabled`, and one-way collision properties at the same index. */ + static body_set_shape(body: RID, shape_idx: int64, shape: RID): void + + /** Sets the local transform matrix of the body's shape with the given index. */ + static body_set_shape_transform(body: RID, shape_idx: int64, transform: Transform2D): void + + /** Returns the number of shapes added to the body. */ + static body_get_shape_count(body: RID): int64 + + /** Returns the [RID] of the shape with the given index in the body's array of shapes. */ + static body_get_shape(body: RID, shape_idx: int64): RID + + /** Returns the local transform matrix of the shape with the given index in the area's array of shapes. */ + static body_get_shape_transform(body: RID, shape_idx: int64): Transform2D + + /** Removes the shape with the given index from the body's array of shapes. The shape itself is not deleted, so it can continue to be used elsewhere or added back later. As a result of this operation, the body's shapes which used to have indices higher than [param shape_idx] will have their index decreased by one. */ + static body_remove_shape(body: RID, shape_idx: int64): void + + /** Removes all shapes from the body. This does not delete the shapes themselves, so they can continue to be used elsewhere or added back later. */ + static body_clear_shapes(body: RID): void + + /** Sets the disabled property of the body's shape with the given index. If [param disabled] is `true`, then the shape will be ignored in all collision detection. */ + static body_set_shape_disabled(body: RID, shape_idx: int64, disabled: boolean): void + + /** Sets the one-way collision properties of the body's shape with the given index. If [param enable] is `true`, the one-way collision direction given by the shape's local upward axis `body_get_shape_transform(body, shape_idx).y` will be used to ignore collisions with the shape in the opposite direction, and to ensure depenetration of kinematic bodies happens in this direction. */ + static body_set_shape_as_one_way_collision(body: RID, shape_idx: int64, enable: boolean, margin: float64): void + + /** Attaches the `ObjectID` of an [Object] to the body. Use [method Object.get_instance_id] to get the `ObjectID` of a [CollisionObject2D]. */ + static body_attach_object_instance_id(body: RID, id: int64): void + + /** Returns the `ObjectID` attached to the body. Use [method @GlobalScope.instance_from_id] to retrieve an [Object] from a nonzero `ObjectID`. */ + static body_get_object_instance_id(body: RID): int64 + + /** Attaches the `ObjectID` of a canvas to the body. Use [method Object.get_instance_id] to get the `ObjectID` of a [CanvasLayer]. */ + static body_attach_canvas_instance_id(body: RID, id: int64): void + + /** Returns the `ObjectID` of the canvas attached to the body. Use [method @GlobalScope.instance_from_id] to retrieve a [CanvasLayer] from a nonzero `ObjectID`. */ + static body_get_canvas_instance_id(body: RID): int64 + + /** Sets the continuous collision detection mode using one of the [enum CCDMode] constants. + * Continuous collision detection tries to predict where a moving body would collide in between physics updates, instead of moving it and correcting its movement if it collided. + */ + static body_set_continuous_collision_detection_mode(body: RID, mode: PhysicsServer2D.CCDMode): void + + /** Returns the body's continuous collision detection mode (see [enum CCDMode]). */ + static body_get_continuous_collision_detection_mode(body: RID): PhysicsServer2D.CCDMode + + /** Sets the physics layer or layers the body belongs to, via a bitmask. */ + static body_set_collision_layer(body: RID, layer: int64): void + + /** Returns the physics layer or layers the body belongs to, as a bitmask. */ + static body_get_collision_layer(body: RID): int64 + + /** Sets the physics layer or layers the body can collide with, via a bitmask. */ + static body_set_collision_mask(body: RID, mask: int64): void + + /** Returns the physics layer or layers the body can collide with, as a bitmask. */ + static body_get_collision_mask(body: RID): int64 + + /** Sets the body's collision priority. This is used in the depenetration phase of [method body_test_motion]. The higher the priority is, the lower the penetration into the body will be. */ + static body_set_collision_priority(body: RID, priority: float64): void + + /** Returns the body's collision priority. This is used in the depenetration phase of [method body_test_motion]. The higher the priority is, the lower the penetration into the body will be. */ + static body_get_collision_priority(body: RID): float64 + + /** Sets the value of the given body parameter. See [enum BodyParameter] for the list of available parameters. */ + static body_set_param(body: RID, param: PhysicsServer2D.BodyParameter, value: any): void + + /** Returns the value of the given body parameter. See [enum BodyParameter] for the list of available parameters. */ + static body_get_param(body: RID, param: PhysicsServer2D.BodyParameter): any + + /** Restores the default inertia and center of mass of the body based on its shapes. This undoes any custom values previously set using [method body_set_param]. */ + static body_reset_mass_properties(body: RID): void + + /** Sets the value of a body's state. See [enum BodyState] for the list of available states. + * + * **Note:** The state change doesn't take effect immediately. The state will change on the next physics frame. + */ + static body_set_state(body: RID, state: PhysicsServer2D.BodyState, value: any): void + + /** Returns the value of the given state of the body. See [enum BodyState] for the list of available states. */ + static body_get_state(body: RID, state: PhysicsServer2D.BodyState): any + + /** Applies a directional impulse to the body, at the body's center of mass. The impulse does not affect rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method body_apply_impulse] at the body's center of mass. + */ + static body_apply_central_impulse(body: RID, impulse: Vector2): void + + /** Applies a rotational impulse to the body. The impulse does not affect position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + */ + static body_apply_torque_impulse(body: RID, impulse: float64): void + + /** Applies a positioned impulse to the body. The impulse can affect rotation if [param position] is different from the body's center of mass. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + static body_apply_impulse(body: RID, impulse: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a directional force to the body, at the body's center of mass. The force does not affect rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method body_apply_force] at the body's center of mass. + */ + static body_apply_central_force(body: RID, force: Vector2): void + + /** Applies a positioned force to the body. The force can affect rotation if [param position] is different from the body's center of mass. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + static body_apply_force(body: RID, force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a rotational force to the body. The force does not affect position. A force is time dependent and meant to be applied every physics update. */ + static body_apply_torque(body: RID, torque: float64): void + + /** Adds a constant directional force to the body. The force does not affect rotation. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))`. + * This is equivalent to using [method body_add_constant_force] at the body's center of mass. + */ + static body_add_constant_central_force(body: RID, force: Vector2): void + + /** Adds a constant positioned force to the body. The force can affect rotation if [param position] is different from the body's center of mass. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_force(body, Vector2(0, 0))`. + * [param position] is the offset from the body origin in global coordinates. + */ + static body_add_constant_force(body: RID, force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Adds a constant rotational force to the body. The force does not affect position. The force remains applied over time until cleared with `PhysicsServer2D.body_set_constant_torque(body, 0)`. */ + static body_add_constant_torque(body: RID, torque: float64): void + + /** Sets the body's total constant positional force applied during each physics update. + * See [method body_add_constant_force] and [method body_add_constant_central_force]. + */ + static body_set_constant_force(body: RID, force: Vector2): void + + /** Returns the body's total constant positional force applied during each physics update. + * See [method body_add_constant_force] and [method body_add_constant_central_force]. + */ + static body_get_constant_force(body: RID): Vector2 + + /** Sets the body's total constant rotational force applied during each physics update. + * See [method body_add_constant_torque]. + */ + static body_set_constant_torque(body: RID, torque: float64): void + + /** Returns the body's total constant rotational force applied during each physics update. + * See [method body_add_constant_torque]. + */ + static body_get_constant_torque(body: RID): float64 + + /** Modifies the body's linear velocity so that its projection to the axis `axis_velocity.normalized()` is exactly `axis_velocity.length()`. This is useful for jumping behavior. */ + static body_set_axis_velocity(body: RID, axis_velocity: Vector2): void + + /** Adds [param excepted_body] to the body's list of collision exceptions, so that collisions with it are ignored. */ + static body_add_collision_exception(body: RID, excepted_body: RID): void + + /** Removes [param excepted_body] from the body's list of collision exceptions, so that collisions with it are no longer ignored. */ + static body_remove_collision_exception(body: RID, excepted_body: RID): void + + /** Sets the maximum number of contacts that the body can report. If [param amount] is greater than zero, then the body will keep track of at most this many contacts with other bodies. */ + static body_set_max_contacts_reported(body: RID, amount: int64): void + + /** Returns the maximum number of contacts that the body can report. See [method body_set_max_contacts_reported]. */ + static body_get_max_contacts_reported(body: RID): int64 + + /** Sets whether the body omits the standard force integration. If [param enable] is `true`, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, [method body_set_force_integration_callback] can be used to manually update the linear and angular velocity instead. + * This method is called when the property [member RigidBody2D.custom_integrator] is set. + */ + static body_set_omit_force_integration(body: RID, enable: boolean): void + + /** Returns `true` if the body is omitting the standard force integration. See [method body_set_omit_force_integration]. */ + static body_is_omitting_force_integration(body: RID): boolean + + /** Sets the body's state synchronization callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()`) to clear the callback. + * The function [param callable] will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. + * The function [param callable] must take the following parameters: + * 1. `state`: a [PhysicsDirectBodyState2D], used to retrieve the body's state. + */ + static body_set_state_sync_callback(body: RID, callable: Callable): void + + /** Sets the body's custom force integration callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()`) to clear the custom callback. + * The function [param callable] will be called every physics tick, before the standard force integration (see [method body_set_omit_force_integration]). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. + * If [param userdata] is not `null`, the function [param callable] must take the following two parameters: + * 1. `state`: a [PhysicsDirectBodyState2D] used to retrieve and modify the body's state, + * 2. [code skip-lint]userdata`: a [Variant]; its value will be the [param userdata] passed into this method. + * If [param userdata] is `null`, then [param callable] must take only the `state` parameter. + */ + static body_set_force_integration_callback(body: RID, callable: Callable, userdata: any = {}): void + + /** Returns `true` if a collision would result from moving the body along a motion vector from a given point in space. See [PhysicsTestMotionParameters2D] for the available motion parameters. Optionally a [PhysicsTestMotionResult2D] object can be passed, which will be used to store the information about the resulting collision. */ + static body_test_motion(body: RID, parameters: PhysicsTestMotionParameters2D, result: PhysicsTestMotionResult2D = undefined): boolean + + /** Returns the [PhysicsDirectBodyState2D] of the body. Returns `null` if the body is destroyed or not assigned to a space. */ + static body_get_direct_state(body: RID): PhysicsDirectBodyState2D + + /** Creates a 2D joint in the physics server, and returns the [RID] that identifies it. To set the joint type, use [method joint_make_damped_spring], [method joint_make_groove] or [method joint_make_pin]. Use [method joint_set_param] to set generic joint parameters. */ + static joint_create(): RID + + /** Destroys the joint with the given [RID], creates a new uninitialized joint, and makes the [RID] refer to this new joint. */ + static joint_clear(joint: RID): void + + /** Sets the value of the given joint parameter. See [enum JointParam] for the list of available parameters. */ + static joint_set_param(joint: RID, param: PhysicsServer2D.JointParam, value: float64): void + + /** Returns the value of the given joint parameter. See [enum JointParam] for the list of available parameters. */ + static joint_get_param(joint: RID, param: PhysicsServer2D.JointParam): float64 + + /** Sets whether the bodies attached to the [Joint2D] will collide with each other. */ + static joint_disable_collisions_between_bodies(joint: RID, disable: boolean): void + + /** Returns whether the bodies attached to the [Joint2D] will collide with each other. */ + static joint_is_disabled_collisions_between_bodies(joint: RID): boolean + + /** Makes the joint a pin joint. If [param body_b] is an empty [RID], then [param body_a] is pinned to the point [param anchor] (given in global coordinates); otherwise, [param body_a] is pinned to [param body_b] at the point [param anchor] (given in global coordinates). To set the parameters which are specific to the pin joint, see [method pin_joint_set_param]. */ + static joint_make_pin(joint: RID, anchor: Vector2, body_a: RID, body_b: RID = new RID()): void + + /** Makes the joint a groove joint. */ + static joint_make_groove(joint: RID, groove1_a: Vector2, groove2_a: Vector2, anchor_b: Vector2, body_a: RID = new RID(), body_b: RID = new RID()): void + + /** Makes the joint a damped spring joint, attached at the point [param anchor_a] (given in global coordinates) on the body [param body_a] and at the point [param anchor_b] (given in global coordinates) on the body [param body_b]. To set the parameters which are specific to the damped spring, see [method damped_spring_joint_set_param]. */ + static joint_make_damped_spring(joint: RID, anchor_a: Vector2, anchor_b: Vector2, body_a: RID, body_b: RID = new RID()): void + + /** Sets a pin joint flag (see [enum PinJointFlag] constants). */ + static pin_joint_set_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: boolean): void + + /** Gets a pin joint flag (see [enum PinJointFlag] constants). */ + static pin_joint_get_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag): boolean + + /** Sets a pin joint parameter. See [enum PinJointParam] for a list of available parameters. */ + static pin_joint_set_param(joint: RID, param: PhysicsServer2D.PinJointParam, value: float64): void + + /** Returns the value of a pin joint parameter. See [enum PinJointParam] for a list of available parameters. */ + static pin_joint_get_param(joint: RID, param: PhysicsServer2D.PinJointParam): float64 + + /** Sets the value of the given damped spring joint parameter. See [enum DampedSpringParam] for the list of available parameters. */ + static damped_spring_joint_set_param(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: float64): void + + /** Returns the value of the given damped spring joint parameter. See [enum DampedSpringParam] for the list of available parameters. */ + static damped_spring_joint_get_param(joint: RID, param: PhysicsServer2D.DampedSpringParam): float64 + + /** Returns the joint's type (see [enum JointType]). */ + static joint_get_type(joint: RID): PhysicsServer2D.JointType + + /** Destroys any of the objects created by PhysicsServer2D. If the [RID] passed is not one of the objects that can be created by PhysicsServer2D, an error will be printed to the console. */ + static free_rid(rid: RID): void + + /** Activates or deactivates the 2D physics server. If [param active] is `false`, then the physics server will not do anything in its physics step. */ + static set_active(active: boolean): void + + /** Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for the list of available states. */ + static get_process_info(process_info: PhysicsServer2D.ProcessInfo): int64 + } + // _singleton_class_: PhysicsServer3D + namespace PhysicsServer3D { + enum JointType { + /** The [Joint3D] is a [PinJoint3D]. */ + JOINT_TYPE_PIN = 0, + + /** The [Joint3D] is a [HingeJoint3D]. */ + JOINT_TYPE_HINGE = 1, + + /** The [Joint3D] is a [SliderJoint3D]. */ + JOINT_TYPE_SLIDER = 2, + + /** The [Joint3D] is a [ConeTwistJoint3D]. */ + JOINT_TYPE_CONE_TWIST = 3, + + /** The [Joint3D] is a [Generic6DOFJoint3D]. */ + JOINT_TYPE_6DOF = 4, + + /** Represents the size of the [enum JointType] enum. */ + JOINT_TYPE_MAX = 5, + } + enum PinJointParam { + /** The strength with which the pinned objects try to stay in positional relation to each other. + * The higher, the stronger. + */ + PIN_JOINT_BIAS = 0, + + /** The strength with which the pinned objects try to stay in velocity relation to each other. + * The higher, the stronger. + */ + PIN_JOINT_DAMPING = 1, + + /** If above 0, this value is the maximum value for an impulse that this Joint3D puts on its ends. */ + PIN_JOINT_IMPULSE_CLAMP = 2, + } + enum HingeJointParam { + /** The speed with which the two bodies get pulled together when they move in different directions. */ + HINGE_JOINT_BIAS = 0, + + /** The maximum rotation across the Hinge. */ + HINGE_JOINT_LIMIT_UPPER = 1, + + /** The minimum rotation across the Hinge. */ + HINGE_JOINT_LIMIT_LOWER = 2, + + /** The speed with which the rotation across the axis perpendicular to the hinge gets corrected. */ + HINGE_JOINT_LIMIT_BIAS = 3, + HINGE_JOINT_LIMIT_SOFTNESS = 4, + + /** The lower this value, the more the rotation gets slowed down. */ + HINGE_JOINT_LIMIT_RELAXATION = 5, + + /** Target speed for the motor. */ + HINGE_JOINT_MOTOR_TARGET_VELOCITY = 6, + + /** Maximum acceleration for the motor. */ + HINGE_JOINT_MOTOR_MAX_IMPULSE = 7, + } + enum HingeJointFlag { + /** If `true`, the Hinge has a maximum and a minimum rotation. */ + HINGE_JOINT_FLAG_USE_LIMIT = 0, + + /** If `true`, a motor turns the Hinge. */ + HINGE_JOINT_FLAG_ENABLE_MOTOR = 1, + } + enum SliderJointParam { + /** The maximum difference between the pivot points on their X axis before damping happens. */ + SLIDER_JOINT_LINEAR_LIMIT_UPPER = 0, + + /** The minimum difference between the pivot points on their X axis before damping happens. */ + SLIDER_JOINT_LINEAR_LIMIT_LOWER = 1, + + /** A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. */ + SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS = 2, + + /** The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. */ + SLIDER_JOINT_LINEAR_LIMIT_RESTITUTION = 3, + + /** The amount of damping once the slider limits are surpassed. */ + SLIDER_JOINT_LINEAR_LIMIT_DAMPING = 4, + + /** A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. */ + SLIDER_JOINT_LINEAR_MOTION_SOFTNESS = 5, + + /** The amount of restitution inside the slider limits. */ + SLIDER_JOINT_LINEAR_MOTION_RESTITUTION = 6, + + /** The amount of damping inside the slider limits. */ + SLIDER_JOINT_LINEAR_MOTION_DAMPING = 7, + + /** A factor applied to the movement across axes orthogonal to the slider. */ + SLIDER_JOINT_LINEAR_ORTHOGONAL_SOFTNESS = 8, + + /** The amount of restitution when movement is across axes orthogonal to the slider. */ + SLIDER_JOINT_LINEAR_ORTHOGONAL_RESTITUTION = 9, + + /** The amount of damping when movement is across axes orthogonal to the slider. */ + SLIDER_JOINT_LINEAR_ORTHOGONAL_DAMPING = 10, + + /** The upper limit of rotation in the slider. */ + SLIDER_JOINT_ANGULAR_LIMIT_UPPER = 11, + + /** The lower limit of rotation in the slider. */ + SLIDER_JOINT_ANGULAR_LIMIT_LOWER = 12, + + /** A factor applied to the all rotation once the limit is surpassed. */ + SLIDER_JOINT_ANGULAR_LIMIT_SOFTNESS = 13, + + /** The amount of restitution of the rotation when the limit is surpassed. */ + SLIDER_JOINT_ANGULAR_LIMIT_RESTITUTION = 14, + + /** The amount of damping of the rotation when the limit is surpassed. */ + SLIDER_JOINT_ANGULAR_LIMIT_DAMPING = 15, + + /** A factor that gets applied to the all rotation in the limits. */ + SLIDER_JOINT_ANGULAR_MOTION_SOFTNESS = 16, + + /** The amount of restitution of the rotation in the limits. */ + SLIDER_JOINT_ANGULAR_MOTION_RESTITUTION = 17, + + /** The amount of damping of the rotation in the limits. */ + SLIDER_JOINT_ANGULAR_MOTION_DAMPING = 18, + + /** A factor that gets applied to the all rotation across axes orthogonal to the slider. */ + SLIDER_JOINT_ANGULAR_ORTHOGONAL_SOFTNESS = 19, + + /** The amount of restitution of the rotation across axes orthogonal to the slider. */ + SLIDER_JOINT_ANGULAR_ORTHOGONAL_RESTITUTION = 20, + + /** The amount of damping of the rotation across axes orthogonal to the slider. */ + SLIDER_JOINT_ANGULAR_ORTHOGONAL_DAMPING = 21, + + /** Represents the size of the [enum SliderJointParam] enum. */ + SLIDER_JOINT_MAX = 22, + } + enum ConeTwistJointParam { + /** 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 along the swing axis. + * Could be defined as looseness in the [ConeTwistJoint3D]. + * If below 0.05, this behavior is locked. + */ + CONE_TWIST_JOINT_SWING_SPAN = 0, + + /** 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_TWIST_SPAN = 1, + + /** The speed with which the swing or twist will take place. + * The higher, the faster. + */ + CONE_TWIST_JOINT_BIAS = 2, + + /** The ease with which the Joint3D twists, if it's too low, it takes more force to twist the joint. */ + CONE_TWIST_JOINT_SOFTNESS = 3, + + /** Defines, how fast the swing- and twist-speed-difference on both sides gets synced. */ + CONE_TWIST_JOINT_RELAXATION = 4, + } + enum G6DOFJointAxisParam { + /** The minimum difference between the pivot points' axes. */ + G6DOF_JOINT_LINEAR_LOWER_LIMIT = 0, + + /** The maximum difference between the pivot points' axes. */ + G6DOF_JOINT_LINEAR_UPPER_LIMIT = 1, + + /** A factor that gets applied to the movement across the axes. The lower, the slower the movement. */ + G6DOF_JOINT_LINEAR_LIMIT_SOFTNESS = 2, + + /** The amount of restitution on the axes movement. The lower, the more velocity-energy gets lost. */ + G6DOF_JOINT_LINEAR_RESTITUTION = 3, + + /** The amount of damping that happens at the linear motion across the axes. */ + G6DOF_JOINT_LINEAR_DAMPING = 4, + + /** The velocity that the joint's linear motor will attempt to reach. */ + G6DOF_JOINT_LINEAR_MOTOR_TARGET_VELOCITY = 5, + + /** The maximum force that the linear motor can apply while trying to reach the target velocity. */ + G6DOF_JOINT_LINEAR_MOTOR_FORCE_LIMIT = 6, + G6DOF_JOINT_LINEAR_SPRING_STIFFNESS = 7, + G6DOF_JOINT_LINEAR_SPRING_DAMPING = 8, + G6DOF_JOINT_LINEAR_SPRING_EQUILIBRIUM_POINT = 9, + + /** The minimum rotation in negative direction to break loose and rotate around the axes. */ + G6DOF_JOINT_ANGULAR_LOWER_LIMIT = 10, + + /** The minimum rotation in positive direction to break loose and rotate around the axes. */ + G6DOF_JOINT_ANGULAR_UPPER_LIMIT = 11, + + /** A factor that gets multiplied onto all rotations across the axes. */ + G6DOF_JOINT_ANGULAR_LIMIT_SOFTNESS = 12, + + /** The amount of rotational damping across the axes. The lower, the more damping occurs. */ + G6DOF_JOINT_ANGULAR_DAMPING = 13, + + /** The amount of rotational restitution across the axes. The lower, the more restitution occurs. */ + G6DOF_JOINT_ANGULAR_RESTITUTION = 14, + + /** The maximum amount of force that can occur, when rotating around the axes. */ + G6DOF_JOINT_ANGULAR_FORCE_LIMIT = 15, + + /** When correcting the crossing of limits in rotation across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. */ + G6DOF_JOINT_ANGULAR_ERP = 16, + + /** Target speed for the motor at the axes. */ + G6DOF_JOINT_ANGULAR_MOTOR_TARGET_VELOCITY = 17, + + /** Maximum acceleration for the motor at the axes. */ + G6DOF_JOINT_ANGULAR_MOTOR_FORCE_LIMIT = 18, + G6DOF_JOINT_ANGULAR_SPRING_STIFFNESS = 19, + G6DOF_JOINT_ANGULAR_SPRING_DAMPING = 20, + G6DOF_JOINT_ANGULAR_SPRING_EQUILIBRIUM_POINT = 21, + + /** Represents the size of the [enum G6DOFJointAxisParam] enum. */ + G6DOF_JOINT_MAX = 22, + } + enum G6DOFJointAxisFlag { + /** If set, linear motion is possible within the given limits. */ + G6DOF_JOINT_FLAG_ENABLE_LINEAR_LIMIT = 0, + + /** If set, rotational motion is possible. */ + G6DOF_JOINT_FLAG_ENABLE_ANGULAR_LIMIT = 1, + G6DOF_JOINT_FLAG_ENABLE_ANGULAR_SPRING = 2, + G6DOF_JOINT_FLAG_ENABLE_LINEAR_SPRING = 3, + + /** If set, there is a rotational motor across these axes. */ + G6DOF_JOINT_FLAG_ENABLE_MOTOR = 4, + + /** If set, there is a linear motor on this axis that targets a specific velocity. */ + G6DOF_JOINT_FLAG_ENABLE_LINEAR_MOTOR = 5, + + /** Represents the size of the [enum G6DOFJointAxisFlag] enum. */ + G6DOF_JOINT_FLAG_MAX = 6, + } + enum ShapeType { + /** The [Shape3D] is a [WorldBoundaryShape3D]. */ + SHAPE_WORLD_BOUNDARY = 0, + + /** The [Shape3D] is a [SeparationRayShape3D]. */ + SHAPE_SEPARATION_RAY = 1, + + /** The [Shape3D] is a [SphereShape3D]. */ + SHAPE_SPHERE = 2, + + /** The [Shape3D] is a [BoxShape3D]. */ + SHAPE_BOX = 3, + + /** The [Shape3D] is a [CapsuleShape3D]. */ + SHAPE_CAPSULE = 4, + + /** The [Shape3D] is a [CylinderShape3D]. */ + SHAPE_CYLINDER = 5, + + /** The [Shape3D] is a [ConvexPolygonShape3D]. */ + SHAPE_CONVEX_POLYGON = 6, + + /** The [Shape3D] is a [ConcavePolygonShape3D]. */ + SHAPE_CONCAVE_POLYGON = 7, + + /** The [Shape3D] is a [HeightMapShape3D]. */ + SHAPE_HEIGHTMAP = 8, + + /** The [Shape3D] is used internally for a soft body. Any attempt to create this kind of shape results in an error. */ + SHAPE_SOFT_BODY = 9, + + /** This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. */ + SHAPE_CUSTOM = 10, + } + enum AreaParameter { + /** Constant to set/get gravity override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. */ + AREA_PARAM_GRAVITY_OVERRIDE_MODE = 0, + + /** Constant to set/get gravity strength in an area. */ + AREA_PARAM_GRAVITY = 1, + + /** Constant to set/get gravity vector/center in an area. */ + AREA_PARAM_GRAVITY_VECTOR = 2, + + /** Constant to set/get whether the gravity vector of an area is a direction, or a center point. */ + AREA_PARAM_GRAVITY_IS_POINT = 3, + + /** Constant to set/get the distance at which the gravity strength is equal to the gravity controlled by [constant AREA_PARAM_GRAVITY]. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the gravity to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on. + * The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + */ + AREA_PARAM_GRAVITY_POINT_UNIT_DISTANCE = 4, + + /** Constant to set/get linear damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. */ + AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE = 5, + + /** Constant to set/get the linear damping factor of an area. */ + AREA_PARAM_LINEAR_DAMP = 6, + + /** Constant to set/get angular damping override mode in an area. See [enum AreaSpaceOverrideMode] for possible values. */ + AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE = 7, + + /** Constant to set/get the angular damping factor of an area. */ + AREA_PARAM_ANGULAR_DAMP = 8, + + /** Constant to set/get the priority (order of processing) of an area. */ + AREA_PARAM_PRIORITY = 9, + + /** Constant to set/get the magnitude of area-specific wind force. This wind force only applies to [SoftBody3D] nodes. Other physics bodies are currently not affected by wind. */ + AREA_PARAM_WIND_FORCE_MAGNITUDE = 10, + + /** Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. */ + AREA_PARAM_WIND_SOURCE = 11, + + /** Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. */ + AREA_PARAM_WIND_DIRECTION = 12, + + /** Constant to set/get the exponential rate at which wind force decreases with distance from its origin. */ + AREA_PARAM_WIND_ATTENUATION_FACTOR = 13, + } + enum AreaSpaceOverrideMode { + /** 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_DISABLED = 0, + + /** 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 = 1, + + /** 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_COMBINE_REPLACE = 2, + + /** This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas. */ + AREA_SPACE_OVERRIDE_REPLACE = 3, + + /** This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. */ + AREA_SPACE_OVERRIDE_REPLACE_COMBINE = 4, + } + enum BodyMode { + /** Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. */ + BODY_MODE_STATIC = 0, + + /** Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. */ + BODY_MODE_KINEMATIC = 1, + + /** Constant for rigid bodies. In this mode, a body can be pushed by other bodies and has forces applied. */ + BODY_MODE_RIGID = 2, + + /** Constant for linear rigid bodies. In this mode, a body can not rotate, and only its linear velocity is affected by external forces. */ + BODY_MODE_RIGID_LINEAR = 3, + } + enum BodyParameter { + /** Constant to set/get a body's bounce factor. */ + BODY_PARAM_BOUNCE = 0, + + /** Constant to set/get a body's friction. */ + BODY_PARAM_FRICTION = 1, + + /** Constant to set/get a body's mass. */ + BODY_PARAM_MASS = 2, + + /** Constant to set/get a body's inertia. */ + BODY_PARAM_INERTIA = 3, + + /** Constant to set/get a body's center of mass position in the body's local coordinate system. */ + BODY_PARAM_CENTER_OF_MASS = 4, + + /** Constant to set/get a body's gravity multiplier. */ + BODY_PARAM_GRAVITY_SCALE = 5, + + /** Constant to set/get a body's linear damping mode. See [enum BodyDampMode] for possible values. */ + BODY_PARAM_LINEAR_DAMP_MODE = 6, + + /** Constant to set/get a body's angular damping mode. See [enum BodyDampMode] for possible values. */ + BODY_PARAM_ANGULAR_DAMP_MODE = 7, + + /** Constant to set/get a body's linear damping factor. */ + BODY_PARAM_LINEAR_DAMP = 8, + + /** Constant to set/get a body's angular damping factor. */ + BODY_PARAM_ANGULAR_DAMP = 9, + + /** Represents the size of the [enum BodyParameter] enum. */ + BODY_PARAM_MAX = 10, + } + enum BodyDampMode { + /** The body's damping value is added to any value set in areas or the default value. */ + BODY_DAMP_MODE_COMBINE = 0, + + /** The body's damping value replaces any value set in areas or the default value. */ + BODY_DAMP_MODE_REPLACE = 1, + } + enum BodyState { + /** Constant to set/get the current transform matrix of the body. */ + BODY_STATE_TRANSFORM = 0, + + /** Constant to set/get the current linear velocity of the body. */ + BODY_STATE_LINEAR_VELOCITY = 1, + + /** Constant to set/get the current angular velocity of the body. */ + BODY_STATE_ANGULAR_VELOCITY = 2, + + /** Constant to sleep/wake up a body, or to get whether it is sleeping. */ + BODY_STATE_SLEEPING = 3, + + /** Constant to set/get whether the body can sleep. */ + BODY_STATE_CAN_SLEEP = 4, + } + enum AreaBodyStatus { + /** The value of the first parameter and area callback function receives, when an object enters one of its shapes. */ + AREA_BODY_ADDED = 0, + + /** The value of the first parameter and area callback function receives, when an object exits one of its shapes. */ + AREA_BODY_REMOVED = 1, + } + enum ProcessInfo { + /** Constant to get the number of objects that are not sleeping. */ + INFO_ACTIVE_OBJECTS = 0, + + /** Constant to get the number of possible collisions. */ + INFO_COLLISION_PAIRS = 1, + + /** Constant to get the number of space regions where a collision could occur. */ + INFO_ISLAND_COUNT = 2, + } + enum SpaceParameter { + /** 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_RECYCLE_RADIUS = 0, + + /** Constant to set/get the maximum distance a shape can be from another before they are considered separated and the contact is discarded. */ + SPACE_PARAM_CONTACT_MAX_SEPARATION = 1, + + /** Constant to set/get the maximum distance a shape can penetrate another shape before it is considered a collision. */ + SPACE_PARAM_CONTACT_MAX_ALLOWED_PENETRATION = 2, + + /** Constant to set/get the default solver bias for all physics contacts. A solver bias is a factor controlling how much two objects "rebound", after overlapping, to avoid leaving them in that state because of numerical imprecision. */ + SPACE_PARAM_CONTACT_DEFAULT_BIAS = 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_LINEAR_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_ANGULAR_VELOCITY_SLEEP_THRESHOLD = 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_TIME_TO_SLEEP = 6, + + /** Constant to set/get the number of solver iterations for contacts and constraints. The greater the number of iterations, the more accurate the collisions and constraints will be. However, a greater number of iterations requires more CPU power, which can decrease performance. */ + SPACE_PARAM_SOLVER_ITERATIONS = 7, + } + enum BodyAxis { + BODY_AXIS_LINEAR_X = 1, + BODY_AXIS_LINEAR_Y = 2, + BODY_AXIS_LINEAR_Z = 4, + BODY_AXIS_ANGULAR_X = 8, + BODY_AXIS_ANGULAR_Y = 16, + BODY_AXIS_ANGULAR_Z = 32, + } + } + /** A server interface for low-level 3D physics access. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver3d.html + */ + class PhysicsServer3D extends Object { + static world_boundary_shape_create(): RID + static separation_ray_shape_create(): RID + static sphere_shape_create(): RID + static box_shape_create(): RID + static capsule_shape_create(): RID + static cylinder_shape_create(): RID + static convex_polygon_shape_create(): RID + static concave_polygon_shape_create(): RID + static heightmap_shape_create(): RID + static custom_shape_create(): RID + + /** Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. */ + static shape_set_data(shape: RID, data: any): void + + /** Sets the collision margin for the shape. + * + * **Note:** This is not used in Godot Physics. + */ + static shape_set_margin(shape: RID, margin: float64): void + + /** Returns the type of shape (see [enum ShapeType] constants). */ + static shape_get_type(shape: RID): PhysicsServer3D.ShapeType + + /** Returns the shape data. */ + static shape_get_data(shape: RID): any + + /** Returns the collision margin for the shape. + * + * **Note:** This is not used in Godot Physics, so will always return `0`. + */ + static shape_get_margin(shape: RID): float64 + + /** 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 [method area_set_space], or to a body with [method body_set_space]. */ + static space_create(): RID + + /** Marks a space as active. It will not have an effect, unless it is assigned to an area or body. */ + static space_set_active(space: RID, active: boolean): void + + /** Returns whether the space is active. */ + static space_is_active(space: RID): boolean + + /** Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. */ + static space_set_param(space: RID, param: PhysicsServer3D.SpaceParameter, value: float64): void + + /** Returns the value of a space parameter. */ + static space_get_param(space: RID, param: PhysicsServer3D.SpaceParameter): float64 + + /** Returns the state of a space, a [PhysicsDirectSpaceState3D]. This object can be used to make collision/intersection queries. */ + static space_get_direct_state(space: RID): PhysicsDirectSpaceState3D + + /** Creates a 3D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and `monitorable` set to `false`. + * Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable]. + */ + static area_create(): RID + + /** Assigns a space to the area. */ + static area_set_space(area: RID, space: RID): void + + /** Returns the space assigned to the area. */ + static area_get_space(area: RID): RID + + /** 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. */ + static area_add_shape(area: RID, shape: RID, transform: Transform3D = new Transform3D(), disabled: boolean = false): void + + /** Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. */ + static area_set_shape(area: RID, shape_idx: int64, shape: RID): void + + /** Sets the transform matrix for an area shape. */ + static area_set_shape_transform(area: RID, shape_idx: int64, transform: Transform3D): void + static area_set_shape_disabled(area: RID, shape_idx: int64, disabled: boolean): void + + /** Returns the number of shapes assigned to an area. */ + static area_get_shape_count(area: RID): int64 + + /** Returns the [RID] of the nth shape of an area. */ + static area_get_shape(area: RID, shape_idx: int64): RID + + /** Returns the transform matrix of a shape within an area. */ + static area_get_shape_transform(area: RID, shape_idx: int64): Transform3D + + /** Removes a shape from an area. It does not delete the shape, so it can be reassigned later. */ + static area_remove_shape(area: RID, shape_idx: int64): void + + /** Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. */ + static area_clear_shapes(area: RID): void + + /** Assigns the area to one or many physics layers. */ + static area_set_collision_layer(area: RID, layer: int64): void + + /** Returns the physics layer or layers an area belongs to. */ + static area_get_collision_layer(area: RID): int64 + + /** Sets which physics layers the area will monitor. */ + static area_set_collision_mask(area: RID, mask: int64): void + + /** Returns the physics layer or layers an area can contact with. */ + static area_get_collision_mask(area: RID): int64 + + /** Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. */ + static area_set_param(area: RID, param: PhysicsServer3D.AreaParameter, value: any): void + + /** Sets the transform matrix for an area. */ + static area_set_transform(area: RID, transform: Transform3D): void + + /** Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. */ + static area_get_param(area: RID, param: PhysicsServer3D.AreaParameter): any + + /** Returns the transform matrix for an area. */ + static area_get_transform(area: RID): Transform3D + + /** Assigns the area to a descendant of [Object], so it can exist in the node tree. */ + static area_attach_object_instance_id(area: RID, id: int64): void + + /** Gets the instance ID of the object the area is assigned to. */ + static area_get_object_instance_id(area: RID): int64 + + /** Sets the area's body monitor callback. This callback will be called when any other (shape of a) body enters or exits (a shape of) the given area, and must take the following five parameters: + * 1. an integer `status`: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other body shape entered or exited the area, + * 2. an [RID] `body_rid`: the [RID] of the body that entered or exited the area, + * 3. an integer `instance_id`: the `ObjectID` attached to the body, + * 4. an integer `body_shape_idx`: the index of the shape of the body that entered or exited the area, + * 5. an integer `self_shape_idx`: the index of the shape of the area where the body entered or exited. + * By counting (or keeping track of) the shapes that enter and exit, it can be determined if a body (with all its shapes) is entering for the first time or exiting for the last time. + */ + static area_set_monitor_callback(area: RID, callback: Callable): void + + /** Sets the area's area monitor callback. This callback will be called when any other (shape of an) area enters or exits (a shape of) the given area, and must take the following five parameters: + * 1. an integer `status`: either [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED] depending on whether the other area's shape entered or exited the area, + * 2. an [RID] `area_rid`: the [RID] of the other area that entered or exited the area, + * 3. an integer `instance_id`: the `ObjectID` attached to the other area, + * 4. an integer `area_shape_idx`: the index of the shape of the other area that entered or exited the area, + * 5. an integer `self_shape_idx`: the index of the shape of the area where the other area entered or exited. + * By counting (or keeping track of) the shapes that enter and exit, it can be determined if an area (with all its shapes) is entering for the first time or exiting for the last time. + */ + static area_set_area_monitor_callback(area: RID, callback: Callable): void + static area_set_monitorable(area: RID, monitorable: boolean): void + + /** Sets object pickable with rays. */ + static area_set_ray_pickable(area: RID, enable: boolean): void + + /** Creates a 3D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to `1`, and body mode set to [constant BODY_MODE_RIGID]. + * Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space. + */ + static body_create(): RID + + /** Assigns a space to the body (see [method space_create]). */ + static body_set_space(body: RID, space: RID): void + + /** Returns the [RID] of the space assigned to a body. */ + static body_get_space(body: RID): RID + + /** Sets the body mode, from one of the [enum BodyMode] constants. */ + static body_set_mode(body: RID, mode: PhysicsServer3D.BodyMode): void + + /** Returns the body mode. */ + static body_get_mode(body: RID): PhysicsServer3D.BodyMode + + /** Sets the physics layer or layers a body belongs to. */ + static body_set_collision_layer(body: RID, layer: int64): void + + /** Returns the physics layer or layers a body belongs to. */ + static body_get_collision_layer(body: RID): int64 + + /** Sets the physics layer or layers a body can collide with. */ + static body_set_collision_mask(body: RID, mask: int64): void + + /** Returns the physics layer or layers a body can collide with. */ + static body_get_collision_mask(body: RID): int64 + + /** Sets the body's collision priority. */ + static body_set_collision_priority(body: RID, priority: float64): void + + /** Returns the body's collision priority. */ + static body_get_collision_priority(body: RID): float64 + + /** 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. */ + static body_add_shape(body: RID, shape: RID, transform: Transform3D = new Transform3D(), disabled: boolean = false): void + + /** Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. */ + static body_set_shape(body: RID, shape_idx: int64, shape: RID): void + + /** Sets the transform matrix for a body shape. */ + static body_set_shape_transform(body: RID, shape_idx: int64, transform: Transform3D): void + static body_set_shape_disabled(body: RID, shape_idx: int64, disabled: boolean): void + + /** Returns the number of shapes assigned to a body. */ + static body_get_shape_count(body: RID): int64 + + /** Returns the [RID] of the nth shape of a body. */ + static body_get_shape(body: RID, shape_idx: int64): RID + + /** Returns the transform matrix of a body shape. */ + static body_get_shape_transform(body: RID, shape_idx: int64): Transform3D + + /** Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. */ + static body_remove_shape(body: RID, shape_idx: int64): void + + /** Removes all shapes from a body. */ + static body_clear_shapes(body: RID): void + + /** Assigns the area to a descendant of [Object], so it can exist in the node tree. */ + static body_attach_object_instance_id(body: RID, id: int64): void + + /** Gets the instance ID of the object the area is assigned to. */ + static body_get_object_instance_id(body: RID): int64 + + /** 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. + */ + static body_set_enable_continuous_collision_detection(body: RID, enable: boolean): void + + /** If `true`, the continuous collision detection mode is enabled. */ + static body_is_continuous_collision_detection_enabled(body: RID): boolean + + /** Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. */ + static body_set_param(body: RID, param: PhysicsServer3D.BodyParameter, value: any): void + + /** Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. */ + static body_get_param(body: RID, param: PhysicsServer3D.BodyParameter): any + + /** Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param]. */ + static body_reset_mass_properties(body: RID): void + + /** Sets a body state (see [enum BodyState] constants). */ + static body_set_state(body: RID, state: PhysicsServer3D.BodyState, value: any): void + + /** Returns a body state. */ + static body_get_state(body: RID, state: PhysicsServer3D.BodyState): any + + /** Applies a directional impulse without affecting rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method body_apply_impulse] at the body's center of mass. + */ + static body_apply_central_impulse(body: RID, impulse: Vector3): void + + /** Applies a positioned impulse to the body. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + static body_apply_impulse(body: RID, impulse: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational impulse to the body without affecting the position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + */ + static body_apply_torque_impulse(body: RID, impulse: Vector3): void + + /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method body_apply_force] at the body's center of mass. + */ + static body_apply_central_force(body: RID, force: Vector3): void + + /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + static body_apply_force(body: RID, force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. */ + static body_apply_torque(body: RID, torque: Vector3): void + + /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `body_set_constant_force(body, Vector3(0, 0, 0))`. + * This is equivalent to using [method body_add_constant_force] at the body's center of mass. + */ + static body_add_constant_central_force(body: RID, force: Vector3): void + + /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `body_set_constant_force(body, Vector3(0, 0, 0))`. + * [param position] is the offset from the body origin in global coordinates. + */ + static body_add_constant_force(body: RID, force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `body_set_constant_torque(body, Vector3(0, 0, 0))`. */ + static body_add_constant_torque(body: RID, torque: Vector3): void + + /** Sets the body's total constant positional forces applied during each physics update. + * See [method body_add_constant_force] and [method body_add_constant_central_force]. + */ + static body_set_constant_force(body: RID, force: Vector3): void + + /** Returns the body's total constant positional forces applied during each physics update. + * See [method body_add_constant_force] and [method body_add_constant_central_force]. + */ + static body_get_constant_force(body: RID): Vector3 + + /** Sets the body's total constant rotational forces applied during each physics update. + * See [method body_add_constant_torque]. + */ + static body_set_constant_torque(body: RID, torque: Vector3): void + + /** Returns the body's total constant rotational forces applied during each physics update. + * See [method body_add_constant_torque]. + */ + static body_get_constant_torque(body: RID): Vector3 + + /** 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. */ + static body_set_axis_velocity(body: RID, axis_velocity: Vector3): void + static body_set_axis_lock(body: RID, axis: PhysicsServer3D.BodyAxis, lock: boolean): void + static body_is_axis_locked(body: RID, axis: PhysicsServer3D.BodyAxis): boolean + + /** Adds a body to the list of bodies exempt from collisions. */ + static body_add_collision_exception(body: RID, excepted_body: RID): void + + /** 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. + */ + static body_remove_collision_exception(body: RID, excepted_body: RID): void + + /** Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies. This is enabled by setting the maximum number of contacts reported to a number greater than 0. */ + static body_set_max_contacts_reported(body: RID, amount: int64): void + + /** Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. */ + static body_get_max_contacts_reported(body: RID): int64 + + /** Sets whether the body omits the standard force integration. If [param enable] is `true`, the body will not automatically use applied forces, torques, and damping to update the body's linear and angular velocity. In this case, [method body_set_force_integration_callback] can be used to manually update the linear and angular velocity instead. + * This method is called when the property [member RigidBody3D.custom_integrator] is set. + */ + static body_set_omit_force_integration(body: RID, enable: boolean): void + + /** Returns `true` if the body is omitting the standard force integration. See [method body_set_omit_force_integration]. */ + static body_is_omitting_force_integration(body: RID): boolean + + /** Sets the body's state synchronization callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()`) to clear the callback. + * The function [param callable] will be called every physics frame, assuming that the body was active during the previous physics tick, and can be used to fetch the latest state from the physics server. + * The function [param callable] must take the following parameters: + * 1. `state`: a [PhysicsDirectBodyState3D], used to retrieve the body's state. + */ + static body_set_state_sync_callback(body: RID, callable: Callable): void + + /** Sets the body's custom force integration callback function to [param callable]. Use an empty [Callable] ([code skip-lint]Callable()`) to clear the custom callback. + * The function [param callable] will be called every physics tick, before the standard force integration (see [method body_set_omit_force_integration]). It can be used for example to update the body's linear and angular velocity based on contact with other bodies. + * If [param userdata] is not `null`, the function [param callable] must take the following two parameters: + * 1. `state`: a [PhysicsDirectBodyState3D], used to retrieve and modify the body's state, + * 2. [code skip-lint]userdata`: a [Variant]; its value will be the [param userdata] passed into this method. + * If [param userdata] is `null`, then [param callable] must take only the `state` parameter. + */ + static body_set_force_integration_callback(body: RID, callable: Callable, userdata: any = {}): void + + /** Sets the body pickable with rays if [param enable] is set. */ + static body_set_ray_pickable(body: RID, enable: boolean): void + + /** Returns `true` if a collision would result from moving along a motion vector from a given point in space. [PhysicsTestMotionParameters3D] is passed to set motion parameters. [PhysicsTestMotionResult3D] can be passed to return additional information. */ + static body_test_motion(body: RID, parameters: PhysicsTestMotionParameters3D, result: PhysicsTestMotionResult3D = undefined): boolean + + /** Returns the [PhysicsDirectBodyState3D] of the body. Returns `null` if the body is destroyed or removed from the physics space. */ + static body_get_direct_state(body: RID): PhysicsDirectBodyState3D + + /** Creates a new soft body and returns its internal [RID]. */ + static soft_body_create(): RID + + /** Requests that the physics server updates the rendering server with the latest positions of the given soft body's points through the [param rendering_server_handler] interface. */ + static soft_body_update_rendering_server(body: RID, rendering_server_handler: PhysicsServer3DRenderingServerHandler): void + + /** Assigns a space to the given soft body (see [method space_create]). */ + static soft_body_set_space(body: RID, space: RID): void + + /** Returns the [RID] of the space assigned to the given soft body. */ + static soft_body_get_space(body: RID): RID + + /** Sets the mesh of the given soft body. */ + static soft_body_set_mesh(body: RID, mesh: RID): void + + /** Returns the bounds of the given soft body in global coordinates. */ + static soft_body_get_bounds(body: RID): AABB + + /** Sets the physics layer or layers the given soft body belongs to. */ + static soft_body_set_collision_layer(body: RID, layer: int64): void + + /** Returns the physics layer or layers that the given soft body belongs to. */ + static soft_body_get_collision_layer(body: RID): int64 + + /** Sets the physics layer or layers the given soft body can collide with. */ + static soft_body_set_collision_mask(body: RID, mask: int64): void + + /** Returns the physics layer or layers that the given soft body can collide with. */ + static soft_body_get_collision_mask(body: RID): int64 + + /** Adds the given body to the list of bodies exempt from collisions. */ + static soft_body_add_collision_exception(body: RID, body_b: RID): void + + /** Removes the given body from the list of bodies exempt from collisions. */ + static soft_body_remove_collision_exception(body: RID, body_b: RID): void + + /** Sets the given body state for the given body (see [enum BodyState] constants). + * + * **Note:** Godot's default physics implementation does not support [constant BODY_STATE_LINEAR_VELOCITY], [constant BODY_STATE_ANGULAR_VELOCITY], [constant BODY_STATE_SLEEPING], or [constant BODY_STATE_CAN_SLEEP]. + */ + static soft_body_set_state(body: RID, state: PhysicsServer3D.BodyState, variant: any): void + + /** Returns the given soft body state (see [enum BodyState] constants). + * + * **Note:** Godot's default physics implementation does not support [constant BODY_STATE_LINEAR_VELOCITY], [constant BODY_STATE_ANGULAR_VELOCITY], [constant BODY_STATE_SLEEPING], or [constant BODY_STATE_CAN_SLEEP]. + */ + static soft_body_get_state(body: RID, state: PhysicsServer3D.BodyState): any + + /** Sets the global transform of the given soft body. */ + static soft_body_set_transform(body: RID, transform: Transform3D): void + + /** Sets whether the given soft body will be pickable when using object picking. */ + static soft_body_set_ray_pickable(body: RID, enable: boolean): void + + /** Sets the simulation precision of the given soft body. Increasing this value will improve the resulting simulation, but can affect performance. Use with care. */ + static soft_body_set_simulation_precision(body: RID, simulation_precision: int64): void + + /** Returns the simulation precision of the given soft body. */ + static soft_body_get_simulation_precision(body: RID): int64 + + /** Sets the total mass for the given soft body. */ + static soft_body_set_total_mass(body: RID, total_mass: float64): void + + /** Returns the total mass assigned to the given soft body. */ + static soft_body_get_total_mass(body: RID): float64 + + /** Sets the linear stiffness of the given soft body. Higher values will result in a stiffer body, while lower values will increase the body's ability to bend. The value can be between `0.0` and `1.0` (inclusive). */ + static soft_body_set_linear_stiffness(body: RID, stiffness: float64): void + + /** Returns the linear stiffness of the given soft body. */ + static soft_body_get_linear_stiffness(body: RID): float64 + + /** Sets the pressure coefficient of the given soft body. Simulates pressure build-up from inside this body. Higher values increase the strength of this effect. */ + static soft_body_set_pressure_coefficient(body: RID, pressure_coefficient: float64): void + + /** Returns the pressure coefficient of the given soft body. */ + static soft_body_get_pressure_coefficient(body: RID): float64 + + /** Sets the damping coefficient of the given soft body. Higher values will slow down the body more noticeably when forces are applied. */ + static soft_body_set_damping_coefficient(body: RID, damping_coefficient: float64): void + + /** Returns the damping coefficient of the given soft body. */ + static soft_body_get_damping_coefficient(body: RID): float64 + + /** Sets the drag coefficient of the given soft body. Higher values increase this body's air resistance. + * + * **Note:** This value is currently unused by Godot's default physics implementation. + */ + static soft_body_set_drag_coefficient(body: RID, drag_coefficient: float64): void + + /** Returns the drag coefficient of the given soft body. */ + static soft_body_get_drag_coefficient(body: RID): float64 + + /** Moves the given soft body point to a position in global coordinates. */ + static soft_body_move_point(body: RID, point_index: int64, global_position: Vector3): void + + /** Returns the current position of the given soft body point in global coordinates. */ + static soft_body_get_point_global_position(body: RID, point_index: int64): Vector3 + + /** Unpins all points of the given soft body. */ + static soft_body_remove_all_pinned_points(body: RID): void + + /** Pins or unpins the given soft body point based on the value of [param pin]. + * + * **Note:** Pinning a point effectively makes it kinematic, preventing it from being affected by forces, but you can still move it using [method soft_body_move_point]. + */ + static soft_body_pin_point(body: RID, point_index: int64, pin: boolean): void + + /** Returns whether the given soft body point is pinned. */ + static soft_body_is_point_pinned(body: RID, point_index: int64): boolean + static joint_create(): RID + static joint_clear(joint: RID): void + static joint_make_pin(joint: RID, body_A: RID, local_A: Vector3, body_B: RID, local_B: Vector3): void + + /** Sets a pin_joint parameter (see [enum PinJointParam] constants). */ + static pin_joint_set_param(joint: RID, param: PhysicsServer3D.PinJointParam, value: float64): void + + /** Gets a pin_joint parameter (see [enum PinJointParam] constants). */ + static pin_joint_get_param(joint: RID, param: PhysicsServer3D.PinJointParam): float64 + + /** Sets position of the joint in the local space of body a of the joint. */ + static pin_joint_set_local_a(joint: RID, local_A: Vector3): void + + /** Returns position of the joint in the local space of body a of the joint. */ + static pin_joint_get_local_a(joint: RID): Vector3 + + /** Sets position of the joint in the local space of body b of the joint. */ + static pin_joint_set_local_b(joint: RID, local_B: Vector3): void + + /** Returns position of the joint in the local space of body b of the joint. */ + static pin_joint_get_local_b(joint: RID): Vector3 + static joint_make_hinge(joint: RID, body_A: RID, hinge_A: Transform3D, body_B: RID, hinge_B: Transform3D): void + + /** Sets a hinge_joint parameter (see [enum HingeJointParam] constants). */ + static hinge_joint_set_param(joint: RID, param: PhysicsServer3D.HingeJointParam, value: float64): void + + /** Gets a hinge_joint parameter (see [enum HingeJointParam]). */ + static hinge_joint_get_param(joint: RID, param: PhysicsServer3D.HingeJointParam): float64 + + /** Sets a hinge_joint flag (see [enum HingeJointFlag] constants). */ + static hinge_joint_set_flag(joint: RID, flag: PhysicsServer3D.HingeJointFlag, enabled: boolean): void + + /** Gets a hinge_joint flag (see [enum HingeJointFlag] constants). */ + static hinge_joint_get_flag(joint: RID, flag: PhysicsServer3D.HingeJointFlag): boolean + static joint_make_slider(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + + /** Gets a slider_joint parameter (see [enum SliderJointParam] constants). */ + static slider_joint_set_param(joint: RID, param: PhysicsServer3D.SliderJointParam, value: float64): void + + /** Gets a slider_joint parameter (see [enum SliderJointParam] constants). */ + static slider_joint_get_param(joint: RID, param: PhysicsServer3D.SliderJointParam): float64 + static joint_make_cone_twist(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + + /** Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). */ + static cone_twist_joint_set_param(joint: RID, param: PhysicsServer3D.ConeTwistJointParam, value: float64): void + + /** Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). */ + static cone_twist_joint_get_param(joint: RID, param: PhysicsServer3D.ConeTwistJointParam): float64 + + /** Returns the type of the Joint3D. */ + static joint_get_type(joint: RID): PhysicsServer3D.JointType + + /** Sets the priority value of the Joint3D. */ + static joint_set_solver_priority(joint: RID, priority: int64): void + + /** Gets the priority value of the Joint3D. */ + static joint_get_solver_priority(joint: RID): int64 + + /** Sets whether the bodies attached to the [Joint3D] will collide with each other. */ + static joint_disable_collisions_between_bodies(joint: RID, disable: boolean): void + + /** Returns whether the bodies attached to the [Joint3D] will collide with each other. */ + static joint_is_disabled_collisions_between_bodies(joint: RID): boolean + + /** Make the joint a generic six degrees of freedom (6DOF) joint. Use [method generic_6dof_joint_set_flag] and [method generic_6dof_joint_set_param] to set the joint's flags and parameters respectively. */ + static joint_make_generic_6dof(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + + /** Sets the value of a given generic 6DOF joint parameter. See [enum G6DOFJointAxisParam] for the list of available parameters. */ + static generic_6dof_joint_set_param(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam, value: float64): void + + /** Returns the value of a generic 6DOF joint parameter. See [enum G6DOFJointAxisParam] for the list of available parameters. */ + static generic_6dof_joint_get_param(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam): float64 + + /** Sets the value of a given generic 6DOF joint flag. See [enum G6DOFJointAxisFlag] for the list of available flags. */ + static generic_6dof_joint_set_flag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag, enable: boolean): void + + /** Returns the value of a generic 6DOF joint flag. See [enum G6DOFJointAxisFlag] for the list of available flags. */ + static generic_6dof_joint_get_flag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag): boolean + + /** Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. */ + static free_rid(rid: RID): void + + /** Activates or deactivates the 3D physics engine. */ + static set_active(active: boolean): void + + /** Returns information about the current state of the 3D physics engine. See [enum ProcessInfo] for a list of available states. */ + static get_process_info(process_info: PhysicsServer3D.ProcessInfo): int64 + } + // _singleton_class_: XRServer + namespace XRServer { + enum TrackerType { + /** The tracker tracks the location of the players head. This is usually a location centered between the players eyes. Note that for handheld AR devices this can be the current location of the device. */ + TRACKER_HEAD = 1, + + /** The tracker tracks the location of a controller. */ + TRACKER_CONTROLLER = 2, + + /** The tracker tracks the location of a base station. */ + TRACKER_BASESTATION = 4, + + /** The tracker tracks the location and size of an AR anchor. */ + TRACKER_ANCHOR = 8, + + /** The tracker tracks the location and joints of a hand. */ + TRACKER_HAND = 16, + + /** The tracker tracks the location and joints of a body. */ + TRACKER_BODY = 32, + + /** The tracker tracks the expressions of a face. */ + TRACKER_FACE = 64, + + /** Used internally to filter trackers of any known type. */ + TRACKER_ANY_KNOWN = 127, + + /** Used internally if we haven't set the tracker type yet. */ + TRACKER_UNKNOWN = 128, + + /** Used internally to select all trackers. */ + TRACKER_ANY = 255, + } + enum RotationMode { + /** Fully reset the orientation of the HMD. Regardless of what direction the user is looking to in the real world. The user will look dead ahead in the virtual world. */ + RESET_FULL_ROTATION = 0, + + /** Resets the orientation but keeps the tilt of the device. So if we're looking down, we keep looking down but heading will be reset. */ + RESET_BUT_KEEP_TILT = 1, + + /** Does not reset the orientation of the HMD, only the position of the player gets centered. */ + DONT_RESET_ROTATION = 2, + } + } + /** Server for AR and VR features. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_xrserver.html + */ + class XRServer extends Object { + /** Returns the reference frame transform. Mostly used internally and exposed for GDExtension build interfaces. */ + static get_reference_frame(): Transform3D + + /** Clears the reference frame that was set by previous calls to [method center_on_hmd]. */ + static clear_reference_frame(): void + + /** This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. + * For platforms that do not offer spatial tracking, our origin point (0, 0, 0) is the location of our HMD, but you have little control over the direction the player is facing in the real world. + * For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera. + * This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world. + * For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game. + * You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. + */ + static center_on_hmd(rotation_mode: XRServer.RotationMode, keep_height: boolean): void + + /** Returns the primary interface's transformation. */ + static get_hmd_transform(): Transform3D + + /** Registers an [XRInterface] object. */ + static add_interface(interface: XRInterface): void + + /** Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns `true`. */ + static get_interface_count(): int64 + + /** Removes this [param interface]. */ + static remove_interface(interface: XRInterface): void + + /** Returns the interface registered at the given [param idx] index in the list of interfaces. */ + static get_interface(idx: int64): XRInterface + + /** Returns a list of available interfaces the ID and name of each interface. */ + static get_interfaces(): GArray + + /** Finds an interface by its [param name]. For example, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. */ + static find_interface(name: string): XRInterface + + /** Registers a new [XRTracker] that tracks a physical object. */ + static add_tracker(tracker: XRTracker): void + + /** Removes this [param tracker]. */ + static remove_tracker(tracker: XRTracker): void + + /** Returns a dictionary of trackers for [param tracker_types]. */ + static get_trackers(tracker_types: int64): GDictionary + + /** Returns the positional tracker with the given [param tracker_name]. */ + static get_tracker(tracker_name: StringName): XRTracker + + /** The scale of the game world compared to the real world. By default, most AR/VR platforms assume that 1 game unit corresponds to 1 real world meter. */ + get world_scale(): float64 + set world_scale(value: float64) + + /** The current origin of our tracking space in the virtual world. This is used by the renderer to properly position the camera with new tracking data. + * + * **Note:** This property is managed by the current [XROrigin3D] node. It is exposed for access from GDExtensions. + */ + get world_origin(): Vector3 + set world_origin(value: Vector3) + + /** The primary [XRInterface] currently bound to the [XRServer]. */ + get primary_interface(): Object + set primary_interface(value: Object) + + /** Emitted when the reference frame transform changes. */ + static readonly reference_frame_changed: Signal0 + + /** Emitted when a new interface has been added. */ + static readonly interface_added: Signal1 + + /** Emitted when an interface is removed. */ + static readonly interface_removed: Signal1 + + /** Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [XRAnchor3D]s for an AR solution, it is important to react to this signal to add the appropriate [XRController3D] or [XRAnchor3D] nodes related to this new tracker. */ + static readonly tracker_added: Signal2 + + /** Emitted when an existing tracker has been updated. This can happen if the user switches controllers. */ + static readonly tracker_updated: Signal2 + + /** Emitted when a tracker is removed. You should remove any [XRController3D] or [XRAnchor3D] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). */ + static readonly tracker_removed: Signal2 + } + // _singleton_class_: GDScriptLanguageProtocol + /** @link https://docs.godotengine.org/en/4.3/classes/class_gdscriptlanguageprotocol.html */ + class GDScriptLanguageProtocol extends JSONRPC { + static initialize(params: GDictionary): GDictionary + static initialized(params: any): void + static on_client_connected(): GError + static on_client_disconnected(_unnamed_arg0: int64): void + static notify_client(method: string, params: any = {}, client_id: int64 = -1): void + static is_smart_resolve_enabled(): boolean + static get_text_document(): GDScriptTextDocument + static get_workspace(): GDScriptWorkspace + static is_initialized(): boolean + } +} diff --git a/godot/typings/godot1.gen.d.ts b/godot/typings/godot1.gen.d.ts new file mode 100644 index 0000000..752ce51 --- /dev/null +++ b/godot/typings/godot1.gen.d.ts @@ -0,0 +1,9367 @@ +// AUTO-GENERATED +/// +declare module "godot" { + namespace AESContext { + enum Mode { + /** AES electronic codebook encryption mode. */ + MODE_ECB_ENCRYPT = 0, + + /** AES electronic codebook decryption mode. */ + MODE_ECB_DECRYPT = 1, + + /** AES cipher blocker chaining encryption mode. */ + MODE_CBC_ENCRYPT = 2, + + /** AES cipher blocker chaining decryption mode. */ + MODE_CBC_DECRYPT = 3, + + /** Maximum value for the mode enum. */ + MODE_MAX = 4, + } + } + /** Provides access to AES encryption/decryption of raw data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_aescontext.html + */ + class AESContext extends RefCounted { + constructor(identifier?: any) + /** Start the AES context in the given [param mode]. A [param key] of either 16 or 32 bytes must always be provided, while an [param iv] (initialization vector) of exactly 16 bytes, is only needed when [param mode] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. */ + start(mode: AESContext.Mode, key: PackedByteArray | byte[] | ArrayBuffer, iv: PackedByteArray | byte[] | ArrayBuffer = []): GError + + /** Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [param src]. See [method start] for mode of operation. + * + * **Note:** The size of [param src] must be a multiple of 16. Apply some padding if needed. + */ + update(src: PackedByteArray | byte[] | ArrayBuffer): PackedByteArray + + /** Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function. + * + * **Note:** This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. + */ + get_iv_state(): PackedByteArray + + /** Close this AES context so it can be started again. See [method start]. */ + finish(): void + } + /** An implementation of A* for finding the shortest path between two vertices on a connected graph in 2D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_astar2d.html + */ + class AStar2D extends RefCounted { + constructor(identifier?: any) + /** Called when estimating the cost between a point and the path's ending point. + * Note that this function is hidden in the default [AStar2D] class. + */ + /* gdvirtual */ _estimate_cost(from_id: int64, to_id: int64): float64 + + /** Called when computing the cost between two connected points. + * Note that this function is hidden in the default [AStar2D] class. + */ + /* gdvirtual */ _compute_cost(from_id: int64, to_id: int64): float64 + + /** Returns the next available point ID with no point associated to it. */ + get_available_point_id(): int64 + + /** Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. + * The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. + * + * If there already exists a point for the given [param id], its position and weight scale are updated to the given values. + */ + add_point(id: int64, position: Vector2, weight_scale: float64 = 1): void + + /** Returns the position of the point associated with the given [param id]. */ + get_point_position(id: int64): Vector2 + + /** Sets the [param position] for the point with the given [param id]. */ + set_point_position(id: int64, position: Vector2): void + + /** Returns the weight scale of the point associated with the given [param id]. */ + get_point_weight_scale(id: int64): float64 + + /** Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. */ + set_point_weight_scale(id: int64, weight_scale: float64): void + + /** Removes the point associated with the given [param id] from the points pool. */ + remove_point(id: int64): void + + /** Returns whether a point associated with the given [param id] exists. */ + has_point(id: int64): boolean + + /** Returns an array with the IDs of the points that form the connection with the given point. + * + */ + get_point_connections(id: int64): PackedInt64Array + + /** Returns an array of all point IDs. */ + get_point_ids(): PackedInt64Array + + /** Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. */ + set_point_disabled(id: int64, disabled: boolean = true): void + + /** Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. */ + is_point_disabled(id: int64): boolean + + /** Creates a segment between the given points. If [param bidirectional] is `false`, only movement from [param id] to [param to_id] is allowed, not the reverse direction. + * + */ + connect_points(id: int64, to_id: int64, bidirectional: boolean = true): void + + /** Deletes the segment between the given points. If [param bidirectional] is `false`, only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains. */ + disconnect_points(id: int64, to_id: int64, bidirectional: boolean = true): void + + /** Returns whether there is a connection/segment between the given points. If [param bidirectional] is `false`, returns whether movement from [param id] to [param to_id] is possible through this segment. */ + are_points_connected(id: int64, to_id: int64, bidirectional: boolean = true): boolean + + /** Returns the number of points currently in the points pool. */ + get_point_count(): int64 + + /** Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space]. */ + get_point_capacity(): int64 + + /** Reserves space internally for [param num_nodes] points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. */ + reserve_space(num_nodes: int64): void + + /** Clears all the points and segments. */ + clear(): void + + /** Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns `-1` if there are no points in the points pool. + * + * **Note:** If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result. + */ + get_closest_point(to_position: Vector2, include_disabled: boolean = false): int64 + + /** Returns the closest position to [param to_position] that resides inside a segment between two connected points. + * + * The result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point. + */ + get_closest_position_in_segment(to_position: Vector2): Vector2 + + /** Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + * + * **Note:** This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. + */ + get_point_path(from_id: int64, to_id: int64, allow_partial_path: boolean = false): PackedVector2Array + + /** Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + * + * If you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + */ + get_id_path(from_id: int64, to_id: int64, allow_partial_path: boolean = false): PackedInt64Array + } + /** An implementation of A* for finding the shortest path between two vertices on a connected graph in 3D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_astar3d.html + */ + class AStar3D extends RefCounted { + constructor(identifier?: any) + /** Called when estimating the cost between a point and the path's ending point. + * Note that this function is hidden in the default [AStar3D] class. + */ + /* gdvirtual */ _estimate_cost(from_id: int64, to_id: int64): float64 + + /** Called when computing the cost between two connected points. + * Note that this function is hidden in the default [AStar3D] class. + */ + /* gdvirtual */ _compute_cost(from_id: int64, to_id: int64): float64 + + /** Returns the next available point ID with no point associated to it. */ + get_available_point_id(): int64 + + /** Adds a new point at the given position with the given identifier. The [param id] must be 0 or larger, and the [param weight_scale] must be 0.0 or greater. + * The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [param weight_scale]s to form a path. + * + * If there already exists a point for the given [param id], its position and weight scale are updated to the given values. + */ + add_point(id: int64, position: Vector3, weight_scale: float64 = 1): void + + /** Returns the position of the point associated with the given [param id]. */ + get_point_position(id: int64): Vector3 + + /** Sets the [param position] for the point with the given [param id]. */ + set_point_position(id: int64, position: Vector3): void + + /** Returns the weight scale of the point associated with the given [param id]. */ + get_point_weight_scale(id: int64): float64 + + /** Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. */ + set_point_weight_scale(id: int64, weight_scale: float64): void + + /** Removes the point associated with the given [param id] from the points pool. */ + remove_point(id: int64): void + + /** Returns whether a point associated with the given [param id] exists. */ + has_point(id: int64): boolean + + /** Returns an array with the IDs of the points that form the connection with the given point. + * + */ + get_point_connections(id: int64): PackedInt64Array + + /** Returns an array of all point IDs. */ + get_point_ids(): PackedInt64Array + + /** Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. */ + set_point_disabled(id: int64, disabled: boolean = true): void + + /** Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. */ + is_point_disabled(id: int64): boolean + + /** Creates a segment between the given points. If [param bidirectional] is `false`, only movement from [param id] to [param to_id] is allowed, not the reverse direction. + * + */ + connect_points(id: int64, to_id: int64, bidirectional: boolean = true): void + + /** Deletes the segment between the given points. If [param bidirectional] is `false`, only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains. */ + disconnect_points(id: int64, to_id: int64, bidirectional: boolean = true): void + + /** Returns whether the two given points are directly connected by a segment. If [param bidirectional] is `false`, returns whether movement from [param id] to [param to_id] is possible through this segment. */ + are_points_connected(id: int64, to_id: int64, bidirectional: boolean = true): boolean + + /** Returns the number of points currently in the points pool. */ + get_point_count(): int64 + + /** Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space]. */ + get_point_capacity(): int64 + + /** Reserves space internally for [param num_nodes] points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. */ + reserve_space(num_nodes: int64): void + + /** Clears all the points and segments. */ + clear(): void + + /** Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns `-1` if there are no points in the points pool. + * + * **Note:** If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result. + */ + get_closest_point(to_position: Vector3, include_disabled: boolean = false): int64 + + /** Returns the closest position to [param to_position] that resides inside a segment between two connected points. + * + * The result is in the segment that goes from `y = 0` to `y = 5`. It's the closest position in the segment to the given point. + */ + get_closest_position_in_segment(to_position: Vector3): Vector3 + + /** Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + * + * **Note:** This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. + */ + get_point_path(from_id: int64, to_id: int64, allow_partial_path: boolean = false): PackedVector3Array + + /** Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + * + * If you change the 2nd point's weight to 3, then the result will be `[1, 4, 3]` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. + */ + get_id_path(from_id: int64, to_id: int64, allow_partial_path: boolean = false): PackedInt64Array + } + namespace AStarGrid2D { + enum Heuristic { + /** The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean heuristic[/url] to be used for the pathfinding using the following formula: + * + * + * **Note:** This is also the internal heuristic used in [AStar3D] and [AStar2D] by default (with the inclusion of possible z-axis coordinate). + */ + HEURISTIC_EUCLIDEAN = 0, + + /** The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/url] to be used for the pathfinding using the following formula: + * + * + * **Note:** This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the [member diagonal_mode] to [constant DIAGONAL_MODE_NEVER]. + */ + HEURISTIC_MANHATTAN = 1, + + /** The Octile heuristic to be used for the pathfinding using the following formula: + * + */ + HEURISTIC_OCTILE = 2, + + /** The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev heuristic[/url] to be used for the pathfinding using the following formula: + * + */ + HEURISTIC_CHEBYSHEV = 3, + + /** Represents the size of the [enum Heuristic] enum. */ + HEURISTIC_MAX = 4, + } + enum DiagonalMode { + /** The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals. */ + DIAGONAL_MODE_ALWAYS = 0, + + /** The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal. */ + DIAGONAL_MODE_NEVER = 1, + + /** The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment. */ + DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE = 2, + + /** The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment. */ + DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES = 3, + + /** Represents the size of the [enum DiagonalMode] enum. */ + DIAGONAL_MODE_MAX = 4, + } + enum CellShape { + /** Rectangular cell shape. */ + CELL_SHAPE_SQUARE = 0, + + /** Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right. */ + CELL_SHAPE_ISOMETRIC_RIGHT = 1, + + /** Diamond cell shape (for isometric look). Cell coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left. */ + CELL_SHAPE_ISOMETRIC_DOWN = 2, + + /** Represents the size of the [enum CellShape] enum. */ + CELL_SHAPE_MAX = 3, + } + } + /** An implementation of A* for finding the shortest path between two points on a partial 2D grid. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_astargrid2d.html + */ + class AStarGrid2D extends RefCounted { + constructor(identifier?: any) + /** Called when estimating the cost between a point and the path's ending point. + * Note that this function is hidden in the default [AStarGrid2D] class. + */ + /* gdvirtual */ _estimate_cost(from_id: Vector2i, to_id: Vector2i): float64 + + /** Called when computing the cost between two connected points. + * Note that this function is hidden in the default [AStarGrid2D] class. + */ + /* gdvirtual */ _compute_cost(from_id: Vector2i, to_id: Vector2i): float64 + + /** Returns `true` if the [param x] and [param y] is a valid grid coordinate (id), i.e. if it is inside [member region]. Equivalent to `region.has_point(Vector2i(x, y))`. */ + is_in_bounds(x: int64, y: int64): boolean + + /** Returns `true` if the [param id] vector is a valid grid coordinate, i.e. if it is inside [member region]. Equivalent to `region.has_point(id)`. */ + is_in_boundsv(id: Vector2i): boolean + + /** Indicates that the grid parameters were changed and [method update] needs to be called. */ + is_dirty(): boolean + + /** Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like [member region], [member cell_size] or [member offset] are changed. [method is_dirty] will return `true` if this is the case and this needs to be called. + * + * **Note:** All point data (solidity and weight scale) will be cleared. + */ + update(): void + + /** Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. + * + * **Note:** Calling [method update] is not needed after the call of this function. + */ + set_point_solid(id: Vector2i, solid: boolean = true): void + + /** Returns `true` if a point is disabled for pathfinding. By default, all points are enabled. */ + is_point_solid(id: Vector2i): boolean + + /** Sets the [param weight_scale] for the point with the given [param id]. The [param weight_scale] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. + * + * **Note:** Calling [method update] is not needed after the call of this function. + */ + set_point_weight_scale(id: Vector2i, weight_scale: float64): void + + /** Returns the weight scale of the point associated with the given [param id]. */ + get_point_weight_scale(id: Vector2i): float64 + + /** Fills the given [param region] on the grid with the specified value for the solid flag. + * + * **Note:** Calling [method update] is not needed after the call of this function. + */ + fill_solid_region(region: Rect2i, solid: boolean = true): void + + /** Fills the given [param region] on the grid with the specified value for the weight scale. + * + * **Note:** Calling [method update] is not needed after the call of this function. + */ + fill_weight_scale_region(region: Rect2i, weight_scale: float64): void + + /** Clears the grid and sets the [member region] to `Rect2i(0, 0, 0, 0)`. */ + clear(): void + + /** Returns the position of the point associated with the given [param id]. */ + get_point_position(id: Vector2i): Vector2 + + /** Returns an array with the points that are in the path found by [AStarGrid2D] between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + * + * **Note:** This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message. + */ + get_point_path(from_id: Vector2i, to_id: Vector2i, allow_partial_path: boolean = false): PackedVector2Array + + /** Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + * If there is no valid path to the target, and [param allow_partial_path] is `true`, returns a path to the point closest to the target that can be reached. + */ + get_id_path(from_id: Vector2i, to_id: Vector2i, allow_partial_path: boolean = false): GArray + + /** The region of grid cells available for pathfinding. If changed, [method update] needs to be called before finding the next path. */ + get region(): Rect2i + set region(value: Rect2i) + + /** The size of the grid (number of cells of size [member cell_size] on each axis). If changed, [method update] needs to be called before finding the next path. */ + get size(): Vector2i + set size(value: Vector2i) + + /** The offset of the grid which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The size of the point cell which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path. */ + get cell_size(): Vector2 + set cell_size(value: Vector2) + + /** The cell shape. Affects how the positions are placed in the grid. If changed, [method update] needs to be called before finding the next path. */ + get cell_shape(): int64 + set cell_shape(value: int64) + + /** Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm. + * + * **Note:** Currently, toggling it on disables the consideration of weight scaling in pathfinding. + */ + get jumping_enabled(): boolean + set jumping_enabled(value: boolean) + + /** The default [enum Heuristic] which will be used to calculate the cost between two points if [method _compute_cost] was not overridden. */ + get default_compute_heuristic(): int64 + set default_compute_heuristic(value: int64) + + /** The default [enum Heuristic] which will be used to calculate the cost between the point and the end point if [method _estimate_cost] was not overridden. */ + get default_estimate_heuristic(): int64 + set default_estimate_heuristic(value: int64) + + /** A specific [enum DiagonalMode] mode which will force the path to avoid or accept the specified diagonals. */ + get diagonal_mode(): int64 + set diagonal_mode(value: int64) + } + class AbstractPolygon2DEditor extends HBoxContainer { + constructor(identifier?: any) + } + class AbstractPolygon2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A base dialog used for user notification. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_acceptdialog.html + */ + class AcceptDialog extends Window { + constructor(identifier?: any) + /** Returns the OK [Button] instance. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_ok_button(): Button + + /** Returns the label used for built-in text. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_label(): Label + + /** Adds a button with label [param text] and a custom [param action] to the dialog and returns the created button. [param action] will be passed to the [signal custom_action] signal when pressed. + * If `true`, [param right] will place the button to the right of any sibling buttons. + * You can use [method remove_button] method to remove a button created with this method from the dialog. + */ + add_button(text: string, right: boolean = false, action: string = ''): Button + + /** Adds a button with label [param name] and a cancel action to the dialog and returns the created button. + * You can use [method remove_button] method to remove a button created with this method from the dialog. + */ + add_cancel_button(name: string): Button + + /** Removes the [param button] from the dialog. Does NOT free the [param button]. The [param button] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [param button] will no longer emit this dialog's [signal custom_action] or [signal canceled] signals. */ + remove_button(button: Button): void + + /** Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. */ + register_text_enter(line_edit: LineEdit): void + + /** The text displayed by the OK button (see [method get_ok_button]). */ + get ok_button_text(): string + set ok_button_text(value: string) + + /** The text displayed by the dialog. */ + get dialog_text(): string + set dialog_text(value: string) + + /** If `true`, the dialog is hidden when the OK button is pressed. You can set it to `false` if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. + * + * **Note:** Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to `false`, and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK. + */ + get dialog_hide_on_ok(): boolean + set dialog_hide_on_ok(value: boolean) + + /** If `true`, the dialog will be hidden when the escape key ([constant KEY_ESCAPE]) is pressed. */ + get dialog_close_on_escape(): boolean + set dialog_close_on_escape(value: boolean) + + /** Sets autowrapping for the text in the dialog. */ + get dialog_autowrap(): boolean + set dialog_autowrap(value: boolean) + + /** Emitted when the dialog is accepted, i.e. the OK button is pressed. */ + readonly confirmed: Signal0 + + /** Emitted when the dialog is closed or the button created with [method add_cancel_button] is pressed. */ + readonly canceled: Signal0 + + /** Emitted when a custom button is pressed. See [method add_button]. */ + readonly custom_action: Signal1 + } + class ActionMapEditor extends Control { + constructor(identifier?: any) + readonly action_added: Signal1 + readonly action_edited: Signal2 + readonly action_removed: Signal1 + readonly action_renamed: Signal2 + readonly action_reordered: Signal3 + readonly filter_focused: Signal0 + readonly filter_unfocused: Signal0 + } + class AnchorPresetPicker extends ControlEditorPresetPicker { + constructor(identifier?: any) + readonly anchors_preset_selected: Signal1 + } + /** A 2D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animatablebody2d.html + */ + class AnimatableBody2D extends StaticBody2D { + constructor(identifier?: any) + /** If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do **not** use together with [method PhysicsBody2D.move_and_collide]. */ + get sync_to_physics(): boolean + set sync_to_physics(value: boolean) + } + /** A 3D physics body that can't be moved by external forces. When moved manually, it affects other bodies in its path. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animatablebody3d.html + */ + class AnimatableBody3D extends StaticBody3D { + constructor(identifier?: any) + /** If `true`, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do **not** use together with [method PhysicsBody3D.move_and_collide]. */ + get sync_to_physics(): boolean + set sync_to_physics(value: boolean) + } + /** Sprite node that contains multiple textures as frames to play for animation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animatedsprite2d.html + */ + class AnimatedSprite2D extends Node2D { + constructor(identifier?: any) + /** Returns `true` if an animation is currently playing (even if [member speed_scale] and/or `custom_speed` are `0`). */ + is_playing(): boolean + + /** Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is `true`, the animation will play backwards (which is equivalent to calling [method play_backwards]). + * If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused. + */ + play(name: StringName = '', custom_speed: float64 = 1, from_end: boolean = false): void + + /** Plays the animation with key [param name] in reverse. + * This method is a shorthand for [method play] with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + */ + play_backwards(name: StringName = ''): void + + /** Pauses the currently playing animation. The [member frame] and [member frame_progress] will be kept and calling [method play] or [method play_backwards] without arguments will resume the animation from the current playback position. + * See also [method stop]. + */ + pause(): void + + /** Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also [method pause]. */ + stop(): void + + /** The setter of [member frame] resets the [member frame_progress] to `0.0` implicitly, but this method avoids that. + * This is useful when you want to carry over the current [member frame_progress] to another [member frame]. + * **Example:** + * + */ + set_frame_and_progress(frame: int64, progress: float64): void + + /** Returns the actual playing speed of current animation or `0` if not playing. This speed is the [member speed_scale] property multiplied by `custom_speed` argument specified when calling the [method play] method. + * Returns a negative value if the current animation is playing backwards. + */ + get_playing_speed(): float64 + + /** The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource. */ + get sprite_frames(): SpriteFrames + set sprite_frames(value: SpriteFrames) + + /** The current animation from the [member sprite_frames] resource. If this value is changed, the [member frame] counter and the [member frame_progress] are reset. */ + get animation(): StringName + set animation(value: StringName) + + /** The key of the animation to play when the scene loads. */ + get autoplay(): StringName + set autoplay(value: StringName) + + /** The displayed animation frame's index. Setting this property also resets [member frame_progress]. If this is not desired, use [method set_frame_and_progress]. */ + get frame(): int64 + set frame(value: int64) + + /** The progress value between `0.0` and `1.0` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from `1.0` to `0.0`. */ + get frame_progress(): float64 + set frame_progress(value: float64) + + /** The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + * If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** If `true`, texture will be centered. + * + * **Note:** For games with a pixel art aesthetic, textures may appear deformed when centered. This is caused by their position being between pixels. To prevent this, set this property to `false`, or consider enabling [member ProjectSettings.rendering/2d/snap/snap_2d_vertices_to_pixel] and [member ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel]. + */ + get centered(): boolean + set centered(value: boolean) + + /** The texture's drawing offset. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** If `true`, texture is flipped horizontally. */ + get flip_h(): boolean + set flip_h(value: boolean) + + /** If `true`, texture is flipped vertically. */ + get flip_v(): boolean + set flip_v(value: boolean) + + /** Emitted when [member sprite_frames] changes. */ + readonly sprite_frames_changed: Signal0 + + /** Emitted when [member animation] changes. */ + readonly animation_changed: Signal0 + + /** Emitted when [member frame] changes. */ + readonly frame_changed: Signal0 + + /** Emitted when the animation loops. */ + readonly animation_looped: Signal0 + + /** Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. + * + * **Note:** This signal is not emitted if an animation is looping. + */ + readonly animation_finished: Signal0 + } + /** 2D sprite node in 3D world, that can use multiple 2D textures for animation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animatedsprite3d.html + */ + class AnimatedSprite3D extends SpriteBase3D { + constructor(identifier?: any) + /** Returns `true` if an animation is currently playing (even if [member speed_scale] and/or `custom_speed` are `0`). */ + is_playing(): boolean + + /** Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is `true`, the animation will play backwards (which is equivalent to calling [method play_backwards]). + * If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused. + */ + play(name: StringName = '', custom_speed: float64 = 1, from_end: boolean = false): void + + /** Plays the animation with key [param name] in reverse. + * This method is a shorthand for [method play] with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + */ + play_backwards(name: StringName = ''): void + + /** Pauses the currently playing animation. The [member frame] and [member frame_progress] will be kept and calling [method play] or [method play_backwards] without arguments will resume the animation from the current playback position. + * See also [method stop]. + */ + pause(): void + + /** Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also [method pause]. */ + stop(): void + + /** The setter of [member frame] resets the [member frame_progress] to `0.0` implicitly, but this method avoids that. + * This is useful when you want to carry over the current [member frame_progress] to another [member frame]. + * **Example:** + * + */ + set_frame_and_progress(frame: int64, progress: float64): void + + /** Returns the actual playing speed of current animation or `0` if not playing. This speed is the [member speed_scale] property multiplied by `custom_speed` argument specified when calling the [method play] method. + * Returns a negative value if the current animation is playing backwards. + */ + get_playing_speed(): float64 + _res_changed(): void + + /** The [SpriteFrames] resource containing the animation(s). Allows you the option to load, edit, clear, make unique and save the states of the [SpriteFrames] resource. */ + get sprite_frames(): SpriteFrames + set sprite_frames(value: SpriteFrames) + + /** The current animation from the [member sprite_frames] resource. If this value is changed, the [member frame] counter and the [member frame_progress] are reset. */ + get animation(): StringName + set animation(value: StringName) + + /** The key of the animation to play when the scene loads. */ + get autoplay(): StringName + set autoplay(value: StringName) + + /** The displayed animation frame's index. Setting this property also resets [member frame_progress]. If this is not desired, use [method set_frame_and_progress]. */ + get frame(): int64 + set frame(value: int64) + + /** The progress value between `0.0` and `1.0` until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from `1.0` to `0.0`. */ + get frame_progress(): float64 + set frame_progress(value: float64) + + /** The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + * If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** Emitted when [member sprite_frames] changes. */ + readonly sprite_frames_changed: Signal0 + + /** Emitted when [member animation] changes. */ + readonly animation_changed: Signal0 + + /** Emitted when [member frame] changes. */ + readonly frame_changed: Signal0 + + /** Emitted when the animation loops. */ + readonly animation_looped: Signal0 + + /** Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback. + * + * **Note:** This signal is not emitted if an animation is looping. + */ + readonly animation_finished: Signal0 + } + /** Proxy texture for simple frame-based animations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animatedtexture.html + */ + class AnimatedTexture extends Texture2D { + /** The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D]. */ + static readonly MAX_FRAMES = 256 + constructor(identifier?: any) + + /** Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1. + * You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation. + */ + set_frame_texture(frame: int64, texture: Texture2D): void + + /** Returns the given frame's [Texture2D]. */ + get_frame_texture(frame: int64): Texture2D + + /** Sets the duration of any given [param frame]. The final duration is affected by the [member speed_scale]. If set to `0`, the frame is skipped during playback. */ + set_frame_duration(frame: int64, duration: float64): void + + /** Returns the given [param frame]'s duration, in seconds. */ + get_frame_duration(frame: int64): float64 + + /** Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. */ + get frames(): int64 + set frames(value: int64) + + /** Sets the currently visible frame of the texture. Setting this frame while playing resets the current frame time, so the newly selected frame plays for its whole configured frame duration. */ + get current_frame(): int64 + set current_frame(value: int64) + + /** If `true`, the animation will pause where it currently is (i.e. at [member current_frame]). The animation will continue from where it was paused when changing this property to `false`. */ + get pause(): boolean + set pause(value: boolean) + + /** If `true`, the animation will only play once and will not loop back to the first frame after reaching the end. Note that reaching the end will not set [member pause] to `true`. */ + get one_shot(): boolean + set one_shot(value: boolean) + + /** The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. */ + get speed_scale(): float64 + set speed_scale(value: float64) + } + namespace Animation { + enum TrackType { + /** Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated [constant TYPE_POSITION_3D], [constant TYPE_ROTATION_3D] and [constant TYPE_SCALE_3D] track types instead of [constant TYPE_VALUE] is recommended for performance reasons. */ + TYPE_VALUE = 0, + + /** 3D position track (values are stored in [Vector3]s). */ + TYPE_POSITION_3D = 1, + + /** 3D rotation track (values are stored in [Quaternion]s). */ + TYPE_ROTATION_3D = 2, + + /** 3D scale track (values are stored in [Vector3]s). */ + TYPE_SCALE_3D = 3, + + /** Blend shape track. */ + TYPE_BLEND_SHAPE = 4, + + /** Method tracks call functions with given arguments per key. */ + TYPE_METHOD = 5, + + /** Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]). */ + TYPE_BEZIER = 6, + + /** Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation. */ + TYPE_AUDIO = 7, + + /** Animation tracks play animations in other [AnimationPlayer] nodes. */ + TYPE_ANIMATION = 8, + } + enum InterpolationType { + /** No interpolation (nearest value). */ + INTERPOLATION_NEAREST = 0, + + /** Linear interpolation. */ + INTERPOLATION_LINEAR = 1, + + /** Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to [constant INTERPOLATION_LINEAR] for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return. */ + INTERPOLATION_CUBIC = 2, + + /** Linear interpolation with shortest path rotation. + * + * **Note:** The result value is always normalized and may not match the key value. + */ + INTERPOLATION_LINEAR_ANGLE = 3, + + /** Cubic interpolation with shortest path rotation. + * + * **Note:** The result value is always normalized and may not match the key value. + */ + INTERPOLATION_CUBIC_ANGLE = 4, + } + enum UpdateMode { + /** Update between keyframes and hold the value. */ + UPDATE_CONTINUOUS = 0, + + /** Update at the keyframes. */ + UPDATE_DISCRETE = 1, + + /** Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture], [member AnimationPlayer.playback_auto_capture], and [method AnimationPlayer.play_with_capture]. */ + UPDATE_CAPTURE = 2, + } + enum LoopMode { + /** At both ends of the animation, the animation will stop playing. */ + LOOP_NONE = 0, + + /** At both ends of the animation, the animation will be repeated without changing the playback direction. */ + LOOP_LINEAR = 1, + + /** Repeats playback and reverse playback at both ends of the animation. */ + LOOP_PINGPONG = 2, + } + enum LoopedFlag { + /** This flag indicates that the animation proceeds without any looping. */ + LOOPED_FLAG_NONE = 0, + + /** This flag indicates that the animation has reached the end of the animation and just after loop processed. */ + LOOPED_FLAG_END = 1, + + /** This flag indicates that the animation has reached the start of the animation and just after loop processed. */ + LOOPED_FLAG_START = 2, + } + enum FindMode { + /** Finds the nearest time key. */ + FIND_MODE_NEAREST = 0, + + /** Finds only the key with approximating the time. */ + FIND_MODE_APPROX = 1, + + /** Finds only the key with matching the time. */ + FIND_MODE_EXACT = 2, + } + } + /** Holds data that can be used to animate anything in the engine. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animation.html + */ + class Animation extends Resource { + constructor(identifier?: any) + /** Adds a track to the Animation. */ + add_track(type: Animation.TrackType, at_position: int64 = -1): int64 + + /** Removes a track by specifying the track index. */ + remove_track(track_idx: int64): void + + /** Returns the amount of tracks in the animation. */ + get_track_count(): int64 + + /** Gets the type of a track. */ + track_get_type(track_idx: int64): Animation.TrackType + + /** Gets the path of a track. For more information on the path format, see [method track_set_path]. */ + track_get_path(track_idx: int64): NodePath + + /** Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the [member AnimationMixer.root_node] that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by `":"`. + * For example, `"character/skeleton:ankle"` or `"character/mesh:transform/local"`. + */ + track_set_path(track_idx: int64, path: NodePath | string): void + + /** Returns the index of the specified track. If the track is not found, return -1. */ + find_track(path: NodePath | string, type: Animation.TrackType): int64 + + /** Moves a track up. */ + track_move_up(track_idx: int64): void + + /** Moves a track down. */ + track_move_down(track_idx: int64): void + + /** Changes the index position of track [param track_idx] to the one defined in [param to_idx]. */ + track_move_to(track_idx: int64, to_idx: int64): void + + /** Swaps the track [param track_idx]'s index position with the track [param with_idx]. */ + track_swap(track_idx: int64, with_idx: int64): void + + /** Sets the given track as imported or not. */ + track_set_imported(track_idx: int64, imported: boolean): void + + /** Returns `true` if the given track is imported. Else, return `false`. */ + track_is_imported(track_idx: int64): boolean + + /** Enables/disables the given track. Tracks are enabled by default. */ + track_set_enabled(track_idx: int64, enabled: boolean): void + + /** Returns `true` if the track at index [param track_idx] is enabled. */ + track_is_enabled(track_idx: int64): boolean + + /** Inserts a key in a given 3D position track. Returns the key index. */ + position_track_insert_key(track_idx: int64, time: float64, position: Vector3): int64 + + /** Inserts a key in a given 3D rotation track. Returns the key index. */ + rotation_track_insert_key(track_idx: int64, time: float64, rotation: Quaternion): int64 + + /** Inserts a key in a given 3D scale track. Returns the key index. */ + scale_track_insert_key(track_idx: int64, time: float64, scale: Vector3): int64 + + /** Inserts a key in a given blend shape track. Returns the key index. */ + blend_shape_track_insert_key(track_idx: int64, time: float64, amount: float64): int64 + + /** Returns the interpolated position value at the given time (in seconds). The [param track_idx] must be the index of a 3D position track. */ + position_track_interpolate(track_idx: int64, time_sec: float64, backward: boolean = false): Vector3 + + /** Returns the interpolated rotation value at the given time (in seconds). The [param track_idx] must be the index of a 3D rotation track. */ + rotation_track_interpolate(track_idx: int64, time_sec: float64, backward: boolean = false): Quaternion + + /** Returns the interpolated scale value at the given time (in seconds). The [param track_idx] must be the index of a 3D scale track. */ + scale_track_interpolate(track_idx: int64, time_sec: float64, backward: boolean = false): Vector3 + + /** Returns the interpolated blend shape value at the given time (in seconds). The [param track_idx] must be the index of a blend shape track. */ + blend_shape_track_interpolate(track_idx: int64, time_sec: float64, backward: boolean = false): float64 + + /** Inserts a generic key in a given track. Returns the key index. */ + track_insert_key(track_idx: int64, time: float64, key: any, transition: float64 = 1): int64 + + /** Removes a key by index in a given track. */ + track_remove_key(track_idx: int64, key_idx: int64): void + + /** Removes a key at [param time] in a given track. */ + track_remove_key_at_time(track_idx: int64, time: float64): void + + /** Sets the value of an existing key. */ + track_set_key_value(track_idx: int64, key: int64, value: any): void + + /** Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]). */ + track_set_key_transition(track_idx: int64, key_idx: int64, transition: float64): void + + /** Sets the time of an existing key. */ + track_set_key_time(track_idx: int64, key_idx: int64, time: float64): void + + /** Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]). */ + track_get_key_transition(track_idx: int64, key_idx: int64): float64 + + /** Returns the number of keys in a given track. */ + track_get_key_count(track_idx: int64): int64 + + /** Returns the value of a given key in a given track. */ + track_get_key_value(track_idx: int64, key_idx: int64): any + + /** Returns the time at which the key is located. */ + track_get_key_time(track_idx: int64, key_idx: int64): float64 + + /** Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. + * If [param limit] is `true`, it does not return keys outside the animation range. + * If [param backward] is `true`, the direction is reversed in methods that rely on one directional processing. + * For example, in case [param find_mode] is [constant FIND_MODE_NEAREST], if there is no key in the current position just after seeked, the first key found is retrieved by searching before the position, but if [param backward] is `true`, the first key found is retrieved after the position. + */ + track_find_key(track_idx: int64, time: float64, find_mode: Animation.FindMode = 0, limit: boolean = false, backward: boolean = false): int64 + + /** Sets the interpolation type of a given track. */ + track_set_interpolation_type(track_idx: int64, interpolation: Animation.InterpolationType): void + + /** Returns the interpolation type of a given track. */ + track_get_interpolation_type(track_idx: int64): Animation.InterpolationType + + /** If `true`, the track at [param track_idx] wraps the interpolation loop. */ + track_set_interpolation_loop_wrap(track_idx: int64, interpolation: boolean): void + + /** Returns `true` if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default. */ + track_get_interpolation_loop_wrap(track_idx: int64): boolean + + /** Returns `true` if the track is compressed, `false` otherwise. See also [method compress]. */ + track_is_compressed(track_idx: int64): boolean + + /** Sets the update mode (see [enum UpdateMode]) of a value track. */ + value_track_set_update_mode(track_idx: int64, mode: Animation.UpdateMode): void + + /** Returns the update mode of a value track. */ + value_track_get_update_mode(track_idx: int64): Animation.UpdateMode + + /** Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track. + * A [param backward] mainly affects the direction of key retrieval of the track with [constant UPDATE_DISCRETE] converted by [constant AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to match the result with [method track_find_key]. + */ + value_track_interpolate(track_idx: int64, time_sec: float64, backward: boolean = false): any + + /** Returns the method name of a method track. */ + method_track_get_name(track_idx: int64, key_idx: int64): StringName + + /** Returns the arguments values to be called on a method track for a given key in a given track. */ + method_track_get_params(track_idx: int64, key_idx: int64): GArray + + /** Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track. + * [param in_handle] is the left-side weight of the added Bezier curve point, [param out_handle] is the right-side one, while [param value] is the actual value at this point. + */ + bezier_track_insert_key(track_idx: int64, time: float64, value: float64, in_handle: Vector2 = Vector2.ZERO, out_handle: Vector2 = Vector2.ZERO): int64 + + /** Sets the value of the key identified by [param key_idx] to the given value. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_set_key_value(track_idx: int64, key_idx: int64, value: float64): void + + /** Sets the in handle of the key identified by [param key_idx] to value [param in_handle]. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_set_key_in_handle(track_idx: int64, key_idx: int64, in_handle: Vector2, balanced_value_time_ratio: float64 = 1): void + + /** Sets the out handle of the key identified by [param key_idx] to value [param out_handle]. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_set_key_out_handle(track_idx: int64, key_idx: int64, out_handle: Vector2, balanced_value_time_ratio: float64 = 1): void + + /** Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_get_key_value(track_idx: int64, key_idx: int64): float64 + + /** Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_get_key_in_handle(track_idx: int64, key_idx: int64): Vector2 + + /** Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_get_key_out_handle(track_idx: int64, key_idx: int64): Vector2 + + /** Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track. */ + bezier_track_interpolate(track_idx: int64, time: float64): float64 + + /** Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track. + * [param stream] is the [AudioStream] resource to play. [param start_offset] is the number of seconds cut off at the beginning of the audio stream, while [param end_offset] is at the ending. + */ + audio_track_insert_key(track_idx: int64, time: float64, stream: Resource, start_offset: float64 = 0, end_offset: float64 = 0): int64 + + /** Sets the stream of the key identified by [param key_idx] to value [param stream]. The [param track_idx] must be the index of an Audio Track. */ + audio_track_set_key_stream(track_idx: int64, key_idx: int64, stream: Resource): void + + /** Sets the start offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track. */ + audio_track_set_key_start_offset(track_idx: int64, key_idx: int64, offset: float64): void + + /** Sets the end offset of the key identified by [param key_idx] to value [param offset]. The [param track_idx] must be the index of an Audio Track. */ + audio_track_set_key_end_offset(track_idx: int64, key_idx: int64, offset: float64): void + + /** Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. */ + audio_track_get_key_stream(track_idx: int64, key_idx: int64): Resource + + /** Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. + * Start offset is the number of seconds cut off at the beginning of the audio stream. + */ + audio_track_get_key_start_offset(track_idx: int64, key_idx: int64): float64 + + /** Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track. + * End offset is the number of seconds cut off at the ending of the audio stream. + */ + audio_track_get_key_end_offset(track_idx: int64, key_idx: int64): float64 + + /** Sets whether the track will be blended with other animations. If `true`, the audio playback volume changes depending on the blend value. */ + audio_track_set_use_blend(track_idx: int64, enable: boolean): void + + /** Returns `true` if the track at [param track_idx] will be blended with other animations. */ + audio_track_is_use_blend(track_idx: int64): boolean + + /** Inserts a key with value [param animation] at the given [param time] (in seconds). The [param track_idx] must be the index of an Animation Track. */ + animation_track_insert_key(track_idx: int64, time: float64, animation: StringName): int64 + + /** Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track. */ + animation_track_set_key_animation(track_idx: int64, key_idx: int64, animation: StringName): void + + /** Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track. */ + animation_track_get_key_animation(track_idx: int64, key_idx: int64): StringName + + /** Clear the animation (clear all tracks and reset all). */ + clear(): void + + /** Adds a new track to [param to_animation] that is a copy of the given track from this animation. */ + copy_track(track_idx: int64, to_animation: Animation): void + + /** Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return `true` once called on this [Animation]. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. + * + * **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. + */ + compress(page_size: int64 = 8192, fps: int64 = 120, split_tolerance: float64 = 4): void + + /** The total length of the animation (in seconds). + * + * **Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + */ + get length(): float64 + set length(value: float64) + + /** Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. */ + get loop_mode(): int64 + set loop_mode(value: int64) + + /** The animation step value. */ + get step(): float64 + set step(value: float64) + + /** Returns `true` if the capture track is included. This is a cached readonly value for performance. */ + get capture_included(): boolean + } + class AnimationBezierTrackEdit extends Control { + constructor(identifier?: any) + _clear_selection(): void + _clear_selection_for_anim(_unnamed_arg0: Animation): void + _select_at_anim(_unnamed_arg0: Animation, _unnamed_arg1: int64, _unnamed_arg2: float64, _unnamed_arg3: boolean): void + _update_hidden_tracks_after(_unnamed_arg0: int64): void + _update_locked_tracks_after(_unnamed_arg0: int64): void + _bezier_track_insert_key_at_anim(_unnamed_arg0: Animation, _unnamed_arg1: int64, _unnamed_arg2: float64, _unnamed_arg3: float64, _unnamed_arg4: Vector2, _unnamed_arg5: Vector2, _unnamed_arg6: any /*Animation.HandleMode*/): void + readonly select_key: Signal3 + readonly deselect_key: Signal2 + readonly clear_selection: Signal0 + } + /** Container for [Animation] resources. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationlibrary.html + */ + class AnimationLibrary extends Resource { + constructor(identifier?: any) + /** Adds the [param animation] to the library, accessible by the key [param name]. */ + add_animation(name: StringName, animation: Animation): GError + + /** Removes the [Animation] with the key [param name]. */ + remove_animation(name: StringName): void + + /** Changes the key of the [Animation] associated with the key [param name] to [param newname]. */ + rename_animation(name: StringName, newname: StringName): void + + /** Returns `true` if the library stores an [Animation] with [param name] as the key. */ + has_animation(name: StringName): boolean + + /** Returns the [Animation] with the key [param name]. If the animation does not exist, `null` is returned and an error is logged. */ + get_animation(name: StringName): Animation + + /** Returns the keys for the [Animation]s stored in the library. */ + get_animation_list(): GArray + get _data(): GDictionary + set _data(value: GDictionary) + + /** Emitted when an [Animation] is added, under the key [param name]. */ + readonly animation_added: Signal1 + + /** Emitted when an [Animation] stored with the key [param name] is removed. */ + readonly animation_removed: Signal1 + + /** Emitted when the key for an [Animation] is changed, from [param name] to [param to_name]. */ + readonly animation_renamed: Signal2 + + /** Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. [param name] is the key of the animation that was changed. + * See also [signal Resource.changed], which this acts as a relay for. + */ + readonly animation_changed: Signal1 + } + class AnimationLibraryEditor extends AcceptDialog { + constructor(identifier?: any) + _update_editor(mixer: Object): void + readonly update_editor: Signal0 + } + namespace AnimationMixer { + enum AnimationCallbackModeProcess { + /** Process animation during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). This is especially useful when animating physics bodies. */ + ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS = 0, + + /** Process animation during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]). */ + ANIMATION_CALLBACK_MODE_PROCESS_IDLE = 1, + + /** Do not process animation. Use [method advance] to process the animation manually. */ + ANIMATION_CALLBACK_MODE_PROCESS_MANUAL = 2, + } + enum AnimationCallbackModeMethod { + /** Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing. */ + ANIMATION_CALLBACK_MODE_METHOD_DEFERRED = 0, + + /** Make method calls immediately when reached in the animation. */ + ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE = 1, + } + enum AnimationCallbackModeDiscrete { + /** An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values. */ + ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT = 0, + + /** An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer]. */ + ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE = 1, + + /** Always treat the [constant Animation.UPDATE_DISCRETE] track value as [constant Animation.UPDATE_CONTINUOUS] with [constant Animation.INTERPOLATION_NEAREST]. This is the default behavior for [AnimationTree]. + * If a value track has non-numeric type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] with [constant Animation.UPDATE_DISCRETE]. + */ + ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS = 2, + } + } + /** Base class for [AnimationPlayer] and [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationmixer.html + */ + class AnimationMixer extends Node { + constructor(identifier?: any) + /** A virtual function for processing after getting a key during playback. */ + /* gdvirtual */ _post_process_key_value(animation: Animation, track: int64, value: any, object_id: int64, object_sub_idx: int64): any + + /** Adds [param library] to the animation player, under the key [param name]. + * AnimationMixer has a global library by default with an empty string as key. For adding an animation to the global library: + * + */ + add_animation_library(name: StringName, library: AnimationLibrary): GError + + /** Removes the [AnimationLibrary] associated with the key [param name]. */ + remove_animation_library(name: StringName): void + + /** Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname]. */ + rename_animation_library(name: StringName, newname: StringName): void + + /** Returns `true` if the [AnimationMixer] stores an [AnimationLibrary] with key [param name]. */ + has_animation_library(name: StringName): boolean + + /** Returns the first [AnimationLibrary] with key [param name] or `null` if not found. + * To get the [AnimationMixer]'s global animation library, use `get_animation_library("")`. + */ + get_animation_library(name: StringName): AnimationLibrary + + /** Returns the list of stored library keys. */ + get_animation_library_list(): GArray + + /** Returns `true` if the [AnimationMixer] stores an [Animation] with key [param name]. */ + has_animation(name: StringName): boolean + + /** Returns the [Animation] with the key [param name]. If the animation does not exist, `null` is returned and an error is logged. */ + get_animation(name: StringName): Animation + + /** Returns the list of stored animation keys. */ + get_animation_list(): PackedStringArray + + /** Retrieve the motion delta of position with the [member root_motion_track] as a [Vector3] that can be used elsewhere. + * If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], returns `Vector3(0, 0, 0)`. + * See also [member root_motion_track] and [RootMotionView]. + * The most basic example is applying position to [CharacterBody3D]: + * + * By using this in combination with [method get_root_motion_rotation_accumulator], you can apply the root motion position more correctly to account for the rotation of the node. + * + */ + get_root_motion_position(): Vector3 + + /** Retrieve the motion delta of rotation with the [member root_motion_track] as a [Quaternion] that can be used elsewhere. + * If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_ROTATION_3D], returns `Quaternion(0, 0, 0, 1)`. + * See also [member root_motion_track] and [RootMotionView]. + * The most basic example is applying rotation to [CharacterBody3D]: + * + */ + get_root_motion_rotation(): Quaternion + + /** Retrieve the motion delta of scale with the [member root_motion_track] as a [Vector3] that can be used elsewhere. + * If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_SCALE_3D], returns `Vector3(0, 0, 0)`. + * See also [member root_motion_track] and [RootMotionView]. + * The most basic example is applying scale to [CharacterBody3D]: + * + */ + get_root_motion_scale(): Vector3 + + /** Retrieve the blended value of the position tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere. + * This is useful in cases where you want to respect the initial key values of the animation. + * For example, if an animation with only one key `Vector3(0, 0, 0)` is played in the previous frame and then an animation with only one key `Vector3(1, 0, 1)` is played in the next frame, the difference can be calculated as follows: + * + * However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + */ + get_root_motion_position_accumulator(): Vector3 + + /** Retrieve the blended value of the rotation tracks with the [member root_motion_track] as a [Quaternion] that can be used elsewhere. + * This is necessary to apply the root motion position correctly, taking rotation into account. See also [method get_root_motion_position]. + * Also, this is useful in cases where you want to respect the initial key values of the animation. + * For example, if an animation with only one key `Quaternion(0, 0, 0, 1)` is played in the previous frame and then an animation with only one key `Quaternion(0, 0.707, 0, 0.707)` is played in the next frame, the difference can be calculated as follows: + * + * However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + */ + get_root_motion_rotation_accumulator(): Quaternion + + /** Retrieve the blended value of the scale tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere. + * For example, if an animation with only one key `Vector3(1, 1, 1)` is played in the previous frame and then an animation with only one key `Vector3(2, 2, 2)` is played in the next frame, the difference can be calculated as follows: + * + * However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases. + */ + get_root_motion_scale_accumulator(): Vector3 + + /** [AnimationMixer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again. */ + clear_caches(): void + + /** Manually advance the animations by the specified time (in seconds). */ + advance(delta: float64): void + + /** If the animation track specified by [param name] has an option [constant Animation.UPDATE_CAPTURE], stores current values of the objects indicated by the track path as a cache. If there is already a captured cache, the old cache is discarded. + * After this it will interpolate with current animation blending result during the playback process for the time specified by [param duration], working like a crossfade. + * You can specify [param trans_type] as the curve for the interpolation. For better results, it may be appropriate to specify [constant Tween.TRANS_LINEAR] for cases where the first key of the track begins with a non-zero value or where the key value does not change, and [constant Tween.TRANS_QUAD] for cases where the key value changes linearly. + */ + capture(name: StringName, duration: float64, trans_type: Tween.TransitionType = 0, ease_type: Tween.EaseType = 0): void + _reset(): void + _restore(backup: any /*AnimatedValuesBackup*/): void + + /** Returns the key of [param animation] or an empty [StringName] if not found. */ + find_animation(animation: Animation): StringName + + /** Returns the key for the [AnimationLibrary] that contains [param animation] or an empty [StringName] if not found. */ + find_animation_library(animation: Animation): StringName + + /** If `true`, the [AnimationMixer] will be processing. */ + get active(): boolean + set active(value: boolean) + + /** If `true`, the blending uses the deterministic algorithm. The total weight is not normalized and the result is accumulated with an initial value (`0` or a `"RESET"` animation if present). + * This means that if the total amount of blending is `0.0`, the result is equal to the `"RESET"` animation. + * If the number of tracks between the blended animations is different, the animation with the missing track is treated as if it had the initial value. + * If `false`, The blend does not use the deterministic algorithm. The total weight is normalized and always `1.0`. If the number of tracks between the blended animations is different, nothing is done about the animation that is missing a track. + * + * **Note:** In [AnimationTree], the blending with [AnimationNodeAdd2], [AnimationNodeAdd3], [AnimationNodeSub2] or the weight greater than `1.0` may produce unexpected results. + * For example, if [AnimationNodeAdd2] blends two nodes with the amount `1.0`, then total weight is `2.0` but it will be normalized to make the total amount `1.0` and the result will be equal to [AnimationNodeBlend2] with the amount `0.5`. + */ + get deterministic(): boolean + set deterministic(value: boolean) + + /** This is used by the editor. If set to `true`, the scene will be saved with the effects of the reset animation (the animation with the key `"RESET"`) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving. + * This makes it more convenient to preview and edit animations in the editor, as changes to the scene will not be saved as long as they are set in the reset animation. + */ + get reset_on_save(): boolean + set reset_on_save(value: boolean) + + /** The node which node path references will travel from. */ + get root_node(): NodePath + set root_node(value: NodePath | string) + + /** The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The [member root_motion_track] uses the same format as [method Animation.track_set_path], but note that a bone must be specified. + * If the track has type [constant Animation.TYPE_POSITION_3D], [constant Animation.TYPE_ROTATION_3D], or [constant Animation.TYPE_SCALE_3D] the transformation will be canceled visually, and the animation will appear to stay in place. See also [method get_root_motion_position], [method get_root_motion_rotation], [method get_root_motion_scale], and [RootMotionView]. + */ + get root_motion_track(): NodePath + set root_motion_track(value: NodePath | string) + + /** The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. + * For example, if this value is `32` and the animation has two audio tracks, the two [AudioStreamPlayer]s assigned can play simultaneously up to `32` voices each. + */ + get audio_max_polyphony(): int64 + set audio_max_polyphony(value: int64) + + /** The process notification in which to update animations. */ + get callback_mode_process(): int64 + set callback_mode_process(value: int64) + + /** The call mode used for "Call Method" tracks. */ + get callback_mode_method(): int64 + set callback_mode_method(value: int64) + + /** Ordinarily, tracks can be set to [constant Animation.UPDATE_DISCRETE] to update infrequently, usually when using nearest interpolation. + * However, when blending with [constant Animation.UPDATE_CONTINUOUS] several results are considered. The [member callback_mode_discrete] specify it explicitly. See also [enum AnimationCallbackModeDiscrete]. + * To make the blended results look good, it is recommended to set this to [constant ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to update every frame during blending. Other values exist for compatibility and they are fine if there is no blending, but not so, may produce artifacts. + */ + get callback_mode_discrete(): int64 + set callback_mode_discrete(value: int64) + + /** Notifies when an animation list is changed. */ + readonly animation_list_changed: Signal0 + + /** Notifies when the animation libraries have changed. */ + readonly animation_libraries_updated: Signal0 + + /** Notifies when an animation finished playing. + * + * **Note:** This signal is not emitted if an animation is looping. + */ + readonly animation_finished: Signal1 + + /** Notifies when an animation starts playing. */ + readonly animation_started: Signal1 + + /** Notifies when the caches have been cleared, either automatically, or manually via [method clear_caches]. */ + readonly caches_cleared: Signal0 + + /** Notifies when the blending result related have been applied to the target objects. */ + readonly mixer_applied: Signal0 + + /** Notifies when the property related process have been updated. */ + readonly mixer_updated: Signal0 + } + namespace AnimationNode { + enum FilterAction { + /** Do not use filtering. */ + FILTER_IGNORE = 0, + + /** Paths matching the filter will be allowed to pass. */ + FILTER_PASS = 1, + + /** Paths matching the filter will be discarded. */ + FILTER_STOP = 2, + + /** Paths matching the filter will be blended (by the blend value). */ + FILTER_BLEND = 3, + } + } + /** Base class for [AnimationTree] nodes. Not related to scene nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnode.html + */ + class AnimationNode extends Resource { + constructor(identifier?: any) + /** When inheriting from [AnimationRootNode], implement this virtual method to return all child animation nodes in order as a `name: node` dictionary. */ + /* gdvirtual */ _get_child_nodes(): GDictionary + + /** When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. */ + /* gdvirtual */ _get_parameter_list(): GArray + + /** When inheriting from [AnimationRootNode], implement this virtual method to return a child animation node by its [param name]. */ + /* gdvirtual */ _get_child_by_name(name: StringName): AnimationNode + + /** When inheriting from [AnimationRootNode], implement this virtual method to return the default value of a [param parameter]. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. */ + /* gdvirtual */ _get_parameter_default_value(parameter: StringName): any + + /** When inheriting from [AnimationRootNode], implement this virtual method to return whether the [param parameter] is read-only. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. */ + /* gdvirtual */ _is_parameter_read_only(parameter: StringName): boolean + + /** When inheriting from [AnimationRootNode], implement this virtual method to run some code when this animation node is processed. The [param time] parameter is a relative delta, unless [param seek] is `true`, in which case it is absolute. + * Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. + * This function should return the delta. + */ + /* gdvirtual */ _process(time: float64, seek: boolean, is_external_seeking: boolean, test_only: boolean): float64 + + /** When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this animation node. */ + /* gdvirtual */ _get_caption(): string + + /** When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this animation node. */ + /* gdvirtual */ _has_filter(): boolean + + /** Adds an input to the animation node. This is only useful for animation nodes created for use in an [AnimationNodeBlendTree]. If the addition fails, returns `false`. */ + add_input(name: string): boolean + + /** Removes an input, call this only when inactive. */ + remove_input(index: int64): void + + /** Sets the name of the input at the given [param input] index. If the setting fails, returns `false`. */ + set_input_name(input: int64, name: string): boolean + + /** Gets the name of an input by index. */ + get_input_name(input: int64): string + + /** Amount of inputs in this animation node, only useful for animation nodes that go into [AnimationNodeBlendTree]. */ + get_input_count(): int64 + + /** Returns the input index which corresponds to [param name]. If not found, returns `-1`. */ + find_input(name: string): int64 + + /** Adds or removes a path for the filter. */ + set_filter_path(path: NodePath | string, enable: boolean): void + + /** Returns whether the given path is filtered. */ + is_path_filtered(path: NodePath | string): boolean + + /** Blend an animation by [param blend] amount (name must be valid in the linked [AnimationPlayer]). A [param time] and [param delta] may be passed, as well as whether [param seeked] happened. + * A [param looped_flag] is used by internal processing immediately after the loop. See also [enum Animation.LoopedFlag]. + */ + blend_animation(animation: StringName, time: float64, delta: float64, seeked: boolean, is_external_seeking: boolean, blend: float64, looped_flag: Animation.LoopedFlag = 0): void + + /** Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, otherwise editors will not display your animation node for addition. */ + blend_node(name: StringName, node: AnimationNode, time: float64, seek: boolean, is_external_seeking: boolean, blend: float64, filter: AnimationNode.FilterAction = 0, sync: boolean = true, test_only: boolean = false): float64 + + /** Blend an input. This is only useful for animation nodes created for an [AnimationNodeBlendTree]. The [param time] parameter is a relative delta, unless [param seek] is `true`, in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). */ + blend_input(input_index: int64, time: float64, seek: boolean, is_external_seeking: boolean, blend: float64, filter: AnimationNode.FilterAction = 0, sync: boolean = true, test_only: boolean = false): float64 + + /** Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. */ + set_parameter(name: StringName, value: any): void + + /** Gets the value of a parameter. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. */ + get_parameter(name: StringName): any + + /** If `true`, filtering is enabled. */ + get filter_enabled(): boolean + set filter_enabled(value: boolean) + get filters(): GArray + set filters(value: GArray) + + /** Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes changes. The animation nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], [AnimationNodeBlendTree] and [AnimationNodeTransition]. */ + readonly tree_changed: Signal0 + + /** Emitted by nodes that inherit from this class and that have an internal tree when one of their animation node names changes. The animation nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. */ + readonly animation_node_renamed: Signal3 + + /** Emitted by nodes that inherit from this class and that have an internal tree when one of their animation nodes removes. The animation nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. */ + readonly animation_node_removed: Signal2 + } + /** Blends two animations additively inside of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeadd2.html + */ + class AnimationNodeAdd2 extends AnimationNodeSync { + constructor(identifier?: any) + } + /** Blends two of three animations additively inside of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeadd3.html + */ + class AnimationNodeAdd3 extends AnimationNodeSync { + constructor(identifier?: any) + } + namespace AnimationNodeAnimation { + enum PlayMode { + /** Plays animation in forward direction. */ + PLAY_MODE_FORWARD = 0, + + /** Plays animation in backward direction. */ + PLAY_MODE_BACKWARD = 1, + } + } + /** An input animation for an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeanimation.html + */ + class AnimationNodeAnimation extends AnimationRootNode { + constructor(identifier?: any) + /** Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. */ + get animation(): StringName + set animation(value: StringName) + + /** Determines the playback direction of the animation. */ + get play_mode(): int64 + set play_mode(value: int64) + + /** If `true`, [AnimationNode] provides an animation based on the [Animation] resource with some parameters adjusted. */ + get use_custom_timeline(): boolean + set use_custom_timeline(value: boolean) + + /** If [member use_custom_timeline] is `true`, offset the start position of the animation. */ + get timeline_length(): float64 + set timeline_length(value: float64) + + /** If `true`, scales the time so that the length specified in [member timeline_length] is one cycle. + * This is useful for matching the periods of walking and running animations. + * If `false`, the original animation length is respected. If you set the loop to [member loop_mode], the animation will loop in [member timeline_length]. + */ + get stretch_time_scale(): boolean + set stretch_time_scale(value: boolean) + + /** If [member use_custom_timeline] is `true`, offset the start position of the animation. + * This is useful for adjusting which foot steps first in 3D walking animations. + */ + get start_offset(): float64 + set start_offset(value: float64) + + /** If [member use_custom_timeline] is `true`, override the loop settings of the original [Animation] resource with the value. + * + * **Note:** If the [member Animation.loop_mode] isn't set to looping, the [method Animation.track_set_interpolation_loop_wrap] option will not be respected. If you cannot get the expected behavior, consider duplicating the [Animation] resource and changing the loop settings. + */ + get loop_mode(): int64 + set loop_mode(value: int64) + } + /** Blends two animations linearly inside of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeblend2.html + */ + class AnimationNodeBlend2 extends AnimationNodeSync { + constructor(identifier?: any) + } + /** Blends two of three animations linearly inside of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeblend3.html + */ + class AnimationNodeBlend3 extends AnimationNodeSync { + constructor(identifier?: any) + } + namespace AnimationNodeBlendSpace1D { + enum BlendMode { + /** The interpolation between animations is linear. */ + BLEND_MODE_INTERPOLATED = 0, + + /** The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. */ + BLEND_MODE_DISCRETE = 1, + + /** Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position. */ + BLEND_MODE_DISCRETE_CARRY = 2, + } + } + /** A set of [AnimationRootNode]s placed on a virtual axis, crossfading between the two adjacent ones. Used by [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeblendspace1d.html + */ + class AnimationNodeBlendSpace1D extends AnimationRootNode { + constructor(identifier?: any) + /** Adds a new point that represents a [param node] on the virtual axis at a given position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. */ + add_blend_point(node: AnimationRootNode, pos: float64, at_index: int64 = -1): void + + /** Updates the position of the point at index [param point] on the blend axis. */ + set_blend_point_position(point: int64, pos: float64): void + + /** Returns the position of the point at index [param point]. */ + get_blend_point_position(point: int64): float64 + + /** Changes the [AnimationNode] referenced by the point at index [param point]. */ + set_blend_point_node(point: int64, node: AnimationRootNode): void + + /** Returns the [AnimationNode] referenced by the point at index [param point]. */ + get_blend_point_node(point: int64): AnimationRootNode + + /** Removes the point at index [param point] from the blend axis. */ + remove_blend_point(point: int64): void + + /** Returns the number of points on the blend axis. */ + get_blend_point_count(): int64 + _add_blend_point(index: int64, node: AnimationRootNode): void + + /** The blend space's axis's lower limit for the points' position. See [method add_blend_point]. */ + get min_space(): float64 + set min_space(value: float64) + + /** The blend space's axis's upper limit for the points' position. See [method add_blend_point]. */ + get max_space(): float64 + set max_space(value: float64) + + /** Position increment to snap to when moving a point on the axis. */ + get snap(): float64 + set snap(value: float64) + + /** Label of the virtual axis of the blend space. */ + get value_label(): string + set value_label(value: string) + + /** Controls the interpolation between animations. See [enum BlendMode] constants. */ + get blend_mode(): int64 + set blend_mode(value: int64) + + /** If `false`, the blended animations' frame are stopped when the blend value is `0`. + * If `true`, forcing the blended animations to advance frame. + */ + get sync(): boolean + set sync(value: boolean) + } + class AnimationNodeBlendSpace1DEditor extends AnimationTreeNodeEditorPlugin { + constructor(identifier?: any) + _update_space(): void + _update_tool_erase(): void + _update_edited_point_pos(): void + } + namespace AnimationNodeBlendSpace2D { + enum BlendMode { + /** The interpolation between animations is linear. */ + BLEND_MODE_INTERPOLATED = 0, + + /** The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations. */ + BLEND_MODE_DISCRETE = 1, + + /** Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position. */ + BLEND_MODE_DISCRETE_CARRY = 2, + } + } + /** A set of [AnimationRootNode]s placed on 2D coordinates, crossfading between the three adjacent ones. Used by [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeblendspace2d.html + */ + class AnimationNodeBlendSpace2D extends AnimationRootNode { + constructor(identifier?: any) + /** Adds a new point that represents a [param node] at the position set by [param pos]. You can insert it at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. */ + add_blend_point(node: AnimationRootNode, pos: Vector2, at_index: int64 = -1): void + + /** Updates the position of the point at index [param point] in the blend space. */ + set_blend_point_position(point: int64, pos: Vector2): void + + /** Returns the position of the point at index [param point]. */ + get_blend_point_position(point: int64): Vector2 + + /** Changes the [AnimationNode] referenced by the point at index [param point]. */ + set_blend_point_node(point: int64, node: AnimationRootNode): void + + /** Returns the [AnimationRootNode] referenced by the point at index [param point]. */ + get_blend_point_node(point: int64): AnimationRootNode + + /** Removes the point at index [param point] from the blend space. */ + remove_blend_point(point: int64): void + + /** Returns the number of points in the blend space. */ + get_blend_point_count(): int64 + + /** Creates a new triangle using three points [param x], [param y], and [param z]. Triangles can overlap. You can insert the triangle at a specific index using the [param at_index] argument. If you use the default value for [param at_index], the point is inserted at the end of the blend points array. */ + add_triangle(x: int64, y: int64, z: int64, at_index: int64 = -1): void + + /** Returns the position of the point at index [param point] in the triangle of index [param triangle]. */ + get_triangle_point(triangle: int64, point: int64): int64 + + /** Removes the triangle at index [param triangle] from the blend space. */ + remove_triangle(triangle: int64): void + + /** Returns the number of triangles in the blend space. */ + get_triangle_count(): int64 + _add_blend_point(index: int64, node: AnimationRootNode): void + + /** If `true`, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]. */ + get auto_triangles(): boolean + set auto_triangles(value: boolean) + get triangles(): PackedInt32Array + set triangles(value: PackedInt32Array | int32[]) + + /** The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]. */ + get min_space(): Vector2 + set min_space(value: Vector2) + + /** The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]. */ + get max_space(): Vector2 + set max_space(value: Vector2) + + /** Position increment to snap to when moving a point. */ + get snap(): Vector2 + set snap(value: Vector2) + + /** Name of the blend space's X axis. */ + get x_label(): string + set x_label(value: string) + + /** Name of the blend space's Y axis. */ + get y_label(): string + set y_label(value: string) + + /** Controls the interpolation between animations. See [enum BlendMode] constants. */ + get blend_mode(): int64 + set blend_mode(value: int64) + + /** If `false`, the blended animations' frame are stopped when the blend value is `0`. + * If `true`, forcing the blended animations to advance frame. + */ + get sync(): boolean + set sync(value: boolean) + + /** Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position. */ + readonly triangles_updated: Signal0 + } + class AnimationNodeBlendSpace2DEditor extends AnimationTreeNodeEditorPlugin { + constructor(identifier?: any) + _update_space(): void + _update_tool_erase(): void + _update_edited_point_pos(): void + } + /** A sub-tree of many type [AnimationNode]s used for complex animations. Used by [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeblendtree.html + */ + class AnimationNodeBlendTree extends AnimationRootNode { + /** The connection was successful. */ + static readonly CONNECTION_OK = 0 + + /** The input node is `null`. */ + static readonly CONNECTION_ERROR_NO_INPUT = 1 + + /** The specified input port is out of range. */ + static readonly CONNECTION_ERROR_NO_INPUT_INDEX = 2 + + /** The output node is `null`. */ + static readonly CONNECTION_ERROR_NO_OUTPUT = 3 + + /** Input and output nodes are the same. */ + static readonly CONNECTION_ERROR_SAME_NODE = 4 + + /** The specified connection already exists. */ + static readonly CONNECTION_ERROR_CONNECTION_EXISTS = 5 + constructor(identifier?: any) + + /** Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub animation node later. */ + add_node(name: StringName, node: AnimationNode, position: Vector2 = Vector2.ZERO): void + + /** Returns the sub animation node with the specified [param name]. */ + get_node(name: StringName): AnimationNode + + /** Removes a sub animation node. */ + remove_node(name: StringName): void + + /** Changes the name of a sub animation node. */ + rename_node(name: StringName, new_name: StringName): void + + /** Returns `true` if a sub animation node with specified [param name] exists. */ + has_node(name: StringName): boolean + + /** Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index]. */ + connect_node(input_node: StringName, input_index: int64, output_node: StringName): void + + /** Disconnects the animation node connected to the specified input. */ + disconnect_node(input_node: StringName, input_index: int64): void + + /** Modifies the position of a sub animation node. */ + set_node_position(name: StringName, position: Vector2): void + + /** Returns the position of the sub animation node with the specified [param name]. */ + get_node_position(name: StringName): Vector2 + + /** The global offset of all sub animation nodes. */ + get graph_offset(): Vector2 + set graph_offset(value: Vector2) + + /** Emitted when the input port information is changed. */ + readonly node_changed: Signal1 + } + class AnimationNodeBlendTreeEditor extends AnimationTreeNodeEditorPlugin { + constructor(identifier?: any) + update_graph(): void + _update_filters(_unnamed_arg0: AnimationNode): boolean + } + class AnimationNodeEndState extends AnimationRootNode { + constructor(identifier?: any) + } + namespace AnimationNodeOneShot { + enum OneShotRequest { + /** The default state of the request. Nothing is done. */ + ONE_SHOT_REQUEST_NONE = 0, + + /** The request to play the animation connected to "shot" port. */ + ONE_SHOT_REQUEST_FIRE = 1, + + /** The request to stop the animation connected to "shot" port. */ + ONE_SHOT_REQUEST_ABORT = 2, + + /** The request to fade out the animation connected to "shot" port. */ + ONE_SHOT_REQUEST_FADE_OUT = 3, + } + enum MixMode { + /** Blends two animations. See also [AnimationNodeBlend2]. */ + MIX_MODE_BLEND = 0, + + /** Blends two animations additively. See also [AnimationNodeAdd2]. */ + MIX_MODE_ADD = 1, + } + } + /** Plays an animation once in an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeoneshot.html + */ + class AnimationNodeOneShot extends AnimationNodeSync { + constructor(identifier?: any) + /** The blend type. */ + get mix_mode(): int64 + set mix_mode(value: int64) + + /** The fade-in duration. For example, setting this to `1.0` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. + * + * **Note:** [AnimationNodeOneShot] transitions the current state after the end of the fading. When [AnimationNodeOutput] is considered as the most upstream, so the [member fadein_time] is scaled depending on the downstream delta. For example, if this value is set to `1.0` and a [AnimationNodeTimeScale] with a value of `2.0` is chained downstream, the actual processing time will be 0.5 second. + */ + get fadein_time(): float64 + set fadein_time(value: float64) + + /** Determines how cross-fading between animations is eased. If empty, the transition will be linear. */ + get fadein_curve(): Curve + set fadein_curve(value: Curve) + + /** The fade-out duration. For example, setting this to `1.0` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. + * + * **Note:** [AnimationNodeOneShot] transitions the current state after the end of the fading. When [AnimationNodeOutput] is considered as the most upstream, so the [member fadeout_time] is scaled depending on the downstream delta. For example, if this value is set to `1.0` and an [AnimationNodeTimeScale] with a value of `2.0` is chained downstream, the actual processing time will be 0.5 second. + */ + get fadeout_time(): float64 + set fadeout_time(value: float64) + + /** Determines how cross-fading between animations is eased. If empty, the transition will be linear. */ + get fadeout_curve(): Curve + set fadeout_curve(value: Curve) + + /** If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. */ + get break_loop_at_end(): boolean + set break_loop_at_end(value: boolean) + + /** If `true`, the sub-animation will restart automatically after finishing. + * In other words, to start auto restarting, the animation must be played once with the [constant ONE_SHOT_REQUEST_FIRE] request. The [constant ONE_SHOT_REQUEST_ABORT] request stops the auto restarting, but it does not disable the [member autorestart] itself. So, the [constant ONE_SHOT_REQUEST_FIRE] request will start auto restarting again. + */ + get autorestart(): boolean + set autorestart(value: boolean) + + /** The delay after which the automatic restart is triggered, in seconds. */ + get autorestart_delay(): float64 + set autorestart_delay(value: float64) + + /** If [member autorestart] is `true`, a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay]. */ + get autorestart_random_delay(): float64 + set autorestart_random_delay(value: float64) + } + /** The animation output node of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodeoutput.html + */ + class AnimationNodeOutput extends AnimationNode { + constructor(identifier?: any) + } + class AnimationNodeStartState extends AnimationRootNode { + constructor(identifier?: any) + } + namespace AnimationNodeStateMachine { + enum StateMachineType { + /** Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine. */ + STATE_MACHINE_TYPE_ROOT = 0, + + /** Seeking to the beginning is treated as seeking to the beginning of the animation in the current state. Transition to the end state, or the absence of transitions in each state, is treated as exiting the state machine. */ + STATE_MACHINE_TYPE_NESTED = 1, + + /** This is a grouped state machine that can be controlled from a parent state machine. It does not work independently. There must be a state machine with [member state_machine_type] of [constant STATE_MACHINE_TYPE_ROOT] or [constant STATE_MACHINE_TYPE_NESTED] in the parent or ancestor. */ + STATE_MACHINE_TYPE_GROUPED = 2, + } + } + /** A state machine with multiple [AnimationRootNode]s, used by [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodestatemachine.html + */ + class AnimationNodeStateMachine extends AnimationRootNode { + constructor(identifier?: any) + /** Adds a new animation node to the graph. The [param position] is used for display in the editor. */ + add_node(name: StringName, node: AnimationNode, position: Vector2 = Vector2.ZERO): void + + /** Replaces the given animation node with a new animation node. */ + replace_node(name: StringName, node: AnimationNode): void + + /** Returns the animation node with the given name. */ + get_node(name: StringName): AnimationNode + + /** Deletes the given animation node from the graph. */ + remove_node(name: StringName): void + + /** Renames the given animation node. */ + rename_node(name: StringName, new_name: StringName): void + + /** Returns `true` if the graph contains the given animation node. */ + has_node(name: StringName): boolean + + /** Returns the given animation node's name. */ + get_node_name(node: AnimationNode): StringName + + /** Sets the animation node's coordinates. Used for display in the editor. */ + set_node_position(name: StringName, position: Vector2): void + + /** Returns the given animation node's coordinates. Used for display in the editor. */ + get_node_position(name: StringName): Vector2 + + /** Returns `true` if there is a transition between the given animation nodes. */ + has_transition(from: StringName, to: StringName): boolean + + /** Adds a transition between the given animation nodes. */ + add_transition(from: StringName, to: StringName, transition: AnimationNodeStateMachineTransition): void + + /** Returns the given transition. */ + get_transition(idx: int64): AnimationNodeStateMachineTransition + + /** Returns the given transition's start node. */ + get_transition_from(idx: int64): StringName + + /** Returns the given transition's end node. */ + get_transition_to(idx: int64): StringName + + /** Returns the number of connections in the graph. */ + get_transition_count(): int64 + + /** Deletes the given transition by index. */ + remove_transition_by_index(idx: int64): void + + /** Deletes the transition between the two specified animation nodes. */ + remove_transition(from: StringName, to: StringName): void + + /** Sets the draw offset of the graph. Used for display in the editor. */ + set_graph_offset(offset: Vector2): void + + /** Returns the draw offset of the graph. Used for display in the editor. */ + get_graph_offset(): Vector2 + + /** This property can define the process of transitions for different use cases. See also [enum AnimationNodeStateMachine.StateMachineType]. */ + get state_machine_type(): int64 + set state_machine_type(value: int64) + + /** If `true`, allows teleport to the self state with [method AnimationNodeStateMachinePlayback.travel]. When the reset option is enabled in [method AnimationNodeStateMachinePlayback.travel], the animation is restarted. If `false`, nothing happens on the teleportation to the self state. */ + get allow_transition_to_self(): boolean + set allow_transition_to_self(value: boolean) + + /** If `true`, treat the cross-fade to the start and end nodes as a blend with the RESET animation. + * In most cases, when additional cross-fades are performed in the parent [AnimationNode] of the state machine, setting this property to `false` and matching the cross-fade time of the parent [AnimationNode] and the state machine's start node and end node gives good results. + */ + get reset_ends(): boolean + set reset_ends(value: boolean) + } + class AnimationNodeStateMachineEditor extends AnimationTreeNodeEditorPlugin { + constructor(identifier?: any) + _update_graph(): void + } + /** Provides playback control for an [AnimationNodeStateMachine]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodestatemachineplayback.html + */ + class AnimationNodeStateMachinePlayback extends Resource { + constructor(identifier?: any) + /** Transitions from the current state to another one, following the shortest path. + * If the path does not connect from the current state, the animation will play after the state teleports. + * If [param reset_on_teleport] is `true`, the animation is played from the beginning when the travel cause a teleportation. + */ + travel(to_node: StringName, reset_on_teleport: boolean = true): void + + /** Starts playing the given animation. + * If [param reset] is `true`, the animation is played from the beginning. + */ + start(node: StringName, reset: boolean = true): void + + /** If there is a next path by travel or auto advance, immediately transitions from the current state to the next state. */ + next(): void + + /** Stops the currently playing animation. */ + stop(): void + + /** Returns `true` if an animation is playing. */ + is_playing(): boolean + + /** Returns the currently playing animation state. + * + * **Note:** When using a cross-fade, the current state changes to the next state immediately after the cross-fade begins. + */ + get_current_node(): StringName + + /** Returns the playback position within the current animation state. */ + get_current_play_position(): float64 + + /** Returns the current state length. + * + * **Note:** It is possible that any [AnimationRootNode] can be nodes as well as animations. This means that there can be multiple animations within a single state. Which animation length has priority depends on the nodes connected inside it. Also, if a transition does not reset, the remaining length at that point will be returned. + */ + get_current_length(): float64 + + /** Returns the starting state of currently fading animation. */ + get_fading_from_node(): StringName + + /** Returns the current travel path as computed internally by the A* algorithm. */ + get_travel_path(): GArray + } + namespace AnimationNodeStateMachineTransition { + enum SwitchMode { + /** Switch to the next state immediately. The current state will end and blend into the beginning of the new one. */ + SWITCH_MODE_IMMEDIATE = 0, + + /** Switch to the next state immediately, but will seek the new state to the playback position of the old state. */ + SWITCH_MODE_SYNC = 1, + + /** Wait for the current state playback to end, then switch to the beginning of the next state animation. */ + SWITCH_MODE_AT_END = 2, + } + enum AdvanceMode { + /** Don't use this transition. */ + ADVANCE_MODE_DISABLED = 0, + + /** Only use this transition during [method AnimationNodeStateMachinePlayback.travel]. */ + ADVANCE_MODE_ENABLED = 1, + + /** Automatically use this transition if the [member advance_condition] and [member advance_expression] checks are true (if assigned). */ + ADVANCE_MODE_AUTO = 2, + } + } + /** A transition within an [AnimationNodeStateMachine] connecting two [AnimationRootNode]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodestatemachinetransition.html + */ + class AnimationNodeStateMachineTransition extends Resource { + constructor(identifier?: any) + /** The time to cross-fade between this state and the next. + * + * **Note:** [AnimationNodeStateMachine] transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When [AnimationNodeOutput] is considered as the most upstream, so the [member xfade_time] is not scaled depending on the downstream delta. See also [member AnimationNodeOneShot.fadeout_time]. + */ + get xfade_time(): float64 + set xfade_time(value: float64) + + /** Ease curve for better control over cross-fade between this state and the next. */ + get xfade_curve(): Curve + set xfade_curve(value: Curve) + + /** If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. */ + get break_loop_at_end(): boolean + set break_loop_at_end(value: boolean) + + /** If `true`, the destination animation is played back from the beginning when switched. */ + get reset(): boolean + set reset(value: boolean) + + /** Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member advance_mode] is set to [constant ADVANCE_MODE_AUTO]. */ + get priority(): int64 + set priority(value: int64) + + /** The transition type. */ + get switch_mode(): int64 + set switch_mode(value: int64) + + /** Determines whether the transition should disabled, enabled when using [method AnimationNodeStateMachinePlayback.travel], or traversed automatically if the [member advance_condition] and [member advance_expression] checks are true (if assigned). */ + get advance_mode(): int64 + set advance_mode(value: int64) + + /** Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/4.3/tutorials/animation/animation_tree.html#controlling-from-code]Using AnimationTree[/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to `"idle"`: + * + */ + get advance_condition(): StringName + set advance_condition(value: StringName) + + /** Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. */ + get advance_expression(): string + set advance_expression(value: string) + + /** Emitted when [member advance_condition] is changed. */ + readonly advance_condition_changed: Signal0 + } + /** Blends two animations subtractively inside of an [AnimationNodeBlendTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodesub2.html + */ + class AnimationNodeSub2 extends AnimationNodeSync { + constructor(identifier?: any) + } + /** Base class for [AnimationNode]s with multiple input ports that must be synchronized. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodesync.html + */ + class AnimationNodeSync extends AnimationNode { + constructor(identifier?: any) + /** If `false`, the blended animations' frame are stopped when the blend value is `0`. + * If `true`, forcing the blended animations to advance frame. + */ + get sync(): boolean + set sync(value: boolean) + } + /** A time-scaling animation node used in [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodetimescale.html + */ + class AnimationNodeTimeScale extends AnimationNode { + constructor(identifier?: any) + } + /** A time-seeking animation node used in [AnimationTree]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodetimeseek.html + */ + class AnimationNodeTimeSeek extends AnimationNode { + constructor(identifier?: any) + } + /** A transition within an [AnimationTree] connecting two [AnimationNode]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationnodetransition.html + */ + class AnimationNodeTransition extends AnimationNodeSync { + constructor(identifier?: any) + /** Enables or disables auto-advance for the given [param input] index. If enabled, state changes to the next input after playing the animation once. If enabled for the last input state, it loops to the first. */ + set_input_as_auto_advance(input: int64, enable: boolean): void + + /** Returns `true` if auto-advance is enabled for the given [param input] index. */ + is_input_set_as_auto_advance(input: int64): boolean + + /** If `true`, breaks the loop at the end of the loop cycle for transition, even if the animation is looping. */ + set_input_break_loop_at_end(input: int64, enable: boolean): void + + /** Returns whether the animation breaks the loop at the end of the loop cycle for transition. */ + is_input_loop_broken_at_end(input: int64): boolean + + /** If `true`, the destination animation is restarted when the animation transitions. */ + set_input_reset(input: int64, enable: boolean): void + + /** Returns whether the animation restarts when the animation transitions from the other animation. */ + is_input_reset(input: int64): boolean + + /** Cross-fading time (in seconds) between each animation connected to the inputs. + * + * **Note:** [AnimationNodeTransition] transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When [AnimationNodeOutput] is considered as the most upstream, so the [member xfade_time] is not scaled depending on the downstream delta. See also [member AnimationNodeOneShot.fadeout_time]. + */ + get xfade_time(): float64 + set xfade_time(value: float64) + + /** Determines how cross-fading between animations is eased. If empty, the transition will be linear. */ + get xfade_curve(): Curve + set xfade_curve(value: Curve) + + /** If `true`, allows transition to the self state. When the reset option is enabled in input, the animation is restarted. If `false`, nothing happens on the transition to the self state. */ + get allow_transition_to_self(): boolean + set allow_transition_to_self(value: boolean) + + /** The number of enabled input ports for this animation node. */ + get input_count(): any /*Inputs,input_*/ + set input_count(value: any /*Inputs,input_*/) + } + namespace AnimationPlayer { + enum AnimationProcessCallback { + ANIMATION_PROCESS_PHYSICS = 0, + ANIMATION_PROCESS_IDLE = 1, + ANIMATION_PROCESS_MANUAL = 2, + } + enum AnimationMethodCallMode { + ANIMATION_METHOD_CALL_DEFERRED = 0, + ANIMATION_METHOD_CALL_IMMEDIATE = 1, + } + } + /** A node used for animation playback. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationplayer.html + */ + class AnimationPlayer extends AnimationMixer { + constructor(identifier?: any) + /** Triggers the [param animation_to] animation when the [param animation_from] animation completes. */ + animation_set_next(animation_from: StringName, animation_to: StringName): void + + /** Returns the key of the animation which is queued to play after the [param animation_from] animation. */ + animation_get_next(animation_from: StringName): StringName + + /** Specifies a blend time (in seconds) between two animations, referenced by their keys. */ + set_blend_time(animation_from: StringName, animation_to: StringName, sec: float64): void + + /** Returns the blend time (in seconds) between two animations, referenced by their keys. */ + get_blend_time(animation_from: StringName, animation_to: StringName): float64 + + /** Plays the animation with key [param name]. Custom blend times and speed can be set. + * The [param from_end] option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If [param custom_speed] is negative and [param from_end] is `true`, the animation will play backwards (which is equivalent to calling [method play_backwards]). + * The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [param name], or with no [param name] parameter, the assigned animation will resume playing if it was paused. + * + * **Note:** The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call `advance(0)`. + */ + play(name: StringName = '', custom_blend: float64 = -1, custom_speed: float64 = 1, from_end: boolean = false): void + + /** Plays the animation with key [param name] in reverse. + * This method is a shorthand for [method play] with `custom_speed = -1.0` and `from_end = true`, so see its description for more information. + */ + play_backwards(name: StringName = '', custom_blend: float64 = -1): void + + /** See also [method AnimationMixer.capture]. + * You can use this method to use more detailed options for capture than those performed by [member playback_auto_capture]. When [member playback_auto_capture] is `false`, this method is almost the same as the following: + * + * If [param name] is blank, it specifies [member assigned_animation]. + * If [param duration] is a negative value, the duration is set to the interval between the current position and the first key, when [param from_end] is `true`, uses the interval between the current position and the last key instead. + * + * **Note:** The [param duration] takes [member speed_scale] into account, but [param custom_speed] does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations. + */ + play_with_capture(name: StringName = '', duration: float64 = -1, custom_blend: float64 = -1, custom_speed: float64 = 1, from_end: boolean = false, trans_type: Tween.TransitionType = 0, ease_type: Tween.EaseType = 0): void + + /** Pauses the currently playing animation. The [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. + * See also [method stop]. + */ + pause(): void + + /** Stops the currently playing animation. The animation position is reset to `0` and the `custom_speed` is reset to `1.0`. See also [method pause]. + * If [param keep_state] is `true`, the animation state is not updated visually. + * + * **Note:** The method / audio / animation playback tracks will not be processed by this method. + */ + stop(keep_state: boolean = false): void + + /** Returns `true` if an animation is currently playing (even if [member speed_scale] and/or `custom_speed` are `0`). */ + is_playing(): boolean + + /** Queues an animation for playback once the current animation and all previously queued animations are done. + * + * **Note:** If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. + */ + queue(name: StringName): void + + /** Returns a list of the animation keys that are currently queued to play. */ + get_queue(): PackedStringArray + + /** Clears all queued, unplayed animations. */ + clear_queue(): void + + /** Returns the actual playing speed of current animation or `0` if not playing. This speed is the [member speed_scale] property multiplied by `custom_speed` argument specified when calling the [method play] method. + * Returns a negative value if the current animation is playing backwards. + */ + get_playing_speed(): float64 + + /** Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is `true`, the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped. + * If [param update_only] is `true`, the method / audio / animation playback tracks will not be processed. + * + * **Note:** Seeking to the end of the animation doesn't emit [signal AnimationMixer.animation_finished]. If you want to skip animation and emit the signal, use [method AnimationMixer.advance]. + */ + seek(seconds: float64, update: boolean = false, update_only: boolean = false): void + + /** Sets the process notification in which to update animations. */ + set_process_callback(mode: AnimationPlayer.AnimationProcessCallback): void + + /** Returns the process notification in which to update animations. */ + get_process_callback(): AnimationPlayer.AnimationProcessCallback + + /** Sets the call mode used for "Call Method" tracks. */ + set_method_call_mode(mode: AnimationPlayer.AnimationMethodCallMode): void + + /** Returns the call mode used for "Call Method" tracks. */ + get_method_call_mode(): AnimationPlayer.AnimationMethodCallMode + + /** Sets the node which node path references will travel from. */ + set_root(path: NodePath | string): void + + /** Returns the node which node path references will travel from. */ + get_root(): NodePath + + /** The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. + * + * **Note:** While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. + */ + get current_animation(): StringName + set current_animation(value: StringName) + + /** If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation]. */ + get assigned_animation(): StringName + set assigned_animation(value: StringName) + + /** The key of the animation to play when the scene loads. */ + get autoplay(): StringName + set autoplay(value: StringName) + + /** The length (in seconds) of the currently playing animation. */ + get current_animation_length(): float64 + + /** The position (in seconds) of the currently playing animation. */ + get current_animation_position(): float64 + + /** If `true`, performs [method AnimationMixer.capture] before playback automatically. This means just [method play_with_capture] is executed with default arguments instead of [method play]. + * + * **Note:** Capture interpolation is only performed if the animation contains a capture track. See also [constant Animation.UPDATE_CAPTURE]. + */ + get playback_auto_capture(): boolean + set playback_auto_capture(value: boolean) + + /** See also [method play_with_capture] and [method AnimationMixer.capture]. + * If [member playback_auto_capture_duration] is negative value, the duration is set to the interval between the current position and the first key. + */ + get playback_auto_capture_duration(): float64 + set playback_auto_capture_duration(value: float64) + + /** The transition type of the capture interpolation. See also [enum Tween.TransitionType]. */ + get playback_auto_capture_transition_type(): int64 + set playback_auto_capture_transition_type(value: int64) + + /** The ease type of the capture interpolation. See also [enum Tween.EaseType]. */ + get playback_auto_capture_ease_type(): int64 + set playback_auto_capture_ease_type(value: int64) + + /** The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. */ + get playback_default_blend_time(): float64 + set playback_default_blend_time(value: float64) + + /** The speed scaling ratio. For example, if this value is `1`, then the animation plays at normal speed. If it's `0.5`, then it plays at half speed. If it's `2`, then it plays at double speed. + * If set to a negative value, the animation is played in reverse. If set to `0`, the animation will not advance. + */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** If `true` and the engine is running in Movie Maker mode (see [MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an animation is done playing in this [AnimationPlayer]. A message is printed when the engine quits for this reason. + * + * **Note:** This obeys the same logic as the [signal AnimationMixer.animation_finished] signal, so it will not quit the engine if the animation is set to be looping. + */ + get movie_quit_on_finish(): boolean + set movie_quit_on_finish(value: boolean) + + /** Emitted when [member current_animation] changes. */ + readonly current_animation_changed: Signal1 + + /** Emitted when a queued animation plays after the previous animation finished. See also [method AnimationPlayer.queue]. + * + * **Note:** The signal is not emitted when the animation is changed via [method AnimationPlayer.play] or by an [AnimationTree]. + */ + readonly animation_changed: Signal2 + } + class AnimationPlayerEditor extends VBoxContainer { + constructor(identifier?: any) + _animation_player_changed(_unnamed_arg0: Object): void + _start_onion_skinning(): void + _stop_onion_skinning(): void + readonly animation_selected: Signal1 + } + class AnimationPlayerEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Base class for [AnimationNode]s that hold one or multiple composite animations. Usually used for [member AnimationTree.tree_root]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationrootnode.html + */ + class AnimationRootNode extends AnimationNode { + constructor(identifier?: any) + } + class AnimationTimelineEdit extends Range { + constructor(identifier?: any) + update_values(): void + readonly zoom_changed: Signal0 + readonly name_limit_changed: Signal0 + readonly timeline_changed: Signal2 + readonly track_added: Signal1 + readonly length_changed: Signal1 + } + class AnimationTrackEditDefaultPlugin extends AnimationTrackEditPlugin { + constructor(identifier?: any) + } + class AnimationTrackEditPlugin extends RefCounted { + constructor(identifier?: any) + } + class AnimationTrackEditor extends VBoxContainer { + constructor(identifier?: any) + _track_grab_focus(_unnamed_arg0: int64): void + _redraw_tracks(): void + _clear_selection_for_anim(_unnamed_arg0: Animation): void + _select_at_anim(_unnamed_arg0: Animation, _unnamed_arg1: int64, _unnamed_arg2: float64): void + _clear_selection(_unnamed_arg0: boolean): void + _bezier_track_set_key_handle_mode(animation: Animation, track_idx: int64, key_idx: int64, key_handle_mode: any /*Animation.HandleMode*/, key_handle_set_mode: any /*Animation.HandleSetMode*/ = 0): void + readonly timeline_changed: Signal3 + readonly keying_changed: Signal0 + readonly animation_len_changed: Signal1 + readonly animation_step_changed: Signal1 + } + class AnimationTrackKeyEditEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace AnimationTree { + enum AnimationProcessCallback { + ANIMATION_PROCESS_PHYSICS = 0, + ANIMATION_PROCESS_IDLE = 1, + ANIMATION_PROCESS_MANUAL = 2, + } + } + /** A node used for advanced animation transitions in an [AnimationPlayer]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_animationtree.html + */ + class AnimationTree extends AnimationMixer { + constructor(identifier?: any) + /** Sets the process notification in which to update animations. */ + set_process_callback(mode: AnimationTree.AnimationProcessCallback): void + + /** Returns the process notification in which to update animations. */ + get_process_callback(): AnimationTree.AnimationProcessCallback + + /** The root animation node of this [AnimationTree]. See [AnimationRootNode]. */ + get tree_root(): AnimationRootNode + set tree_root(value: AnimationRootNode) + + /** The path to the [Node] used to evaluate the [AnimationNode] [Expression] if one is not explicitly specified internally. */ + get advance_expression_base_node(): NodePath + set advance_expression_base_node(value: NodePath | string) + + /** The path to the [AnimationPlayer] used for animating. */ + get anim_player(): NodePath + set anim_player(value: NodePath | string) + + /** Emitted when the [member anim_player] is changed. */ + readonly animation_player_changed: Signal0 + } + class AnimationTreeEditor extends VBoxContainer { + constructor(identifier?: any) + } + class AnimationTreeEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class AnimationTreeNodeEditorPlugin extends VBoxContainer { + constructor(identifier?: any) + } + namespace Area2D { + enum SpaceOverride { + /** This area does not affect gravity/damping. */ + SPACE_OVERRIDE_DISABLED = 0, + + /** This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). */ + SPACE_OVERRIDE_COMBINE = 1, + + /** This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. */ + SPACE_OVERRIDE_COMBINE_REPLACE = 2, + + /** This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. */ + SPACE_OVERRIDE_REPLACE = 3, + + /** This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. */ + SPACE_OVERRIDE_REPLACE_COMBINE = 4, + } + } + /** A region of 2D space that detects other [CollisionObject2D]s entering or exiting it. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_area2d.html + */ + class Area2D extends CollisionObject2D { + constructor(identifier?: any) + /** Returns a list of intersecting [PhysicsBody2D]s and [TileMap]s. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + get_overlapping_bodies(): GArray + + /** Returns a list of intersecting [Area2D]s. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + get_overlapping_areas(): GArray + + /** Returns `true` if intersecting any [PhysicsBody2D]s or [TileMap]s, otherwise returns `false`. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + has_overlapping_bodies(): boolean + + /** Returns `true` if intersecting any [Area2D]s, otherwise returns `false`. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + has_overlapping_areas(): boolean + + /** Returns `true` if the given physics body intersects or overlaps this [Area2D], `false` otherwise. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + * The [param body] argument can either be a [PhysicsBody2D] or a [TileMap] instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. + */ + overlaps_body(body: Node): boolean + + /** Returns `true` if the given [Area2D] intersects or overlaps this [Area2D], `false` otherwise. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + */ + overlaps_area(area: Node): boolean + + /** If `true`, the area detects bodies or areas entering and exiting it. */ + get monitoring(): boolean + set monitoring(value: boolean) + + /** If `true`, other monitoring areas can detect this area. */ + get monitorable(): boolean + set monitorable(value: boolean) + + /** The area's priority. Higher priority areas are processed first. The [World2D]'s physics is always processed last, after all areas. */ + get priority(): int64 + set priority(value: int64) + + /** Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values. */ + get gravity_space_override(): int64 + set gravity_space_override(value: int64) + + /** If `true`, gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override]. */ + get gravity_point(): boolean + set gravity_point(value: boolean) + + /** The distance at which the gravity strength is equal to [member gravity]. For example, on a planet 100 pixels in radius with a surface gravity of 4.0 px/s², set the [member gravity] to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 pixels from the center the gravity will be 1.0 px/s² (twice the distance, 1/4th the gravity), at 50 pixels it will be 16.0 px/s² (half the distance, 4x the gravity), and so on. + * The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + */ + get gravity_point_unit_distance(): float64 + set gravity_point_unit_distance(value: float64) + + /** If gravity is a point (see [member gravity_point]), this will be the point of attraction. */ + get gravity_point_center(): Vector2 + set gravity_point_center(value: Vector2) + + /** The area's gravity vector (not normalized). */ + get gravity_direction(): Vector2 + set gravity_direction(value: Vector2) + + /** The area's gravity intensity (in pixels per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. */ + get gravity(): float64 + set gravity(value: float64) + + /** Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values. */ + get linear_damp_space_override(): int64 + set linear_damp_space_override(value: int64) + + /** The rate at which objects stop moving in this area. Represents the linear velocity lost per second. + * See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping. + */ + get linear_damp(): float64 + set linear_damp(value: float64) + + /** Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values. */ + get angular_damp_space_override(): int64 + set angular_damp_space_override(value: int64) + + /** The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. + * See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping. + */ + get angular_damp(): float64 + set angular_damp(value: float64) + + /** If `true`, the area's audio bus overrides the default audio bus. */ + get audio_bus_override(): boolean + set audio_bus_override(value: boolean) + + /** The name of the area's audio bus. */ + get audio_bus_name(): StringName + set audio_bus_name(value: StringName) + + /** Emitted when a [Shape2D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to `true`. + * [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer2D]. + * **Example of getting the** [CollisionShape2D] **node from the shape index:** + * + */ + readonly body_shape_entered: Signal4 + + /** Emitted when a [Shape2D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to `true`. + * See also [signal body_shape_entered]. + */ + readonly body_shape_exited: Signal4 + + /** Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to `true`. */ + readonly body_entered: Signal1 + + /** Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to `true`. */ + readonly body_exited: Signal1 + + /** Emitted when a [Shape2D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to `true`. + * [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer2D]. + * **Example of getting the** [CollisionShape2D] **node from the shape index:** + * + */ + readonly area_shape_entered: Signal4 + + /** Emitted when a [Shape2D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to `true`. + * See also [signal area_shape_entered]. + */ + readonly area_shape_exited: Signal4 + + /** Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to `true`. */ + readonly area_entered: Signal1 + + /** Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to `true`. */ + readonly area_exited: Signal1 + } + namespace Area3D { + enum SpaceOverride { + /** This area does not affect gravity/damping. */ + SPACE_OVERRIDE_DISABLED = 0, + + /** This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order). */ + SPACE_OVERRIDE_COMBINE = 1, + + /** This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas. */ + SPACE_OVERRIDE_COMBINE_REPLACE = 2, + + /** This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas. */ + SPACE_OVERRIDE_REPLACE = 3, + + /** This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas. */ + SPACE_OVERRIDE_REPLACE_COMBINE = 4, + } + } + /** A region of 3D space that detects other [CollisionObject3D]s entering or exiting it. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_area3d.html + */ + class Area3D extends CollisionObject3D { + constructor(identifier?: any) + /** Returns a list of intersecting [PhysicsBody3D]s and [GridMap]s. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + get_overlapping_bodies(): GArray + + /** Returns a list of intersecting [Area3D]s. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + get_overlapping_areas(): GArray + + /** Returns `true` if intersecting any [PhysicsBody3D]s or [GridMap]s, otherwise returns `false`. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) the list of overlapping bodies is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + has_overlapping_bodies(): boolean + + /** Returns `true` if intersecting any [Area3D]s, otherwise returns `false`. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected. + * For performance reasons (collisions are all processed at the same time) the list of overlapping areas is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. + */ + has_overlapping_areas(): boolean + + /** Returns `true` if the given physics body intersects or overlaps this [Area3D], `false` otherwise. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + * The [param body] argument can either be a [PhysicsBody3D] or a [GridMap] instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. + */ + overlaps_body(body: Node): boolean + + /** Returns `true` if the given [Area3D] intersects or overlaps this [Area3D], `false` otherwise. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + */ + overlaps_area(area: Node): boolean + + /** If `true`, the area detects bodies or areas entering and exiting it. */ + get monitoring(): boolean + set monitoring(value: boolean) + + /** If `true`, other monitoring areas can detect this area. */ + get monitorable(): boolean + set monitorable(value: boolean) + + /** The area's priority. Higher priority areas are processed first. The [World3D]'s physics is always processed last, after all areas. */ + get priority(): int64 + set priority(value: int64) + + /** Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values. */ + get gravity_space_override(): int64 + set gravity_space_override(value: int64) + + /** If `true`, gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override]. */ + get gravity_point(): boolean + set gravity_point(value: boolean) + + /** The distance at which the gravity strength is equal to [member gravity]. For example, on a planet 100 meters in radius with a surface gravity of 4.0 m/s², set the [member gravity] to 4.0 and the unit distance to 100.0. The gravity will have falloff according to the inverse square law, so in the example, at 200 meters from the center the gravity will be 1.0 m/s² (twice the distance, 1/4th the gravity), at 50 meters it will be 16.0 m/s² (half the distance, 4x the gravity), and so on. + * The above is true only when the unit distance is a positive number. When this is set to 0.0, the gravity will be constant regardless of distance. + */ + get gravity_point_unit_distance(): float64 + set gravity_point_unit_distance(value: float64) + + /** If gravity is a point (see [member gravity_point]), this will be the point of attraction. */ + get gravity_point_center(): Vector3 + set gravity_point_center(value: Vector3) + + /** The area's gravity vector (not normalized). */ + get gravity_direction(): Vector3 + set gravity_direction(value: Vector3) + + /** The area's gravity intensity (in meters per second squared). This value multiplies the gravity direction. This is useful to alter the force of gravity without altering its direction. */ + get gravity(): float64 + set gravity(value: float64) + + /** Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values. */ + get linear_damp_space_override(): int64 + set linear_damp_space_override(value: int64) + + /** The rate at which objects stop moving in this area. Represents the linear velocity lost per second. + * See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. + */ + get linear_damp(): float64 + set linear_damp(value: float64) + + /** Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values. */ + get angular_damp_space_override(): int64 + set angular_damp_space_override(value: int64) + + /** The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. + * See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. + */ + get angular_damp(): float64 + set angular_damp(value: float64) + + /** The magnitude of area-specific wind force. + * + * **Note:** This wind force only applies to [SoftBody3D] nodes. Other physics bodies are currently not affected by wind. + */ + get wind_force_magnitude(): float64 + set wind_force_magnitude(value: float64) + + /** The exponential rate at which wind force decreases with distance from its origin. + * + * **Note:** This wind force only applies to [SoftBody3D] nodes. Other physics bodies are currently not affected by wind. + */ + get wind_attenuation_factor(): float64 + set wind_attenuation_factor(value: float64) + + /** The [Node3D] which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform. + * + * **Note:** This wind force only applies to [SoftBody3D] nodes. Other physics bodies are currently not affected by wind. + */ + get wind_source_path(): NodePath + set wind_source_path(value: NodePath | string) + + /** If `true`, the area's audio bus overrides the default audio bus. */ + get audio_bus_override(): boolean + set audio_bus_override(value: boolean) + + /** The name of the area's audio bus. */ + get audio_bus_name(): StringName + set audio_bus_name(value: StringName) + + /** If `true`, the area applies reverb to its associated audio. */ + get reverb_bus_enabled(): boolean + set reverb_bus_enabled(value: boolean) + + /** The name of the reverb bus to use for this area's associated audio. */ + get reverb_bus_name(): StringName + set reverb_bus_name(value: StringName) + + /** The degree to which this area applies reverb to its associated audio. Ranges from `0` to `1` with `0.1` precision. */ + get reverb_bus_amount(): float64 + set reverb_bus_amount(value: float64) + + /** The degree to which this area's reverb is a uniform effect. Ranges from `0` to `1` with `0.1` precision. */ + get reverb_bus_uniformity(): float64 + set reverb_bus_uniformity(value: float64) + + /** Emitted when a [Shape3D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to `true`. + * [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer3D]. + * **Example of getting the** [CollisionShape3D] **node from the shape index:** + * + */ + readonly body_shape_entered: Signal4 + + /** Emitted when a [Shape3D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to `true`. + * See also [signal body_shape_entered]. + */ + readonly body_shape_exited: Signal4 + + /** Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to `true`. */ + readonly body_entered: Signal1 + + /** Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to `true`. */ + readonly body_exited: Signal1 + + /** Emitted when a [Shape3D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to `true`. + * [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer3D]. + * **Example of getting the** [CollisionShape3D] **node from the shape index:** + * + */ + readonly area_shape_entered: Signal4 + + /** Emitted when a [Shape3D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to `true`. + * See also [signal area_shape_entered]. + */ + readonly area_shape_exited: Signal4 + + /** Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to `true`. */ + readonly area_entered: Signal1 + + /** Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to `true`. */ + readonly area_exited: Signal1 + } + /** [Mesh] type that provides utility for constructing a surface from arrays. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_arraymesh.html + */ + class ArrayMesh extends Mesh { + constructor(identifier?: any) + /** Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. */ + add_blend_shape(name: StringName): void + + /** Returns the number of blend shapes that the [ArrayMesh] holds. */ + get_blend_shape_count(): int64 + + /** Returns the name of the blend shape at this index. */ + get_blend_shape_name(index: int64): StringName + + /** Sets the name of the blend shape at this index. */ + set_blend_shape_name(index: int64, name: StringName): void + + /** Removes all blend shapes from this [ArrayMesh]. */ + clear_blend_shapes(): void + + /** Creates a new surface. [method Mesh.get_surface_count] will become the `surf_idx` for this new surface. + * Surfaces are created to be rendered using a [param primitive], which may be any of the values defined in [enum Mesh.PrimitiveType]. + * The [param arrays] argument is an array of arrays. Each of the [constant Mesh.ARRAY_MAX] elements contains an array with some of the mesh data for this surface as described by the corresponding member of [enum Mesh.ArrayType] or `null` if it is not used by the surface. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. + * The [param blend_shapes] argument is an array of vertex data for each blend shape. Each element is an array of the same structure as [param arrays], but [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL], and [constant Mesh.ARRAY_TANGENT] are set if and only if they are set in [param arrays] and all other entries are `null`. + * The [param lods] argument is a dictionary with [float] keys and [PackedInt32Array] values. Each entry in the dictionary represents an LOD level of the surface, where the value is the [constant Mesh.ARRAY_INDEX] array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. + * The [param flags] argument is the bitwise or of, as required: One value of [enum Mesh.ArrayCustomFormat] left shifted by `ARRAY_FORMAT_CUSTOMn_SHIFT` for each custom channel in use, [constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY]. + * + * **Note:** When using indices, it is recommended to only use points, lines, or triangles. + */ + add_surface_from_arrays(primitive: Mesh.PrimitiveType, arrays: GArray, blend_shapes: GArray = [], lods: GDictionary = new GDictionary(), flags: Mesh.ArrayFormat = 0): void + + /** Removes all surfaces from this [ArrayMesh]. */ + clear_surfaces(): void + surface_update_vertex_region(surf_idx: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + surface_update_attribute_region(surf_idx: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + surface_update_skin_region(surf_idx: int64, offset: int64, data: PackedByteArray | byte[] | ArrayBuffer): void + + /** Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]). */ + surface_get_array_len(surf_idx: int64): int64 + + /** Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]). */ + surface_get_array_index_len(surf_idx: int64): int64 + + /** Returns the format mask of the requested surface (see [method add_surface_from_arrays]). */ + surface_get_format(surf_idx: int64): Mesh.ArrayFormat + + /** Returns the primitive type of the requested surface (see [method add_surface_from_arrays]). */ + surface_get_primitive_type(surf_idx: int64): Mesh.PrimitiveType + + /** Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned. */ + surface_find_by_name(name: string): int64 + + /** Sets a name for a given surface. */ + surface_set_name(surf_idx: int64, name: string): void + + /** Gets the name assigned to this surface. */ + surface_get_name(surf_idx: int64): string + + /** Regenerates tangents for each of the [ArrayMesh]'s surfaces. */ + regen_normal_maps(): void + + /** Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. */ + lightmap_unwrap(transform: Transform3D, texel_size: float64): GError + get _blend_shape_names(): PackedStringArray + set _blend_shape_names(value: PackedStringArray | string[]) + get _surfaces(): GArray + set _surfaces(value: GArray) + + /** Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. */ + get blend_shape_mode(): int64 + set blend_shape_mode(value: int64) + + /** Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. */ + get custom_aabb(): AABB + set custom_aabb(value: AABB) + + /** An optional mesh which can be used for rendering shadows and the depth prepass. Can be used to increase performance by supplying a mesh with fused vertices and only vertex position data (without normals, UVs, colors, etc.). + * + * **Note:** This mesh must have exactly the same vertex positions as the source mesh (including the source mesh's LODs, if present). If vertex positions differ, then the mesh will not draw correctly. + */ + get shadow_mesh(): ArrayMesh + set shadow_mesh(value: ArrayMesh) + } + /** 3D polygon shape for use with occlusion culling in [OccluderInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_arrayoccluder3d.html + */ + class ArrayOccluder3D extends Occluder3D { + constructor(identifier?: any) + /** Sets [member indices] and [member vertices], while updating the final occluder only once after both values are set. */ + set_arrays(vertices: PackedVector3Array | Vector3[], indices: PackedInt32Array | int32[]): void + + /** The occluder's vertex positions in local 3D coordinates. + * + * **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using [method set_arrays] instead to avoid updating the occluder twice when it's created. + */ + get vertices(): PackedVector3Array + set vertices(value: PackedVector3Array | Vector3[]) + + /** The occluder's index position. Indices determine which points from the [member vertices] array should be drawn, and in which order. + * + * **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using [method set_arrays] instead to avoid updating the occluder twice when it's created. + */ + get indices(): PackedInt32Array + set indices(value: PackedInt32Array | int32[]) + } + namespace AspectRatioContainer { + enum StretchMode { + /** The height of child controls is automatically adjusted based on the width of the container. */ + STRETCH_WIDTH_CONTROLS_HEIGHT = 0, + + /** The width of child controls is automatically adjusted based on the height of the container. */ + STRETCH_HEIGHT_CONTROLS_WIDTH = 1, + + /** The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio. */ + STRETCH_FIT = 2, + + /** The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. + * When the bounding rectangle of child controls exceed the container's size and [member Control.clip_contents] is enabled, this allows to show only the container's area restricted by its own bounding rectangle. + */ + STRETCH_COVER = 3, + } + enum AlignmentMode { + /** Aligns child controls with the beginning (left or top) of the container. */ + ALIGNMENT_BEGIN = 0, + + /** Aligns child controls with the center of the container. */ + ALIGNMENT_CENTER = 1, + + /** Aligns child controls with the end (right or bottom) of the container. */ + ALIGNMENT_END = 2, + } + } + /** A container that preserves the proportions of its child controls. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_aspectratiocontainer.html + */ + class AspectRatioContainer extends Container { + constructor(identifier?: any) + /** The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [member stretch_mode]. */ + get ratio(): float64 + set ratio(value: float64) + + /** The stretch mode used to align child controls. */ + get stretch_mode(): int64 + set stretch_mode(value: int64) + + /** Specifies the horizontal relative position of child controls. */ + get alignment_horizontal(): int64 + set alignment_horizontal(value: int64) + + /** Specifies the vertical relative position of child controls. */ + get alignment_vertical(): int64 + set alignment_vertical(value: int64) + } + class AssetLibraryEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class AtlasMergingDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + /** A texture that crops out part of another Texture2D. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_atlastexture.html + */ + class AtlasTexture extends Texture2D { + constructor(identifier?: any) + /** The texture that contains the atlas. Can be any type inheriting from [Texture2D], including another [AtlasTexture]. */ + get atlas(): Texture2D + set atlas(value: Texture2D) + + /** The region used to draw the [member atlas]. If either dimension of the region's size is `0`, the value from [member atlas] size will be used for that axis instead. */ + get region(): Rect2 + set region(value: Rect2) + + /** The margin around the [member region]. Useful for small adjustments. If the [member Rect2.size] of this property ("w" and "h" in the editor) is set, the drawn texture is resized to fit within the margin. */ + get margin(): Rect2 + set margin(value: Rect2) + + /** If `true`, the area outside of the [member region] is clipped to avoid bleeding of the surrounding texture pixels. */ + get filter_clip(): boolean + set filter_clip(value: boolean) + } + class AtlasTileProxyObject extends Object { + constructor(identifier?: any) + readonly changed: Signal1 + } + /** Stores information about the audio buses. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiobuslayout.html + */ + class AudioBusLayout extends Resource { + constructor(identifier?: any) + } + class AudioBusesEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Base class for audio effect resources. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffect.html + */ + class AudioEffect extends Resource { + constructor(identifier?: any) + /** Override this method to customize the [AudioEffectInstance] created when this effect is applied on a bus in the editor's Audio panel, or through [method AudioServer.add_bus_effect]. + * + * + * **Note:** It is recommended to keep a reference to the original [AudioEffect] in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly. + */ + /* gdvirtual */ _instantiate(): AudioEffectInstance + } + /** Adds an amplifying audio effect to an audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectamplify.html + */ + class AudioEffectAmplify extends AudioEffect { + constructor(identifier?: any) + /** Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. */ + get volume_db(): float64 + set volume_db(value: float64) + } + /** Adds a band limit filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectbandlimitfilter.html + */ + class AudioEffectBandLimitFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Adds a band pass filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectbandpassfilter.html + */ + class AudioEffectBandPassFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Captures audio from an audio bus in real-time. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectcapture.html + */ + class AudioEffectCapture extends AudioEffect { + constructor(identifier?: any) + /** Returns `true` if at least [param frames] audio frames are available to read in the internal ring buffer. */ + can_get_buffer(frames: int64): boolean + + /** Gets the next [param frames] audio samples from the internal ring buffer. + * Returns a [PackedVector2Array] containing exactly [param frames] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. + * The samples are signed floating-point PCM between `-1` and `1`. You will have to scale them if you want to use them as 8 or 16-bit integer samples. (`v = 0x7fff * samples[0].x`) + */ + get_buffer(frames: int64): PackedVector2Array + + /** Clears the internal ring buffer. + * + * **Note:** Calling this during a capture can cause the loss of samples which causes popping in the playback. + */ + clear_buffer(): void + + /** Returns the number of frames available to read using [method get_buffer]. */ + get_frames_available(): int64 + + /** Returns the number of audio frames discarded from the audio bus due to full buffer. */ + get_discarded_frames(): int64 + + /** Returns the total size of the internal ring buffer in frames. */ + get_buffer_length_frames(): int64 + + /** Returns the number of audio frames inserted from the audio bus. */ + get_pushed_frames(): int64 + + /** Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized. */ + get buffer_length(): float64 + set buffer_length(value: float64) + } + /** Adds a chorus audio effect. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectchorus.html + */ + class AudioEffectChorus extends AudioEffect { + constructor(identifier?: any) + set_voice_delay_ms(voice_idx: int64, delay_ms: float64): void + get_voice_delay_ms(voice_idx: int64): float64 + set_voice_rate_hz(voice_idx: int64, rate_hz: float64): void + get_voice_rate_hz(voice_idx: int64): float64 + set_voice_depth_ms(voice_idx: int64, depth_ms: float64): void + get_voice_depth_ms(voice_idx: int64): float64 + set_voice_level_db(voice_idx: int64, level_db: float64): void + get_voice_level_db(voice_idx: int64): float64 + set_voice_cutoff_hz(voice_idx: int64, cutoff_hz: float64): void + get_voice_cutoff_hz(voice_idx: int64): float64 + set_voice_pan(voice_idx: int64, pan: float64): void + get_voice_pan(voice_idx: int64): float64 + + /** The number of voices in the effect. */ + get voice_count(): int64 + set voice_count(value: int64) + + /** The effect's raw signal. */ + get dry(): float64 + set dry(value: float64) + + /** The effect's processed signal. */ + get wet(): float64 + set wet(value: float64) + } + /** Adds a compressor audio effect to an audio bus. + * Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectcompressor.html + */ + class AudioEffectCompressor extends AudioEffect { + constructor(identifier?: any) + /** The level above which compression is applied to the audio. Value can range from -60 to 0. */ + get threshold(): float64 + set threshold(value: float64) + + /** 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. */ + get ratio(): float64 + set ratio(value: float64) + + /** Gain applied to the output signal. */ + get gain(): float64 + set gain(value: float64) + + /** Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. */ + get attack_us(): float64 + set attack_us(value: float64) + + /** Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. */ + get release_ms(): float64 + set release_ms(value: float64) + + /** Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). */ + get mix(): float64 + set mix(value: float64) + + /** Reduce the sound level using another audio bus for threshold detection. */ + get sidechain(): StringName + set sidechain(value: StringName) + } + /** Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. + * Two tap delay and feedback options. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectdelay.html + */ + class AudioEffectDelay extends AudioEffect { + constructor(identifier?: any) + /** Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. */ + get dry(): float64 + set dry(value: float64) + + /** If `true`, the first tap will be enabled. */ + get tap1_active(): boolean + set tap1_active(value: boolean) + + /** First tap delay time in milliseconds. */ + get tap1_delay_ms(): float64 + set tap1_delay_ms(value: float64) + + /** Sound level for the first tap. */ + get tap1_level_db(): float64 + set tap1_level_db(value: float64) + + /** Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right). */ + get tap1_pan(): float64 + set tap1_pan(value: float64) + + /** If `true`, the second tap will be enabled. */ + get tap2_active(): boolean + set tap2_active(value: boolean) + + /** Second tap delay time in milliseconds. */ + get tap2_delay_ms(): float64 + set tap2_delay_ms(value: float64) + + /** Sound level for the second tap. */ + get tap2_level_db(): float64 + set tap2_level_db(value: float64) + + /** Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). */ + get tap2_pan(): float64 + set tap2_pan(value: float64) + + /** If `true`, feedback is enabled. */ + get feedback_active(): boolean + set feedback_active(value: boolean) + + /** Feedback delay time in milliseconds. */ + get feedback_delay_ms(): float64 + set feedback_delay_ms(value: float64) + + /** Sound level for feedback. */ + get feedback_level_db(): float64 + set feedback_level_db(value: float64) + + /** Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. */ + get feedback_lowpass(): float64 + set feedback_lowpass(value: float64) + } + namespace AudioEffectDistortion { + enum Mode { + /** Digital distortion effect which cuts off peaks at the top and bottom of the waveform. */ + MODE_CLIP = 0, + MODE_ATAN = 1, + + /** Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices. */ + MODE_LOFI = 2, + + /** Emulates the warm distortion produced by a field effect transistor, which is commonly used in solid-state musical instrument amplifiers. The [member drive] property has no effect in this mode. */ + MODE_OVERDRIVE = 3, + + /** Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound. */ + MODE_WAVESHAPE = 4, + } + } + /** Adds a distortion audio effect to an Audio bus. + * Modifies the sound to make it distorted. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectdistortion.html + */ + class AudioEffectDistortion extends AudioEffect { + constructor(identifier?: any) + /** Distortion type. */ + get mode(): int64 + set mode(value: int64) + + /** Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. */ + get pre_gain(): float64 + set pre_gain(value: float64) + + /** High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. */ + get keep_hf_hz(): float64 + set keep_hf_hz(value: float64) + + /** Distortion power. Value can range from 0 to 1. */ + get drive(): float64 + set drive(value: float64) + + /** Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24. */ + get post_gain(): float64 + set post_gain(value: float64) + } + /** Base class for audio equalizers. Gives you control over frequencies. + * Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecteq.html + */ + class AudioEffectEQ extends AudioEffect { + constructor(identifier?: any) + /** Sets band's gain at the specified index, in dB. */ + set_band_gain_db(band_idx: int64, volume_db: float64): void + + /** Returns the band's gain at the specified index, in dB. */ + get_band_gain_db(band_idx: int64): float64 + + /** Returns the number of bands of the equalizer. */ + get_band_count(): int64 + } + /** Adds a 10-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 31 Hz to 16000 Hz. + * Each frequency can be modulated between -60/+24 dB. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecteq10.html + */ + class AudioEffectEQ10 extends AudioEffectEQ { + constructor(identifier?: any) + } + /** Adds a 21-band equalizer audio effect to an Audio bus. Gives you control over frequencies from 22 Hz to 22000 Hz. + * Each frequency can be modulated between -60/+24 dB. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecteq21.html + */ + class AudioEffectEQ21 extends AudioEffectEQ { + constructor(identifier?: any) + } + /** Adds a 6-band equalizer audio effect to an audio bus. Gives you control over frequencies from 32 Hz to 10000 Hz. + * Each frequency can be modulated between -60/+24 dB. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecteq6.html + */ + class AudioEffectEQ6 extends AudioEffectEQ { + constructor(identifier?: any) + } + namespace AudioEffectFilter { + enum FilterDB { + FILTER_6DB = 0, + FILTER_12DB = 1, + FILTER_18DB = 2, + FILTER_24DB = 3, + } + } + /** Adds a filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectfilter.html + */ + class AudioEffectFilter extends AudioEffect { + constructor(identifier?: any) + /** Threshold frequency for the filter, in Hz. */ + get cutoff_hz(): float64 + set cutoff_hz(value: float64) + + /** Amount of boost in the frequency range near the cutoff frequency. */ + get resonance(): float64 + set resonance(value: float64) + + /** Gain amount of the frequencies after the filter. */ + get gain(): float64 + set gain(value: float64) + get db(): int64 + set db(value: int64) + } + /** Adds a hard limiter audio effect to an Audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecthardlimiter.html + */ + class AudioEffectHardLimiter extends AudioEffect { + constructor(identifier?: any) + /** Gain to apply before limiting, in decibels. */ + get pre_gain_db(): float64 + set pre_gain_db(value: float64) + + /** The waveform's maximum allowed value, in decibels. This value can range from `-24.0` to `0.0`. + * The default value of `-0.3` prevents potential inter-sample peaks (ISP) from crossing over 0 dB, which can cause slight distortion on some older hardware. + */ + get ceiling_db(): float64 + set ceiling_db(value: float64) + + /** Time it takes in seconds for the gain reduction to fully release. */ + get release(): float64 + set release(value: float64) + } + /** Adds a high-pass filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecthighpassfilter.html + */ + class AudioEffectHighPassFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Adds a high-shelf filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffecthighshelffilter.html + */ + class AudioEffectHighShelfFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Manipulates the audio it receives for a given effect. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectinstance.html + */ + class AudioEffectInstance extends RefCounted { + constructor(identifier?: any) + /** Called by the [AudioServer] to process this effect. When [method _process_silence] is not overridden or it returns `false`, this method is called only when the bus is active. + * + * **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. + */ + /* gdvirtual */ _process(src_buffer: int64, dst_buffer: int64, frame_count: int64): void + + /** Override this method to customize the processing behavior of this effect instance. + * Should return `true` to force the [AudioServer] to always call [method _process], even if the bus has been muted or cannot otherwise be heard. + */ + /* gdvirtual */ _process_silence(): boolean + } + /** Adds a soft-clip limiter audio effect to an Audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectlimiter.html + */ + class AudioEffectLimiter extends AudioEffect { + constructor(identifier?: any) + /** The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. */ + get ceiling_db(): float64 + set ceiling_db(value: float64) + + /** Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. */ + get threshold_db(): float64 + set threshold_db(value: float64) + + /** Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. */ + get soft_clip_db(): float64 + set soft_clip_db(value: float64) + get soft_clip_ratio(): float64 + set soft_clip_ratio(value: float64) + } + /** Adds a low-pass filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectlowpassfilter.html + */ + class AudioEffectLowPassFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Adds a low-shelf filter to the audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectlowshelffilter.html + */ + class AudioEffectLowShelfFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Adds a notch filter to the Audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectnotchfilter.html + */ + class AudioEffectNotchFilter extends AudioEffectFilter { + constructor(identifier?: any) + } + /** Adds a panner audio effect to an audio bus. Pans sound left or right. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectpanner.html + */ + class AudioEffectPanner extends AudioEffect { + constructor(identifier?: any) + /** Pan position. Value can range from -1 (fully left) to 1 (fully right). */ + get pan(): float64 + set pan(value: float64) + } + /** Adds a phaser audio effect to an audio bus. + * Combines the original signal with a copy that is slightly out of phase with the original. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectphaser.html + */ + class AudioEffectPhaser extends AudioEffect { + constructor(identifier?: any) + /** Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. */ + get range_min_hz(): float64 + set range_min_hz(value: float64) + + /** Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. */ + get range_max_hz(): float64 + set range_max_hz(value: float64) + + /** Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. */ + get rate_hz(): float64 + set rate_hz(value: float64) + + /** Output percent of modified sound. Value can range from 0.1 to 0.9. */ + get feedback(): float64 + set feedback(value: float64) + + /** 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. */ + get depth(): float64 + set depth(value: float64) + } + namespace AudioEffectPitchShift { + enum FFTSize { + /** Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. */ + FFT_SIZE_256 = 0, + + /** Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. */ + FFT_SIZE_512 = 1, + + /** Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. */ + FFT_SIZE_1024 = 2, + + /** Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. */ + FFT_SIZE_2048 = 3, + + /** Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. */ + FFT_SIZE_4096 = 4, + + /** Represents the size of the [enum FFTSize] enum. */ + FFT_SIZE_MAX = 5, + } + } + /** Adds a pitch-shifting audio effect to an audio bus. + * Raises or lowers the pitch of original sound. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectpitchshift.html + */ + class AudioEffectPitchShift extends AudioEffect { + constructor(identifier?: any) + /** The pitch scale to use. `1.0` is the default pitch and plays sounds unaffected. [member pitch_scale] can range from `0.0` (infinitely low pitch, inaudible) to `16` (16 times higher than the initial pitch). */ + get pitch_scale(): float64 + set pitch_scale(value: float64) + + /** The oversampling factor to use. Higher values result in better quality, but are more demanding on the CPU and may cause audio cracking if the CPU can't keep up. */ + get oversampling(): float64 + set oversampling(value: float64) + + /** The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the effect over time, but have greater latency. The effects of this higher latency are especially noticeable on sounds that have sudden amplitude changes. */ + get fft_size(): int64 + set fft_size(value: int64) + } + /** Audio effect used for recording the sound from an audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectrecord.html + */ + class AudioEffectRecord extends AudioEffect { + constructor(identifier?: any) + /** If `true`, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. */ + set_recording_active(record: boolean): void + + /** Returns whether the recording is active or not. */ + is_recording_active(): boolean + + /** Returns the recorded sample. */ + get_recording(): AudioStreamWAV + + /** Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats. */ + get format(): int64 + set format(value: int64) + } + /** Adds a reverberation audio effect to an Audio bus. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectreverb.html + */ + class AudioEffectReverb extends AudioEffect { + constructor(identifier?: any) + /** Time between the original signal and the early reflections of the reverb signal, in milliseconds. */ + get predelay_msec(): float64 + set predelay_msec(value: float64) + + /** Output percent of predelay. Value can range from 0 to 1. */ + get predelay_feedback(): float64 + set predelay_feedback(value: float64) + + /** Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. */ + get room_size(): float64 + set room_size(value: float64) + + /** Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. */ + get damping(): float64 + set damping(value: float64) + + /** Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. */ + get spread(): float64 + set spread(value: float64) + + /** 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. */ + get hipass(): float64 + set hipass(value: float64) + + /** Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. */ + get dry(): float64 + set dry(value: float64) + + /** Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. */ + get wet(): float64 + set wet(value: float64) + } + namespace AudioEffectSpectrumAnalyzer { + enum FFTSize { + /** Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time. */ + FFT_SIZE_256 = 0, + + /** Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time. */ + FFT_SIZE_512 = 1, + + /** Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time. */ + FFT_SIZE_1024 = 2, + + /** Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time. */ + FFT_SIZE_2048 = 3, + + /** Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time. */ + FFT_SIZE_4096 = 4, + + /** Represents the size of the [enum FFTSize] enum. */ + FFT_SIZE_MAX = 5, + } + } + /** Audio effect that can be used for real-time audio visualizations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectspectrumanalyzer.html + */ + class AudioEffectSpectrumAnalyzer extends AudioEffect { + constructor(identifier?: any) + /** The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory. */ + get buffer_length(): float64 + set buffer_length(value: float64) + get tap_back_pos(): float64 + set tap_back_pos(value: float64) + + /** The size of the [url=https://en.wikipedia.org/wiki/Fast_Fourier_transform]Fast Fourier transform[/url] buffer. Higher values smooth out the spectrum analysis over time, but have greater latency. The effects of this higher latency are especially noticeable with sudden amplitude changes. */ + get fft_size(): int64 + set fft_size(value: int64) + } + namespace AudioEffectSpectrumAnalyzerInstance { + enum MagnitudeMode { + /** Use the average value across the frequency range as magnitude. */ + MAGNITUDE_AVERAGE = 0, + + /** Use the maximum value of the frequency range as magnitude. */ + MAGNITUDE_MAX = 1, + } + } + /** Queryable instance of an [AudioEffectSpectrumAnalyzer]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectspectrumanalyzerinstance.html + */ + class AudioEffectSpectrumAnalyzerInstance extends AudioEffectInstance { + constructor(identifier?: any) + /** Returns the magnitude of the frequencies from [param from_hz] to [param to_hz] in linear energy as a Vector2. The `x` component of the return value represents the left stereo channel, and `y` represents the right channel. + * [param mode] determines how the frequency range will be processed. See [enum MagnitudeMode]. + */ + get_magnitude_for_frequency_range(from_hz: float64, to_hz: float64, mode: AudioEffectSpectrumAnalyzerInstance.MagnitudeMode = 1): Vector2 + } + /** An audio effect that can be used to adjust the intensity of stereo panning. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audioeffectstereoenhance.html + */ + class AudioEffectStereoEnhance extends AudioEffect { + constructor(identifier?: any) + /** Values greater than 1.0 increase intensity of any panning on audio passing through this effect, whereas values less than 1.0 will decrease the panning intensity. A value of 0.0 will downmix audio to mono. */ + get pan_pullout(): float64 + set pan_pullout(value: float64) + get time_pullout_ms(): float64 + set time_pullout_ms(value: float64) + get surround(): float64 + set surround(value: float64) + } + /** Overrides the location sounds are heard from. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiolistener2d.html + */ + class AudioListener2D extends Node2D { + constructor(identifier?: any) + /** Makes the [AudioListener2D] active, setting it as the hearing point for the sounds. If there is already another active [AudioListener2D], it will be disabled. + * This method will have no effect if the [AudioListener2D] is not added to [SceneTree]. + */ + make_current(): void + + /** Disables the [AudioListener2D]. If it's not set as current, this method will have no effect. */ + clear_current(): void + + /** Returns `true` if this [AudioListener2D] is currently active. */ + is_current(): boolean + } + /** Overrides the location sounds are heard from. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiolistener3d.html + */ + class AudioListener3D extends Node3D { + constructor(identifier?: any) + /** Enables the listener. This will override the current camera's listener. */ + make_current(): void + + /** Disables the listener to use the current camera's listener instead. */ + clear_current(): void + + /** Returns `true` if the listener was made current using [method make_current], `false` otherwise. + * + * **Note:** There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. + */ + is_current(): boolean + + /** Returns the listener's global orthonormalized [Transform3D]. */ + get_listener_transform(): Transform3D + } + class AudioListener3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Base class for audio samples. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiosample.html + */ + class AudioSample extends RefCounted { + constructor(identifier?: any) + } + /** Meta class for playing back audio samples. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiosampleplayback.html + */ + class AudioSamplePlayback extends RefCounted { + constructor(identifier?: any) + } + /** Base class for audio streams. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostream.html + */ + class AudioStream extends Resource { + constructor(identifier?: any) + /** Override this method to customize the returned value of [method instantiate_playback]. Should returned a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer]).. */ + /* gdvirtual */ _instantiate_playback(): AudioStreamPlayback + + /** Override this method to customize the name assigned to this audio stream. Unused by the engine. */ + /* gdvirtual */ _get_stream_name(): string + + /** Override this method to customize the returned value of [method get_length]. Should return the length of this audio stream, in seconds. */ + /* gdvirtual */ _get_length(): float64 + + /** Override this method to customize the returned value of [method is_monophonic]. Should return `true` if this audio stream only supports one channel. */ + /* gdvirtual */ _is_monophonic(): boolean + + /** Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat. + * Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example). + */ + /* gdvirtual */ _get_bpm(): float64 + + /** Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat. + * Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example). + */ + /* gdvirtual */ _get_beat_count(): int64 + + /** Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see [method Object.get_property_list]). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. */ + /* gdvirtual */ _get_parameter_list(): GArray + + /** Returns the length of the audio stream in seconds. */ + get_length(): float64 + + /** Returns `true` if this audio stream only supports one channel ( *monophony* ), or `false` if the audio stream supports two or more channels ( *polyphony* ). */ + is_monophonic(): boolean + + /** Returns a newly created [AudioStreamPlayback] intended to play this audio stream. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source code for `AudioStreamRandomPitch::instantiate_playback`. */ + instantiate_playback(): AudioStreamPlayback + + /** Returns if the current [AudioStream] can be used as a sample. Only static streams can be sampled. */ + can_be_sampled(): boolean + + /** Generates an [AudioSample] based on the current stream. */ + generate_sample(): AudioSample + + /** Returns `true` if the stream is a collection of other streams, `false` otherwise. */ + is_meta_stream(): boolean + + /** Signal to be emitted to notify when the parameter list changed. */ + readonly parameter_list_changed: Signal0 + } + class AudioStreamEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** An audio stream with utilities for procedural sound generation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamgenerator.html + */ + class AudioStreamGenerator extends AudioStream { + constructor(identifier?: any) + /** The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality. + * In games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`. + * According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality. + */ + get mix_rate(): float64 + set mix_rate(value: float64) + + /** The length of the buffer to generate (in seconds). Lower values result in less latency, but require the script to generate audio data faster, resulting in increased CPU usage and more risk for audio cracking if the CPU can't keep up. */ + get buffer_length(): float64 + set buffer_length(value: float64) + } + /** Plays back audio generated using [AudioStreamGenerator]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamgeneratorplayback.html + */ + class AudioStreamGeneratorPlayback extends AudioStreamPlaybackResampled { + constructor(identifier?: any) + /** Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDExtension, but [method push_frame] may be *more* efficient in GDScript. */ + push_frame(frame: Vector2): boolean + + /** Returns `true` if a buffer of the size [param amount] can be pushed to the audio sample data buffer without overflowing it, `false` otherwise. */ + can_push_buffer(amount: int64): boolean + + /** Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDExtension, but [method push_buffer] may be *less* efficient in GDScript. */ + push_buffer(frames: PackedVector2Array | Vector2[]): boolean + + /** Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is `0`, the buffer is full. */ + get_frames_available(): int64 + + /** Returns the number of times the playback skipped due to a buffer underrun in the audio sample data. This value is reset at the start of the playback. */ + get_skips(): int64 + + /** Clears the audio sample data buffer. */ + clear_buffer(): void + } + class AudioStreamImportSettingsDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + namespace AudioStreamInteractive { + enum TransitionFromTime { + /** Start transition as soon as possible, don't wait for any specific time position. */ + TRANSITION_FROM_TIME_IMMEDIATE = 0, + + /** Transition when the clip playback position reaches the next beat. */ + TRANSITION_FROM_TIME_NEXT_BEAT = 1, + + /** Transition when the clip playback position reaches the next bar. */ + TRANSITION_FROM_TIME_NEXT_BAR = 2, + + /** Transition when the current clip finished playing. */ + TRANSITION_FROM_TIME_END = 3, + } + enum TransitionToTime { + /** Transition to the same position in the destination clip. This is useful when both clips have exactly the same length and the music should fade between them. */ + TRANSITION_TO_TIME_SAME_POSITION = 0, + + /** Transition to the start of the destination clip. */ + TRANSITION_TO_TIME_START = 1, + } + enum FadeMode { + /** Do not use fade for the transition. This is useful when transitioning from a clip-end to clip-beginning, and each clip has their begin/end. */ + FADE_DISABLED = 0, + + /** Use a fade-in in the next clip, let the current clip finish. */ + FADE_IN = 1, + + /** Use a fade-out in the current clip, the next clip will start by itself. */ + FADE_OUT = 2, + + /** Use a cross-fade between clips. */ + FADE_CROSS = 3, + + /** Use automatic fade logic depending on the transition from/to. It is recommended to use this by default. */ + FADE_AUTOMATIC = 4, + } + enum AutoAdvanceMode { + /** Disable auto-advance (default). */ + AUTO_ADVANCE_DISABLED = 0, + + /** Enable auto-advance, a clip must be specified. */ + AUTO_ADVANCE_ENABLED = 1, + + /** Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see [method add_transition]). */ + AUTO_ADVANCE_RETURN_TO_HOLD = 2, + } + } + /** Audio stream that can playback music interactively, combining clips and a transition table. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreaminteractive.html + */ + class AudioStreamInteractive extends AudioStream { + /** This constant describes that any clip is valid for a specific transition as either source or destination. */ + static readonly CLIP_ANY = -1 + constructor(identifier?: any) + _get_linked_undo_properties(for_property: string, for_value: any): PackedStringArray + _inspector_array_swap_clip(a: int64, b: int64): void + + /** Set the name of the current clip (for easier identification). */ + set_clip_name(clip_index: int64, name: StringName): void + + /** Return the name of a clip. */ + get_clip_name(clip_index: int64): StringName + + /** Set the [AudioStream] associated with the current clip. */ + set_clip_stream(clip_index: int64, stream: AudioStream): void + + /** Return the [AudioStream] associated with a clip. */ + get_clip_stream(clip_index: int64): AudioStream + + /** Set whether a clip will auto-advance by changing the auto-advance mode. */ + set_clip_auto_advance(clip_index: int64, mode: AudioStreamInteractive.AutoAdvanceMode): void + + /** Return whether a clip has auto-advance enabled. See [method set_clip_auto_advance]. */ + get_clip_auto_advance(clip_index: int64): AudioStreamInteractive.AutoAdvanceMode + + /** Set the index of the next clip towards which this clip will auto advance to when finished. If the clip being played loops, then auto-advance will be ignored. */ + set_clip_auto_advance_next_clip(clip_index: int64, auto_advance_next_clip: int64): void + + /** Return the clip towards which the clip referenced by [param clip_index] will auto-advance to. */ + get_clip_auto_advance_next_clip(clip_index: int64): int64 + + /** Add a transition between two clips. Provide the indices of the source and destination clips, or use the [constant CLIP_ANY] constant to indicate that transition happens to/from any clip to this one. + * * [param from_time] indicates the moment in the current clip the transition will begin after triggered. + * * [param to_time] indicates the time in the next clip that the playback will start from. + * * [param fade_mode] indicates how the fade will happen between clips. If unsure, just use [constant FADE_AUTOMATIC] which uses the most common type of fade for each situation. + * * [param fade_beats] indicates how many beats the fade will take. Using decimals is allowed. + * * [param use_filler_clip] indicates that there will be a filler clip used between the source and destination clips. + * * [param filler_clip] the index of the filler clip. + * * If [param hold_previous] is used, then this clip will be remembered. This can be used together with [constant AUTO_ADVANCE_RETURN_TO_HOLD] to return to this clip after another is done playing. + */ + add_transition(from_clip: int64, to_clip: int64, from_time: AudioStreamInteractive.TransitionFromTime, to_time: AudioStreamInteractive.TransitionToTime, fade_mode: AudioStreamInteractive.FadeMode, fade_beats: float64, use_filler_clip: boolean = false, filler_clip: int64 = -1, hold_previous: boolean = false): void + + /** Return true if a given transition exists (was added via [method add_transition]). */ + has_transition(from_clip: int64, to_clip: int64): boolean + + /** Erase a transition by providing [param from_clip] and [param to_clip] clip indices. [constant CLIP_ANY] can be used for either argument or both. */ + erase_transition(from_clip: int64, to_clip: int64): void + + /** Return the list of transitions (from, to interleaved). */ + get_transition_list(): PackedInt32Array + + /** Return the source time position for a transition (see [method add_transition]). */ + get_transition_from_time(from_clip: int64, to_clip: int64): AudioStreamInteractive.TransitionFromTime + + /** Return the destination time position for a transition (see [method add_transition]). */ + get_transition_to_time(from_clip: int64, to_clip: int64): AudioStreamInteractive.TransitionToTime + + /** Return the mode for a transition (see [method add_transition]). */ + get_transition_fade_mode(from_clip: int64, to_clip: int64): AudioStreamInteractive.FadeMode + + /** Return the time (in beats) for a transition (see [method add_transition]). */ + get_transition_fade_beats(from_clip: int64, to_clip: int64): float64 + + /** Return whether a transition uses the *filler clip* functionality (see [method add_transition]). */ + is_transition_using_filler_clip(from_clip: int64, to_clip: int64): boolean + + /** Return the filler clip for a transition (see [method add_transition]). */ + get_transition_filler_clip(from_clip: int64, to_clip: int64): int64 + + /** Return whether a transition uses the *hold previous* functionality (see [method add_transition]). */ + is_transition_holding_previous(from_clip: int64, to_clip: int64): boolean + + /** Index of the initial clip, which will be played first when this stream is played. */ + get initial_clip(): int64 + set initial_clip(value: int64) + + /** Amount of clips contained in this interactive player. */ + get clip_count(): any /*Clips,clip_,page_size=999,unfoldable,numbered,swap_method=_inspector_array_swap_clip,add_button_text=Add Clip*/ + set clip_count(value: any /*Clips,clip_,page_size=999,unfoldable,numbered,swap_method=_inspector_array_swap_clip,add_button_text=Add Clip*/) + get _transitions(): GDictionary + set _transitions(value: GDictionary) + } + class AudioStreamInteractiveEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class AudioStreamInteractiveTransitionEditor extends AcceptDialog { + constructor(identifier?: any) + _update_transitions(): void + } + /** MP3 audio stream driver. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreammp3.html + */ + class AudioStreamMP3 extends AudioStream { + constructor(identifier?: any) + /** Contains the audio data in bytes. + * You can load a file without having to import it beforehand using the code snippet below. Keep in mind that this snippet loads the whole file into memory and may not be ideal for huge files (hundreds of megabytes or more). + * + */ + get data(): PackedByteArray + set data(value: PackedByteArray | byte[] | ArrayBuffer) + get bpm(): float64 + set bpm(value: float64) + get beat_count(): int64 + set beat_count(value: int64) + get bar_beats(): int64 + set bar_beats(value: int64) + + /** If `true`, the stream will automatically loop when it reaches the end. */ + get loop(): boolean + set loop(value: boolean) + + /** Time in seconds at which the stream starts after being looped. */ + get loop_offset(): float64 + set loop_offset(value: float64) + } + /** Plays real-time audio input data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreammicrophone.html + */ + class AudioStreamMicrophone extends AudioStream { + constructor(identifier?: any) + } + /** A class representing an Ogg Vorbis audio stream. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamoggvorbis.html + */ + class AudioStreamOggVorbis extends AudioStream { + constructor(identifier?: any) + /** Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data. */ + static load_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): AudioStreamOggVorbis + + /** Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format. */ + static load_from_file(path: string): AudioStreamOggVorbis + + /** Contains the raw Ogg data for this stream. */ + get packet_sequence(): Object + set packet_sequence(value: Object) + get bpm(): float64 + set bpm(value: float64) + get beat_count(): int64 + set beat_count(value: int64) + get bar_beats(): int64 + set bar_beats(value: int64) + + /** If `true`, the audio will play again from the specified [member loop_offset] once it is done playing. Useful for ambient sounds and background music. */ + get loop(): boolean + set loop(value: boolean) + + /** Time in seconds at which the stream starts after being looped. */ + get loop_offset(): float64 + set loop_offset(value: float64) + } + /** Meta class for playing back audio. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplayback.html + */ + class AudioStreamPlayback extends RefCounted { + constructor(identifier?: any) + /** Override this method to customize what happens when the playback starts at the given position, such as by calling [method AudioStreamPlayer.play]. */ + /* gdvirtual */ _start(from_pos: float64): void + + /** Override this method to customize what happens when the playback is stopped, such as by calling [method AudioStreamPlayer.stop]. */ + /* gdvirtual */ _stop(): void + + /** Overridable method. Should return `true` if this playback is active and playing its audio stream. */ + /* gdvirtual */ _is_playing(): boolean + + /** Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return `0`. */ + /* gdvirtual */ _get_loop_count(): int64 + + /** Overridable method. Should return the current progress along the audio stream, in seconds. */ + /* gdvirtual */ _get_playback_position(): float64 + + /** Override this method to customize what happens when seeking this audio stream at the given [param position], such as by calling [method AudioStreamPlayer.seek]. */ + /* gdvirtual */ _seek(position: float64): void + + /** Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. + * + * **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. + */ + /* gdvirtual */ _mix(buffer: int64, rate_scale: float64, frames: int64): int64 + + /** Overridable method. Called whenever the audio stream is mixed if the playback is active and [method AudioServer.set_enable_tagging_used_audio_streams] has been set to `true`. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. */ + /* gdvirtual */ _tag_used_streams(): void + + /** Set the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]). */ + /* gdvirtual */ _set_parameter(name: StringName, value: any): void + + /** Return the current value of a playback parameter by name (see [method AudioStream._get_parameter_list]). */ + /* gdvirtual */ _get_parameter(name: StringName): any + + /** Associates [AudioSamplePlayback] to this [AudioStreamPlayback] for playing back the audio sample of this stream. */ + set_sample_playback(playback_sample: AudioSamplePlayback): void + + /** Returns the [AudioSamplePlayback] associated with this [AudioStreamPlayback] for playing back the audio sample of this stream. */ + get_sample_playback(): AudioSamplePlayback + } + /** Playback component of [AudioStreamInteractive]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybackinteractive.html + */ + class AudioStreamPlaybackInteractive extends AudioStreamPlayback { + constructor(identifier?: any) + /** Switch to a clip (by name). */ + switch_to_clip_by_name(clip_name: StringName): void + + /** Switch to a clip (by index). */ + switch_to_clip(clip_index: int64): void + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybackoggvorbis.html */ + class AudioStreamPlaybackOggVorbis extends AudioStreamPlaybackResampled { + constructor(identifier?: any) + } + /** Playback class used for [AudioStreamPlaylist]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybackplaylist.html + */ + class AudioStreamPlaybackPlaylist extends AudioStreamPlayback { + constructor(identifier?: any) + } + /** Playback instance for [AudioStreamPolyphonic]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybackpolyphonic.html + */ + class AudioStreamPlaybackPolyphonic extends AudioStreamPlayback { + /** Returned by [method play_stream] in case it could not allocate a stream for playback. */ + static readonly INVALID_ID = -1 + constructor(identifier?: any) + + /** Play an [AudioStream] at a given offset, volume, pitch scale, playback type, and bus. Playback starts immediately. + * The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. + * This ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called. + * This function returns [constant INVALID_ID] if the amount of streams currently playing equals [member AudioStreamPolyphonic.polyphony]. If you need a higher amount of maximum polyphony, raise this value. + */ + play_stream(stream: AudioStream, from_offset: float64 = 0, volume_db: float64 = 0, pitch_scale: float64 = 1, playback_type: AudioServer.PlaybackType = 0, bus: StringName = 'Master'): int64 + + /** Change the stream volume (in db). The [param stream] argument is an integer ID returned by [method play_stream]. */ + set_stream_volume(stream: int64, volume_db: float64): void + + /** Change the stream pitch scale. The [param stream] argument is an integer ID returned by [method play_stream]. */ + set_stream_pitch_scale(stream: int64, pitch_scale: float64): void + + /** Return true whether the stream associated with an integer ID is still playing. Check [method play_stream] for information on when this ID becomes invalid. */ + is_stream_playing(stream: int64): boolean + + /** Stop a stream. The [param stream] argument is an integer ID returned by [method play_stream], which becomes invalid after calling this function. */ + stop_stream(stream: int64): void + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybackresampled.html */ + class AudioStreamPlaybackResampled extends AudioStreamPlayback { + constructor(identifier?: any) + /* gdvirtual */ _mix_resampled(dst_buffer: int64, frame_count: int64): int64 + /* gdvirtual */ _get_stream_sampling_rate(): float64 + begin_resample(): void + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaybacksynchronized.html */ + class AudioStreamPlaybackSynchronized extends AudioStreamPlayback { + constructor(identifier?: any) + } + namespace AudioStreamPlayer { + enum MixTarget { + /** The audio will be played only on the first channel. This is the default. */ + MIX_TARGET_STEREO = 0, + + /** The audio will be played on all surround channels. */ + MIX_TARGET_SURROUND = 1, + + /** The audio will be played on the second channel, which is usually the center. */ + MIX_TARGET_CENTER = 2, + } + } + /** A node for audio playback. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplayer.html + */ + class AudioStreamPlayer extends Node { + constructor(identifier?: any) + /** Plays a sound from the beginning, or the given [param from_position] in seconds. */ + play(from_position: float64 = 0): void + + /** Restarts all sounds to be played from the given [param to_position], in seconds. Does nothing if no sounds are playing. */ + seek(to_position: float64): void + + /** Stops all sounds from this node. */ + stop(): void + + /** Returns the position in the [AudioStream] of the latest sound, in seconds. Returns `0.0` if no sounds are playing. + * + * **Note:** The position is not always accurate, as the [AudioServer] does not mix audio every processed frame. To get more accurate results, add [method AudioServer.get_time_since_last_mix] to the returned position. + */ + get_playback_position(): float64 + _is_active(): boolean + + /** Returns `true` if any sound is active, even if [member stream_paused] is set to `true`. See also [member playing] and [method get_stream_playback]. */ + has_stream_playback(): boolean + + /** Returns the latest [AudioStreamPlayback] of this node, usually the most recently created by [method play]. If no sounds are playing, this method fails and returns an empty playback. */ + get_stream_playback(): AudioStreamPlayback + + /** The [AudioStream] resource to be played. Setting this property stops all currently playing sounds. If left empty, the [AudioStreamPlayer] does not work. */ + get stream(): AudioStream + set stream(value: AudioStream) + + /** Volume of sound, in decibel. This is an offset of the [member stream]'s volume. + * + * **Note:** To convert between decibel and linear energy (like most volume sliders do), use [method @GlobalScope.db_to_linear] and [method @GlobalScope.linear_to_db]. + */ + get volume_db(): float64 + set volume_db(value: float64) + + /** The audio's pitch and tempo, as a multiplier of the [member stream]'s sample rate. A value of `2.0` doubles the audio's pitch, while a value of `0.5` halves the pitch. */ + get pitch_scale(): float64 + set pitch_scale(value: float64) + + /** If `true`, this node is playing sounds. Setting this property has the same effect as [method play] and [method stop]. */ + get playing(): boolean + set playing(value: boolean) + + /** If `true`, this node calls [method play] when entering the tree. */ + get autoplay(): boolean + set autoplay(value: boolean) + + /** If `true`, the sounds are paused. Setting [member stream_paused] to `false` resumes all sounds. + * + * **Note:** This property is automatically changed when exiting or entering the tree, or this node is paused (see [member Node.process_mode]). + */ + get stream_paused(): boolean + set stream_paused(value: boolean) + + /** The mix target channels, as one of the [enum MixTarget] constants. Has no effect when two speakers or less are detected (see [enum AudioServer.SpeakerMode]). */ + get mix_target(): int64 + set mix_target(value: int64) + + /** The maximum number of sounds this node can play at the same time. Calling [method play] after this value is reached will cut off the oldest sounds. */ + get max_polyphony(): int64 + set max_polyphony(value: int64) + + /** The target bus name. All sounds from this node will be playing on this bus. + * + * **Note:** At runtime, if no bus with the given name exists, all sounds will fall back on `"Master"`. See also [method AudioServer.get_bus_name]. + */ + get bus(): StringName + set bus(value: StringName) + + /** The playback type of the stream player. If set other than to the default value, it will force that playback type. */ + get playback_type(): int64 + set playback_type(value: int64) + + /** Emitted when a sound finishes playing without interruptions. This signal is *not* emitted when calling [method stop], or when exiting the tree while sounds are playing. */ + readonly finished: Signal0 + } + /** Plays positional sound in 2D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplayer2d.html + */ + class AudioStreamPlayer2D extends Node2D { + constructor(identifier?: any) + /** Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds. */ + play(from_position: float64 = 0): void + + /** Sets the position from which audio will be played, in seconds. */ + seek(to_position: float64): void + + /** Stops the audio. */ + stop(): void + + /** Returns the position in the [AudioStream]. */ + get_playback_position(): float64 + _is_active(): boolean + + /** Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not. */ + has_stream_playback(): boolean + + /** Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]. */ + get_stream_playback(): AudioStreamPlayback + + /** The [AudioStream] object to be played. */ + get stream(): AudioStream + set stream(value: AudioStream) + + /** Base volume before attenuation. */ + get volume_db(): float64 + set volume_db(value: float64) + + /** The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. */ + get pitch_scale(): float64 + set pitch_scale(value: float64) + + /** If `true`, audio is playing or is queued to be played (see [method play]). */ + get playing(): boolean + set playing(value: boolean) + + /** If `true`, audio plays when added to scene tree. */ + get autoplay(): boolean + set autoplay(value: boolean) + + /** If `true`, the playback is paused. You can resume it by setting [member stream_paused] to `false`. */ + get stream_paused(): boolean + set stream_paused(value: boolean) + + /** Maximum distance from which audio is still hearable. */ + get max_distance(): float64 + set max_distance(value: float64) + + /** The volume is attenuated over distance with this as an exponent. */ + get attenuation(): float64 + set attenuation(value: float64) + + /** The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. */ + get max_polyphony(): int64 + set max_polyphony(value: int64) + + /** Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/2d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values. */ + get panning_strength(): float64 + set panning_strength(value: float64) + + /** Bus on which this audio is playing. + * + * **Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `"Master"`. + */ + get bus(): StringName + set bus(value: StringName) + + /** Determines which [Area2D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. */ + get area_mask(): int64 + set area_mask(value: int64) + + /** The playback type of the stream player. If set other than to the default value, it will force that playback type. */ + get playback_type(): int64 + set playback_type(value: int64) + + /** Emitted when the audio stops playing. */ + readonly finished: Signal0 + } + namespace AudioStreamPlayer3D { + enum AttenuationModel { + /** Attenuation of loudness according to linear distance. */ + ATTENUATION_INVERSE_DISTANCE = 0, + + /** Attenuation of loudness according to squared distance. */ + ATTENUATION_INVERSE_SQUARE_DISTANCE = 1, + + /** Attenuation of loudness according to logarithmic distance. */ + ATTENUATION_LOGARITHMIC = 2, + + /** No attenuation of loudness according to distance. The sound will still be heard positionally, unlike an [AudioStreamPlayer]. [constant ATTENUATION_DISABLED] can be combined with a [member max_distance] value greater than `0.0` to achieve linear attenuation clamped to a sphere of a defined size. */ + ATTENUATION_DISABLED = 3, + } + enum DopplerTracking { + /** Disables doppler tracking. */ + DOPPLER_TRACKING_DISABLED = 0, + + /** Executes doppler tracking during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]). */ + DOPPLER_TRACKING_IDLE_STEP = 1, + + /** Executes doppler tracking during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). */ + DOPPLER_TRACKING_PHYSICS_STEP = 2, + } + } + /** Plays positional sound in 3D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplayer3d.html + */ + class AudioStreamPlayer3D extends Node3D { + constructor(identifier?: any) + /** Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds. */ + play(from_position: float64 = 0): void + + /** Sets the position from which audio will be played, in seconds. */ + seek(to_position: float64): void + + /** Stops the audio. */ + stop(): void + + /** Returns the position in the [AudioStream]. */ + get_playback_position(): float64 + _is_active(): boolean + + /** Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not. */ + has_stream_playback(): boolean + + /** Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]. */ + get_stream_playback(): AudioStreamPlayback + + /** The [AudioStream] resource to be played. */ + get stream(): AudioStream + set stream(value: AudioStream) + + /** Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation. */ + get attenuation_model(): int64 + set attenuation_model(value: int64) + + /** The base sound level before attenuation, in decibels. */ + get volume_db(): float64 + set volume_db(value: float64) + + /** The factor for the attenuation effect. Higher values make the sound audible over a larger distance. */ + get unit_size(): float64 + set unit_size(value: float64) + + /** Sets the absolute maximum of the sound level, in decibels. */ + get max_db(): float64 + set max_db(value: float64) + + /** The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. */ + get pitch_scale(): float64 + set pitch_scale(value: float64) + + /** If `true`, audio is playing or is queued to be played (see [method play]). */ + get playing(): boolean + set playing(value: boolean) + + /** If `true`, audio plays when the AudioStreamPlayer3D node is added to scene tree. */ + get autoplay(): boolean + set autoplay(value: boolean) + + /** If `true`, the playback is paused. You can resume it by setting [member stream_paused] to `false`. */ + get stream_paused(): boolean + set stream_paused(value: boolean) + + /** The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than `0.0`. [member max_distance] works in tandem with [member unit_size]. However, unlike [member unit_size] whose behavior depends on the [member attenuation_model], [member max_distance] always works in a linear fashion. This can be used to prevent the [AudioStreamPlayer3D] from requiring audio mixing when the listener is far away, which saves CPU resources. */ + get max_distance(): float64 + set max_distance(value: float64) + + /** The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. */ + get max_polyphony(): int64 + set max_polyphony(value: int64) + + /** Scales the panning strength for this node by multiplying the base [member ProjectSettings.audio/general/3d_panning_strength] with this factor. Higher values will pan audio from left to right more dramatically than lower values. */ + get panning_strength(): float64 + set panning_strength(value: float64) + + /** The bus on which this audio is playing. + * + * **Note:** When setting this property, keep in mind that no validation is performed to see if the given name matches an existing bus. This is because audio bus layouts might be loaded after this property is set. If this given name can't be resolved at runtime, it will fall back to `"Master"`. + */ + get bus(): StringName + set bus(value: StringName) + + /** Determines which [Area3D] layers affect the sound for reverb and audio bus effects. Areas can be used to redirect [AudioStream]s so that they play in a certain audio bus. An example of how you might use this is making a "water" area so that sounds played in the water are redirected through an audio bus to make them sound like they are being played underwater. */ + get area_mask(): int64 + set area_mask(value: int64) + + /** The playback type of the stream player. If set other than to the default value, it will force that playback type. */ + get playback_type(): int64 + set playback_type(value: int64) + + /** If `true`, the audio should be attenuated according to the direction of the sound. */ + get emission_angle_enabled(): boolean + set emission_angle_enabled(value: boolean) + + /** The angle in which the audio reaches a listener unattenuated. */ + get emission_angle_degrees(): float64 + set emission_angle_degrees(value: float64) + + /** Attenuation factor used if listener is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set, in decibels. */ + get emission_angle_filter_attenuation_db(): float64 + set emission_angle_filter_attenuation_db(value: float64) + + /** The cutoff frequency of the attenuation low-pass filter, in Hz. A sound above this frequency is attenuated more than a sound below this frequency. To disable this effect, set this to `20500` as this frequency is above the human hearing limit. */ + get attenuation_filter_cutoff_hz(): float64 + set attenuation_filter_cutoff_hz(value: float64) + + /** Amount how much the filter affects the loudness, in decibels. */ + get attenuation_filter_db(): float64 + set attenuation_filter_db(value: float64) + + /** Decides in which step the Doppler effect should be calculated. */ + get doppler_tracking(): int64 + set doppler_tracking(value: int64) + + /** Emitted when the audio stops playing. */ + readonly finished: Signal0 + } + class AudioStreamPlayer3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + class AudioStreamPlayerInternal extends Object { + constructor(identifier?: any) + } + /** [AudioStream] that includes sub-streams and plays them back like a playlist. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamplaylist.html + */ + class AudioStreamPlaylist extends AudioStream { + /** Maximum amount of streams supported in the playlist. */ + static readonly MAX_STREAMS = 64 + constructor(identifier?: any) + + /** Returns the BPM of the playlist, which can vary depending on the clip being played. */ + get_bpm(): float64 + + /** Sets the stream at playback position index. */ + set_list_stream(stream_index: int64, audio_stream: AudioStream): void + + /** Returns the stream at playback position index. */ + get_list_stream(stream_index: int64): AudioStream + + /** If `true`, the playlist will shuffle each time playback starts and each time it loops. */ + get shuffle(): boolean + set shuffle(value: boolean) + + /** If `true`, the playlist will loop, otherwise the playlist will end when the last stream is finished. */ + get loop(): boolean + set loop(value: boolean) + + /** Fade time used when a stream ends, when going to the next one. Streams are expected to have an extra bit of audio after the end to help with fading. */ + get fade_time(): float64 + set fade_time(value: float64) + + /** Amount of streams in the playlist. */ + get stream_count(): any /*Streams,stream_,unfoldable,page_size=999,add_button_text=Add Stream*/ + set stream_count(value: any /*Streams,stream_,unfoldable,page_size=999,add_button_text=Add Stream*/) + get stream_0(): AudioStream + set stream_0(value: AudioStream) + get stream_1(): AudioStream + set stream_1(value: AudioStream) + get stream_2(): AudioStream + set stream_2(value: AudioStream) + get stream_3(): AudioStream + set stream_3(value: AudioStream) + get stream_4(): AudioStream + set stream_4(value: AudioStream) + get stream_5(): AudioStream + set stream_5(value: AudioStream) + get stream_6(): AudioStream + set stream_6(value: AudioStream) + get stream_7(): AudioStream + set stream_7(value: AudioStream) + get stream_8(): AudioStream + set stream_8(value: AudioStream) + get stream_9(): AudioStream + set stream_9(value: AudioStream) + get stream_10(): AudioStream + set stream_10(value: AudioStream) + get stream_11(): AudioStream + set stream_11(value: AudioStream) + get stream_12(): AudioStream + set stream_12(value: AudioStream) + get stream_13(): AudioStream + set stream_13(value: AudioStream) + get stream_14(): AudioStream + set stream_14(value: AudioStream) + get stream_15(): AudioStream + set stream_15(value: AudioStream) + get stream_16(): AudioStream + set stream_16(value: AudioStream) + get stream_17(): AudioStream + set stream_17(value: AudioStream) + get stream_18(): AudioStream + set stream_18(value: AudioStream) + get stream_19(): AudioStream + set stream_19(value: AudioStream) + get stream_20(): AudioStream + set stream_20(value: AudioStream) + get stream_21(): AudioStream + set stream_21(value: AudioStream) + get stream_22(): AudioStream + set stream_22(value: AudioStream) + get stream_23(): AudioStream + set stream_23(value: AudioStream) + get stream_24(): AudioStream + set stream_24(value: AudioStream) + get stream_25(): AudioStream + set stream_25(value: AudioStream) + get stream_26(): AudioStream + set stream_26(value: AudioStream) + get stream_27(): AudioStream + set stream_27(value: AudioStream) + get stream_28(): AudioStream + set stream_28(value: AudioStream) + get stream_29(): AudioStream + set stream_29(value: AudioStream) + get stream_30(): AudioStream + set stream_30(value: AudioStream) + get stream_31(): AudioStream + set stream_31(value: AudioStream) + get stream_32(): AudioStream + set stream_32(value: AudioStream) + get stream_33(): AudioStream + set stream_33(value: AudioStream) + get stream_34(): AudioStream + set stream_34(value: AudioStream) + get stream_35(): AudioStream + set stream_35(value: AudioStream) + get stream_36(): AudioStream + set stream_36(value: AudioStream) + get stream_37(): AudioStream + set stream_37(value: AudioStream) + get stream_38(): AudioStream + set stream_38(value: AudioStream) + get stream_39(): AudioStream + set stream_39(value: AudioStream) + get stream_40(): AudioStream + set stream_40(value: AudioStream) + get stream_41(): AudioStream + set stream_41(value: AudioStream) + get stream_42(): AudioStream + set stream_42(value: AudioStream) + get stream_43(): AudioStream + set stream_43(value: AudioStream) + get stream_44(): AudioStream + set stream_44(value: AudioStream) + get stream_45(): AudioStream + set stream_45(value: AudioStream) + get stream_46(): AudioStream + set stream_46(value: AudioStream) + get stream_47(): AudioStream + set stream_47(value: AudioStream) + get stream_48(): AudioStream + set stream_48(value: AudioStream) + get stream_49(): AudioStream + set stream_49(value: AudioStream) + get stream_50(): AudioStream + set stream_50(value: AudioStream) + get stream_51(): AudioStream + set stream_51(value: AudioStream) + get stream_52(): AudioStream + set stream_52(value: AudioStream) + get stream_53(): AudioStream + set stream_53(value: AudioStream) + get stream_54(): AudioStream + set stream_54(value: AudioStream) + get stream_55(): AudioStream + set stream_55(value: AudioStream) + get stream_56(): AudioStream + set stream_56(value: AudioStream) + get stream_57(): AudioStream + set stream_57(value: AudioStream) + get stream_58(): AudioStream + set stream_58(value: AudioStream) + get stream_59(): AudioStream + set stream_59(value: AudioStream) + get stream_60(): AudioStream + set stream_60(value: AudioStream) + get stream_61(): AudioStream + set stream_61(value: AudioStream) + get stream_62(): AudioStream + set stream_62(value: AudioStream) + get stream_63(): AudioStream + set stream_63(value: AudioStream) + } + /** AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreampolyphonic.html + */ + class AudioStreamPolyphonic extends AudioStream { + constructor(identifier?: any) + /** Maximum amount of simultaneous streams that can be played. */ + get polyphony(): int64 + set polyphony(value: int64) + } + class AudioStreamPreviewGenerator extends Node { + constructor(identifier?: any) + generate_preview(stream: AudioStream): any /*AudioStreamPreview*/ + readonly preview_updated: Signal1 + } + namespace AudioStreamRandomizer { + enum PlaybackMode { + /** Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur. */ + PLAYBACK_RANDOM_NO_REPEATS = 0, + + /** Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play. */ + PLAYBACK_RANDOM = 1, + + /** Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play. */ + PLAYBACK_SEQUENTIAL = 2, + } + } + /** Wraps a pool of audio streams with pitch and volume shifting. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamrandomizer.html + */ + class AudioStreamRandomizer extends AudioStream { + constructor(identifier?: any) + /** Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. */ + add_stream(index: int64, stream: AudioStream, weight: float64 = 1): void + + /** Move a stream from one index to another. */ + move_stream(index_from: int64, index_to: int64): void + + /** Remove the stream at the specified index. */ + remove_stream(index: int64): void + + /** Set the AudioStream at the specified index. */ + set_stream(index: int64, stream: AudioStream): void + + /** Returns the stream at the specified index. */ + get_stream(index: int64): AudioStream + + /** Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes. */ + set_stream_probability_weight(index: int64, weight: float64): void + + /** Returns the probability weight associated with the stream at the given index. */ + get_stream_probability_weight(index: int64): float64 + + /** Controls how this AudioStreamRandomizer picks which AudioStream to play next. */ + get playback_mode(): int64 + set playback_mode(value: int64) + + /** The intensity of random pitch variation. A value of 1 means no variation. */ + get random_pitch(): float64 + set random_pitch(value: float64) + + /** The intensity of random volume variation. A value of 0 means no variation. */ + get random_volume_offset_db(): float64 + set random_volume_offset_db(value: float64) + + /** The number of streams in the stream pool. */ + get streams_count(): int64 + set streams_count(value: int64) + } + class AudioStreamRandomizerEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Stream that can be fitted with sub-streams, which will be played in-sync. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamsynchronized.html + */ + class AudioStreamSynchronized extends AudioStream { + /** Maximum amount of streams that can be synchronized. */ + static readonly MAX_STREAMS = 32 + constructor(identifier?: any) + + /** Set one of the synchronized streams, by index. */ + set_sync_stream(stream_index: int64, audio_stream: AudioStream): void + + /** Get one of the synchronized streams, by index. */ + get_sync_stream(stream_index: int64): AudioStream + + /** Set the volume of one of the synchronized streams, by index. */ + set_sync_stream_volume(stream_index: int64, volume_db: float64): void + + /** Get the volume of one of the synchronized streams, by index. */ + get_sync_stream_volume(stream_index: int64): float64 + + /** Set the total amount of streams that will be played back synchronized. */ + get stream_count(): any /*Streams,stream_,unfoldable,page_size=999,add_button_text=Add Stream*/ + set stream_count(value: any /*Streams,stream_,unfoldable,page_size=999,add_button_text=Add Stream*/) + } + namespace AudioStreamWAV { + enum Format { + /** 8-bit audio codec. */ + FORMAT_8_BITS = 0, + + /** 16-bit audio codec. */ + FORMAT_16_BITS = 1, + + /** Audio is compressed using IMA ADPCM. */ + FORMAT_IMA_ADPCM = 2, + + /** Audio is compressed as QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]). */ + FORMAT_QOA = 3, + } + enum LoopMode { + /** Audio does not loop. */ + LOOP_DISABLED = 0, + + /** Audio loops the data between [member loop_begin] and [member loop_end], playing forward only. */ + LOOP_FORWARD = 1, + + /** Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth. */ + LOOP_PINGPONG = 2, + + /** Audio loops the data between [member loop_begin] and [member loop_end], playing backward only. */ + LOOP_BACKWARD = 3, + } + } + /** Stores audio data loaded from WAV files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_audiostreamwav.html + */ + class AudioStreamWAV extends AudioStream { + constructor(identifier?: any) + /** Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM or QOA formats can't be saved. + * + * **Note:** A `.wav` extension is automatically appended to [param path] if it is missing. + */ + save_to_wav(path: string): GError + + /** Contains the audio data in bytes. + * + * **Note:** This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. + */ + get data(): PackedByteArray + set data(value: PackedByteArray | byte[] | ArrayBuffer) + + /** Audio format. See [enum Format] constants for values. */ + get format(): int64 + set format(value: int64) + + /** The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values. */ + get loop_mode(): int64 + set loop_mode(value: int64) + + /** The loop start point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. */ + get loop_begin(): int64 + set loop_begin(value: int64) + + /** The loop end point (in number of samples, relative to the beginning of the stream). This information will be imported automatically from the WAV file if present. */ + get loop_end(): int64 + set loop_end(value: int64) + + /** The sample rate for mixing this audio. Higher values require more storage space, but result in better quality. + * In games, common sample rates in use are `11025`, `16000`, `22050`, `32000`, `44100`, and `48000`. + * According to the [url=https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem]Nyquist-Shannon sampling theorem[/url], there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are using lower-pitched sounds such as voices, lower sample rates such as `32000` or `22050` may be usable with no loss in quality. + */ + get mix_rate(): int64 + set mix_rate(value: int64) + + /** If `true`, audio is stereo. */ + get stereo(): boolean + set stereo(value: boolean) + } + namespace BackBufferCopy { + enum CopyMode { + /** Disables the buffering mode. This means the [BackBufferCopy] node will directly use the portion of screen it covers. */ + COPY_MODE_DISABLED = 0, + + /** [BackBufferCopy] buffers a rectangular region. */ + COPY_MODE_RECT = 1, + + /** [BackBufferCopy] buffers the entire screen. */ + COPY_MODE_VIEWPORT = 2, + } + } + /** A node that copies a region of the screen to a buffer for access in shader code. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_backbuffercopy.html + */ + class BackBufferCopy extends Node2D { + constructor(identifier?: any) + /** Buffer mode. See [enum CopyMode] constants. */ + get copy_mode(): int64 + set copy_mode(value: int64) + + /** The area covered by the [BackBufferCopy]. Only used if [member copy_mode] is [constant COPY_MODE_RECT]. */ + get rect(): Rect2 + set rect(value: Rect2) + } + class BackgroundProgress extends HBoxContainer { + constructor(identifier?: any) + } + namespace BaseButton { + enum DrawMode { + /** The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons. */ + DRAW_NORMAL = 0, + + /** The state of buttons are pressed. */ + DRAW_PRESSED = 1, + + /** The state of buttons are hovered. */ + DRAW_HOVER = 2, + + /** The state of buttons are disabled. */ + DRAW_DISABLED = 3, + + /** The state of buttons are both hovered and pressed. */ + DRAW_HOVER_PRESSED = 4, + } + enum ActionMode { + /** Require just a press to consider the button clicked. */ + ACTION_MODE_BUTTON_PRESS = 0, + + /** Require a press and a subsequent release before considering the button clicked. */ + ACTION_MODE_BUTTON_RELEASE = 1, + } + } + /** Abstract base class for GUI buttons. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_basebutton.html + */ + class BaseButton extends Control { + constructor(identifier?: any) + /** Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead. */ + /* gdvirtual */ _pressed(): void + + /** Called when the button is toggled (only if [member toggle_mode] is active). */ + /* gdvirtual */ _toggled(toggled_on: boolean): void + + /** Changes the [member button_pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is `true`. + * + * **Note:** This method doesn't unpress other buttons in [member button_group]. + */ + set_pressed_no_signal(pressed: boolean): void + + /** Returns `true` if the mouse has entered the button and has not left it yet. */ + is_hovered(): boolean + + /** Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum. */ + get_draw_mode(): BaseButton.DrawMode + + /** If `true`, the button is in disabled state and can't be clicked or toggled. */ + get disabled(): boolean + set disabled(value: boolean) + + /** If `true`, the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. */ + get toggle_mode(): boolean + set toggle_mode(value: boolean) + + /** If `true`, the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is `true`. + * + * **Note:** Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal]. + */ + get button_pressed(): boolean + set button_pressed(value: boolean) + + /** Determines when the button is considered clicked, one of the [enum ActionMode] constants. */ + get action_mode(): int64 + set action_mode(value: int64) + + /** Binary mask to choose which mouse buttons this button will respond to. + * To allow both left-click and right-click, use `MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT`. + */ + get button_mask(): int64 + set button_mask(value: int64) + + /** If `true`, the button stays pressed when moving the cursor outside the button while pressing it. + * + * **Note:** This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. + */ + get keep_pressed_outside(): boolean + set keep_pressed_outside(value: boolean) + + /** The [ButtonGroup] associated with the button. Not to be confused with node groups. + * + * **Note:** The button will be configured as a radio button if a [ButtonGroup] is assigned to it. + */ + get button_group(): ButtonGroup + set button_group(value: ButtonGroup) + + /** [Shortcut] associated to the button. */ + get shortcut(): Shortcut + set shortcut(value: Shortcut) + + /** If `true`, the button will highlight for a short amount of time when its shortcut is activated. If `false` and [member toggle_mode] is `false`, the shortcut will activate without any visual feedback. */ + get shortcut_feedback(): boolean + set shortcut_feedback(value: boolean) + + /** If `true`, the button will add information about its shortcut in the tooltip. */ + get shortcut_in_tooltip(): boolean + set shortcut_in_tooltip(value: boolean) + + /** Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise. + * If you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead. + */ + readonly pressed: Signal0 + + /** Emitted when the button stops being held down. */ + readonly button_up: Signal0 + + /** Emitted when the button starts being held down. */ + readonly button_down: Signal0 + + /** Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [param toggled_on] argument. */ + readonly toggled: Signal1 + } + namespace BaseMaterial3D { + enum TextureParam { + /** Texture specifying per-pixel color. */ + TEXTURE_ALBEDO = 0, + + /** Texture specifying per-pixel metallic value. */ + TEXTURE_METALLIC = 1, + + /** Texture specifying per-pixel roughness value. */ + TEXTURE_ROUGHNESS = 2, + + /** Texture specifying per-pixel emission color. */ + TEXTURE_EMISSION = 3, + + /** Texture specifying per-pixel normal vector. */ + TEXTURE_NORMAL = 4, + + /** Texture specifying per-pixel rim value. */ + TEXTURE_RIM = 5, + + /** Texture specifying per-pixel clearcoat value. */ + TEXTURE_CLEARCOAT = 6, + + /** Texture specifying per-pixel flowmap direction for use with [member anisotropy]. */ + TEXTURE_FLOWMAP = 7, + + /** Texture specifying per-pixel ambient occlusion value. */ + TEXTURE_AMBIENT_OCCLUSION = 8, + + /** Texture specifying per-pixel height. */ + TEXTURE_HEIGHTMAP = 9, + + /** Texture specifying per-pixel subsurface scattering. */ + TEXTURE_SUBSURFACE_SCATTERING = 10, + + /** Texture specifying per-pixel transmittance for subsurface scattering. */ + TEXTURE_SUBSURFACE_TRANSMITTANCE = 11, + + /** Texture specifying per-pixel backlight color. */ + TEXTURE_BACKLIGHT = 12, + + /** Texture specifying per-pixel refraction strength. */ + TEXTURE_REFRACTION = 13, + + /** Texture specifying per-pixel detail mask blending value. */ + TEXTURE_DETAIL_MASK = 14, + + /** Texture specifying per-pixel detail color. */ + TEXTURE_DETAIL_ALBEDO = 15, + + /** Texture specifying per-pixel detail normal. */ + TEXTURE_DETAIL_NORMAL = 16, + + /** Texture holding ambient occlusion, roughness, and metallic. */ + TEXTURE_ORM = 17, + + /** Represents the size of the [enum TextureParam] enum. */ + TEXTURE_MAX = 18, + } + enum TextureFilter { + /** The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). */ + TEXTURE_FILTER_NEAREST = 0, + + /** The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). */ + TEXTURE_FILTER_LINEAR = 1, + + /** The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance. */ + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 2, + + /** The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance. */ + TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 3, + + /** The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 4, + + /** The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. */ + TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 5, + + /** Represents the size of the [enum TextureFilter] enum. */ + TEXTURE_FILTER_MAX = 6, + } + enum DetailUV { + /** Use `UV` with the detail texture. */ + DETAIL_UV_1 = 0, + + /** Use `UV2` with the detail texture. */ + DETAIL_UV_2 = 1, + } + enum Transparency { + /** The material will not use transparency. This is the fastest to render. */ + TRANSPARENCY_DISABLED = 0, + + /** The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting. */ + TRANSPARENCY_ALPHA = 1, + + /** The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. */ + TRANSPARENCY_ALPHA_SCISSOR = 2, + + /** The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering. */ + TRANSPARENCY_ALPHA_HASH = 3, + + /** The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. This also supports casting shadows. */ + TRANSPARENCY_ALPHA_DEPTH_PRE_PASS = 4, + + /** Represents the size of the [enum Transparency] enum. */ + TRANSPARENCY_MAX = 5, + } + enum ShadingMode { + /** The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights. */ + SHADING_MODE_UNSHADED = 0, + + /** The object will be shaded per pixel. Useful for realistic shading effects. */ + SHADING_MODE_PER_PIXEL = 1, + + /** The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. Not implemented yet (this mode will act like [constant SHADING_MODE_PER_PIXEL]). */ + SHADING_MODE_PER_VERTEX = 2, + + /** Represents the size of the [enum ShadingMode] enum. */ + SHADING_MODE_MAX = 3, + } + enum Feature { + /** Constant for setting [member emission_enabled]. */ + FEATURE_EMISSION = 0, + + /** Constant for setting [member normal_enabled]. */ + FEATURE_NORMAL_MAPPING = 1, + + /** Constant for setting [member rim_enabled]. */ + FEATURE_RIM = 2, + + /** Constant for setting [member clearcoat_enabled]. */ + FEATURE_CLEARCOAT = 3, + + /** Constant for setting [member anisotropy_enabled]. */ + FEATURE_ANISOTROPY = 4, + + /** Constant for setting [member ao_enabled]. */ + FEATURE_AMBIENT_OCCLUSION = 5, + + /** Constant for setting [member heightmap_enabled]. */ + FEATURE_HEIGHT_MAPPING = 6, + + /** Constant for setting [member subsurf_scatter_enabled]. */ + FEATURE_SUBSURFACE_SCATTERING = 7, + + /** Constant for setting [member subsurf_scatter_transmittance_enabled]. */ + FEATURE_SUBSURFACE_TRANSMITTANCE = 8, + + /** Constant for setting [member backlight_enabled]. */ + FEATURE_BACKLIGHT = 9, + + /** Constant for setting [member refraction_enabled]. */ + FEATURE_REFRACTION = 10, + + /** Constant for setting [member detail_enabled]. */ + FEATURE_DETAIL = 11, + + /** Represents the size of the [enum Feature] enum. */ + FEATURE_MAX = 12, + } + enum BlendMode { + /** Default blend mode. The color of the object is blended over the background based on the object's alpha value. */ + BLEND_MODE_MIX = 0, + + /** The color of the object is added to the background. */ + BLEND_MODE_ADD = 1, + + /** The color of the object is subtracted from the background. */ + BLEND_MODE_SUB = 2, + + /** The color of the object is multiplied by the background. */ + BLEND_MODE_MUL = 3, + + /** The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the `PREMUL_ALPHA_FACTOR` built-in so that lighting can be modulated as well. */ + BLEND_MODE_PREMULT_ALPHA = 4, + } + enum AlphaAntiAliasing { + /** Disables Alpha AntiAliasing for the material. */ + ALPHA_ANTIALIASING_OFF = 0, + + /** Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask. */ + ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE = 1, + + /** Enables AlphaToCoverage and forces all non-zero alpha values to `1`. Alpha values in the material are passed to the AntiAliasing sample mask. */ + ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE = 2, + } + enum DepthDrawMode { + /** Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass. */ + DEPTH_DRAW_OPAQUE_ONLY = 0, + + /** Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. + * + * **Note:** This does not influence whether transparent objects are included in the depth prepass or not. For that, see [enum Transparency]. + */ + DEPTH_DRAW_ALWAYS = 1, + + /** Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled). */ + DEPTH_DRAW_DISABLED = 2, + } + enum CullMode { + /** Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible. */ + CULL_BACK = 0, + + /** Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes, this means that the interior of the mesh will be drawn instead of the exterior. */ + CULL_FRONT = 1, + + /** No face culling is performed; both the front face and back face will be visible. */ + CULL_DISABLED = 2, + } + enum Flags { + /** Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth. */ + FLAG_DISABLE_DEPTH_TEST = 0, + + /** Set `ALBEDO` to the per-vertex color specified in the mesh. */ + FLAG_ALBEDO_FROM_VERTEX_COLOR = 1, + + /** Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also [member vertex_color_is_srgb]. + * + * **Note:** Only effective when using the Forward+ and Mobile rendering methods. + */ + FLAG_SRGB_VERTEX_COLOR = 2, + + /** Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use `POINT_COORD` instead of `UV`. */ + FLAG_USE_POINT_SIZE = 3, + + /** Object is scaled by depth so that it always appears the same size on screen. */ + FLAG_FIXED_SIZE = 4, + + /** Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when [member billboard_mode] is [constant BILLBOARD_ENABLED]. */ + FLAG_BILLBOARD_KEEP_SCALE = 5, + + /** Use triplanar texture lookup for all texture lookups that would normally use `UV`. */ + FLAG_UV1_USE_TRIPLANAR = 6, + + /** Use triplanar texture lookup for all texture lookups that would normally use `UV2`. */ + FLAG_UV2_USE_TRIPLANAR = 7, + + /** Use triplanar texture lookup for all texture lookups that would normally use `UV`. */ + FLAG_UV1_USE_WORLD_TRIPLANAR = 8, + + /** Use triplanar texture lookup for all texture lookups that would normally use `UV2`. */ + FLAG_UV2_USE_WORLD_TRIPLANAR = 9, + + /** Use `UV2` coordinates to look up from the [member ao_texture]. */ + FLAG_AO_ON_UV2 = 10, + + /** Use `UV2` coordinates to look up from the [member emission_texture]. */ + FLAG_EMISSION_ON_UV2 = 11, + + /** Forces the shader to convert albedo from sRGB space to linear space. See also [member albedo_texture_force_srgb]. */ + FLAG_ALBEDO_TEXTURE_FORCE_SRGB = 12, + + /** Disables receiving shadows from other objects. */ + FLAG_DONT_RECEIVE_SHADOWS = 13, + + /** Disables receiving ambient light. */ + FLAG_DISABLE_AMBIENT_LIGHT = 14, + + /** Enables the shadow to opacity feature. */ + FLAG_USE_SHADOW_TO_OPACITY = 15, + + /** Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture. */ + FLAG_USE_TEXTURE_REPEAT = 16, + + /** Invert values read from a depth texture to convert them to height values (heightmap). */ + FLAG_INVERT_HEIGHTMAP = 17, + + /** Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin. */ + FLAG_SUBSURFACE_MODE_SKIN = 18, + + /** Enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering. */ + FLAG_PARTICLE_TRAILS_MODE = 19, + + /** Enables multichannel signed distance field rendering shader. */ + FLAG_ALBEDO_TEXTURE_MSDF = 20, + + /** Disables receiving depth-based or volumetric fog. */ + FLAG_DISABLE_FOG = 21, + + /** Represents the size of the [enum Flags] enum. */ + FLAG_MAX = 22, + } + enum DiffuseMode { + /** Default diffuse scattering algorithm. */ + DIFFUSE_BURLEY = 0, + + /** Diffuse scattering ignores roughness. */ + DIFFUSE_LAMBERT = 1, + + /** Extends Lambert to cover more than 90 degrees when roughness increases. */ + DIFFUSE_LAMBERT_WRAP = 2, + + /** Uses a hard cut for lighting, with smoothing affected by roughness. */ + DIFFUSE_TOON = 3, + } + enum SpecularMode { + /** Default specular blob. */ + SPECULAR_SCHLICK_GGX = 0, + + /** Toon blob which changes size based on roughness. */ + SPECULAR_TOON = 1, + + /** No specular blob. This is slightly faster to render than other specular modes. */ + SPECULAR_DISABLED = 2, + } + enum BillboardMode { + /** Billboard mode is disabled. */ + BILLBOARD_DISABLED = 0, + + /** The object's Z axis will always face the camera. */ + BILLBOARD_ENABLED = 1, + + /** The object's X axis will always face the camera. */ + BILLBOARD_FIXED_Y = 2, + + /** Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes (flipbook animation). Enables `particles_anim_*` properties. + * The [member ParticleProcessMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play. + */ + BILLBOARD_PARTICLES = 3, + } + enum TextureChannel { + /** Used to read from the red channel of a texture. */ + TEXTURE_CHANNEL_RED = 0, + + /** Used to read from the green channel of a texture. */ + TEXTURE_CHANNEL_GREEN = 1, + + /** Used to read from the blue channel of a texture. */ + TEXTURE_CHANNEL_BLUE = 2, + + /** Used to read from the alpha channel of a texture. */ + TEXTURE_CHANNEL_ALPHA = 3, + + /** Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture. */ + TEXTURE_CHANNEL_GRAYSCALE = 4, + } + enum EmissionOperator { + /** Adds the emission color to the color from the emission texture. */ + EMISSION_OP_ADD = 0, + + /** Multiplies the emission color by the color from the emission texture. */ + EMISSION_OP_MULTIPLY = 1, + } + enum DistanceFadeMode { + /** Do not use distance fade. */ + DISTANCE_FADE_DISABLED = 0, + + /** Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel. */ + DISTANCE_FADE_PIXEL_ALPHA = 1, + + /** Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA]. */ + DISTANCE_FADE_PIXEL_DITHER = 2, + + /** Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than [constant DISTANCE_FADE_PIXEL_ALPHA] and [constant DISTANCE_FADE_PIXEL_DITHER]. */ + DISTANCE_FADE_OBJECT_DITHER = 3, + } + } + /** Abstract base class for defining the 3D rendering properties of meshes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_basematerial3d.html + */ + class BaseMaterial3D extends Material { + constructor(identifier?: any) + /** If `true`, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to `true`. See [enum Flags] enumerator for options. */ + set_flag(flag: BaseMaterial3D.Flags, enable: boolean): void + + /** Returns `true`, if the specified flag is enabled. See [enum Flags] enumerator for options. */ + get_flag(flag: BaseMaterial3D.Flags): boolean + + /** If `true`, enables the specified [enum Feature]. Many features that are available in [BaseMaterial3D]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to `true`. */ + set_feature(feature: BaseMaterial3D.Feature, enable: boolean): void + + /** Returns `true`, if the specified [enum Feature] is enabled. */ + get_feature(feature: BaseMaterial3D.Feature): boolean + + /** Sets the texture for the slot specified by [param param]. See [enum TextureParam] for available slots. */ + set_texture(param: BaseMaterial3D.TextureParam, texture: Texture2D): void + + /** Returns the [Texture2D] associated with the specified [enum TextureParam]. */ + get_texture(param: BaseMaterial3D.TextureParam): Texture2D + + /** The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than [constant TRANSPARENCY_DISABLED] has a greater performance impact compared to opaque rendering. See also [member blend_mode]. */ + get transparency(): int64 + set transparency(value: int64) + + /** Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing [member alpha_scissor_threshold]. If the material disappears at a distance, try decreasing [member alpha_scissor_threshold]. */ + get alpha_scissor_threshold(): float64 + set alpha_scissor_threshold(value: float64) + + /** The hashing scale for Alpha Hash. Recommended values between `0` and `2`. */ + get alpha_hash_scale(): float64 + set alpha_hash_scale(value: float64) + + /** The type of alpha antialiasing to apply. See [enum AlphaAntiAliasing]. */ + get alpha_antialiasing_mode(): int64 + set alpha_antialiasing_mode(value: int64) + + /** Threshold at which antialiasing will be applied on the alpha channel. */ + get alpha_antialiasing_edge(): float64 + set alpha_antialiasing_edge(value: float64) + + /** The material's blend mode. + * + * **Note:** Values other than `Mix` force the object into the transparent pipeline. See [enum BlendMode]. + */ + get blend_mode(): int64 + set blend_mode(value: int64) + + /** Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See [enum CullMode]. */ + get cull_mode(): int64 + set cull_mode(value: int64) + + /** Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency]. */ + get depth_draw_mode(): int64 + set depth_draw_mode(value: int64) + + /** If `true`, depth testing is disabled and the object will be drawn in render order. */ + get no_depth_test(): boolean + set no_depth_test(value: boolean) + + /** Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. Unshaded rendering is the fastest, but disables all interactions with lights. + * + * **Note:** Setting the shading mode vertex shading currently has no effect, as vertex shading is not implemented yet. + */ + get shading_mode(): int64 + set shading_mode(value: int64) + + /** The algorithm used for diffuse light scattering. See [enum DiffuseMode]. */ + get diffuse_mode(): int64 + set diffuse_mode(value: int64) + + /** The method for rendering the specular blob. See [enum SpecularMode]. + * + * **Note:** [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to `0.0` instead. + */ + get specular_mode(): int64 + set specular_mode(value: int64) + + /** If `true`, the object receives no ambient light. */ + get disable_ambient_light(): boolean + set disable_ambient_light(value: boolean) + + /** If `true`, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent. */ + get disable_fog(): boolean + set disable_fog(value: boolean) + + /** If `true`, the vertex color is used as albedo color. */ + get vertex_color_use_as_albedo(): boolean + set vertex_color_use_as_albedo(value: boolean) + + /** If `true`, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If `false`, vertex colors are considered to be stored in linear color space and are rendered as-is. See also [member albedo_texture_force_srgb]. + * + * **Note:** Only effective when using the Forward+ and Mobile rendering methods, not Compatibility. + */ + get vertex_color_is_srgb(): boolean + set vertex_color_is_srgb(value: boolean) + + /** The material's base color. + * + * **Note:** If [member detail_enabled] is `true` and a [member detail_albedo] texture is specified, [member albedo_color] will *not* modulate the detail texture. This can be used to color partial areas of a material by not specifying an albedo texture and using a transparent [member detail_albedo] texture instead. + */ + get albedo_color(): Color + set albedo_color(value: Color) + + /** Texture to multiply by [member albedo_color]. Used for basic texturing of objects. + * If the texture appears unexpectedly too dark or too bright, check [member albedo_texture_force_srgb]. + */ + get albedo_texture(): Texture2D + set albedo_texture(value: Texture2D) + + /** If `true`, forces a conversion of the [member albedo_texture] from sRGB color space to linear color space. See also [member vertex_color_is_srgb]. + * This should only be enabled when needed (typically when using a [ViewportTexture] as [member albedo_texture]). If [member albedo_texture_force_srgb] is `true` when it shouldn't be, the texture will appear to be too dark. If [member albedo_texture_force_srgb] is `false` when it shouldn't be, the texture will appear to be too bright. + */ + get albedo_texture_force_srgb(): boolean + set albedo_texture_force_srgb(value: boolean) + + /** Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF parameters. */ + get albedo_texture_msdf(): boolean + set albedo_texture_msdf(value: boolean) + + /** The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of [member ao_texture], [member roughness_texture] and [member metallic_texture] in [ORMMaterial3D]. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored. */ + get orm_texture(): Texture2D + set orm_texture(value: Texture2D) + + /** A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between `0` and `1` should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness]. */ + get metallic(): float64 + set metallic(value: float64) + + /** Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to `0.0`, no specular reflections will be visible. This differs from the [constant SPECULAR_DISABLED] [enum SpecularMode] as [constant SPECULAR_DISABLED] only applies to the specular lobe from the light source. + * + * **Note:** Unlike [member metallic], this is not energy-conserving, so it should be left at `0.5` in most cases. See also [member roughness]. + */ + get metallic_specular(): float64 + set metallic_specular(value: float64) + + /** Texture used to specify metallic for an object. This is multiplied by [member metallic]. */ + get metallic_texture(): Texture2D + set metallic_texture(value: Texture2D) + + /** Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. */ + get metallic_texture_channel(): int64 + set metallic_texture_channel(value: int64) + + /** Surface reflection. A value of `0` represents a perfect mirror while a value of `1` completely blurs the reflection. See also [member metallic]. */ + get roughness(): float64 + set roughness(value: float64) + + /** Texture used to control the roughness per-pixel. Multiplied by [member roughness]. */ + get roughness_texture(): Texture2D + set roughness_texture(value: Texture2D) + + /** Specifies the channel of the [member roughness_texture] in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. */ + get roughness_texture_channel(): int64 + set roughness_texture_channel(value: int64) + + /** If `true`, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a [VoxelGI], SDFGI, or [LightmapGI] is used and this object is used in baked lighting. */ + get emission_enabled(): boolean + set emission_enabled(value: boolean) + + /** The emitted light's color. See [member emission_enabled]. */ + get emission(): Color + set emission(value: Color) + + /** Multiplier for emitted light. See [member emission_enabled]. */ + get emission_energy_multiplier(): float64 + set emission_energy_multiplier(value: float64) + + /** Luminance of emitted light, measured in nits (candela per square meter). Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default is roughly equivalent to an indoor lightbulb. */ + get emission_intensity(): float64 + set emission_intensity(value: float64) + + /** Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options. */ + get emission_operator(): int64 + set emission_operator(value: int64) + + /** Use `UV2` to read from the [member emission_texture]. */ + get emission_on_uv2(): boolean + set emission_on_uv2(value: boolean) + + /** Texture that specifies how much surface emits light at a given point. */ + get emission_texture(): Texture2D + set emission_texture(value: Texture2D) + + /** If `true`, normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs. */ + get normal_enabled(): boolean + set normal_enabled(value: boolean) + + /** The strength of the normal map's effect. */ + get normal_scale(): float64 + set normal_scale(value: float64) + + /** Texture used to specify the normal at a given pixel. The [member normal_texture] only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member normal_texture] is oriented around the surface normal provided by the [Mesh]. + * + * **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with [SurfaceTool], you can use [method SurfaceTool.generate_normals] and [method SurfaceTool.generate_tangents] to automatically generate normals and tangents respectively. + * + * **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. + * + * **Note:** If [member detail_enabled] is `true`, the [member detail_albedo] texture is drawn *below* the [member normal_texture]. To display a normal map *above* the [member detail_albedo] texture, use [member detail_normal] instead. + */ + get normal_texture(): Texture2D + set normal_texture(value: Texture2D) + + /** If `true`, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. + * + * **Note:** Rim lighting is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]. + */ + get rim_enabled(): boolean + set rim_enabled(value: boolean) + + /** Sets the strength of the rim lighting effect. */ + get rim(): float64 + set rim(value: float64) + + /** The amount of to blend light and albedo color when rendering rim effect. If `0` the light color is used, while `1` means albedo color is used. An intermediate value generally works best. */ + get rim_tint(): float64 + set rim_tint(value: float64) + + /** Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]. */ + get rim_texture(): Texture2D + set rim_texture(value: Texture2D) + + /** If `true`, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. + * + * **Note:** Clearcoat rendering is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]. + */ + get clearcoat_enabled(): boolean + set clearcoat_enabled(value: boolean) + + /** Sets the strength of the clearcoat effect. Setting to `0` looks the same as disabling the clearcoat effect. */ + get clearcoat(): float64 + set clearcoat(value: float64) + + /** Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat. */ + get clearcoat_roughness(): float64 + set clearcoat_roughness(value: float64) + + /** Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. */ + get clearcoat_texture(): Texture2D + set clearcoat_texture(value: Texture2D) + + /** If `true`, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminium and hair reflections. + * + * **Note:** Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. + * + * **Note:** Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting [member texture_filter] to [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC]. + */ + get anisotropy_enabled(): boolean + set anisotropy_enabled(value: boolean) + + /** The strength of the anisotropy effect. This is multiplied by [member anisotropy_flowmap]'s alpha channel if a texture is defined there and the texture contains an alpha channel. */ + get anisotropy(): float64 + set anisotropy(value: float64) + + /** Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion. + * If present, the texture's alpha channel will be used to multiply the strength of the [member anisotropy] effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored. + */ + get anisotropy_flowmap(): Texture2D + set anisotropy_flowmap(value: Texture2D) + + /** If `true`, ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture]. */ + get ao_enabled(): boolean + set ao_enabled(value: boolean) + + /** Amount that ambient occlusion affects lighting from lights. If `0`, ambient occlusion only affects ambient light. If `1`, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. */ + get ao_light_affect(): float64 + set ao_light_affect(value: float64) + + /** Texture that defines the amount of ambient occlusion for a given point on the object. */ + get ao_texture(): Texture2D + set ao_texture(value: Texture2D) + + /** If `true`, use `UV2` coordinates to look up from the [member ao_texture]. */ + get ao_on_uv2(): boolean + set ao_on_uv2(value: boolean) + + /** Specifies the channel of the [member ao_texture] in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. */ + get ao_texture_channel(): int64 + set ao_texture_channel(value: int64) + + /** If `true`, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also [member normal_enabled]. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. + * + * **Note:** Height mapping is not supported if triplanar mapping is used on the same material. The value of [member heightmap_enabled] will be ignored if [member uv1_triplanar] is enabled. + */ + get heightmap_enabled(): boolean + set heightmap_enabled(value: boolean) + + /** The heightmap scale to use for the parallax effect (see [member heightmap_enabled]). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using [member heightmap_flip_texture] as the material will also appear to be "closer" to the camera. In most cases, [member heightmap_scale] should be kept to a positive value. + * + * **Note:** If the height map effect looks strange regardless of this value, try adjusting [member heightmap_flip_binormal] and [member heightmap_flip_tangent]. See also [member heightmap_texture] for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how [member heightmap_scale] behaves. + */ + get heightmap_scale(): float64 + set heightmap_scale(value: float64) + + /** If `true`, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see [member heightmap_enabled]). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference. */ + get heightmap_deep_parallax(): boolean + set heightmap_deep_parallax(value: boolean) + + /** The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + * + * **Note:** Only effective if [member heightmap_deep_parallax] is `true`. + */ + get heightmap_min_layers(): int64 + set heightmap_min_layers(value: int64) + + /** The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. + * + * **Note:** Only effective if [member heightmap_deep_parallax] is `true`. + */ + get heightmap_max_layers(): int64 + set heightmap_max_layers(value: int64) + + /** If `true`, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to `true`. */ + get heightmap_flip_tangent(): boolean + set heightmap_flip_tangent(value: boolean) + + /** If `true`, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable [member heightmap_scale]), try setting this to `true`. */ + get heightmap_flip_binormal(): boolean + set heightmap_flip_binormal(value: boolean) + + /** The texture to use as a height map. See also [member heightmap_enabled]. + * For best results, the texture should be normalized (with [member heightmap_scale] reduced to compensate). In [url=https://gimp.org]GIMP[/url], this can be done using **Colors > Auto > Equalize**. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves. + * + * **Note:** To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data. + */ + get heightmap_texture(): Texture2D + set heightmap_texture(value: Texture2D) + + /** If `true`, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. + * This can be enabled for compatibility with some materials authored for Godot 3.x. This is not necessary if the Invert import option was used to invert the depth map in Godot 3.x, in which case [member heightmap_flip_texture] should remain `false`. + */ + get heightmap_flip_texture(): boolean + set heightmap_flip_texture(value: boolean) + + /** If `true`, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality]. */ + get subsurf_scatter_enabled(): boolean + set subsurf_scatter_enabled(value: boolean) + + /** The strength of the subsurface scattering effect. The depth of the effect is also controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale], which is set globally. */ + get subsurf_scatter_strength(): float64 + set subsurf_scatter_strength(value: float64) + + /** If `true`, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering. */ + get subsurf_scatter_skin_mode(): boolean + set subsurf_scatter_skin_mode(value: boolean) + + /** Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]. */ + get subsurf_scatter_texture(): Texture2D + set subsurf_scatter_texture(value: Texture2D) + + /** If `true`, enables subsurface scattering transmittance. Only effective if [member subsurf_scatter_enabled] is `true`. See also [member backlight_enabled]. */ + get subsurf_scatter_transmittance_enabled(): boolean + set subsurf_scatter_transmittance_enabled(value: boolean) + + /** The color to multiply the subsurface scattering transmittance effect with. Ignored if [member subsurf_scatter_skin_mode] is `true`. */ + get subsurf_scatter_transmittance_color(): Color + set subsurf_scatter_transmittance_color(value: Color) + + /** The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also [member subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is `true`. */ + get subsurf_scatter_transmittance_texture(): Texture2D + set subsurf_scatter_transmittance_texture(value: Texture2D) + + /** The depth of the subsurface scattering transmittance effect. */ + get subsurf_scatter_transmittance_depth(): float64 + set subsurf_scatter_transmittance_depth(value: float64) + + /** The intensity of the subsurface scattering transmittance effect. */ + get subsurf_scatter_transmittance_boost(): float64 + set subsurf_scatter_transmittance_boost(value: float64) + + /** If `true`, the backlight effect is enabled. See also [member subsurf_scatter_transmittance_enabled]. */ + get backlight_enabled(): boolean + set backlight_enabled(value: boolean) + + /** The color used by the backlight effect. Represents the light passing through an object. */ + get backlight(): Color + set backlight(value: Color) + + /** Texture used to control the backlight effect per-pixel. Added to [member backlight]. */ + get backlight_texture(): Texture2D + set backlight_texture(value: Texture2D) + + /** If `true`, the refraction effect is enabled. Distorts transparency based on light from behind the object. */ + get refraction_enabled(): boolean + set refraction_enabled(value: boolean) + + /** The strength of the refraction effect. */ + get refraction_scale(): float64 + set refraction_scale(value: float64) + + /** Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]. */ + get refraction_texture(): Texture2D + set refraction_texture(value: Texture2D) + + /** Specifies the channel of the [member refraction_texture] in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. */ + get refraction_texture_channel(): int64 + set refraction_texture_channel(value: int64) + + /** If `true`, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on [member detail_mask] and [member detail_albedo]'s alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures. */ + get detail_enabled(): boolean + set detail_enabled(value: boolean) + + /** Texture used to specify how the detail textures get blended with the base textures. [member detail_mask] can be used together with [member detail_albedo]'s alpha channel (if any). */ + get detail_mask(): Texture2D + set detail_mask(value: Texture2D) + + /** Specifies how the [member detail_albedo] should blend with the current `ALBEDO`. See [enum BlendMode] for options. */ + get detail_blend_mode(): int64 + set detail_blend_mode(value: int64) + + /** Specifies whether to use `UV` or `UV2` for the detail layer. See [enum DetailUV] for options. */ + get detail_uv_layer(): int64 + set detail_uv_layer(value: int64) + + /** Texture that specifies the color of the detail overlay. [member detail_albedo]'s alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see [member detail_mask]. + * + * **Note:** [member detail_albedo] is *not* modulated by [member albedo_color]. + */ + get detail_albedo(): Texture2D + set detail_albedo(value: Texture2D) + + /** Texture that specifies the per-pixel normal of the detail overlay. The [member detail_normal] texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from [member detail_normal] is oriented around the surface normal provided by the [Mesh]. + * + * **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. + */ + get detail_normal(): Texture2D + set detail_normal(value: Texture2D) + + /** How much to scale the `UV` coordinates. This is multiplied by `UV` in the vertex function. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else. */ + get uv1_scale(): Vector3 + set uv1_scale(value: Vector3) + + /** How much to offset the `UV` coordinates. This amount will be added to `UV` in the vertex function. This can be used to offset a texture. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else. */ + get uv1_offset(): Vector3 + set uv1_offset(value: Vector3) + + /** If `true`, instead of using `UV` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. */ + get uv1_triplanar(): boolean + set uv1_triplanar(value: boolean) + + /** A lower number blends the texture more softly while a higher number blends the texture more sharply. + * + * **Note:** [member uv1_triplanar_sharpness] is clamped between `0.0` and `150.0` (inclusive) as values outside that range can look broken depending on the mesh. + */ + get uv1_triplanar_sharpness(): float64 + set uv1_triplanar_sharpness(value: float64) + + /** If `true`, triplanar mapping for `UV` is calculated in world space rather than object local space. See also [member uv1_triplanar]. */ + get uv1_world_triplanar(): boolean + set uv1_world_triplanar(value: boolean) + + /** How much to scale the `UV2` coordinates. This is multiplied by `UV2` in the vertex function. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else. */ + get uv2_scale(): Vector3 + set uv2_scale(value: Vector3) + + /** How much to offset the `UV2` coordinates. This amount will be added to `UV2` in the vertex function. This can be used to offset a texture. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else. */ + get uv2_offset(): Vector3 + set uv2_offset(value: Vector3) + + /** If `true`, instead of using `UV2` textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. */ + get uv2_triplanar(): boolean + set uv2_triplanar(value: boolean) + + /** A lower number blends the texture more softly while a higher number blends the texture more sharply. + * + * **Note:** [member uv2_triplanar_sharpness] is clamped between `0.0` and `150.0` (inclusive) as values outside that range can look broken depending on the mesh. + */ + get uv2_triplanar_sharpness(): float64 + set uv2_triplanar_sharpness(value: float64) + + /** If `true`, triplanar mapping for `UV2` is calculated in world space rather than object local space. See also [member uv2_triplanar]. */ + get uv2_world_triplanar(): boolean + set uv2_world_triplanar(value: boolean) + + /** Filter flags for the texture. See [enum TextureFilter] for options. + * + * **Note:** [member heightmap_texture] is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering. + */ + get texture_filter(): int64 + set texture_filter(value: int64) + + /** Repeat flags for the texture. See [enum TextureFilter] for options. */ + get texture_repeat(): boolean + set texture_repeat(value: boolean) + + /** If `true`, the object receives no shadow that would otherwise be cast onto it. */ + get disable_receive_shadows(): boolean + set disable_receive_shadows(value: boolean) + + /** If `true`, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. */ + get shadow_to_opacity(): boolean + set shadow_to_opacity(value: boolean) + + /** Controls how the object faces the camera. See [enum BillboardMode]. + * + * **Note:** When billboarding is enabled and the material also casts shadows, billboards will face **the** camera in the scene when rendering shadows. In scenes with multiple cameras, the intended shadow cannot be determined and this will result in undefined behavior. See [url=https://github.com/godotengine/godot/pull/72638]GitHub Pull Request #72638[/url] for details. + * + * **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See [url=https://github.com/godotengine/godot/issues/41567]GitHub issue #41567[/url] for details. + */ + get billboard_mode(): int64 + set billboard_mode(value: int64) + + /** If `true`, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when [member billboard_mode] is not [constant BILLBOARD_DISABLED]. */ + get billboard_keep_scale(): boolean + set billboard_keep_scale(value: boolean) + + /** The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. */ + get particles_anim_h_frames(): int64 + set particles_anim_h_frames(value: int64) + + /** The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. */ + get particles_anim_v_frames(): int64 + set particles_anim_v_frames(value: int64) + + /** If `true`, particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]. */ + get particles_anim_loop(): boolean + set particles_anim_loop(value: boolean) + + /** If `true`, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its [member cull_mode] set to [constant CULL_FRONT]. See also [member grow_amount]. + * + * **Note:** Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using [url=https://wiki.polycount.com/wiki/Face_weighted_normals]face weighted normals[/url] in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. + */ + get grow(): boolean + set grow(value: boolean) + + /** Grows object vertices in the direction of their normals. Only effective if [member grow] is `true`. */ + get grow_amount(): float64 + set grow_amount(value: float64) + + /** If `true`, the object is rendered at the same size regardless of distance. */ + get fixed_size(): boolean + set fixed_size(value: boolean) + + /** If `true`, render point size can be changed. + * + * **Note:** This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size]. + */ + get use_point_size(): boolean + set use_point_size(value: boolean) + + /** The point size in pixels. See [member use_point_size]. */ + get point_size(): float64 + set point_size(value: float64) + + /** If `true`, enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering. */ + get use_particle_trails(): boolean + set use_particle_trails(value: boolean) + + /** If `true`, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. */ + get proximity_fade_enabled(): boolean + set proximity_fade_enabled(value: boolean) + + /** Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. */ + get proximity_fade_distance(): float64 + set proximity_fade_distance(value: float64) + + /** The width of the range around the shape between the minimum and maximum representable signed distance. */ + get msdf_pixel_range(): float64 + set msdf_pixel_range(value: float64) + + /** The width of the shape outline. */ + get msdf_outline_size(): float64 + set msdf_outline_size(value: float64) + + /** Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s. */ + get distance_fade_mode(): int64 + set distance_fade_mode(value: int64) + + /** Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. + * + * **Note:** If [member distance_fade_min_distance] is greater than [member distance_fade_max_distance], the behavior will be reversed. The object will start to fade away at [member distance_fade_max_distance] and will fully disappear once it reaches [member distance_fade_min_distance]. + */ + get distance_fade_min_distance(): float64 + set distance_fade_min_distance(value: float64) + + /** Distance at which the object appears fully opaque. + * + * **Note:** If [member distance_fade_max_distance] is less than [member distance_fade_min_distance], the behavior will be reversed. The object will start to fade away at [member distance_fade_max_distance] and will fully disappear once it reaches [member distance_fade_min_distance]. + */ + get distance_fade_max_distance(): float64 + set distance_fade_max_distance(value: float64) + } + /** Boolean matrix. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_bitmap.html + */ + class BitMap extends Resource { + constructor(identifier?: any) + /** Creates a bitmap with the specified size, filled with `false`. */ + create(size: Vector2i): void + + /** Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to `false` if the alpha value of the image at that position is equal to [param threshold] or less, and `true` in other case. */ + create_from_image_alpha(image: Image, threshold: float64 = 0.1): void + + /** Sets the bitmap's element at the specified position, to the specified value. */ + set_bitv(position: Vector2i, bit: boolean): void + + /** Sets the bitmap's element at the specified position, to the specified value. */ + set_bit(x: int64, y: int64, bit: boolean): void + + /** Returns bitmap's value at the specified position. */ + get_bitv(position: Vector2i): boolean + + /** Returns bitmap's value at the specified position. */ + get_bit(x: int64, y: int64): boolean + + /** Sets a rectangular portion of the bitmap to the specified value. */ + set_bit_rect(rect: Rect2i, bit: boolean): void + + /** Returns the number of bitmap elements that are set to `true`. */ + get_true_bit_count(): int64 + + /** Returns bitmap's dimensions. */ + get_size(): Vector2i + + /** Resizes the image to [param new_size]. */ + resize(new_size: Vector2i): void + + /** Applies morphological dilation or erosion to the bitmap. If [param pixels] is positive, dilation is applied to the bitmap. If [param pixels] is negative, erosion is applied to the bitmap. [param rect] defines the area where the morphological operation is applied. Pixels located outside the [param rect] are unaffected by [method grow_mask]. */ + grow_mask(pixels: int64, rect: Rect2i): void + + /** Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. `true` bits of the bitmap are being converted into white pixels, and `false` bits into black. */ + convert_to_image(): Image + + /** Creates an [Array] of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a [PackedVector2Array] of its vertices. + * To get polygons covering the whole bitmap, pass: + * + * [param epsilon] is passed to RDP to control how accurately the polygons cover the bitmap: a lower [param epsilon] corresponds to more points in the polygons. + */ + opaque_to_polygons(rect: Rect2i, epsilon: float64 = 2): GArray + get data(): GDictionary + set data(value: GDictionary) + } + class BitMapEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A joint used with [Skeleton2D] to control and animate other nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_bone2d.html + */ + class Bone2D extends Node2D { + constructor(identifier?: any) + /** Resets the bone to the rest pose. This is equivalent to setting [member Node2D.transform] to [member rest]. */ + apply_rest(): void + + /** Returns the node's [member rest] [Transform2D] if it doesn't have a parent, or its rest pose relative to its parent. */ + get_skeleton_rest(): Transform2D + + /** Returns the node's index as part of the entire skeleton. See [Skeleton2D]. */ + get_index_in_skeleton(): int64 + + /** When set to `true`, the [Bone2D] node will attempt to automatically calculate the bone angle and length using the first child [Bone2D] node, if one exists. If none exist, the [Bone2D] cannot automatically calculate these values and will print a warning. */ + set_autocalculate_length_and_angle(auto_calculate: boolean): void + + /** Returns whether this [Bone2D] is going to autocalculate its length and bone angle using its first [Bone2D] child node, if one exists. If there are no [Bone2D] children, then it cannot autocalculate these values and will print a warning. */ + get_autocalculate_length_and_angle(): boolean + + /** Sets the length of the bone in the [Bone2D]. */ + set_length(length: float64): void + + /** Returns the length of the bone in the [Bone2D] node. */ + get_length(): float64 + + /** Sets the bone angle for the [Bone2D]. This is typically set to the rotation from the [Bone2D] to a child [Bone2D] node. + * + * **Note:** This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform]. + */ + set_bone_angle(angle: float64): void + + /** Returns the angle of the bone in the [Bone2D]. + * + * **Note:** This is different from the [Bone2D]'s rotation. The bone's angle is the rotation of the bone shown by the gizmo, which is unaffected by the [Bone2D]'s [member Node2D.transform]. + */ + get_bone_angle(): float64 + + /** Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. */ + get rest(): Transform2D + set rest(value: Transform2D) + } + /** А node that dynamically copies or overrides the 3D transform of a bone in its parent [Skeleton3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_boneattachment3d.html + */ + class BoneAttachment3D extends Node3D { + constructor(identifier?: any) + /** A function that is called automatically when the [Skeleton3D] is updated. This function is where the [BoneAttachment3D] node updates its position so it is correctly bound when it is *not* set to override the bone pose. */ + on_skeleton_update(): void + + /** Sets whether the BoneAttachment3D node will use an external [Skeleton3D] node rather than attempting to use its parent node as the [Skeleton3D]. When set to `true`, the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton]. */ + set_use_external_skeleton(use_external_skeleton: boolean): void + + /** Returns whether the BoneAttachment3D node is using an external [Skeleton3D] rather than attempting to use its parent node as the [Skeleton3D]. */ + get_use_external_skeleton(): boolean + + /** Sets the [NodePath] to the external skeleton that the BoneAttachment3D node should use. See [method set_use_external_skeleton] to enable the external [Skeleton3D] node. */ + set_external_skeleton(external_skeleton: NodePath | string): void + + /** Returns the [NodePath] to the external [Skeleton3D] node, if one has been set. */ + get_external_skeleton(): NodePath + + /** The name of the attached bone. */ + get bone_name(): StringName + set bone_name(value: StringName) + + /** The index of the attached bone. */ + get bone_idx(): int64 + set bone_idx(value: int64) + + /** Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to `true`, the BoneAttachment3D node can change the pose of the bone. When set to `false`, the BoneAttachment3D will always be set to the bone's transform. + * + * **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with [SkeletonModifier3D]. + */ + get override_pose(): boolean + set override_pose(value: boolean) + } + /** Describes a mapping of bone names for retargeting [Skeleton3D] into common names defined by a [SkeletonProfile]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_bonemap.html + */ + class BoneMap extends Resource { + constructor(identifier?: any) + /** Returns a skeleton bone name is mapped to [param profile_bone_name]. + * In the retargeting process, the returned bone name is the bone name of the source skeleton. + */ + get_skeleton_bone_name(profile_bone_name: StringName): StringName + + /** Maps a skeleton bone name to [param profile_bone_name]. + * In the retargeting process, the setting bone name is the bone name of the source skeleton. + */ + set_skeleton_bone_name(profile_bone_name: StringName, skeleton_bone_name: StringName): void + + /** Returns a profile bone name having [param skeleton_bone_name]. If not found, an empty [StringName] will be returned. + * In the retargeting process, the returned bone name is the bone name of the target skeleton. + */ + find_profile_bone_name(skeleton_bone_name: StringName): StringName + + /** A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are synchronized with it. */ + get profile(): SkeletonProfile + set profile(value: SkeletonProfile) + + /** This signal is emitted when change the key value in the [BoneMap]. This is used to validate mapping and to update [BoneMap] editor. */ + readonly bone_map_updated: Signal0 + + /** This signal is emitted when change the value in profile or change the reference of profile. This is used to update key names in the [BoneMap] and to redraw the [BoneMap] editor. */ + readonly profile_updated: Signal0 + } + class BoneMapEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace BoxContainer { + enum AlignmentMode { + /** The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). */ + ALIGNMENT_BEGIN = 0, + + /** The child controls will be centered in the container. */ + ALIGNMENT_CENTER = 1, + + /** The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). */ + ALIGNMENT_END = 2, + } + } + /** A container that arranges its child controls horizontally or vertically. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_boxcontainer.html + */ + class BoxContainer extends Container { + constructor(identifier?: any) + /** Adds a [Control] node to the box as a spacer. If [param begin] is `true`, it will insert the [Control] node in front of all other children. */ + add_spacer(begin: boolean): Control + + /** The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]). */ + get alignment(): int64 + set alignment(value: int64) + + /** If `true`, the [BoxContainer] will arrange its children vertically, rather than horizontally. + * Can't be changed when using [HBoxContainer] and [VBoxContainer]. + */ + get vertical(): boolean + set vertical(value: boolean) + } + /** Generate an axis-aligned box [PrimitiveMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_boxmesh.html + */ + class BoxMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** The box's width, height and depth. */ + get size(): Vector3 + set size(value: Vector3) + + /** Number of extra edge loops inserted along the X axis. */ + get subdivide_width(): int64 + set subdivide_width(value: int64) + + /** Number of extra edge loops inserted along the Y axis. */ + get subdivide_height(): int64 + set subdivide_height(value: int64) + + /** Number of extra edge loops inserted along the Z axis. */ + get subdivide_depth(): int64 + set subdivide_depth(value: int64) + } + /** Cuboid shape for use with occlusion culling in [OccluderInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_boxoccluder3d.html + */ + class BoxOccluder3D extends Occluder3D { + constructor(identifier?: any) + /** The box's size in 3D units. */ + get size(): Vector3 + set size(value: Vector3) + } + /** A 3D box shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_boxshape3d.html + */ + class BoxShape3D extends Shape3D { + constructor(identifier?: any) + /** The box's width, height and depth. */ + get size(): Vector3 + set size(value: Vector3) + } + /** A themed button that can contain text and an icon. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_button.html + */ + class Button extends BaseButton { + constructor(identifier?: any) + /** The button's text that will be displayed inside the button's area. */ + get text(): string + set text(value: string) + + /** Button's icon, if text is present the icon will be placed before the text. + * To edit margin and spacing of the icon, use [theme_item h_separation] theme property and `content_margin_*` properties of the used [StyleBox]es. + */ + get icon(): Texture2D + set icon(value: Texture2D) + + /** Flat buttons don't display decoration. */ + get flat(): boolean + set flat(value: boolean) + + /** Text alignment policy for the button's text, use one of the [enum HorizontalAlignment] constants. */ + get alignment(): int64 + set alignment(value: int64) + + /** Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes. */ + get text_overrun_behavior(): int64 + set text_overrun_behavior(value: int64) + + /** If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. */ + get autowrap_mode(): int64 + set autowrap_mode(value: int64) + + /** 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. */ + get clip_text(): boolean + set clip_text(value: boolean) + + /** Specifies if the icon should be aligned horizontally to the left, right, or center of a button. Uses the same [enum HorizontalAlignment] constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. */ + get icon_alignment(): int64 + set icon_alignment(value: int64) + + /** Specifies if the icon should be aligned vertically to the top, bottom, or center of a button. Uses the same [enum VerticalAlignment] constants as the text alignment. If centered horizontally and vertically, text will draw on top of the icon. */ + get vertical_icon_alignment(): int64 + set vertical_icon_alignment(value: int64) + + /** When enabled, the button's icon will expand/shrink to fit the button's size while keeping its aspect. See also [theme_item icon_max_width]. */ + get expand_icon(): boolean + set expand_icon(value: boolean) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + } + /** A group of buttons that doesn't allow more than one button to be pressed at a time. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_buttongroup.html + */ + class ButtonGroup extends Resource { + constructor(identifier?: any) + /** Returns the current pressed button. */ + get_pressed_button(): BaseButton + + /** Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]). */ + get_buttons(): GArray + + /** If `true`, it is possible to unpress all buttons in this [ButtonGroup]. */ + get allow_unpress(): boolean + set allow_unpress(value: boolean) + + /** Emitted when one of the buttons of the group is pressed. */ + readonly pressed: Signal1 + } + namespace CPUParticles2D { + enum DrawOrder { + /** Particles are drawn in the order emitted. */ + DRAW_ORDER_INDEX = 0, + + /** Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. */ + DRAW_ORDER_LIFETIME = 1, + } + enum Parameter { + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. */ + PARAM_INITIAL_LINEAR_VELOCITY = 0, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. */ + PARAM_ANGULAR_VELOCITY = 1, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. */ + PARAM_ORBIT_VELOCITY = 2, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. */ + PARAM_LINEAR_ACCEL = 3, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. */ + PARAM_RADIAL_ACCEL = 4, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. */ + PARAM_TANGENTIAL_ACCEL = 5, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. */ + PARAM_DAMPING = 6, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. */ + PARAM_ANGLE = 7, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. */ + PARAM_SCALE = 8, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. */ + PARAM_HUE_VARIATION = 9, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. */ + PARAM_ANIM_SPEED = 10, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. */ + PARAM_ANIM_OFFSET = 11, + + /** Represents the size of the [enum Parameter] enum. */ + PARAM_MAX = 12, + } + enum ParticleFlags { + /** Use with [method set_particle_flag] to set [member particle_flag_align_y]. */ + PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY = 0, + + /** Present for consistency with 3D particle nodes, not used in 2D. */ + PARTICLE_FLAG_ROTATE_Y = 1, + + /** Present for consistency with 3D particle nodes, not used in 2D. */ + PARTICLE_FLAG_DISABLE_Z = 2, + + /** Represents the size of the [enum ParticleFlags] enum. */ + PARTICLE_FLAG_MAX = 3, + } + enum EmissionShape { + /** All particles will be emitted from a single point. */ + EMISSION_SHAPE_POINT = 0, + + /** Particles will be emitted in the volume of a sphere flattened to two dimensions. */ + EMISSION_SHAPE_SPHERE = 1, + + /** Particles will be emitted on the surface of a sphere flattened to two dimensions. */ + EMISSION_SHAPE_SPHERE_SURFACE = 2, + + /** Particles will be emitted in the area of a rectangle. */ + EMISSION_SHAPE_RECTANGLE = 3, + + /** Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. */ + EMISSION_SHAPE_POINTS = 4, + + /** Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. */ + EMISSION_SHAPE_DIRECTED_POINTS = 5, + + /** Represents the size of the [enum EmissionShape] enum. */ + EMISSION_SHAPE_MAX = 6, + } + } + /** A CPU-based 2D particle emitter. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cpuparticles2d.html + */ + class CPUParticles2D extends Node2D { + constructor(identifier?: any) + /** Restarts the particle emitter. */ + restart(): void + + /** Sets the minimum value for the given parameter. */ + set_param_min(param: CPUParticles2D.Parameter, value: float64): void + + /** Returns the minimum value range for the given parameter. */ + get_param_min(param: CPUParticles2D.Parameter): float64 + + /** Sets the maximum value for the given parameter. */ + set_param_max(param: CPUParticles2D.Parameter, value: float64): void + + /** Returns the maximum value range for the given parameter. */ + get_param_max(param: CPUParticles2D.Parameter): float64 + + /** Sets the [Curve] of the parameter specified by [enum Parameter]. */ + set_param_curve(param: CPUParticles2D.Parameter, curve: Curve): void + + /** Returns the [Curve] of the parameter specified by [enum Parameter]. */ + get_param_curve(param: CPUParticles2D.Parameter): Curve + + /** Enables or disables the given flag (see [enum ParticleFlags] for options). */ + set_particle_flag(particle_flag: CPUParticles2D.ParticleFlags, enable: boolean): void + + /** Returns the enabled state of the given flag (see [enum ParticleFlags] for options). */ + get_particle_flag(particle_flag: CPUParticles2D.ParticleFlags): boolean + + /** Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticleProcessMaterial]. */ + convert_from_particles(particles: Node): void + + /** If `true`, particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is `true` setting [member emitting] to `true` will not restart the emission cycle until after all active particles finish processing. You can use the [signal finished] signal to be notified once all active particles finish processing. */ + get emitting(): boolean + set emitting(value: boolean) + + /** Number of particles emitted in one emission cycle. */ + get amount(): int64 + set amount(value: int64) + + /** Amount of time each particle will exist. */ + get lifetime(): float64 + set lifetime(value: float64) + + /** If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. */ + get one_shot(): boolean + set one_shot(value: boolean) + + /** Particle system starts as if it had already run for this many seconds. */ + get preprocess(): float64 + set preprocess(value: float64) + + /** Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** 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. */ + get explosiveness(): float64 + set explosiveness(value: float64) + + /** Emission lifetime randomness ratio. */ + get randomness(): float64 + set randomness(value: float64) + + /** Particle lifetime randomness ratio. */ + get lifetime_randomness(): float64 + set lifetime_randomness(value: float64) + + /** The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. */ + get fixed_fps(): int64 + set fixed_fps(value: int64) + + /** If `true`, results in fractional delta calculation which has a smoother particles display effect. */ + get fract_delta(): boolean + set fract_delta(value: boolean) + + /** If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated. */ + get local_coords(): boolean + set local_coords(value: boolean) + + /** Particle draw order. Uses [enum DrawOrder] values. */ + get draw_order(): int64 + set draw_order(value: int64) + + /** Particle texture. If `null`, particles will be squares. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** Particles will be emitted inside this region. See [enum EmissionShape] for possible values. */ + get emission_shape(): int64 + set emission_shape(value: int64) + + /** The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]. */ + get emission_sphere_radius(): float64 + set emission_sphere_radius(value: float64) + + /** The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]. */ + get emission_rect_extents(): Vector2 + set emission_rect_extents(value: Vector2) + + /** Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_points(): PackedVector2Array + set emission_points(value: PackedVector2Array | Vector2[]) + + /** Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_normals(): PackedVector2Array + set emission_normals(value: PackedVector2Array | Vector2[]) + + /** Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_colors(): PackedColorArray + set emission_colors(value: PackedColorArray | Color[]) + + /** Align Y axis of particle with the direction of its velocity. */ + get particle_flag_align_y(): boolean + set particle_flag_align_y(value: boolean) + + /** Unit vector specifying the particles' emission direction. */ + get direction(): Vector2 + set direction(value: Vector2) + + /** Each particle's initial direction range from `+spread` to `-spread` degrees. */ + get spread(): float64 + set spread(value: float64) + + /** Gravity applied to every particle. */ + get gravity(): Vector2 + set gravity(value: Vector2) + + /** Minimum equivalent of [member initial_velocity_max]. */ + get initial_velocity_min(): float64 + set initial_velocity_min(value: float64) + + /** Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread]. */ + get initial_velocity_max(): float64 + set initial_velocity_max(value: float64) + + /** Minimum equivalent of [member angular_velocity_max]. */ + get angular_velocity_min(): float64 + set angular_velocity_min(value: float64) + + /** Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. */ + get angular_velocity_max(): float64 + set angular_velocity_max(value: float64) + + /** Each particle's angular velocity will vary along this [Curve]. */ + get angular_velocity_curve(): Curve + set angular_velocity_curve(value: Curve) + + /** Minimum equivalent of [member orbit_velocity_max]. */ + get orbit_velocity_min(): float64 + set orbit_velocity_min(value: float64) + + /** Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. */ + get orbit_velocity_max(): float64 + set orbit_velocity_max(value: float64) + + /** Each particle's orbital velocity will vary along this [Curve]. */ + get orbit_velocity_curve(): Curve + set orbit_velocity_curve(value: Curve) + + /** Minimum equivalent of [member linear_accel_max]. */ + get linear_accel_min(): float64 + set linear_accel_min(value: float64) + + /** Maximum linear acceleration applied to each particle in the direction of motion. */ + get linear_accel_max(): float64 + set linear_accel_max(value: float64) + + /** Each particle's linear acceleration will vary along this [Curve]. */ + get linear_accel_curve(): Curve + set linear_accel_curve(value: Curve) + + /** Minimum equivalent of [member radial_accel_max]. */ + get radial_accel_min(): float64 + set radial_accel_min(value: float64) + + /** Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. */ + get radial_accel_max(): float64 + set radial_accel_max(value: float64) + + /** Each particle's radial acceleration will vary along this [Curve]. */ + get radial_accel_curve(): Curve + set radial_accel_curve(value: Curve) + + /** Minimum equivalent of [member tangential_accel_max]. */ + get tangential_accel_min(): float64 + set tangential_accel_min(value: float64) + + /** Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. */ + get tangential_accel_max(): float64 + set tangential_accel_max(value: float64) + + /** Each particle's tangential acceleration will vary along this [Curve]. */ + get tangential_accel_curve(): Curve + set tangential_accel_curve(value: Curve) + + /** Minimum equivalent of [member damping_max]. */ + get damping_min(): float64 + set damping_min(value: float64) + + /** The maximum rate at which particles lose velocity. For example value of `100` means that the particle will go from `100` velocity to `0` in `1` second. */ + get damping_max(): float64 + set damping_max(value: float64) + + /** Damping will vary along this [Curve]. */ + get damping_curve(): Curve + set damping_curve(value: Curve) + + /** Minimum equivalent of [member angle_max]. */ + get angle_min(): float64 + set angle_min(value: float64) + + /** Maximum initial rotation applied to each particle, in degrees. */ + get angle_max(): float64 + set angle_max(value: float64) + + /** Each particle's rotation will be animated along this [Curve]. */ + get angle_curve(): Curve + set angle_curve(value: Curve) + + /** Minimum equivalent of [member scale_amount_max]. */ + get scale_amount_min(): float64 + set scale_amount_min(value: float64) + + /** Maximum initial scale applied to each particle. */ + get scale_amount_max(): float64 + set scale_amount_max(value: float64) + + /** Each particle's scale will vary along this [Curve]. */ + get scale_amount_curve(): Curve + set scale_amount_curve(value: Curve) + + /** If `true`, the scale curve will be split into x and y components. See [member scale_curve_x] and [member scale_curve_y]. */ + get split_scale(): boolean + set split_scale(value: boolean) + + /** Each particle's horizontal scale will vary along this [Curve]. + * [member split_scale] must be enabled. + */ + get scale_curve_x(): Curve + set scale_curve_x(value: Curve) + + /** Each particle's vertical scale will vary along this [Curve]. + * [member split_scale] must be enabled. + */ + get scale_curve_y(): Curve + set scale_curve_y(value: Curve) + + /** Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. */ + get color(): Color + set color(value: Color) + + /** Each particle's color will vary along this [Gradient] (multiplied with [member color]). */ + get color_ramp(): Gradient + set color_ramp(value: Gradient) + + /** Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). */ + get color_initial_ramp(): Gradient + set color_initial_ramp(value: Gradient) + + /** Minimum equivalent of [member hue_variation_max]. */ + get hue_variation_min(): float64 + set hue_variation_min(value: float64) + + /** Maximum initial hue variation applied to each particle. It will shift the particle color's hue. */ + get hue_variation_max(): float64 + set hue_variation_max(value: float64) + + /** Each particle's hue will vary along this [Curve]. */ + get hue_variation_curve(): Curve + set hue_variation_curve(value: Curve) + + /** Minimum equivalent of [member anim_speed_max]. */ + get anim_speed_min(): float64 + set anim_speed_min(value: float64) + + /** Maximum particle animation speed. Animation speed of `1` means that the particles will make full `0` to `1` offset cycle during lifetime, `2` means `2` cycles etc. + * With animation speed greater than `1`, remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat. + */ + get anim_speed_max(): float64 + set anim_speed_max(value: float64) + + /** Each particle's animation speed will vary along this [Curve]. */ + get anim_speed_curve(): Curve + set anim_speed_curve(value: Curve) + + /** Minimum equivalent of [member anim_offset_max]. */ + get anim_offset_min(): float64 + set anim_offset_min(value: float64) + + /** Maximum animation offset that corresponds to frame index in the texture. `0` is the first frame, `1` is the last one. See [member CanvasItemMaterial.particles_animation]. */ + get anim_offset_max(): float64 + set anim_offset_max(value: float64) + + /** Each particle's animation offset will vary along this [Curve]. */ + get anim_offset_curve(): Curve + set anim_offset_curve(value: Curve) + + /** Emitted when all active particles have finished processing. When [member one_shot] is disabled, particles will process continuously, so this is never emitted. */ + readonly finished: Signal0 + } + class CPUParticles2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace CPUParticles3D { + enum DrawOrder { + /** Particles are drawn in the order emitted. */ + DRAW_ORDER_INDEX = 0, + + /** Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. */ + DRAW_ORDER_LIFETIME = 1, + + /** Particles are drawn in order of depth. */ + DRAW_ORDER_VIEW_DEPTH = 2, + } + enum Parameter { + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. */ + PARAM_INITIAL_LINEAR_VELOCITY = 0, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. */ + PARAM_ANGULAR_VELOCITY = 1, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. */ + PARAM_ORBIT_VELOCITY = 2, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. */ + PARAM_LINEAR_ACCEL = 3, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. */ + PARAM_RADIAL_ACCEL = 4, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. */ + PARAM_TANGENTIAL_ACCEL = 5, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. */ + PARAM_DAMPING = 6, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. */ + PARAM_ANGLE = 7, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. */ + PARAM_SCALE = 8, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. */ + PARAM_HUE_VARIATION = 9, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. */ + PARAM_ANIM_SPEED = 10, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. */ + PARAM_ANIM_OFFSET = 11, + + /** Represents the size of the [enum Parameter] enum. */ + PARAM_MAX = 12, + } + enum ParticleFlags { + /** Use with [method set_particle_flag] to set [member particle_flag_align_y]. */ + PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY = 0, + + /** Use with [method set_particle_flag] to set [member particle_flag_rotate_y]. */ + PARTICLE_FLAG_ROTATE_Y = 1, + + /** Use with [method set_particle_flag] to set [member particle_flag_disable_z]. */ + PARTICLE_FLAG_DISABLE_Z = 2, + + /** Represents the size of the [enum ParticleFlags] enum. */ + PARTICLE_FLAG_MAX = 3, + } + enum EmissionShape { + /** All particles will be emitted from a single point. */ + EMISSION_SHAPE_POINT = 0, + + /** Particles will be emitted in the volume of a sphere. */ + EMISSION_SHAPE_SPHERE = 1, + + /** Particles will be emitted on the surface of a sphere. */ + EMISSION_SHAPE_SPHERE_SURFACE = 2, + + /** Particles will be emitted in the volume of a box. */ + EMISSION_SHAPE_BOX = 3, + + /** Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]. */ + EMISSION_SHAPE_POINTS = 4, + + /** Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. */ + EMISSION_SHAPE_DIRECTED_POINTS = 5, + + /** Particles will be emitted in a ring or cylinder. */ + EMISSION_SHAPE_RING = 6, + + /** Represents the size of the [enum EmissionShape] enum. */ + EMISSION_SHAPE_MAX = 7, + } + } + /** A CPU-based 3D particle emitter. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cpuparticles3d.html + */ + class CPUParticles3D extends GeometryInstance3D { + constructor(identifier?: any) + /** Restarts the particle emitter. */ + restart(): void + + /** Sets the minimum value for the given parameter. */ + set_param_min(param: CPUParticles3D.Parameter, value: float64): void + + /** Returns the minimum value range for the given parameter. */ + get_param_min(param: CPUParticles3D.Parameter): float64 + + /** Sets the maximum value for the given parameter. */ + set_param_max(param: CPUParticles3D.Parameter, value: float64): void + + /** Returns the maximum value range for the given parameter. */ + get_param_max(param: CPUParticles3D.Parameter): float64 + + /** Sets the [Curve] of the parameter specified by [enum Parameter]. */ + set_param_curve(param: CPUParticles3D.Parameter, curve: Curve): void + + /** Returns the [Curve] of the parameter specified by [enum Parameter]. */ + get_param_curve(param: CPUParticles3D.Parameter): Curve + + /** Enables or disables the given particle flag (see [enum ParticleFlags] for options). */ + set_particle_flag(particle_flag: CPUParticles3D.ParticleFlags, enable: boolean): void + + /** Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options). */ + get_particle_flag(particle_flag: CPUParticles3D.ParticleFlags): boolean + + /** Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticleProcessMaterial]. */ + convert_from_particles(particles: Node): void + + /** If `true`, particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is `true` setting [member emitting] to `true` will not restart the emission cycle until after all active particles finish processing. You can use the [signal finished] signal to be notified once all active particles finish processing. */ + get emitting(): boolean + set emitting(value: boolean) + + /** Number of particles emitted in one emission cycle. */ + get amount(): int64 + set amount(value: int64) + + /** Amount of time each particle will exist. */ + get lifetime(): float64 + set lifetime(value: float64) + + /** If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. */ + get one_shot(): boolean + set one_shot(value: boolean) + + /** Particle system starts as if it had already run for this many seconds. */ + get preprocess(): float64 + set preprocess(value: float64) + + /** Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** 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. */ + get explosiveness(): float64 + set explosiveness(value: float64) + + /** Emission lifetime randomness ratio. */ + get randomness(): float64 + set randomness(value: float64) + + /** Particle lifetime randomness ratio. */ + get lifetime_randomness(): float64 + set lifetime_randomness(value: float64) + + /** The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. */ + get fixed_fps(): int64 + set fixed_fps(value: int64) + + /** If `true`, results in fractional delta calculation which has a smoother particles display effect. */ + get fract_delta(): boolean + set fract_delta(value: boolean) + + /** The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active. + * Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the **Particles → Generate AABB** editor tool. + */ + get visibility_aabb(): AABB + set visibility_aabb(value: AABB) + + /** If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated. */ + get local_coords(): boolean + set local_coords(value: boolean) + + /** Particle draw order. Uses [enum DrawOrder] values. */ + get draw_order(): int64 + set draw_order(value: int64) + + /** The [Mesh] used for each particle. If `null`, particles will be spheres. */ + get mesh(): Mesh + set mesh(value: Mesh) + + /** Particles will be emitted inside this region. See [enum EmissionShape] for possible values. */ + get emission_shape(): int64 + set emission_shape(value: int64) + + /** The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]. */ + get emission_sphere_radius(): float64 + set emission_sphere_radius(value: float64) + + /** The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. */ + get emission_box_extents(): Vector3 + set emission_box_extents(value: Vector3) + + /** Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_points(): PackedVector3Array + set emission_points(value: PackedVector3Array | Vector3[]) + + /** Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_normals(): PackedVector3Array + set emission_normals(value: PackedVector3Array | Vector3[]) + + /** Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. + * + * **Note:** [member emission_colors] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member emission_colors] will have no visible effect. + */ + get emission_colors(): PackedColorArray + set emission_colors(value: PackedColorArray | Color[]) + + /** The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_axis(): Vector3 + set emission_ring_axis(value: Vector3) + + /** The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_height(): float64 + set emission_ring_height(value: float64) + + /** The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_radius(): float64 + set emission_ring_radius(value: float64) + + /** The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_inner_radius(): float64 + set emission_ring_inner_radius(value: float64) + + /** Align Y axis of particle with the direction of its velocity. */ + get particle_flag_align_y(): boolean + set particle_flag_align_y(value: boolean) + + /** If `true`, particles rotate around Y axis by [member angle_min]. */ + get particle_flag_rotate_y(): boolean + set particle_flag_rotate_y(value: boolean) + + /** If `true`, particles will not move on the Z axis. */ + get particle_flag_disable_z(): boolean + set particle_flag_disable_z(value: boolean) + + /** Unit vector specifying the particles' emission direction. */ + get direction(): Vector3 + set direction(value: Vector3) + + /** Each particle's initial direction range from `+spread` to `-spread` degrees. Applied to X/Z plane and Y/Z planes. */ + get spread(): float64 + set spread(value: float64) + + /** Amount of [member spread] in Y/Z plane. A value of `1` restricts particles to X/Z plane. */ + get flatness(): float64 + set flatness(value: float64) + + /** Gravity applied to every particle. */ + get gravity(): Vector3 + set gravity(value: Vector3) + + /** Minimum value of the initial velocity. */ + get initial_velocity_min(): float64 + set initial_velocity_min(value: float64) + + /** Maximum value of the initial velocity. */ + get initial_velocity_max(): float64 + set initial_velocity_max(value: float64) + + /** Minimum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. */ + get angular_velocity_min(): float64 + set angular_velocity_min(value: float64) + + /** Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. */ + get angular_velocity_max(): float64 + set angular_velocity_max(value: float64) + + /** Each particle's angular velocity (rotation speed) will vary along this [Curve] over its lifetime. */ + get angular_velocity_curve(): Curve + set angular_velocity_curve(value: Curve) + + /** Minimum orbit velocity. */ + get orbit_velocity_min(): float64 + set orbit_velocity_min(value: float64) + + /** Maximum orbit velocity. */ + get orbit_velocity_max(): float64 + set orbit_velocity_max(value: float64) + + /** Each particle's orbital velocity will vary along this [Curve]. */ + get orbit_velocity_curve(): Curve + set orbit_velocity_curve(value: Curve) + + /** Minimum linear acceleration. */ + get linear_accel_min(): float64 + set linear_accel_min(value: float64) + + /** Maximum linear acceleration. */ + get linear_accel_max(): float64 + set linear_accel_max(value: float64) + + /** Each particle's linear acceleration will vary along this [Curve]. */ + get linear_accel_curve(): Curve + set linear_accel_curve(value: Curve) + + /** Minimum radial acceleration. */ + get radial_accel_min(): float64 + set radial_accel_min(value: float64) + + /** Maximum radial acceleration. */ + get radial_accel_max(): float64 + set radial_accel_max(value: float64) + + /** Each particle's radial acceleration will vary along this [Curve]. */ + get radial_accel_curve(): Curve + set radial_accel_curve(value: Curve) + + /** Minimum tangent acceleration. */ + get tangential_accel_min(): float64 + set tangential_accel_min(value: float64) + + /** Maximum tangent acceleration. */ + get tangential_accel_max(): float64 + set tangential_accel_max(value: float64) + + /** Each particle's tangential acceleration will vary along this [Curve]. */ + get tangential_accel_curve(): Curve + set tangential_accel_curve(value: Curve) + + /** Minimum damping. */ + get damping_min(): float64 + set damping_min(value: float64) + + /** Maximum damping. */ + get damping_max(): float64 + set damping_max(value: float64) + + /** Damping will vary along this [Curve]. */ + get damping_curve(): Curve + set damping_curve(value: Curve) + + /** Minimum angle. */ + get angle_min(): float64 + set angle_min(value: float64) + + /** Maximum angle. */ + get angle_max(): float64 + set angle_max(value: float64) + + /** Each particle's rotation will be animated along this [Curve]. */ + get angle_curve(): Curve + set angle_curve(value: Curve) + + /** Minimum scale. */ + get scale_amount_min(): float64 + set scale_amount_min(value: float64) + + /** Maximum scale. */ + get scale_amount_max(): float64 + set scale_amount_max(value: float64) + + /** Each particle's scale will vary along this [Curve]. */ + get scale_amount_curve(): Curve + set scale_amount_curve(value: Curve) + + /** If set to `true`, three different scale curves can be specified, one per scale axis. */ + get split_scale(): boolean + set split_scale(value: boolean) + + /** Curve for the scale over life, along the x axis. */ + get scale_curve_x(): Curve + set scale_curve_x(value: Curve) + + /** Curve for the scale over life, along the y axis. */ + get scale_curve_y(): Curve + set scale_curve_y(value: Curve) + + /** Curve for the scale over life, along the z axis. */ + get scale_curve_z(): Curve + set scale_curve_z(value: Curve) + + /** Each particle's initial color. + * + * **Note:** [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color] will have no visible effect. + */ + get color(): Color + set color(value: Color) + + /** Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]). + * + * **Note:** [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color_ramp] will have no visible effect. + */ + get color_ramp(): Gradient + set color_ramp(value: Gradient) + + /** Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). + * + * **Note:** [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color_initial_ramp] will have no visible effect. + */ + get color_initial_ramp(): Gradient + set color_initial_ramp(value: Gradient) + + /** Minimum hue variation. */ + get hue_variation_min(): float64 + set hue_variation_min(value: float64) + + /** Maximum hue variation. */ + get hue_variation_max(): float64 + set hue_variation_max(value: float64) + + /** Each particle's hue will vary along this [Curve]. */ + get hue_variation_curve(): Curve + set hue_variation_curve(value: Curve) + + /** Minimum particle animation speed. */ + get anim_speed_min(): float64 + set anim_speed_min(value: float64) + + /** Maximum particle animation speed. */ + get anim_speed_max(): float64 + set anim_speed_max(value: float64) + + /** Each particle's animation speed will vary along this [Curve]. */ + get anim_speed_curve(): Curve + set anim_speed_curve(value: Curve) + + /** Minimum animation offset. */ + get anim_offset_min(): float64 + set anim_offset_min(value: float64) + + /** Maximum animation offset. */ + get anim_offset_max(): float64 + set anim_offset_max(value: float64) + + /** Each particle's animation offset will vary along this [Curve]. */ + get anim_offset_curve(): Curve + set anim_offset_curve(value: Curve) + + /** Emitted when all active particles have finished processing. When [member one_shot] is disabled, particles will process continuously, so this is never emitted. */ + readonly finished: Signal0 + } + class CPUParticles3DEditor extends GPUParticles3DEditorBase { + constructor(identifier?: any) + } + class CPUParticles3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class CPUParticles3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** A CSG Box shape. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgbox3d.html + */ + class CSGBox3D extends CSGPrimitive3D { + constructor(identifier?: any) + /** The box's width, height and depth. */ + get size(): Vector3 + set size(value: Vector3) + + /** The material used to render the box. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + /** A CSG node that allows you to combine other CSG modifiers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgcombiner3d.html + */ + class CSGCombiner3D extends CSGShape3D { + constructor(identifier?: any) + } + /** A CSG Cylinder shape. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgcylinder3d.html + */ + class CSGCylinder3D extends CSGPrimitive3D { + constructor(identifier?: any) + /** The radius of the cylinder. */ + get radius(): float64 + set radius(value: float64) + + /** The height of the cylinder. */ + get height(): float64 + set height(value: float64) + + /** The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. */ + get sides(): int64 + set sides(value: int64) + + /** If `true` a cone is created, the [member radius] will only apply to one side. */ + get cone(): boolean + set cone(value: boolean) + + /** If `true` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If `false` the cylinder will have a flat shaded look. */ + get smooth_faces(): boolean + set smooth_faces(value: boolean) + + /** The material used to render the cylinder. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + /** A CSG Mesh shape that uses a mesh resource. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgmesh3d.html + */ + class CSGMesh3D extends CSGPrimitive3D { + constructor(identifier?: any) + /** The [Mesh] resource to use as a CSG shape. + * + * **Note:** When using an [ArrayMesh], all vertex attributes except [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL] and [constant Mesh.ARRAY_TEX_UV] are left unused. Only [constant Mesh.ARRAY_VERTEX] and [constant Mesh.ARRAY_TEX_UV] will be passed to the GPU. + * [constant Mesh.ARRAY_NORMAL] is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. + */ + get mesh(): Mesh + set mesh(value: Mesh) + + /** The [Material] used in drawing the CSG shape. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + namespace CSGPolygon3D { + enum Mode { + /** The [member polygon] shape is extruded along the negative Z axis. */ + MODE_DEPTH = 0, + + /** The [member polygon] shape is extruded by rotating it around the Y axis. */ + MODE_SPIN = 1, + + /** The [member polygon] shape is extruded along the [Path3D] specified in [member path_node]. */ + MODE_PATH = 2, + } + enum PathRotation { + /** The [member polygon] shape is not rotated. + * + * **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes. + */ + PATH_ROTATION_POLYGON = 0, + + /** The [member polygon] shape is rotated along the path, but it is not rotated around the path axis. + * + * **Note:** Requires the path Z coordinates to continually decrease to ensure viable shapes. + */ + PATH_ROTATION_PATH = 1, + + /** The [member polygon] shape follows the path and its rotations around the path axis. */ + PATH_ROTATION_PATH_FOLLOW = 2, + } + enum PathIntervalType { + /** When [member mode] is set to [constant MODE_PATH], [member path_interval] will determine the distance, in meters, each interval of the path will extrude. */ + PATH_INTERVAL_DISTANCE = 0, + + /** When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path. */ + PATH_INTERVAL_SUBDIVIDE = 1, + } + } + /** Extrudes a 2D polygon shape to create a 3D mesh. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgpolygon3d.html + */ + class CSGPolygon3D extends CSGPrimitive3D { + constructor(identifier?: any) + _is_editable_3d_polygon(): boolean + _has_editable_3d_polygon_no_depth(): boolean + + /** The point array that defines the 2D polygon that is extruded. This can be a convex or concave polygon with 3 or more points. The polygon must *not* have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated. + * + * **Note:** If only 1 or 2 points are defined in [member polygon], no mesh will be generated. + */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + + /** The [member mode] used to extrude the [member polygon]. */ + get mode(): int64 + set mode(value: int64) + + /** When [member mode] is [constant MODE_DEPTH], the depth of the extrusion. */ + get depth(): float64 + set depth(value: float64) + + /** When [member mode] is [constant MODE_SPIN], the total number of degrees the [member polygon] is rotated when extruding. */ + get spin_degrees(): float64 + set spin_degrees(value: float64) + + /** When [member mode] is [constant MODE_SPIN], the number of extrusions made. */ + get spin_sides(): int64 + set spin_sides(value: int64) + + /** When [member mode] is [constant MODE_PATH], the location of the [Path3D] object used to extrude the [member polygon]. */ + get path_node(): NodePath + set path_node(value: NodePath | string) + + /** When [member mode] is [constant MODE_PATH], this will determine if the interval should be by distance ([constant PATH_INTERVAL_DISTANCE]) or subdivision fractions ([constant PATH_INTERVAL_SUBDIVIDE]). */ + get path_interval_type(): int64 + set path_interval_type(value: int64) + + /** When [member mode] is [constant MODE_PATH], the path interval or ratio of path points to extrusions. */ + get path_interval(): float64 + set path_interval(value: float64) + + /** When [member mode] is [constant MODE_PATH], extrusions that are less than this angle, will be merged together to reduce polygon count. */ + get path_simplify_angle(): float64 + set path_simplify_angle(value: float64) + + /** When [member mode] is [constant MODE_PATH], the path rotation method used to rotate the [member polygon] as it is extruded. */ + get path_rotation(): int64 + set path_rotation(value: int64) + + /** When [member mode] is [constant MODE_PATH], if `true` the [Transform3D] of the [CSGPolygon3D] is used as the starting point for the extrusions, not the [Transform3D] of the [member path_node]. */ + get path_local(): boolean + set path_local(value: boolean) + + /** When [member mode] is [constant MODE_PATH], by default, the top half of the [member material] is stretched along the entire length of the extruded shape. If `false` the top half of the material is repeated every step of the extrusion. */ + get path_continuous_u(): boolean + set path_continuous_u(value: boolean) + + /** When [member mode] is [constant MODE_PATH], this is the distance along the path, in meters, the texture coordinates will tile. When set to 0, texture coordinates will match geometry exactly with no tiling. */ + get path_u_distance(): float64 + set path_u_distance(value: float64) + + /** When [member mode] is [constant MODE_PATH], if `true` the ends of the path are joined, by adding an extrusion between the last and first points of the path. */ + get path_joined(): boolean + set path_joined(value: boolean) + + /** If `true`, applies smooth shading to the extrusions. */ + get smooth_faces(): boolean + set smooth_faces(value: boolean) + + /** Material to use for the resulting mesh. The UV maps the top half of the material to the extruded shape (U along the length of the extrusions and V around the outline of the [member polygon]), the bottom-left quarter to the front end face, and the bottom-right quarter to the back end face. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + /** Base class for CSG primitives. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgprimitive3d.html + */ + class CSGPrimitive3D extends CSGShape3D { + constructor(identifier?: any) + /** If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. */ + get flip_faces(): boolean + set flip_faces(value: boolean) + } + namespace CSGShape3D { + enum Operation { + /** Geometry of both primitives is merged, intersecting geometry is removed. */ + OPERATION_UNION = 0, + + /** Only intersecting geometry remains, the rest is removed. */ + OPERATION_INTERSECTION = 1, + + /** The second shape is subtracted from the first, leaving a dent with its shape. */ + OPERATION_SUBTRACTION = 2, + } + } + /** The CSG base class. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgshape3d.html + */ + class CSGShape3D extends GeometryInstance3D { + constructor(identifier?: any) + _update_shape(): void + + /** Returns `true` if this is a root shape and is thus the object that is rendered. */ + is_root_shape(): boolean + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. */ + set_collision_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_layer_value(layer_number: int64): boolean + + /** Returns an [Array] with two elements, the first is the [Transform3D] of this node and the second is the root [Mesh] of this node. Only works when this node is the root shape. */ + get_meshes(): GArray + + /** The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. */ + get operation(): int64 + set operation(value: int64) + + /** Snap makes the mesh vertices snap to a given distance so that the faces of two meshes can be perfectly aligned. A lower value results in greater precision but may be harder to adjust. The top-level CSG shape's snap value is used for the entire CSG tree. */ + get snap(): float64 + set snap(value: float64) + + /** Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. */ + get calculate_tangents(): boolean + set calculate_tangents(value: boolean) + + /** Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. See also [member collision_mask] and [member collision_priority]. */ + get use_collision(): boolean + set use_collision(value: boolean) + + /** 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. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + */ + get collision_layer(): int64 + set collision_layer(value: int64) + + /** The physics layers this CSG shape scans for collisions. Only effective if [member use_collision] is `true`. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The priority used to solve colliding when occurring penetration. Only effective if [member use_collision] is `true`. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. */ + get collision_priority(): float64 + set collision_priority(value: float64) + } + class CSGShape3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** A CSG Sphere shape. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgsphere3d.html + */ + class CSGSphere3D extends CSGPrimitive3D { + constructor(identifier?: any) + /** Radius of the sphere. */ + get radius(): float64 + set radius(value: float64) + + /** Number of vertical slices for the sphere. */ + get radial_segments(): int64 + set radial_segments(value: int64) + + /** Number of horizontal slices for the sphere. */ + get rings(): int64 + set rings(value: int64) + + /** If `true` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If `false` the sphere will have a flat shaded look. */ + get smooth_faces(): boolean + set smooth_faces(value: boolean) + + /** The material used to render the sphere. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + /** A CSG Torus shape. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_csgtorus3d.html + */ + class CSGTorus3D extends CSGPrimitive3D { + constructor(identifier?: any) + /** The inner radius of the torus. */ + get inner_radius(): float64 + set inner_radius(value: float64) + + /** The outer radius of the torus. */ + get outer_radius(): float64 + set outer_radius(value: float64) + + /** The number of slices the torus is constructed of. */ + get sides(): int64 + set sides(value: int64) + + /** The number of edges each ring of the torus is constructed of. */ + get ring_sides(): int64 + set ring_sides(value: int64) + + /** If `true` the normals of the torus are set to give a smooth effect making the torus seem rounded. If `false` the torus will have a flat shaded look. */ + get smooth_faces(): boolean + set smooth_faces(value: boolean) + + /** The material used to render the torus. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + } + /** Calls the specified method after optional delay. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_callbacktweener.html + */ + class CallbackTweener extends Tweener { + constructor(identifier?: any) + /** Makes the callback call delayed by given time in seconds. + * **Example:** + * + */ + set_delay(delay: float64): CallbackTweener + } + namespace Camera2D { + enum AnchorMode { + /** The camera's position is fixed so that the top-left corner is always at the origin. */ + ANCHOR_MODE_FIXED_TOP_LEFT = 0, + + /** The camera's position takes into account vertical/horizontal offsets and the screen size. */ + ANCHOR_MODE_DRAG_CENTER = 1, + } + enum Camera2DProcessCallback { + /** The camera updates during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). */ + CAMERA2D_PROCESS_PHYSICS = 0, + + /** The camera updates during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]). */ + CAMERA2D_PROCESS_IDLE = 1, + } + } + /** Camera node for 2D scenes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_camera2d.html + */ + class Camera2D extends Node2D { + constructor(identifier?: any) + _update_scroll(): void + + /** Forces this [Camera2D] to become the current active one. [member enabled] must be `true`. */ + make_current(): void + + /** Returns `true` if this [Camera2D] is the active camera (see [method Viewport.get_camera_2d]). */ + is_current(): boolean + _make_current(_unnamed_arg0: Object): void + + /** Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. */ + set_limit(margin: Side, limit: int64): void + + /** Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. */ + get_limit(margin: Side): int64 + + /** Sets the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin]. */ + set_drag_margin(margin: Side, drag_margin: float64): void + + /** Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin]. */ + get_drag_margin(margin: Side): float64 + + /** Returns this camera's target position, in global coordinates. + * + * **Note:** The returned value is not the same as [member Node2D.global_position], as it is affected by the drag properties. It is also not the same as the current position if [member position_smoothing_enabled] is `true` (see [method get_screen_center_position]). + */ + get_target_position(): Vector2 + + /** Returns the center of the screen from this camera's point of view, in global coordinates. + * + * **Note:** The exact targeted position of the camera may be different. See [method get_target_position]. + */ + get_screen_center_position(): Vector2 + + /** Forces the camera to update scroll immediately. */ + force_update_scroll(): void + + /** Sets the camera's position immediately to its current smoothing destination. + * This method has no effect if [member position_smoothing_enabled] is `false`. + */ + reset_smoothing(): void + + /** Aligns the camera to the tracked node. */ + align(): void + _set_old_smoothing(follow_smoothing: float64): void + + /** The camera's relative offset. Useful for looking around or camera shake animations. The offsetted camera can go past the limits defined in [member limit_top], [member limit_bottom], [member limit_left] and [member limit_right]. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The Camera2D's anchor point. See [enum AnchorMode] constants. */ + get anchor_mode(): int64 + set anchor_mode(value: int64) + + /** If `true`, the camera's rendered view is not affected by its [member Node2D.rotation] and [member Node2D.global_rotation]. */ + get ignore_rotation(): boolean + set ignore_rotation(value: boolean) + + /** Controls whether the camera can be active or not. If `true`, the [Camera2D] will become the main camera when it enters the scene tree and there is no active camera currently (see [method Viewport.get_camera_2d]). + * When the camera is currently active and [member enabled] is set to `false`, the next enabled [Camera2D] in the scene tree will become active. + */ + get enabled(): boolean + set enabled(value: boolean) + + /** The camera's zoom. A zoom of `Vector(2, 2)` doubles the size seen in the viewport. A zoom of `Vector(0.5, 0.5)` halves the size seen in the viewport. + * + * **Note:** [member FontFile.oversampling] does *not* take [Camera2D] zoom into account. This means that zooming in/out will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated unless the font is part of a [CanvasLayer] that makes it ignore camera zoom. To ensure text remains crisp regardless of zoom, you can enable MSDF font rendering by enabling [member ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field] (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, [member SystemFont.multichannel_signed_distance_field] can be enabled in the inspector. + */ + get zoom(): Vector2 + set zoom(value: Vector2) + + /** The custom [Viewport] node attached to the [Camera2D]. If `null` or not a [Viewport], uses the default viewport instead. */ + get custom_viewport(): Viewport + set custom_viewport(value: Viewport) + + /** The camera's process callback. See [enum Camera2DProcessCallback]. */ + get process_callback(): int64 + set process_callback(value: int64) + + /** Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. */ + get limit_left(): int64 + set limit_left(value: int64) + + /** Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. */ + get limit_top(): int64 + set limit_top(value: int64) + + /** Right scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. */ + get limit_right(): int64 + set limit_right(value: int64) + + /** Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit. */ + get limit_bottom(): int64 + set limit_bottom(value: int64) + + /** If `true`, the camera smoothly stops when reaches its limits. + * This property has no effect if [member position_smoothing_enabled] is `false`. + * + * **Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing]. + */ + get limit_smoothed(): boolean + set limit_smoothed(value: boolean) + + /** If `true`, the camera's view smoothly moves towards its target position at [member position_smoothing_speed]. */ + get position_smoothing_enabled(): boolean + set position_smoothing_enabled(value: boolean) + + /** Speed in pixels per second of the camera's smoothing effect when [member position_smoothing_enabled] is `true`. */ + get position_smoothing_speed(): float64 + set position_smoothing_speed(value: float64) + + /** If `true`, the camera's view smoothly rotates, via asymptotic smoothing, to align with its target rotation at [member rotation_smoothing_speed]. + * + * **Note:** This property has no effect if [member ignore_rotation] is `true`. + */ + get rotation_smoothing_enabled(): boolean + set rotation_smoothing_enabled(value: boolean) + + /** The angular, asymptotic speed of the camera's rotation smoothing effect when [member rotation_smoothing_enabled] is `true`. */ + get rotation_smoothing_speed(): float64 + set rotation_smoothing_speed(value: float64) + + /** If `true`, the camera only moves when reaching the horizontal (left and right) drag margins. If `false`, the camera moves horizontally regardless of margins. */ + get drag_horizontal_enabled(): boolean + set drag_horizontal_enabled(value: boolean) + + /** If `true`, the camera only moves when reaching the vertical (top and bottom) drag margins. If `false`, the camera moves vertically regardless of the drag margins. */ + get drag_vertical_enabled(): boolean + set drag_vertical_enabled(value: boolean) + + /** The relative horizontal drag offset of the camera between the right (`-1`) and left (`1`) drag margins. + * + * **Note:** Used to set the initial horizontal drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_horizontal_enabled] is `true` or the drag margins are changed. + */ + get drag_horizontal_offset(): float64 + set drag_horizontal_offset(value: float64) + + /** The relative vertical drag offset of the camera between the bottom (`-1`) and top (`1`) drag margins. + * + * **Note:** Used to set the initial vertical drag offset; determine the current offset; or force the current offset. It's not automatically updated when [member drag_vertical_enabled] is `true` or the drag margins are changed. + */ + get drag_vertical_offset(): float64 + set drag_vertical_offset(value: float64) + + /** Left margin needed to drag the camera. A value of `1` makes the camera move only when reaching the left edge of the screen. */ + get drag_left_margin(): float64 + set drag_left_margin(value: float64) + + /** Top margin needed to drag the camera. A value of `1` makes the camera move only when reaching the top edge of the screen. */ + get drag_top_margin(): float64 + set drag_top_margin(value: float64) + + /** Right margin needed to drag the camera. A value of `1` makes the camera move only when reaching the right edge of the screen. */ + get drag_right_margin(): float64 + set drag_right_margin(value: float64) + + /** Bottom margin needed to drag the camera. A value of `1` makes the camera move only when reaching the bottom edge of the screen. */ + get drag_bottom_margin(): float64 + set drag_bottom_margin(value: float64) + + /** If `true`, draws the camera's screen rectangle in the editor. */ + get editor_draw_screen(): boolean + set editor_draw_screen(value: boolean) + + /** If `true`, draws the camera's limits rectangle in the editor. */ + get editor_draw_limits(): boolean + set editor_draw_limits(value: boolean) + + /** If `true`, draws the camera's drag margin rectangle in the editor. */ + get editor_draw_drag_margin(): boolean + set editor_draw_drag_margin(value: boolean) + } + namespace Camera3D { + enum ProjectionType { + /** Perspective projection. Objects on the screen becomes smaller when they are far away. */ + PROJECTION_PERSPECTIVE = 0, + + /** Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. */ + PROJECTION_ORTHOGONAL = 1, + + /** Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects. */ + PROJECTION_FRUSTUM = 2, + } + enum KeepAspect { + /** Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. */ + KEEP_WIDTH = 0, + + /** Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. */ + KEEP_HEIGHT = 1, + } + enum DopplerTracking { + /** Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default). */ + DOPPLER_TRACKING_DISABLED = 0, + + /** Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in `_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]). */ + DOPPLER_TRACKING_IDLE_STEP = 1, + + /** Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in `_physics_process`. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale]). */ + DOPPLER_TRACKING_PHYSICS_STEP = 2, + } + } + /** Camera node, displays from a point of view. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_camera3d.html + */ + class Camera3D extends Node3D { + constructor(identifier?: any) + /** Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. */ + project_ray_normal(screen_point: Vector2): Vector3 + + /** Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. */ + project_local_ray_normal(screen_point: Vector2): Vector3 + + /** Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the inverse camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. */ + project_ray_origin(screen_point: Vector2): Vector3 + + /** Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space. + * + * **Note:** When using this to position GUI elements over a 3D viewport, use [method is_position_behind] to prevent them from appearing if the 3D point is behind the camera: + * + */ + unproject_position(world_point: Vector3): Vector2 + + /** Returns `true` if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. + * + * **Note:** A position which returns `false` may still be outside the camera's field of view. + */ + is_position_behind(world_point: Vector3): boolean + + /** Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [param z_depth] distance into the scene away from the camera. */ + project_position(screen_point: Vector2, z_depth: float64): Vector3 + + /** Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [param fov] (field of view) angle in degrees, and the [param z_near] and [param z_far] clip planes in world space units. */ + set_perspective(fov: float64, z_near: float64, z_far: float64): void + + /** Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [param size], and the [param z_near] and [param z_far] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) */ + set_orthogonal(size: float64, z_near: float64, z_far: float64): void + + /** Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [param size], an [param offset], and the [param z_near] and [param z_far] clip planes in world space units. See also [member frustum_offset]. */ + set_frustum(size: float64, offset: Vector2, z_near: float64, z_far: float64): void + + /** Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. */ + make_current(): void + + /** If this is the current camera, remove it from being current. If [param enable_next] is `true`, request to make the next camera current, if any. */ + clear_current(enable_next: boolean = true): void + + /** Returns the transform of the camera plus the vertical ([member v_offset]) and horizontal ([member h_offset]) offsets; and any other adjustments made to the position and orientation of the camera by subclassed cameras such as [XRCamera3D]. */ + get_camera_transform(): Transform3D + + /** Returns the projection matrix that this camera uses to render to its associated viewport. The camera must be part of the scene tree to function. */ + get_camera_projection(): Projection + + /** Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. */ + get_frustum(): GArray + + /** Returns `true` if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. */ + is_position_in_frustum(world_point: Vector3): boolean + + /** Returns the camera's RID from the [RenderingServer]. */ + get_camera_rid(): RID + + /** Returns the RID of a pyramid shape encompassing the camera's view frustum, ignoring the camera's near plane. The tip of the pyramid represents the position of the camera. */ + get_pyramid_shape_rid(): RID + + /** Based on [param value], enables or disables the specified layer in the [member cull_mask], given a [param layer_number] between 1 and 20. */ + set_cull_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [param layer_number] between 1 and 20. */ + get_cull_mask_value(layer_number: int64): boolean + + /** The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]. */ + get keep_aspect(): int64 + set keep_aspect(value: int64) + + /** The culling mask that describes which [member VisualInstance3D.layers] are rendered by this camera. By default, all 20 user-visible layers are rendered. + * + * **Note:** Since the [member cull_mask] allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting [member cull_mask] using a script allows you to toggle those reserved layers, which can be useful for editor plugins. + * To adjust [member cull_mask] more easily using a script, use [method get_cull_mask_value] and [method set_cull_mask_value]. + * + * **Note:** [VoxelGI], SDFGI and [LightmapGI] will always take all layers into account to determine what contributes to global illumination. If this is an issue, set [member GeometryInstance3D.gi_mode] to [constant GeometryInstance3D.GI_MODE_DISABLED] for meshes and [member Light3D.light_bake_mode] to [constant Light3D.BAKE_DISABLED] for lights to exclude them from global illumination. + */ + get cull_mask(): int64 + set cull_mask(value: int64) + + /** The [Environment] to use for this camera. */ + get environment(): Environment + set environment(value: Environment) + + /** The [CameraAttributes] to use for this camera. */ + get attributes(): CameraAttributesPractical | CameraAttributesPhysical + set attributes(value: CameraAttributesPractical | CameraAttributesPhysical) + + /** The [Compositor] to use for this camera. */ + get compositor(): Compositor + set compositor(value: Compositor) + + /** The horizontal (X) offset of the camera viewport. */ + get h_offset(): float64 + set h_offset(value: float64) + + /** The vertical (Y) offset of the camera viewport. */ + get v_offset(): float64 + set v_offset(value: float64) + + /** If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular `_process` methods. See [enum DopplerTracking] for possible values. */ + get doppler_tracking(): int64 + set doppler_tracking(value: int64) + + /** The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. */ + get projection(): int64 + set projection(value: int64) + + /** If `true`, the ancestor [Viewport] is currently using this camera. + * If multiple cameras are in the scene, one will always be made current. For example, if two [Camera3D] nodes are present in the scene and only one is current, setting one camera's [member current] to `false` will cause the other camera to be made current. + */ + get current(): boolean + set current(value: boolean) + + /** The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [member fov] sets the other axis' field of view angle. + * For reference, the default vertical field of view value (`75.0`) is equivalent to a horizontal FOV of: + * - ~91.31 degrees in a 4:3 viewport + * - ~101.67 degrees in a 16:10 viewport + * - ~107.51 degrees in a 16:9 viewport + * - ~121.63 degrees in a 21:9 viewport + */ + get fov(): float64 + set fov(value: float64) + + /** The camera's size in meters measured as the diameter of the width or height, depending on [member keep_aspect]. Only applicable in orthogonal and frustum modes. */ + get size(): float64 + set size(value: float64) + + /** The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. + * + * **Note:** Only effective if [member projection] is [constant PROJECTION_FRUSTUM]. + */ + get frustum_offset(): Vector2 + set frustum_offset(value: Vector2) + + /** The distance to the near culling boundary for this camera relative to its local Z axis. Lower values allow the camera to see objects more up close to its origin, at the cost of lower precision across the *entire* range. Values lower than the default can lead to increased Z-fighting. */ + get near(): float64 + set near(value: float64) + + /** The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing [member far] can improve performance if it results in objects being partially or fully culled. */ + get far(): float64 + set far(value: float64) + } + class Camera3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class Camera3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Parent class for camera settings. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cameraattributes.html + */ + class CameraAttributes extends Resource { + constructor(identifier?: any) + /** Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. When [member auto_exposure_enabled] this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. */ + get exposure_sensitivity(): float64 + set exposure_sensitivity(value: float64) + + /** Multiplier for the exposure amount. A higher value results in a brighter image. */ + get exposure_multiplier(): float64 + set exposure_multiplier(value: float64) + + /** If `true`, enables the tonemapping auto exposure mode of the scene renderer. If `true`, the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. */ + get auto_exposure_enabled(): boolean + set auto_exposure_enabled(value: boolean) + + /** The scale of the auto exposure effect. Affects the intensity of auto exposure. */ + get auto_exposure_scale(): float64 + set auto_exposure_scale(value: float64) + + /** The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. */ + get auto_exposure_speed(): float64 + set auto_exposure_speed(value: float64) + } + /** Physically-based camera settings. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cameraattributesphysical.html + */ + class CameraAttributesPhysical extends CameraAttributes { + constructor(identifier?: any) + /** Returns the vertical field of view that corresponds to the [member frustum_focal_length]. This value is calculated internally whenever [member frustum_focal_length] is changed. */ + get_fov(): float64 + + /** Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than [member frustum_focal_length]. */ + get frustum_focus_distance(): float64 + set frustum_focus_distance(value: float64) + + /** Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.fov] property and the [member Camera3D.keep_aspect] property. */ + get frustum_focal_length(): float64 + set frustum_focal_length(value: float64) + + /** Override value for [member Camera3D.near]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.near] property. */ + get frustum_near(): float64 + set frustum_near(value: float64) + + /** Override value for [member Camera3D.far]. Used internally when calculating depth of field. When attached to a [Camera3D] as its [member Camera3D.attributes], it will override the [member Camera3D.far] property. */ + get frustum_far(): float64 + set frustum_far(value: float64) + + /** Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default [DirectionalLight3D]), for indoor lighting, a value between 2 and 4 is more appropriate. + * Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. + */ + get exposure_aperture(): float64 + set exposure_aperture(value: float64) + + /** Time for shutter to open and close, evaluated as `1 / shutter_speed` seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image). + * Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. + */ + get exposure_shutter_speed(): float64 + set exposure_shutter_speed(value: float64) + + /** The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. */ + get auto_exposure_min_exposure_value(): float64 + set auto_exposure_min_exposure_value(value: float64) + + /** The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. */ + get auto_exposure_max_exposure_value(): float64 + set auto_exposure_max_exposure_value(value: float64) + } + /** Camera settings in an easy to use format. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cameraattributespractical.html + */ + class CameraAttributesPractical extends CameraAttributes { + constructor(identifier?: any) + /** Enables depth of field blur for objects further than [member dof_blur_far_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_far_transition]. + * + * **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + */ + get dof_blur_far_enabled(): boolean + set dof_blur_far_enabled(value: boolean) + + /** Objects further from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters. */ + get dof_blur_far_distance(): float64 + set dof_blur_far_distance(value: float64) + + /** When positive, distance over which (starting from [member dof_blur_far_distance]) blur effect will scale from 0 to [member dof_blur_amount]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_far_distance] and will increase in a physically accurate way as objects get further from the [Camera3D]. */ + get dof_blur_far_transition(): float64 + set dof_blur_far_transition(value: float64) + + /** Enables depth of field blur for objects closer than [member dof_blur_near_distance]. Strength of blur is controlled by [member dof_blur_amount] and modulated by [member dof_blur_near_transition]. + * + * **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + */ + get dof_blur_near_enabled(): boolean + set dof_blur_near_enabled(value: boolean) + + /** Objects closer from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters. */ + get dof_blur_near_distance(): float64 + set dof_blur_near_distance(value: float64) + + /** When positive, distance over which blur effect will scale from 0 to [member dof_blur_amount], ending at [member dof_blur_near_distance]. When negative, uses physically-based scaling so depth of field effect will scale from 0 at [member dof_blur_near_distance] and will increase in a physically accurate way as objects get closer to the [Camera3D]. */ + get dof_blur_near_transition(): float64 + set dof_blur_near_transition(value: float64) + + /** Sets the maximum amount of blur. When using physically-based blur amounts, will instead act as a multiplier. High values lead to an increased amount of blurriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style. */ + get dof_blur_amount(): float64 + set dof_blur_amount(value: float64) + + /** The minimum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark. */ + get auto_exposure_min_sensitivity(): float64 + set auto_exposure_min_sensitivity(value: float64) + + /** The maximum sensitivity (in ISO) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright. */ + get auto_exposure_max_sensitivity(): float64 + set auto_exposure_max_sensitivity(value: float64) + } + namespace CameraFeed { + enum FeedDataType { + /** No image set for the feed. */ + FEED_NOIMAGE = 0, + + /** Feed supplies RGB images. */ + FEED_RGB = 1, + + /** Feed supplies YCbCr images that need to be converted to RGB. */ + FEED_YCBCR = 2, + + /** Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. */ + FEED_YCBCR_SEP = 3, + } + enum FeedPosition { + /** Unspecified position. */ + FEED_UNSPECIFIED = 0, + + /** Camera is mounted at the front of the device. */ + FEED_FRONT = 1, + + /** Camera is mounted at the back of the device. */ + FEED_BACK = 2, + } + } + /** A camera feed gives you access to a single physical camera attached to your device. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_camerafeed.html + */ + class CameraFeed extends RefCounted { + constructor(identifier?: any) + /** Returns the unique ID for this feed. */ + get_id(): int64 + + /** Returns the camera's name. */ + get_name(): string + _set_name(name: string): void + + /** Returns the position of camera on the device. */ + get_position(): CameraFeed.FeedPosition + _set_position(position: CameraFeed.FeedPosition): void + _set_RGB_img(rgb_img: Image): void + _set_YCbCr_img(ycbcr_img: Image): void + + /** Returns feed image data type. */ + get_datatype(): CameraFeed.FeedDataType + + /** If `true`, the feed is active. */ + get feed_is_active(): boolean + set feed_is_active(value: boolean) + + /** The transform applied to the camera's image. */ + get feed_transform(): Transform2D + set feed_transform(value: Transform2D) + } + /** Texture provided by a [CameraFeed]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cameratexture.html + */ + class CameraTexture extends Texture2D { + constructor(identifier?: any) + /** The ID of the [CameraFeed] for which we want to display the image. */ + get camera_feed_id(): int64 + set camera_feed_id(value: int64) + + /** Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. */ + get which_feed(): int64 + set which_feed(value: int64) + + /** Convenience property that gives access to the active property of the [CameraFeed]. */ + get camera_is_active(): boolean + set camera_is_active(value: boolean) + } + /** Merges several 2D nodes into a single draw operation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvasgroup.html + */ + class CanvasGroup extends Node2D { + constructor(identifier?: any) + /** Sets the size of a margin used to expand the drawable rect of this [CanvasGroup]. The size of the [CanvasGroup] is determined by fitting a rect around its children then expanding that rect by [member fit_margin]. This increases both the backbuffer area used and the area covered by the [CanvasGroup] both of which can reduce performance. This should be kept as small as possible and should only be expanded when an increased size is needed (e.g. for custom shader effects). */ + get fit_margin(): float64 + set fit_margin(value: float64) + + /** Sets the size of the margin used to expand the clearing rect of this [CanvasGroup]. This expands the area of the backbuffer that will be used by the [CanvasGroup]. A smaller margin will reduce the area of the backbuffer used which can increase performance, however if [member use_mipmaps] is enabled, a small margin may result in mipmap errors at the edge of the [CanvasGroup]. Accordingly, this should be left as small as possible, but should be increased if artifacts appear along the edges of the canvas group. */ + get clear_margin(): float64 + set clear_margin(value: float64) + + /** If `true`, calculates mipmaps for the backbuffer before drawing the [CanvasGroup] so that mipmaps can be used in a custom [ShaderMaterial] attached to the [CanvasGroup]. Generating mipmaps has a performance cost so this should not be enabled unless required. */ + get use_mipmaps(): boolean + set use_mipmaps(value: boolean) + } + namespace CanvasItem { + enum TextureFilter { + /** The [CanvasItem] will inherit the filter from its parent. */ + TEXTURE_FILTER_PARENT_NODE = 0, + + /** The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled). */ + TEXTURE_FILTER_NEAREST = 1, + + /** The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled). */ + TEXTURE_FILTER_LINEAR = 2, + + /** The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look pixelated from up close, and smooth from a distance. + * Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + */ + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 3, + + /** The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`). This makes the texture look smooth from up close, and smooth from a distance. + * Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels. + */ + TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 4, + + /** The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + * + * **Note:** This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case. + */ + TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 5, + + /** The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is `true`) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]. + * + * **Note:** This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case. + */ + TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 6, + + /** Represents the size of the [enum TextureFilter] enum. */ + TEXTURE_FILTER_MAX = 7, + } + enum TextureRepeat { + /** The [CanvasItem] will inherit the filter from its parent. */ + TEXTURE_REPEAT_PARENT_NODE = 0, + + /** Texture will not repeat. */ + TEXTURE_REPEAT_DISABLED = 1, + + /** Texture will repeat normally. */ + TEXTURE_REPEAT_ENABLED = 2, + + /** Texture will repeat in a 2×2 tiled mode, where elements at even positions are mirrored. */ + TEXTURE_REPEAT_MIRROR = 3, + + /** Represents the size of the [enum TextureRepeat] enum. */ + TEXTURE_REPEAT_MAX = 4, + } + enum ClipChildrenMode { + /** Child draws over parent and is not clipped. */ + CLIP_CHILDREN_DISABLED = 0, + + /** Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. */ + CLIP_CHILDREN_ONLY = 1, + + /** Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. */ + CLIP_CHILDREN_AND_DRAW = 2, + + /** Represents the size of the [enum ClipChildrenMode] enum. */ + CLIP_CHILDREN_MAX = 3, + } + } + /** Abstract base class for everything in 2D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvasitem.html + */ + class CanvasItem extends Node { + /** The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform]. */ + static readonly NOTIFICATION_TRANSFORM_CHANGED = 2000 + + /** The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform]. */ + static readonly NOTIFICATION_LOCAL_TRANSFORM_CHANGED = 35 + + /** The [CanvasItem] is requested to draw (see [method _draw]). */ + static readonly NOTIFICATION_DRAW = 30 + + /** The [CanvasItem]'s visibility has changed. */ + static readonly NOTIFICATION_VISIBILITY_CHANGED = 31 + + /** The [CanvasItem] has entered the canvas. */ + static readonly NOTIFICATION_ENTER_CANVAS = 32 + + /** The [CanvasItem] has exited the canvas. */ + static readonly NOTIFICATION_EXIT_CANVAS = 33 + + /** The [CanvasItem]'s active [World2D] changed. */ + static readonly NOTIFICATION_WORLD_2D_CHANGED = 36 + constructor(identifier?: any) + + /** Called when [CanvasItem] has been requested to redraw (after [method queue_redraw] is called, either manually or by the engine). + * Corresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification]. + */ + /* gdvirtual */ _draw(): void + _top_level_raise_self(): void + _edit_set_state(state: GDictionary): void + _edit_get_state(): GDictionary + _edit_set_position(position: Vector2): void + _edit_get_position(): Vector2 + _edit_set_scale(scale: Vector2): void + _edit_get_scale(): Vector2 + _edit_set_rect(rect: Rect2): void + _edit_get_rect(): Rect2 + _edit_use_rect(): boolean + _edit_set_rotation(degrees: float64): void + _edit_get_rotation(): float64 + _edit_use_rotation(): boolean + _edit_set_pivot(pivot: Vector2): void + _edit_get_pivot(): Vector2 + _edit_use_pivot(): boolean + _edit_get_transform(): Transform2D + + /** Returns the canvas item RID used by [RenderingServer] for this item. */ + get_canvas_item(): RID + + /** Returns `true` if the node is present in the [SceneTree], its [member visible] property is `true` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see [method _draw]). + * Visibility is checked only in parent nodes that inherit from [CanvasItem], [CanvasLayer], and [Window]. If the parent is of any other type (such as [Node], [AnimationPlayer], or [Node3D]), it is assumed to be visible. + */ + is_visible_in_tree(): boolean + + /** Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to `true`. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple `popup*()` functions instead. */ + show(): void + + /** Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to `false`. */ + hide(): void + + /** Queues the [CanvasItem] to redraw. During idle time, if [CanvasItem] is visible, [constant NOTIFICATION_DRAW] is sent and [method _draw] is called. This only occurs **once** per frame, even if this method has been called multiple times. */ + queue_redraw(): void + + /** Moves this node to display on top of its siblings. + * Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent. + */ + move_to_front(): void + + /** Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also [method draw_multiline] and [method draw_polyline]. + * If [param width] is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + */ + draw_line(from: Vector2, to: Vector2, color: Color, width: float64 = -1, antialiased: boolean = false): void + + /** Draws a dashed line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline]. + * If [param width] is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * If [param antialiased] is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + * + * **Note:** [param antialiased] is only effective if [param width] is greater than `0.0`. + */ + draw_dashed_line(from: Vector2, to: Vector2, color: Color, width: float64 = -1, dash: float64 = 2, aligned: boolean = true, antialiased: boolean = false): void + + /** Draws interconnected line segments with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline] instead. See also [method draw_polygon]. + * If [param width] is negative, it will be ignored and the polyline will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + */ + draw_polyline(points: PackedVector2Array | Vector2[], color: Color, width: float64 = -1, antialiased: boolean = false): void + + /** Draws interconnected line segments with a uniform [param width], point-by-point coloring, and optional antialiasing (supported only for positive [param width]). Colors assigned to line points match by index between [param points] and [param colors], i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw disconnected lines, use [method draw_multiline_colors] instead. See also [method draw_polygon]. + * If [param width] is negative, it will be ignored and the polyline will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + */ + draw_polyline_colors(points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], width: float64 = -1, antialiased: boolean = false): void + + /** Draws an unfilled arc between the given angles with a uniform [param color] and [param width] and optional antialiasing (supported only for positive [param width]). The larger the value of [param point_count], the smoother the curve. See also [method draw_circle]. + * If [param width] is negative, it will be ignored and the arc will be drawn using [constant RenderingServer.PRIMITIVE_LINE_STRIP]. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * The arc is drawn from [param start_angle] towards the value of [param end_angle] so in clockwise direction if `start_angle < end_angle` and counter-clockwise otherwise. Passing the same angles but in reversed order will produce the same arc. If absolute difference of [param start_angle] and [param end_angle] is greater than [constant @GDScript.TAU] radians, then a full circle arc is drawn (i.e. arc will not overlap itself). + */ + draw_arc(center: Vector2, radius: float64, start_angle: float64, end_angle: float64, point_count: int64, color: Color, width: float64 = -1, antialiased: boolean = false): void + + /** Draws multiple disconnected lines with a uniform [param width] and [param color]. Each line is defined by two consecutive points from [param points] array, i.e. i-th segment consists of `points[2 * i]`, `points[2 * i + 1]` endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. + * If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * + * **Note:** [param antialiased] is only effective if [param width] is greater than `0.0`. + */ + draw_multiline(points: PackedVector2Array | Vector2[], color: Color, width: float64 = -1, antialiased: boolean = false): void + + /** Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Each segment is defined by two consecutive points from [param points] array and a corresponding color from [param colors] array, i.e. i-th segment consists of `points[2 * i]`, `points[2 * i + 1]` endpoints and has `colors *` color. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. + * If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * + * **Note:** [param antialiased] is only effective if [param width] is greater than `0.0`. + */ + draw_multiline_colors(points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], width: float64 = -1, antialiased: boolean = false): void + + /** Draws a rectangle. If [param filled] is `true`, the rectangle will be filled with the [param color] specified. If [param filled] is `false`, the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect]. + * If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * If [param antialiased] is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + * + * **Note:** [param width] is only effective if [param filled] is `false`. + * + * **Note:** Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]). + */ + draw_rect(rect: Rect2, color: Color, filled: boolean = true, width: float64 = -1, antialiased: boolean = false): void + + /** Draws a circle. See also [method draw_arc], [method draw_polyline], and [method draw_polygon]. + * If [param filled] is `true`, the circle will be filled with the [param color] specified. If [param filled] is `false`, the circle will be drawn as a stroke with the [param color] and [param width] specified. + * If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like `1.0`. + * If [param antialiased] is `true`, half transparent "feathers" will be attached to the boundary, making outlines smooth. + * + * **Note:** [param width] is only effective if [param filled] is `false`. + */ + draw_circle(position: Vector2, radius: float64, color: Color, filled: boolean = true, width: float64 = -1, antialiased: boolean = false): void + + /** Draws a texture at a given position. */ + draw_texture(texture: Texture2D, position: Vector2, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is `true`, the texture will have its X and Y coordinates swapped. See also [method draw_rect] and [method draw_texture_rect_region]. */ + draw_texture_rect(texture: Texture2D, rect: Rect2, tile: boolean, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false): void + + /** Draws a textured rectangle from a texture's region (specified by [param src_rect]) at a given position, optionally modulated by a color. If [param transpose] is `true`, the texture will have its X and Y coordinates swapped. See also [method draw_texture_rect]. */ + draw_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1), transpose: boolean = false, clip_uv: boolean = true): void + + /** Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See [member FontFile.multichannel_signed_distance_field] for more information and caveats about MSDF font rendering. + * If [param outline] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [param outline] radius. + * Value of the [param pixel_range] should the same that was used during distance field texture generation. + */ + draw_msdf_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1), outline: float64 = 0, pixel_range: float64 = 4, scale: float64 = 1): void + + /** Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. + * Texture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored: + * + */ + draw_lcd_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a styled rectangle. */ + draw_style_box(style_box: StyleBox, rect: Rect2): void + + /** Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also [method draw_line], [method draw_polyline], [method draw_polygon], and [method draw_rect]. */ + draw_primitive(points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], uvs: PackedVector2Array | Vector2[], texture: Texture2D = undefined): void + + /** Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. If you need more flexibility (such as being able to use bones), use [method RenderingServer.canvas_item_add_triangle_array] instead. */ + draw_polygon(points: PackedVector2Array | Vector2[], colors: PackedColorArray | Color[], uvs: PackedVector2Array | Vector2[] = [], texture: Texture2D = undefined): void + + /** Draws a colored polygon of any number of points, convex or concave. Unlike [method draw_polygon], a single color must be specified for the whole polygon. */ + draw_colored_polygon(points: PackedVector2Array | Vector2[], color: Color, uvs: PackedVector2Array | Vector2[] = [], texture: Texture2D = undefined): void + + /** Draws [param text] using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. + * **Example using the default project font:** + * + * See also [method Font.draw_string]. + */ + draw_string(font: Font, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, modulate: Color = new Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Breaks [param text] into lines and draws it using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. */ + draw_multiline_string(font: Font, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, max_lines: int64 = -1, modulate: Color = new Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Draws [param text] outline using the specified [param font] at the [param pos] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. */ + draw_string_outline(font: Font, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, size: int64 = 1, modulate: Color = new Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Breaks [param text] to the lines and draws text outline using the specified [param font] at the [param pos] (top-left corner). The text will have its color multiplied by [param modulate]. If [param width] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. */ + draw_multiline_string_outline(font: Font, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, max_lines: int64 = -1, size: int64 = 1, modulate: Color = new Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Draws a string first character using a custom font. */ + draw_char(font: Font, pos: Vector2, char: string, font_size: int64 = 16, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a string first character outline using a custom font. */ + draw_char_outline(font: Font, pos: Vector2, char: string, font_size: int64 = 16, size: int64 = -1, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. */ + draw_mesh(mesh: Mesh, texture: Texture2D, transform: Transform2D = new Transform2D(), modulate: Color = new Color(1, 1, 1, 1)): void + + /** Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation. */ + draw_multimesh(multimesh: MultiMesh, texture: Texture2D): void + + /** Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. + * + * **Note:** [member FontFile.oversampling] does *not* take [param scale] into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling [member ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field] (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, [member SystemFont.multichannel_signed_distance_field] can be enabled in the inspector. + */ + draw_set_transform(position: Vector2, rotation: float64 = 0, scale: Vector2 = Vector2.ONE): void + + /** Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. */ + draw_set_transform_matrix(xform: Transform2D): void + + /** Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. */ + draw_animation_slice(animation_length: float64, slice_begin: float64, slice_end: float64, offset: float64 = 0): void + + /** After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. */ + draw_end_animation(): void + + /** Returns the transform matrix of this item. */ + get_transform(): Transform2D + + /** Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled. */ + get_global_transform(): Transform2D + + /** Returns the transform from the local coordinate system of this [CanvasItem] to the [Viewport]s coordinate system. */ + get_global_transform_with_canvas(): Transform2D + + /** Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s embedders coordinate system. */ + get_viewport_transform(): Transform2D + + /** Returns the viewport's boundaries as a [Rect2]. */ + get_viewport_rect(): Rect2 + + /** Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s coordinate system. */ + get_canvas_transform(): Transform2D + + /** Returns the transform of this [CanvasItem] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + * Equals to [method get_global_transform] if the window is embedded (see [member Viewport.gui_embed_subwindows]). + */ + get_screen_transform(): Transform2D + + /** Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem]. */ + get_local_mouse_position(): Vector2 + + /** Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer]. + * + * **Note:** For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position]. + */ + get_global_mouse_position(): Vector2 + + /** Returns the [RID] of the [World2D] canvas where this item is in. */ + get_canvas(): RID + + /** Returns the [CanvasLayer] that contains this node, or `null` if the node is not in any [CanvasLayer]. */ + get_canvas_layer_node(): CanvasLayer + + /** Returns the [World2D] where this item is in. */ + get_world_2d(): World2D + + /** If [param enable] is `true`, this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes. */ + set_notify_local_transform(enable: boolean): void + + /** Returns `true` if local transform notifications are communicated to children. */ + is_local_transform_notification_enabled(): boolean + + /** If [param enable] is `true`, this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. */ + set_notify_transform(enable: boolean): void + + /** Returns `true` if global transform notifications are communicated to children. */ + is_transform_notification_enabled(): boolean + + /** Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. */ + force_update_transform(): void + + /** Assigns [param screen_point] as this node's new local transform. */ + make_canvas_position_local(screen_point: Vector2): Vector2 + + /** Transformations issued by [param event]'s inputs are applied in local space instead of global space. */ + make_input_local(event: InputEvent): InputEvent + + /** Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer. */ + set_visibility_layer_bit(layer: int64, enabled: boolean): void + + /** Returns an individual bit on the rendering visibility layer. */ + get_visibility_layer_bit(layer: int64): boolean + + /** If `true`, this [CanvasItem] is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return `true`). + * + * **Note:** For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple `popup*()` functions instead. + */ + get visible(): boolean + set visible(value: boolean) + + /** The color applied to this [CanvasItem]. This property does affect child [CanvasItem]s, unlike [member self_modulate] which only affects the node itself. */ + get modulate(): Color + set modulate(value: Color) + + /** The color applied to this [CanvasItem]. This property does **not** affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children. + * + * **Note:** Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see `include_internal` parameter of [method Node.get_child] and other similar methods). + */ + get self_modulate(): Color + set self_modulate(value: Color) + + /** If `true`, the object draws behind its parent. */ + get show_behind_parent(): boolean + set show_behind_parent(value: boolean) + + /** If `true`, this [CanvasItem] will *not* inherit its transform from parent [CanvasItem]s. Its draw order will also be changed to make it draw on top of other [CanvasItem]s that do not have [member top_level] set to `true`. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node]. */ + get top_level(): boolean + set top_level(value: boolean) + + /** Allows the current node to clip child nodes, essentially acting as a mask. */ + get clip_children(): int64 + set clip_children(value: int64) + + /** The rendering layers in which this [CanvasItem] responds to [Light2D] nodes. */ + get light_mask(): int64 + set light_mask(value: int64) + + /** The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask. */ + get visibility_layer(): int64 + set visibility_layer(value: int64) + + /** Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between [constant RenderingServer.CANVAS_ITEM_Z_MIN] and [constant RenderingServer.CANVAS_ITEM_Z_MAX] (inclusive). + * + * **Note:** Changing the Z index of a [Control] only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others. + */ + get z_index(): int64 + set z_index(value: int64) + + /** If `true`, the node's Z index is 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. */ + get z_as_relative(): boolean + set z_as_relative(value: boolean) + + /** If `true`, this and child [CanvasItem] nodes with a higher Y position are rendered in front of nodes with a lower Y position. If `false`, this and child [CanvasItem] nodes are rendered normally in scene tree order. + * With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. + * Nodes sort relative to each other only if they are on the same [member z_index]. + */ + get y_sort_enabled(): boolean + set y_sort_enabled(value: boolean) + + /** The texture filtering mode to use on this [CanvasItem]. */ + get texture_filter(): int64 + set texture_filter(value: int64) + + /** The texture repeating mode to use on this [CanvasItem]. */ + get texture_repeat(): int64 + set texture_repeat(value: int64) + + /** The material applied to this [CanvasItem]. */ + get material(): CanvasItemMaterial | ShaderMaterial + set material(value: CanvasItemMaterial | ShaderMaterial) + + /** If `true`, the parent [CanvasItem]'s [member material] property is used as this one's material. */ + get use_parent_material(): boolean + set use_parent_material(value: boolean) + + /** Emitted when the [CanvasItem] must redraw, *after* the related [constant NOTIFICATION_DRAW] notification, and *before* [method _draw] is called. + * + * **Note:** Deferred connections do not allow drawing through the `draw_*` methods. + */ + readonly draw: Signal0 + + /** Emitted when the visibility (hidden/visible) changes. */ + readonly visibility_changed: Signal0 + + /** Emitted when becoming hidden. */ + readonly hidden: Signal0 + + /** Emitted when the item's [Rect2] boundaries (position or size) have changed, or when an action is taking place that may have impacted these boundaries (e.g. changing [member Sprite2D.texture]). */ + readonly item_rect_changed: Signal0 + } + class CanvasItemEditor extends VBoxContainer { + constructor(identifier?: any) + _get_editor_data(_unnamed_arg0: Object): Object + update_viewport(): void + center_at(position: Vector2): void + _set_owner_for_node_and_children(_unnamed_arg0: Node, _unnamed_arg1: Node): void + readonly item_lock_status_changed: Signal0 + readonly item_group_status_changed: Signal0 + } + class CanvasItemEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class CanvasItemEditorSelectedItem extends Object { + constructor(identifier?: any) + } + class CanvasItemEditorViewport extends Control { + constructor(identifier?: any) + } + namespace CanvasItemMaterial { + enum BlendMode { + /** Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value. */ + BLEND_MODE_MIX = 0, + + /** Additive blending mode. */ + BLEND_MODE_ADD = 1, + + /** Subtractive blending mode. */ + BLEND_MODE_SUB = 2, + + /** Multiplicative blending mode. */ + BLEND_MODE_MUL = 3, + + /** Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. */ + BLEND_MODE_PREMULT_ALPHA = 4, + } + enum LightMode { + /** Render the material using both light and non-light sensitive material properties. */ + LIGHT_MODE_NORMAL = 0, + + /** Render the material as if there were no light. */ + LIGHT_MODE_UNSHADED = 1, + + /** Render the material as if there were only light. */ + LIGHT_MODE_LIGHT_ONLY = 2, + } + } + /** A material for [CanvasItem]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvasitemmaterial.html + */ + class CanvasItemMaterial extends Material { + constructor(identifier?: any) + /** The manner in which a material's rendering is applied to underlying textures. */ + get blend_mode(): int64 + set blend_mode(value: int64) + + /** The manner in which material reacts to lighting. */ + get light_mode(): int64 + set light_mode(value: int64) + + /** If `true`, enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticleProcessMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play. + * This property (and other `particles_anim_*` properties that depend on it) has no effect on other types of nodes. + */ + get particles_animation(): boolean + set particles_animation(value: boolean) + + /** The number of columns in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D]. + * + * **Note:** This property is only used and visible in the editor if [member particles_animation] is `true`. + */ + get particles_anim_h_frames(): int64 + set particles_anim_h_frames(value: int64) + + /** The number of rows in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D]. + * + * **Note:** This property is only used and visible in the editor if [member particles_animation] is `true`. + */ + get particles_anim_v_frames(): int64 + set particles_anim_v_frames(value: int64) + + /** If `true`, the particles animation will loop. + * + * **Note:** This property is only used and visible in the editor if [member particles_animation] is `true`. + */ + get particles_anim_loop(): boolean + set particles_anim_loop(value: boolean) + } + class CanvasItemMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + /** A node used for independent rendering of objects within a 2D scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvaslayer.html + */ + class CanvasLayer extends Node { + constructor(identifier?: any) + /** Shows any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to `true`. */ + show(): void + + /** Hides any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to `false`. */ + hide(): void + + /** Returns the transform from the [CanvasLayer]s coordinate system to the [Viewport]s coordinate system. */ + get_final_transform(): Transform2D + + /** Returns the RID of the canvas used by this layer. */ + get_canvas(): RID + + /** Layer index for draw order. Lower values are drawn behind higher values. + * + * **Note:** If multiple CanvasLayers have the same layer index, [CanvasItem] children of one CanvasLayer are drawn behind the [CanvasItem] children of the other CanvasLayer. Which CanvasLayer is drawn in front is non-deterministic. + */ + get layer(): int64 + set layer(value: int64) + + /** If `false`, any [CanvasItem] under this [CanvasLayer] will be hidden. + * Unlike [member CanvasItem.visible], visibility of a [CanvasLayer] isn't propagated to underlying layers. + */ + get visible(): boolean + set visible(value: boolean) + + /** The layer's base offset. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The layer's rotation in radians. */ + get rotation(): float64 + set rotation(value: float64) + + /** The layer's scale. */ + get scale(): Vector2 + set scale(value: Vector2) + + /** The layer's transform. */ + get transform(): Transform2D + set transform(value: Transform2D) + + /** The custom [Viewport] node assigned to the [CanvasLayer]. If `null`, uses the default viewport instead. */ + get custom_viewport(): Viewport + set custom_viewport(value: Viewport) + + /** If enabled, the [CanvasLayer] will use the viewport's transform, so it will move when camera moves instead of being anchored in a fixed position on the screen. + * Together with [member follow_viewport_scale] it can be used for a pseudo 3D effect. + */ + get follow_viewport_enabled(): boolean + set follow_viewport_enabled(value: boolean) + + /** Scales the layer when using [member follow_viewport_enabled]. Layers moving into the foreground should have increasing scales, while layers moving into the background should have decreasing scales. */ + get follow_viewport_scale(): float64 + set follow_viewport_scale(value: float64) + + /** Emitted when visibility of the layer is changed. See [member visible]. */ + readonly visibility_changed: Signal0 + } + /** A node that applies a color tint to a canvas. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvasmodulate.html + */ + class CanvasModulate extends Node2D { + constructor(identifier?: any) + /** The tint color to apply. */ + get color(): Color + set color(value: Color) + } + /** Texture with optional normal and specular maps for use in 2D rendering. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_canvastexture.html + */ + class CanvasTexture extends Texture2D { + constructor(identifier?: any) + /** The diffuse (color) texture to use. This is the main texture you want to set in most cases. */ + get diffuse_texture(): Texture2D + set diffuse_texture(value: Texture2D) + + /** The normal map texture to use. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. + * + * **Note:** Godot expects the normal map to use X+, Y+, and Z+ coordinates. See [url=http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates]this page[/url] for a comparison of normal map coordinates expected by popular engines. + */ + get normal_texture(): Texture2D + set normal_texture(value: Texture2D) + + /** The specular map to use for [Light2D] specular reflections. This should be a grayscale or colored texture, with brighter areas resulting in a higher [member specular_shininess] value. Using a colored [member specular_texture] allows controlling specular shininess on a per-channel basis. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. */ + get specular_texture(): Texture2D + set specular_texture(value: Texture2D) + + /** The multiplier for specular reflection colors. The [Light2D]'s color is also taken into account when determining the reflection color. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. */ + get specular_color(): Color + set specular_color(value: Color) + + /** The specular exponent for [Light2D] specular reflections. Higher values result in a more glossy/"wet" look, with reflections becoming more localized and less visible overall. The default value of `1.0` disables specular reflections entirely. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]. */ + get specular_shininess(): float64 + set specular_shininess(value: float64) + + /** The texture filtering mode to use when drawing this [CanvasTexture]. */ + get texture_filter(): int64 + set texture_filter(value: int64) + + /** The texture repeat mode to use when drawing this [CanvasTexture]. */ + get texture_repeat(): int64 + set texture_repeat(value: int64) + } + /** Class representing a capsule-shaped [PrimitiveMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_capsulemesh.html + */ + class CapsuleMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** Radius of the capsule mesh. */ + get radius(): float64 + set radius(value: float64) + + /** Total height of the capsule mesh (including the hemispherical ends). */ + get height(): float64 + set height(value: float64) + + /** Number of radial segments on the capsule mesh. */ + get radial_segments(): int64 + set radial_segments(value: int64) + + /** Number of rings along the height of the capsule. */ + get rings(): int64 + set rings(value: int64) + } + /** A 2D capsule shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_capsuleshape2d.html + */ + class CapsuleShape2D extends Shape2D { + constructor(identifier?: any) + /** The capsule's radius. */ + get radius(): float64 + set radius(value: float64) + + /** The capsule's height. */ + get height(): float64 + set height(value: float64) + } + /** A 3D capsule shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_capsuleshape3d.html + */ + class CapsuleShape3D extends Shape3D { + constructor(identifier?: any) + /** The capsule's radius. */ + get radius(): float64 + set radius(value: float64) + + /** The capsule's height. */ + get height(): float64 + set height(value: float64) + } + class Cast2DEditor extends Control { + constructor(identifier?: any) + } + class Cast2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A container that keeps child controls in its center. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_centercontainer.html + */ + class CenterContainer extends Container { + constructor(identifier?: any) + /** If `true`, centers children relative to the [CenterContainer]'s top left corner. */ + get use_top_left(): boolean + set use_top_left(value: boolean) + } + /** Controls how an individual character will be displayed in a [RichTextEffect]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_charfxtransform.html + */ + class CharFXTransform extends RefCounted { + constructor(identifier?: any) + /** The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects. */ + get transform(): Transform2D + set transform(value: Transform2D) + + /** Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. */ + get range(): Vector2i + set range(value: Vector2i) + + /** The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the [RichTextLabel] is paused (see [member Node.process_mode]). Resets when the text in the [RichTextLabel] is changed. + * + * **Note:** Time still passes while the [RichTextLabel] is hidden. + */ + get elapsed_time(): float64 + set elapsed_time(value: float64) + + /** If `true`, the character will be drawn. If `false`, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to `Color(1, 1, 1, 0)` instead. */ + get visible(): boolean + set visible(value: boolean) + + /** If `true`, FX transform is called for outline drawing. Setting this property won't affect drawing. */ + get outline(): boolean + set outline(value: boolean) + + /** The position offset the character will be drawn with (in pixels). */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The color the character will be drawn with. */ + get color(): Color + set color(value: Color) + + /** Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form `#rrggbb` or `#rgb` will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. + * For example, the opening BBCode tag `[example foo=hello bar=true baz=42 color=#ffffff]` will map to the following [Dictionary]: + * + */ + get env(): GDictionary + set env(value: GDictionary) + + /** Font specific glyph index. */ + get glyph_index(): int64 + set glyph_index(value: int64) + + /** Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. */ + get glyph_count(): int64 + set glyph_count(value: int64) + + /** Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing. */ + get glyph_flags(): int64 + set glyph_flags(value: int64) + + /** The character offset of the glyph, relative to the current [RichTextEffect] custom block. Setting this property won't affect drawing. */ + get relative_index(): int64 + set relative_index(value: int64) + + /** Font resource used to render glyph. */ + get font(): RID + set font(value: RID) + } + namespace CharacterBody2D { + enum MotionMode { + /** Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. */ + MOTION_MODE_GROUNDED = 0, + + /** Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games. */ + MOTION_MODE_FLOATING = 1, + } + enum PlatformOnLeave { + /** Add the last platform velocity to the [member velocity] when you leave a moving platform. */ + PLATFORM_ON_LEAVE_ADD_VELOCITY = 0, + + /** Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. */ + PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY = 1, + + /** Do nothing when leaving a platform. */ + PLATFORM_ON_LEAVE_DO_NOTHING = 2, + } + } + /** A 2D physics body specialized for characters moved by script. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_characterbody2d.html + */ + class CharacterBody2D extends PhysicsBody2D { + constructor(identifier?: any) + /** Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + * Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. + * When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + * The general behavior and available properties change according to the [member motion_mode]. + * Returns `true` if the body collided, otherwise, returns `false`. + */ + move_and_slide(): boolean + + /** Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns `true`. */ + apply_floor_snap(): void + + /** Returns `true` if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not. */ + is_on_floor(): boolean + + /** Returns `true` if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not. */ + is_on_floor_only(): boolean + + /** Returns `true` if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not. */ + is_on_ceiling(): boolean + + /** Returns `true` if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not. */ + is_on_ceiling_only(): boolean + + /** Returns `true` if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not. */ + is_on_wall(): boolean + + /** Returns `true` if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not. */ + is_on_wall_only(): boolean + + /** Returns the collision normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns `true`. + * **Warning:** The collision normal is not always the same as the surface normal. + */ + get_floor_normal(): Vector2 + + /** Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns `true`. + * **Warning:** The collision normal is not always the same as the surface normal. + */ + get_wall_normal(): Vector2 + + /** Returns the last motion applied to the [CharacterBody2D] during the last call to [method move_and_slide]. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. */ + get_last_motion(): Vector2 + + /** Returns the travel (position delta) that occurred during the last call to [method move_and_slide]. */ + get_position_delta(): Vector2 + + /** Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity. */ + get_real_velocity(): Vector2 + + /** Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns `true`. */ + get_floor_angle(up_direction: Vector2 = new Vector2(0, -1)): float64 + + /** Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. */ + get_platform_velocity(): Vector2 + + /** Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. */ + get_slide_collision_count(): int64 + + /** Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1). + * **Example usage:** + * + */ + get_slide_collision(slide_idx: int64): KinematicCollision2D + + /** Returns a [KinematicCollision2D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. */ + get_last_slide_collision(): KinematicCollision2D + + /** Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes. */ + get motion_mode(): int64 + set motion_mode(value: int64) + + /** Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [constant Vector2.UP]. As the vector will be normalized it can't be equal to [constant Vector2.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode]. */ + get up_direction(): Vector2 + set up_direction(value: Vector2) + + /** Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. */ + get velocity(): Vector2 + set velocity(value: Vector2) + + /** If `true`, during a jump against the ceiling, the body will slide, if `false` it will be stopped and will fall vertically. */ + get slide_on_ceiling(): boolean + set slide_on_ceiling(value: boolean) + + /** Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. */ + get max_slides(): int64 + set max_slides(value: int64) + + /** Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when [member motion_mode] is [constant MOTION_MODE_FLOATING]. */ + get wall_min_slide_angle(): float64 + set wall_min_slide_angle(value: float64) + + /** If `true`, the body will not slide on slopes when calling [method move_and_slide] when the body is standing still. + * If `false`, the body will slide on floor's slopes when [member velocity] applies a downward force. + */ + get floor_stop_on_slope(): boolean + set floor_stop_on_slope(value: boolean) + + /** If `false` (by default), the body will move faster on downward slopes and slower on upward slopes. + * If `true`, the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed. + */ + get floor_constant_speed(): boolean + set floor_constant_speed(value: boolean) + + /** If `true`, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. */ + get floor_block_on_wall(): boolean + set floor_block_on_wall(value: boolean) + + /** Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. */ + get floor_max_angle(): float64 + set floor_max_angle(value: float64) + + /** Sets a snapping distance. When set to a value different from `0.0`, the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. + * As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap]. + */ + get floor_snap_length(): float64 + set floor_snap_length(value: float64) + + /** Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior. */ + get platform_on_leave(): int64 + set platform_on_leave(value: int64) + + /** Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity. */ + get platform_floor_layers(): int64 + set platform_floor_layers(value: int64) + + /** Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored. */ + get platform_wall_layers(): int64 + set platform_wall_layers(value: int64) + + /** Extra margin used for collision recovery when calling [method move_and_slide]. + * If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + * A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + * A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + */ + get safe_margin(): float64 + set safe_margin(value: float64) + } + namespace CharacterBody3D { + enum MotionMode { + /** Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for grounded games like platformers. */ + MOTION_MODE_GROUNDED = 0, + + /** Apply when there is no notion of floor or ceiling. All collisions will be reported as `on_wall`. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games. */ + MOTION_MODE_FLOATING = 1, + } + enum PlatformOnLeave { + /** Add the last platform velocity to the [member velocity] when you leave a moving platform. */ + PLATFORM_ON_LEAVE_ADD_VELOCITY = 0, + + /** Add the last platform velocity to the [member velocity] when you leave a moving platform, but any downward motion is ignored. It's useful to keep full jump height even when the platform is moving down. */ + PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY = 1, + + /** Do nothing when leaving a platform. */ + PLATFORM_ON_LEAVE_DO_NOTHING = 2, + } + } + /** A 3D physics body specialized for characters moved by script. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_characterbody3d.html + */ + class CharacterBody3D extends PhysicsBody3D { + constructor(identifier?: any) + /** Moves the body based on [member velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + * Modifies [member velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision]. + * When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + * Returns `true` if the body collided, otherwise, returns `false`. + */ + move_and_slide(): boolean + + /** Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns `true`. */ + apply_floor_snap(): void + + /** Returns `true` if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not. */ + is_on_floor(): boolean + + /** Returns `true` if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "floor" or not. */ + is_on_floor_only(): boolean + + /** Returns `true` if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not. */ + is_on_ceiling(): boolean + + /** Returns `true` if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "ceiling" or not. */ + is_on_ceiling_only(): boolean + + /** Returns `true` if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not. */ + is_on_wall(): boolean + + /** Returns `true` if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns `false`. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is "wall" or not. */ + is_on_wall_only(): boolean + + /** Returns the collision normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns `true`. + * **Warning:** The collision normal is not always the same as the surface normal. + */ + get_floor_normal(): Vector3 + + /** Returns the collision normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns `true`. + * **Warning:** The collision normal is not always the same as the surface normal. + */ + get_wall_normal(): Vector3 + + /** Returns the last motion applied to the [CharacterBody3D] during the last call to [method move_and_slide]. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. */ + get_last_motion(): Vector3 + + /** Returns the travel (position delta) that occurred during the last call to [method move_and_slide]. */ + get_position_delta(): Vector3 + + /** Returns the current real velocity since the last call to [method move_and_slide]. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to [member velocity] which returns the requested velocity. */ + get_real_velocity(): Vector3 + + /** Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns `true`. */ + get_floor_angle(up_direction: Vector3 = Vector3.ZERO): float64 + + /** Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. */ + get_platform_velocity(): Vector3 + + /** Returns the angular velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. */ + get_platform_angular_velocity(): Vector3 + + /** Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. */ + get_slide_collision_count(): int64 + + /** Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1). */ + get_slide_collision(slide_idx: int64): KinematicCollision3D + + /** Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. */ + get_last_slide_collision(): KinematicCollision3D + + /** Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes. */ + get motion_mode(): int64 + set motion_mode(value: int64) + + /** Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [constant Vector3.UP]. As the vector will be normalized it can't be equal to [constant Vector3.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode]. */ + get up_direction(): Vector3 + set up_direction(value: Vector3) + + /** If `true`, during a jump against the ceiling, the body will slide, if `false` it will be stopped and will fall vertically. */ + get slide_on_ceiling(): boolean + set slide_on_ceiling(value: boolean) + + /** Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. */ + get velocity(): Vector3 + set velocity(value: Vector3) + + /** Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. */ + get max_slides(): int64 + set max_slides(value: int64) + + /** Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When [member motion_mode] is [constant MOTION_MODE_GROUNDED], it only affects movement if [member floor_block_on_wall] is `true`. */ + get wall_min_slide_angle(): float64 + set wall_min_slide_angle(value: float64) + + /** If `true`, the body will not slide on slopes when calling [method move_and_slide] when the body is standing still. + * If `false`, the body will slide on floor's slopes when [member velocity] applies a downward force. + */ + get floor_stop_on_slope(): boolean + set floor_stop_on_slope(value: boolean) + + /** If `false` (by default), the body will move faster on downward slopes and slower on upward slopes. + * If `true`, the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed. + */ + get floor_constant_speed(): boolean + set floor_constant_speed(value: boolean) + + /** If `true`, the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. */ + get floor_block_on_wall(): boolean + set floor_block_on_wall(value: boolean) + + /** Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. */ + get floor_max_angle(): float64 + set floor_max_angle(value: float64) + + /** Sets a snapping distance. When set to a value different from `0.0`, the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. + * As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap]. + */ + get floor_snap_length(): float64 + set floor_snap_length(value: float64) + + /** Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See [enum PlatformOnLeave] constants for available behavior. */ + get platform_on_leave(): int64 + set platform_on_leave(value: int64) + + /** Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all floor bodies are detected and propagate their velocity. */ + get platform_floor_layers(): int64 + set platform_floor_layers(value: int64) + + /** Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody3D]. By default, all wall bodies are ignored. */ + get platform_wall_layers(): int64 + set platform_wall_layers(value: int64) + + /** Extra margin used for collision recovery when calling [method move_and_slide]. + * If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. + * A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. + * A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. + */ + get safe_margin(): float64 + set safe_margin(value: float64) + } + /** A button that represents a binary choice. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_checkbox.html + */ + class CheckBox extends Button { + constructor(identifier?: any) + } + /** A button that represents a binary choice. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_checkbutton.html + */ + class CheckButton extends Button { + constructor(identifier?: any) + } + /** A 2D circle shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_circleshape2d.html + */ + class CircleShape2D extends Shape2D { + constructor(identifier?: any) + /** The circle's radius. */ + get radius(): float64 + set radius(value: float64) + } + namespace CodeEdit { + enum CodeCompletionKind { + /** Marks the option as a class. */ + KIND_CLASS = 0, + + /** Marks the option as a function. */ + KIND_FUNCTION = 1, + + /** Marks the option as a Godot signal. */ + KIND_SIGNAL = 2, + + /** Marks the option as a variable. */ + KIND_VARIABLE = 3, + + /** Marks the option as a member. */ + KIND_MEMBER = 4, + + /** Marks the option as an enum entry. */ + KIND_ENUM = 5, + + /** Marks the option as a constant. */ + KIND_CONSTANT = 6, + + /** Marks the option as a Godot node path. */ + KIND_NODE_PATH = 7, + + /** Marks the option as a file path. */ + KIND_FILE_PATH = 8, + + /** Marks the option as unclassified or plain text. */ + KIND_PLAIN_TEXT = 9, + } + enum CodeCompletionLocation { + /** The option is local to the location of the code completion query - e.g. a local variable. Subsequent value of location represent options from the outer class, the exact value represent how far they are (in terms of inner classes). */ + LOCATION_LOCAL = 0, + + /** The option is from the containing class or a parent class, relative to the location of the code completion query. Perform a bitwise OR with the class depth (e.g. `0` for the local class, `1` for the parent, `2` for the grandparent, etc.) to store the depth of an option in the class or a parent class. */ + LOCATION_PARENT_MASK = 256, + + /** The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons). */ + LOCATION_OTHER_USER_CODE = 512, + + /** The option is from other engine code, not covered by the other enum constants - e.g. built-in classes. */ + LOCATION_OTHER = 1024, + } + } + /** A multiline text editor designed for editing code. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_codeedit.html + */ + class CodeEdit extends TextEdit { + constructor(identifier?: any) + /** Override this method to define how the selected entry should be inserted. If [param replace] is `true`, any existing text should be replaced. */ + /* gdvirtual */ _confirm_code_completion(replace: boolean): void + + /** Override this method to define what happens when the user requests code completion. If [param force] is `true`, any checks should be bypassed. */ + /* gdvirtual */ _request_code_completion(force: boolean): void + + /** Override this method to define what items in [param candidates] should be displayed. + * Both [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. + */ + /* gdvirtual */ _filter_code_completion_candidates(candidates: GArray): GArray + + /** Perform an indent as if the user activated the "ui_text_indent" action. */ + do_indent(): void + + /** Indents selected lines, or in the case of no selection the caret line by one. */ + indent_lines(): void + + /** Unindents selected lines, or in the case of no selection the caret line by one. Same as performing "ui_text_unindent" action. */ + unindent_lines(): void + + /** Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces]. + * Values of `-1` convert the entire text. + */ + convert_indent(from_line: int64 = -1, to_line: int64 = -1): void + + /** Adds a brace pair. + * Both the start and end keys must be symbols. Only the start key has to be unique. + */ + add_auto_brace_completion_pair(start_key: string, end_key: string): void + + /** Returns `true` if open key [param open_key] exists. */ + has_auto_brace_completion_open_key(open_key: string): boolean + + /** Returns `true` if close key [param close_key] exists. */ + has_auto_brace_completion_close_key(close_key: string): boolean + + /** Gets the matching auto brace close key for [param open_key]. */ + get_auto_brace_completion_close_key(open_key: string): string + + /** Sets the line as breakpointed. */ + set_line_as_breakpoint(line: int64, breakpointed: boolean): void + + /** Returns whether the line at the specified index is breakpointed or not. */ + is_line_breakpointed(line: int64): boolean + + /** Clears all breakpointed lines. */ + clear_breakpointed_lines(): void + + /** Gets all breakpointed lines. */ + get_breakpointed_lines(): PackedInt32Array + + /** Sets the line as bookmarked. */ + set_line_as_bookmarked(line: int64, bookmarked: boolean): void + + /** Returns whether the line at the specified index is bookmarked or not. */ + is_line_bookmarked(line: int64): boolean + + /** Clears all bookmarked lines. */ + clear_bookmarked_lines(): void + + /** Gets all bookmarked lines. */ + get_bookmarked_lines(): PackedInt32Array + + /** Sets the line as executing. */ + set_line_as_executing(line: int64, executing: boolean): void + + /** Returns whether the line at the specified index is marked as executing or not. */ + is_line_executing(line: int64): boolean + + /** Clears all executed lines. */ + clear_executing_lines(): void + + /** Gets all executing lines. */ + get_executing_lines(): PackedInt32Array + + /** Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. */ + can_fold_line(line: int64): boolean + + /** Folds the given line, if possible (see [method can_fold_line]). */ + fold_line(line: int64): void + + /** Unfolds all lines that were previously folded. */ + unfold_line(line: int64): void + + /** Folds all lines that are possible to be folded (see [method can_fold_line]). */ + fold_all_lines(): void + + /** Unfolds all lines, folded or not. */ + unfold_all_lines(): void + + /** Toggle the folding of the code block at the given line. */ + toggle_foldable_line(line: int64): void + + /** Toggle the folding of the code block on all lines with a caret on them. */ + toggle_foldable_lines_at_carets(): void + + /** Returns whether the line at the specified index is folded or not. */ + is_line_folded(line: int64): boolean + + /** Returns all lines that are current folded. */ + get_folded_lines(): GArray + + /** Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see [method add_comment_delimiter]). + * A code region is a part of code that is highlighted when folded and can help organize your script. + * Code region start and end tags can be customized (see [method set_code_region_tags]). + * Code regions are delimited using start and end tags (respectively `region` and `endregion` by default) preceded by one line comment delimiter. (eg. `#region` and `#endregion`) + */ + create_code_region(): void + + /** Returns the code region start tag (without comment delimiter). */ + get_code_region_start_tag(): string + + /** Returns the code region end tag (without comment delimiter). */ + get_code_region_end_tag(): string + + /** Sets the code region start and end tags (without comment delimiter). */ + set_code_region_tags(start: string = 'region', end: string = 'endregion'): void + + /** Returns whether the line at the specified index is a code region start. */ + is_line_code_region_start(line: int64): boolean + + /** Returns whether the line at the specified index is a code region end. */ + is_line_code_region_end(line: int64): boolean + + /** Defines a string delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. + * If [param line_only] is `true` or [param end_key] is an empty [String], the region does not carry over to the next line. + */ + add_string_delimiter(start_key: string, end_key: string, line_only: boolean = false): void + + /** Removes the string delimiter with [param start_key]. */ + remove_string_delimiter(start_key: string): void + + /** Returns `true` if string [param start_key] exists. */ + has_string_delimiter(start_key: string): boolean + + /** Removes all string delimiters. */ + clear_string_delimiters(): void + + /** Returns the delimiter index if [param line] [param column] is in a string. If [param column] is not provided, will return the delimiter index if the entire [param line] is a string. Otherwise `-1`. */ + is_in_string(line: int64, column: int64 = -1): int64 + + /** Adds a comment delimiter from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. + * If [param line_only] is `true` or [param end_key] is an empty [String], the region does not carry over to the next line. + */ + add_comment_delimiter(start_key: string, end_key: string, line_only: boolean = false): void + + /** Removes the comment delimiter with [param start_key]. */ + remove_comment_delimiter(start_key: string): void + + /** Returns `true` if comment [param start_key] exists. */ + has_comment_delimiter(start_key: string): boolean + + /** Removes all comment delimiters. */ + clear_comment_delimiters(): void + + /** Returns delimiter index if [param line] [param column] is in a comment. If [param column] is not provided, will return delimiter index if the entire [param line] is a comment. Otherwise `-1`. */ + is_in_comment(line: int64, column: int64 = -1): int64 + + /** Gets the start key for a string or comment region index. */ + get_delimiter_start_key(delimiter_index: int64): string + + /** Gets the end key for a string or comment region index. */ + get_delimiter_end_key(delimiter_index: int64): string + + /** If [param line] [param column] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be `-1`. */ + get_delimiter_start_position(line: int64, column: int64): Vector2 + + /** If [param line] [param column] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be `-1`. */ + get_delimiter_end_position(line: int64, column: int64): Vector2 + + /** Sets the code hint text. Pass an empty string to clear. */ + set_code_hint(code_hint: string): void + + /** Sets if the code hint should draw below the text. */ + set_code_hint_draw_below(draw_below: boolean): void + + /** Returns the full text with char `0xFFFF` at the caret location. */ + get_text_for_code_completion(): string + + /** Emits [signal code_completion_requested], if [param force] is `true` will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal. */ + request_code_completion(force: boolean = false): void + + /** Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. + * [param location] indicates location of the option relative to the location of the code completion query. See [enum CodeEdit.CodeCompletionLocation] for how to set this value. + * + * **Note:** This list will replace all current candidates. + */ + add_code_completion_option(type: CodeEdit.CodeCompletionKind, display_text: string, insert_text: string, text_color: Color = new Color(1, 1, 1, 1), icon: Resource = undefined, value: any = {}, location: int64 = 1024): void + + /** Submits all completion options added with [method add_code_completion_option]. Will try to force the autocomplete menu to popup, if [param force] is `true`. + * + * **Note:** This will replace all current candidates. + */ + update_code_completion_options(force: boolean): void + + /** Gets all completion options, see [method get_code_completion_option] for return content. */ + get_code_completion_options(): GArray + + /** Gets the completion option at [param index]. The return [Dictionary] has the following key-values: + * `kind`: [enum CodeCompletionKind] + * `display_text`: Text that is shown on the autocomplete menu. + * `insert_text`: Text that is to be inserted when this item is selected. + * `font_color`: Color of the text on the autocomplete menu. + * `icon`: Icon to draw on the autocomplete menu. + * `default_value`: Value of the symbol. + */ + get_code_completion_option(index: int64): GDictionary + + /** Gets the index of the current selected completion option. */ + get_code_completion_selected_index(): int64 + + /** Sets the current selected completion option. */ + set_code_completion_selected_index(index: int64): void + + /** Inserts the selected entry into the text. If [param replace] is `true`, any existing text is replaced rather than merged. */ + confirm_code_completion(replace: boolean = false): void + + /** Cancels the autocomplete menu. */ + cancel_code_completion(): void + + /** Returns the full text with char `0xFFFF` at the cursor location. */ + get_text_for_symbol_lookup(): string + + /** Returns the full text with char `0xFFFF` at the specified location. */ + get_text_with_cursor_char(line: int64, column: int64): string + + /** Sets the symbol emitted by [signal symbol_validate] as a valid lookup. */ + set_symbol_lookup_word_as_valid(valid: boolean): void + + /** Moves all lines up that are selected or have a caret on them. */ + move_lines_up(): void + + /** Moves all lines down that are selected or have a caret on them. */ + move_lines_down(): void + + /** Deletes all lines that are selected or have a caret on them. */ + delete_lines(): void + + /** Duplicates all selected text and duplicates all lines with a caret on them. */ + duplicate_selection(): void + + /** Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line. */ + duplicate_lines(): void + + /** Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted. */ + get symbol_lookup_on_click(): boolean + set symbol_lookup_on_click(value: boolean) + + /** Sets whether line folding is allowed. */ + get line_folding(): boolean + set line_folding(value: boolean) + + /** Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. */ + get line_length_guidelines(): PackedInt32Array + set line_length_guidelines(value: PackedInt32Array | int32[]) + + /** Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. */ + get gutters_draw_breakpoints_gutter(): boolean + set gutters_draw_breakpoints_gutter(value: boolean) + + /** Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. */ + get gutters_draw_bookmarks(): boolean + set gutters_draw_bookmarks(value: boolean) + + /** Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. */ + get gutters_draw_executing_lines(): boolean + set gutters_draw_executing_lines(value: boolean) + + /** Sets if line numbers should be drawn in the gutter. */ + get gutters_draw_line_numbers(): boolean + set gutters_draw_line_numbers(value: boolean) + + /** Sets if line numbers drawn in the gutter are zero padded. */ + get gutters_zero_pad_line_numbers(): boolean + set gutters_zero_pad_line_numbers(value: boolean) + + /** Sets if foldable lines icons should be drawn in the gutter. */ + get gutters_draw_fold_gutter(): boolean + set gutters_draw_fold_gutter(value: boolean) + + /** Sets the string delimiters. All existing string delimiters will be removed. */ + get delimiter_strings(): PackedStringArray + set delimiter_strings(value: PackedStringArray | string[]) + + /** Sets the comment delimiters. All existing comment delimiters will be removed. */ + get delimiter_comments(): PackedStringArray + set delimiter_comments(value: PackedStringArray | string[]) + + /** Sets whether code completion is allowed. */ + get code_completion_enabled(): boolean + set code_completion_enabled(value: boolean) + + /** Sets prefixes that will trigger code completion. */ + get code_completion_prefixes(): PackedStringArray + set code_completion_prefixes(value: PackedStringArray | string[]) + + /** Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If [member indent_use_spaces] is enabled the number of spaces to use. */ + get indent_size(): int64 + set indent_size(value: int64) + + /** Use spaces instead of tabs for indentation. */ + get indent_use_spaces(): boolean + set indent_use_spaces(value: boolean) + + /** Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. */ + get indent_automatic(): boolean + set indent_automatic(value: boolean) + + /** Prefixes to trigger an automatic indent. */ + get indent_automatic_prefixes(): PackedStringArray + set indent_automatic_prefixes(value: PackedStringArray | string[]) + + /** Sets whether brace pairs should be autocompleted. */ + get auto_brace_completion_enabled(): boolean + set auto_brace_completion_enabled(value: boolean) + + /** Highlight mismatching brace pairs. */ + get auto_brace_completion_highlight_matching(): boolean + set auto_brace_completion_highlight_matching(value: boolean) + + /** Sets the brace pairs to be autocompleted. */ + get auto_brace_completion_pairs(): GDictionary + set auto_brace_completion_pairs(value: GDictionary) + + /** Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. */ + readonly breakpoint_toggled: Signal1 + + /** Emitted when the user requests code completion. */ + readonly code_completion_requested: Signal0 + + /** Emitted when the user has clicked on a valid symbol. */ + readonly symbol_lookup: Signal3 + + /** Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling [method set_symbol_lookup_word_as_valid]. */ + readonly symbol_validate: Signal1 + } +} diff --git a/godot/typings/godot2.gen.d.ts b/godot/typings/godot2.gen.d.ts new file mode 100644 index 0000000..e56eadf --- /dev/null +++ b/godot/typings/godot2.gen.d.ts @@ -0,0 +1,9353 @@ +// AUTO-GENERATED +/// +declare module "godot" { + /** A syntax highlighter intended for code. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_codehighlighter.html + */ + class CodeHighlighter extends SyntaxHighlighter { + constructor(identifier?: any) + /** Sets the color for a keyword. + * The keyword cannot contain any symbols except '_'. + */ + add_keyword_color(keyword: string, color: Color): void + + /** Removes the keyword. */ + remove_keyword_color(keyword: string): void + + /** Returns `true` if the keyword exists, else `false`. */ + has_keyword_color(keyword: string): boolean + + /** Returns the color for a keyword. */ + get_keyword_color(keyword: string): Color + + /** Removes all keywords. */ + clear_keyword_colors(): void + + /** Sets the color for a member keyword. + * The member keyword cannot contain any symbols except '_'. + * It will not be highlighted if preceded by a '.'. + */ + add_member_keyword_color(member_keyword: string, color: Color): void + + /** Removes the member keyword. */ + remove_member_keyword_color(member_keyword: string): void + + /** Returns `true` if the member keyword exists, else `false`. */ + has_member_keyword_color(member_keyword: string): boolean + + /** Returns the color for a member keyword. */ + get_member_keyword_color(member_keyword: string): Color + + /** Removes all member keywords. */ + clear_member_keyword_colors(): void + + /** Adds a color region (such as for comments or strings) from [param start_key] to [param end_key]. Both keys should be symbols, and [param start_key] must not be shared with other delimiters. + * If [param line_only] is `true` or [param end_key] is an empty [String], the region does not carry over to the next line. + */ + add_color_region(start_key: string, end_key: string, color: Color, line_only: boolean = false): void + + /** Removes the color region that uses that start key. */ + remove_color_region(start_key: string): void + + /** Returns `true` if the start key exists, else `false`. */ + has_color_region(start_key: string): boolean + + /** Removes all color regions. */ + clear_color_regions(): void + + /** Sets the color for numbers. */ + get number_color(): Color + set number_color(value: Color) + + /** Sets the color for symbols. */ + get symbol_color(): Color + set symbol_color(value: Color) + + /** Sets color for functions. A function is a non-keyword string followed by a '('. */ + get function_color(): Color + set function_color(value: Color) + + /** Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. */ + get member_variable_color(): Color + set member_variable_color(value: Color) + + /** Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color. */ + get keyword_colors(): GDictionary + set keyword_colors(value: GDictionary) + + /** Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color. */ + get member_keyword_colors(): GDictionary + set member_keyword_colors(value: GDictionary) + + /** Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color. */ + get color_regions(): GDictionary + set color_regions(value: GDictionary) + } + class CodeTextEditor extends VBoxContainer { + constructor(identifier?: any) + readonly validate_script: Signal0 + readonly load_theme_settings: Signal0 + readonly show_errors_panel: Signal0 + readonly show_warnings_panel: Signal0 + readonly zoomed: Signal1 + } + namespace CollisionObject2D { + enum DisableMode { + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject2D]. + * Automatically re-added to the physics simulation when the [Node] is processed again. + */ + DISABLE_MODE_REMOVE = 0, + + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. [PhysicsBody2D] can't be affected by forces or other bodies while static. + * Automatically set [PhysicsBody2D] back to its original mode when the [Node] is processed again. + */ + DISABLE_MODE_MAKE_STATIC = 1, + + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. */ + DISABLE_MODE_KEEP_ACTIVE = 2, + } + } + /** Abstract base class for 2D physics objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionobject2d.html + */ + class CollisionObject2D extends Node2D { + constructor(identifier?: any) + /** Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to [signal input_event] to easily pick up these events. + * + * **Note:** [method _input_event] requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. + */ + /* gdvirtual */ _input_event(viewport: Viewport, event: InputEvent, shape_idx: int64): void + + /** Called when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called. */ + /* gdvirtual */ _mouse_enter(): void + + /** Called when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this function to be called. */ + /* gdvirtual */ _mouse_exit(): void + + /** Called when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be called. */ + /* gdvirtual */ _mouse_shape_enter(shape_idx: int64): void + + /** Called when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be called. */ + /* gdvirtual */ _mouse_shape_exit(shape_idx: int64): void + + /** Returns the object's [RID]. */ + get_rid(): RID + + /** Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. */ + set_collision_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_layer_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference. */ + create_shape_owner(owner: Object): int64 + + /** Removes the given shape owner. */ + remove_shape_owner(owner_id: int64): void + + /** Returns an [Array] of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument. */ + get_shape_owners(): PackedInt32Array + + /** Sets the [Transform2D] of the given shape owner. */ + shape_owner_set_transform(owner_id: int64, transform: Transform2D): void + + /** Returns the shape owner's [Transform2D]. */ + shape_owner_get_transform(owner_id: int64): Transform2D + + /** Returns the parent object of the given shape owner. */ + shape_owner_get_owner(owner_id: int64): Object + + /** If `true`, disables the given shape owner. */ + shape_owner_set_disabled(owner_id: int64, disabled: boolean): void + + /** If `true`, the shape owner and its shapes are disabled. */ + is_shape_owner_disabled(owner_id: int64): boolean + + /** If [param enable] is `true`, collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. */ + shape_owner_set_one_way_collision(owner_id: int64, enable: boolean): void + + /** Returns `true` if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. */ + is_shape_owner_one_way_collision_enabled(owner_id: int64): boolean + + /** Sets the `one_way_collision_margin` of the shape owner identified by given [param owner_id] to [param margin] pixels. */ + shape_owner_set_one_way_collision_margin(owner_id: int64, margin: float64): void + + /** Returns the `one_way_collision_margin` of the shape owner identified by given [param owner_id]. */ + get_shape_owner_one_way_collision_margin(owner_id: int64): float64 + + /** Adds a [Shape2D] to the shape owner. */ + shape_owner_add_shape(owner_id: int64, shape: Shape2D): void + + /** Returns the number of shapes the given shape owner contains. */ + shape_owner_get_shape_count(owner_id: int64): int64 + + /** Returns the [Shape2D] with the given ID from the given shape owner. */ + shape_owner_get_shape(owner_id: int64, shape_id: int64): Shape2D + + /** Returns the child index of the [Shape2D] with the given ID from the given shape owner. */ + shape_owner_get_shape_index(owner_id: int64, shape_id: int64): int64 + + /** Removes a shape from the given shape owner. */ + shape_owner_remove_shape(owner_id: int64, shape_id: int64): void + + /** Removes all shapes from the shape owner. */ + shape_owner_clear_shapes(owner_id: int64): void + + /** Returns the `owner_id` of the given shape. */ + shape_find_owner(shape_index: int64): int64 + + /** Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. */ + get disable_mode(): int64 + set disable_mode(value: int64) + + /** The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + * + * **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + */ + get collision_layer(): int64 + set collision_layer(value: int64) + + /** The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + * + * **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. */ + get collision_priority(): float64 + set collision_priority(value: float64) + + /** 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. Requires at least one [member collision_layer] bit to be set. */ + get input_pickable(): boolean + set input_pickable(value: boolean) + + /** Emitted when an input event occurs. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. See [method _input_event] for details. */ + readonly input_event: Signal3 + + /** Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. + * + * **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question. + */ + readonly mouse_entered: Signal0 + + /** Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. + * + * **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject2D]'s area is small. This signal may also not be emitted if another [CollisionObject2D] is overlapping the [CollisionObject2D] in question. + */ + readonly mouse_exited: Signal0 + + /** Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [param shape_idx] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. */ + readonly mouse_shape_entered: Signal1 + + /** Emitted when the mouse pointer exits any of this object's shapes. [param shape_idx] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be `true` and at least one [member collision_layer] bit to be set. */ + readonly mouse_shape_exited: Signal1 + } + namespace CollisionObject3D { + enum DisableMode { + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject3D]. + * Automatically re-added to the physics simulation when the [Node] is processed again. + */ + DISABLE_MODE_REMOVE = 0, + + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area3D]. [PhysicsBody3D] can't be affected by forces or other bodies while static. + * Automatically set [PhysicsBody3D] back to its original mode when the [Node] is processed again. + */ + DISABLE_MODE_MAKE_STATIC = 1, + + /** When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. */ + DISABLE_MODE_KEEP_ACTIVE = 2, + } + } + /** Abstract base class for 3D physics objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionobject3d.html + */ + class CollisionObject3D extends Node3D { + constructor(identifier?: any) + /** Receives unhandled [InputEvent]s. [param event_position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. + * + * **Note:** [method _input_event] requires [member input_ray_pickable] to be `true` and at least one [member collision_layer] bit to be set. + */ + /* gdvirtual */ _input_event(camera: Camera3D, event: InputEvent, event_position: Vector3, normal: Vector3, shape_idx: int64): void + + /** Called when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called. */ + /* gdvirtual */ _mouse_enter(): void + + /** Called when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be `true` and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject3D] won't cause this function to be called. */ + /* gdvirtual */ _mouse_exit(): void + + /** Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. */ + set_collision_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_layer_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** Returns the object's [RID]. */ + get_rid(): RID + + /** Creates a new shape owner for the given object. Returns `owner_id` of the new owner for future reference. */ + create_shape_owner(owner: Object): int64 + + /** Removes the given shape owner. */ + remove_shape_owner(owner_id: int64): void + + /** Returns an [Array] of `owner_id` identifiers. You can use these ids in other methods that take `owner_id` as an argument. */ + get_shape_owners(): PackedInt32Array + + /** Sets the [Transform3D] of the given shape owner. */ + shape_owner_set_transform(owner_id: int64, transform: Transform3D): void + + /** Returns the shape owner's [Transform3D]. */ + shape_owner_get_transform(owner_id: int64): Transform3D + + /** Returns the parent object of the given shape owner. */ + shape_owner_get_owner(owner_id: int64): Object + + /** If `true`, disables the given shape owner. */ + shape_owner_set_disabled(owner_id: int64, disabled: boolean): void + + /** If `true`, the shape owner and its shapes are disabled. */ + is_shape_owner_disabled(owner_id: int64): boolean + + /** Adds a [Shape3D] to the shape owner. */ + shape_owner_add_shape(owner_id: int64, shape: Shape3D): void + + /** Returns the number of shapes the given shape owner contains. */ + shape_owner_get_shape_count(owner_id: int64): int64 + + /** Returns the [Shape3D] with the given ID from the given shape owner. */ + shape_owner_get_shape(owner_id: int64, shape_id: int64): Shape3D + + /** Returns the child index of the [Shape3D] with the given ID from the given shape owner. */ + shape_owner_get_shape_index(owner_id: int64, shape_id: int64): int64 + + /** Removes a shape from the given shape owner. */ + shape_owner_remove_shape(owner_id: int64, shape_id: int64): void + + /** Removes all shapes from the shape owner. */ + shape_owner_clear_shapes(owner_id: int64): void + + /** Returns the `owner_id` of the given shape. */ + shape_find_owner(shape_index: int64): int64 + + /** Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. */ + get disable_mode(): int64 + set disable_mode(value: int64) + + /** The physics layers this CollisionObject3D **is in**. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + * + * **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + */ + get collision_layer(): int64 + set collision_layer(value: int64) + + /** The physics layers this CollisionObject3D **scans**. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + * + * **Note:** Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. */ + get collision_priority(): float64 + set collision_priority(value: float64) + + /** 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. Requires at least one [member collision_layer] bit to be set. */ + get input_ray_pickable(): boolean + set input_ray_pickable(value: boolean) + + /** If `true`, the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes. */ + get input_capture_on_drag(): boolean + set input_capture_on_drag(value: boolean) + + /** Emitted when the object receives an unhandled [InputEvent]. [param event_position] is the location in world space of the mouse pointer on the surface of the shape with index [param shape_idx] and [param normal] is the normal vector of the surface at that point. */ + readonly input_event: Signal5 + + /** Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be `true` and at least one [member collision_layer] bit to be set. + * + * **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject3D]'s area is small. This signal may also not be emitted if another [CollisionObject3D] is overlapping the [CollisionObject3D] in question. + */ + readonly mouse_entered: Signal0 + + /** Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be `true` and at least one [member collision_layer] bit to be set. + * + * **Note:** Due to the lack of continuous collision detection, this signal may not be emitted in the expected order if the mouse moves fast enough and the [CollisionObject3D]'s area is small. This signal may also not be emitted if another [CollisionObject3D] is overlapping the [CollisionObject3D] in question. + */ + readonly mouse_exited: Signal0 + } + class CollisionObject3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + namespace CollisionPolygon2D { + enum BuildMode { + /** Collisions will include the polygon and its contained area. In this mode the node has the same effect as several [ConvexPolygonShape2D] nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes). */ + BUILD_SOLIDS = 0, + + /** Collisions will only include the polygon edges. In this mode the node has the same effect as a single [ConcavePolygonShape2D] made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon). */ + BUILD_SEGMENTS = 1, + } + } + /** A node that provides a polygon shape to a [CollisionObject2D] parent. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionpolygon2d.html + */ + class CollisionPolygon2D extends Node2D { + constructor(identifier?: any) + /** Collision build mode. Use one of the [enum BuildMode] constants. */ + get build_mode(): int64 + set build_mode(value: int64) + + /** The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first. + * + * **Note:** The returned vertices are in the local coordinate space of the given [CollisionPolygon2D]. + */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + + /** If `true`, no collisions will be detected. */ + get disabled(): boolean + set disabled(value: boolean) + + /** If `true`, only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. + * + * **Note:** This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node. + */ + get one_way_collision(): boolean + set one_way_collision(value: boolean) + + /** The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity. */ + get one_way_collision_margin(): float64 + set one_way_collision_margin(value: float64) + } + class CollisionPolygon2DEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + } + class CollisionPolygon2DEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + /** A node that provides a thickened polygon shape (a prism) to a [CollisionObject3D] parent. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionpolygon3d.html + */ + class CollisionPolygon3D extends Node3D { + constructor(identifier?: any) + _is_editable_3d_polygon(): boolean + + /** Length that the resulting collision extends in either direction perpendicular to its 2D polygon. */ + get depth(): float64 + set depth(value: float64) + + /** If `true`, no collision will be produced. */ + get disabled(): boolean + set disabled(value: boolean) + + /** Array of vertices which define the 2D polygon in the local XY plane. */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + + /** The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details. */ + get margin(): float64 + set margin(value: float64) + } + class CollisionPolygon3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** A node that provides a [Shape2D] to a [CollisionObject2D] parent. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionshape2d.html + */ + class CollisionShape2D extends Node2D { + constructor(identifier?: any) + /** The actual shape owned by this collision shape. */ + get shape(): Shape2D + set shape(value: Shape2D) + + /** A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]. */ + get disabled(): boolean + set disabled(value: boolean) + + /** Sets whether this collision shape should only detect collision on one side (top or bottom). + * + * **Note:** This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node. + */ + get one_way_collision(): boolean + set one_way_collision(value: boolean) + + /** The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the shape at a high velocity. */ + get one_way_collision_margin(): float64 + set one_way_collision_margin(value: float64) + + /** The collision shape debug color. + * + * **Note:** The default value is [member ProjectSettings.debug/shapes/collision/shape_color]. The `Color(0, 0, 0, 1)` value documented here is a placeholder, and not the actual default debug color. + */ + get debug_color(): Color + set debug_color(value: Color) + } + class CollisionShape2DEditor extends Control { + constructor(identifier?: any) + } + class CollisionShape2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A node that provides a [Shape3D] to a [CollisionObject3D] parent. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_collisionshape3d.html + */ + class CollisionShape3D extends Node3D { + constructor(identifier?: any) + /** This method does nothing. */ + resource_changed(resource: Resource): void + + /** Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry. */ + make_convex_from_siblings(): void + + /** The actual shape owned by this collision shape. */ + get shape(): Shape3D + set shape(value: Shape3D) + + /** A disabled collision shape has no effect in the world. */ + get disabled(): boolean + set disabled(value: boolean) + } + class CollisionShape3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + namespace ColorPicker { + enum ColorModeType { + /** Allows editing the color with Red/Green/Blue sliders. */ + MODE_RGB = 0, + + /** Allows editing the color with Hue/Saturation/Value sliders. */ + MODE_HSV = 1, + + /** Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). */ + MODE_RAW = 2, + + /** Allows editing the color with Hue/Saturation/Lightness sliders. + * OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue. + * [url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url] + */ + MODE_OKHSL = 3, + } + enum PickerShapeType { + /** HSV Color Model rectangle color space. */ + SHAPE_HSV_RECTANGLE = 0, + + /** HSV Color Model rectangle color space with a wheel. */ + SHAPE_HSV_WHEEL = 1, + + /** HSV Color Model circle color space. Use Saturation as a radius. */ + SHAPE_VHS_CIRCLE = 2, + + /** HSL OK Color Model circle color space. */ + SHAPE_OKHSL_CIRCLE = 3, + + /** The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. */ + SHAPE_NONE = 4, + } + } + /** A widget that provides an interface for selecting or modifying a color. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_colorpicker.html + */ + class ColorPicker extends VBoxContainer { + constructor(identifier?: any) + /** Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. + * + * **Note:** The presets list is only for *this* color picker. + */ + add_preset(color: Color): void + + /** Removes the given color from the list of color presets of this color picker. */ + erase_preset(color: Color): void + + /** Returns the list of colors in the presets of the color picker. */ + get_presets(): PackedColorArray + + /** Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color. + * + * **Note:** The recent presets list is only for *this* color picker. + */ + add_recent_preset(color: Color): void + + /** Removes the given color from the list of color recent presets of this color picker. */ + erase_recent_preset(color: Color): void + + /** Returns the list of colors in the recent presets of the color picker. */ + get_recent_presets(): PackedColorArray + + /** The currently selected color. */ + get color(): Color + set color(value: Color) + + /** If `true`, shows an alpha channel slider (opacity). */ + get edit_alpha(): boolean + set edit_alpha(value: boolean) + + /** The currently selected color mode. See [enum ColorModeType]. */ + get color_mode(): int64 + set color_mode(value: int64) + + /** If `true`, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). */ + get deferred_mode(): boolean + set deferred_mode(value: boolean) + + /** The shape of the color space view. See [enum PickerShapeType]. */ + get picker_shape(): int64 + set picker_shape(value: int64) + + /** If `true`, it's possible to add presets under Swatches. If `false`, the button to add presets is disabled. */ + get can_add_swatches(): boolean + set can_add_swatches(value: boolean) + + /** If `true`, the color sampler and color preview are visible. */ + get sampler_visible(): boolean + set sampler_visible(value: boolean) + + /** If `true`, the color mode buttons are visible. */ + get color_modes_visible(): boolean + set color_modes_visible(value: boolean) + + /** If `true`, the color sliders are visible. */ + get sliders_visible(): boolean + set sliders_visible(value: boolean) + + /** If `true`, the hex color code input field is visible. */ + get hex_visible(): boolean + set hex_visible(value: boolean) + + /** If `true`, the Swatches and Recent Colors presets are visible. */ + get presets_visible(): boolean + set presets_visible(value: boolean) + + /** Emitted when the color is changed. */ + readonly color_changed: Signal1 + + /** Emitted when a preset is added. */ + readonly preset_added: Signal1 + + /** Emitted when a preset is removed. */ + readonly preset_removed: Signal1 + } + /** A button that brings up a [ColorPicker] when pressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_colorpickerbutton.html + */ + class ColorPickerButton extends Button { + constructor(identifier?: any) + /** Returns the [ColorPicker] that this node toggles. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_picker(): ColorPicker + + /** Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. + */ + get_popup(): PopupPanel + _about_to_popup(): void + + /** The currently selected color. */ + get color(): Color + set color(value: Color) + + /** If `true`, the alpha channel in the displayed [ColorPicker] will be visible. */ + get edit_alpha(): boolean + set edit_alpha(value: boolean) + + /** Emitted when the color changes. */ + readonly color_changed: Signal1 + + /** Emitted when the [ColorPicker] is closed. */ + readonly popup_closed: Signal0 + + /** Emitted when the [ColorPicker] is created (the button is pressed for the first time). */ + readonly picker_created: Signal0 + } + /** A control that displays a solid color rectangle. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_colorrect.html + */ + class ColorRect extends Control { + constructor(identifier?: any) + /** The fill color of the rectangle. */ + get color(): Color + set color(value: Color) + } + /** Stores attributes used to customize how a Viewport is rendered. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compositor.html + */ + class Compositor extends Resource { + constructor(identifier?: any) + /** The custom [CompositorEffect]s that are applied during rendering of viewports using this compositor. */ + get compositor_effects(): GArray + set compositor_effects(value: GArray) + } + namespace CompositorEffect { + enum EffectCallbackType { + /** The callback is called before our opaque rendering pass, but after depth prepass (if applicable). */ + EFFECT_CALLBACK_TYPE_PRE_OPAQUE = 0, + + /** The callback is called after our opaque rendering pass, but before our sky is rendered. */ + EFFECT_CALLBACK_TYPE_POST_OPAQUE = 1, + + /** The callback is called after our sky is rendered, but before our back buffers are created (and if enabled, before subsurface scattering and/or screen space reflections). */ + EFFECT_CALLBACK_TYPE_POST_SKY = 2, + + /** The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers. */ + EFFECT_CALLBACK_TYPE_PRE_TRANSPARENT = 3, + + /** The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target. */ + EFFECT_CALLBACK_TYPE_POST_TRANSPARENT = 4, + + /** Represents the size of the [enum EffectCallbackType] enum. */ + EFFECT_CALLBACK_TYPE_MAX = 5, + } + } + /** This resource allows for creating a custom rendering effect. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compositoreffect.html + */ + class CompositorEffect extends Resource { + constructor(identifier?: any) + /** Implement this function with your custom rendering code. [param effect_callback_type] should always match the effect callback type you've specified in [member effect_callback_type]. [param render_data] provides access to the rendering state, it is only valid during rendering and should not be stored. */ + /* gdvirtual */ _render_callback(effect_callback_type: int64, render_data: RenderData): void + + /** If `true` this rendering effect is applied to any viewport it is added to. */ + get enabled(): boolean + set enabled(value: boolean) + + /** The type of effect that is implemented, determines at what stage of rendering the callback is called. */ + get effect_callback_type(): int64 + set effect_callback_type(value: int64) + + /** If `true` and MSAA is enabled, this will trigger a color buffer resolve before the effect is run. + * + * **Note:** In [method _render_callback], to access the resolved buffer use: + * + */ + get access_resolved_color(): boolean + set access_resolved_color(value: boolean) + + /** If `true` and MSAA is enabled, this will trigger a depth buffer resolve before the effect is run. + * + * **Note:** In [method _render_callback], to access the resolved buffer use: + * + */ + get access_resolved_depth(): boolean + set access_resolved_depth(value: boolean) + + /** If `true` this triggers motion vectors being calculated during the opaque render state. + * + * **Note:** In [method _render_callback], to access the motion vector buffer use: + * + */ + get needs_motion_vectors(): boolean + set needs_motion_vectors(value: boolean) + + /** If `true` this triggers normal and roughness data to be output during our depth pre-pass, only applicable for the Forward+ renderer. + * + * **Note:** In [method _render_callback], to access the roughness buffer use: + * + */ + get needs_normal_roughness(): boolean + set needs_normal_roughness(value: boolean) + + /** If `true` this triggers specular data being rendered to a separate buffer and combined after effects have been applied, only applicable for the Forward+ renderer. */ + get needs_separate_specular(): boolean + set needs_separate_specular(value: boolean) + } + /** An optionally compressed [Cubemap]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedcubemap.html + */ + class CompressedCubemap extends CompressedTextureLayered { + constructor(identifier?: any) + } + /** An optionally compressed [CubemapArray]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedcubemaparray.html + */ + class CompressedCubemapArray extends CompressedTextureLayered { + constructor(identifier?: any) + } + /** Texture with 2 dimensions, optionally compressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedtexture2d.html + */ + class CompressedTexture2D extends Texture2D { + constructor(identifier?: any) + /** The [CompressedTexture2D]'s file path to a `.ctex` file. */ + get load_path(): string + set load_path(value: string) + } + /** Array of 2-dimensional textures, optionally compressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedtexture2darray.html + */ + class CompressedTexture2DArray extends CompressedTextureLayered { + constructor(identifier?: any) + } + /** Texture with 3 dimensions, optionally compressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedtexture3d.html + */ + class CompressedTexture3D extends Texture3D { + constructor(identifier?: any) + /** The [CompressedTexture3D]'s file path to a `.ctex3d` file. */ + get load_path(): string + set load_path(value: string) + } + /** Base class for texture arrays that can optionally be compressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_compressedtexturelayered.html + */ + class CompressedTextureLayered extends TextureLayered { + constructor(identifier?: any) + /** The path the texture should be loaded from. */ + get load_path(): string + set load_path(value: string) + } + /** A 2D polyline shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_concavepolygonshape2d.html + */ + class ConcavePolygonShape2D extends Shape2D { + constructor(identifier?: any) + /** The array of points that make up the [ConcavePolygonShape2D]'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment. */ + get segments(): PackedVector2Array + set segments(value: PackedVector2Array | Vector2[]) + } + /** A 3D trimesh shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_concavepolygonshape3d.html + */ + class ConcavePolygonShape3D extends Shape3D { + constructor(identifier?: any) + get data(): PackedVector3Array + set data(value: PackedVector3Array | Vector3[]) + + /** If set to `true`, collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals. */ + get backface_collision(): boolean + set backface_collision(value: boolean) + } + namespace ConeTwistJoint3D { + enum Param { + /** 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 along the swing axis. + * Could be defined as looseness in the [ConeTwistJoint3D]. + * If below 0.05, this behavior is locked. + */ + PARAM_SWING_SPAN = 0, + + /** 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_TWIST_SPAN = 1, + + /** The speed with which the swing or twist will take place. + * The higher, the faster. + */ + PARAM_BIAS = 2, + + /** The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. */ + PARAM_SOFTNESS = 3, + + /** Defines, how fast the swing- and twist-speed-difference on both sides gets synced. */ + PARAM_RELAXATION = 4, + + /** Represents the size of the [enum Param] enum. */ + PARAM_MAX = 5, + } + } + /** A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_conetwistjoint3d.html + */ + class ConeTwistJoint3D extends Joint3D { + constructor(identifier?: any) + /** Sets the value of the specified parameter. */ + set_param(param: ConeTwistJoint3D.Param, value: float64): void + + /** Returns the value of the specified parameter. */ + get_param(param: ConeTwistJoint3D.Param): float64 + + /** 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 along the swing axis. + * Could be defined as looseness in the [ConeTwistJoint3D]. + * If below 0.05, this behavior is locked. + */ + get swing_span(): float64 + set swing_span(value: float64) + + /** Twist is the rotation around the twist axis, this value defined how far the joint can twist. + * Twist is locked if below 0.05. + */ + get twist_span(): float64 + set twist_span(value: float64) + + /** The speed with which the swing or twist will take place. + * The higher, the faster. + */ + get bias(): float64 + set bias(value: float64) + + /** The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. */ + get softness(): float64 + set softness(value: float64) + + /** Defines, how fast the swing- and twist-speed-difference on both sides gets synced. */ + get relaxation(): float64 + set relaxation(value: float64) + } + /** Helper class to handle INI-style files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_configfile.html + */ + class ConfigFile extends RefCounted { + constructor(identifier?: any) + /** Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a `null` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. */ + set_value(section: string, key: string, value: any): void + + /** Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [param default] value. If [param default] is not specified or set to `null`, an error is also raised. */ + get_value(section: string, key: string, default_: any = {}): any + + /** Returns `true` if the specified section exists. */ + has_section(section: string): boolean + + /** Returns `true` if the specified section-key pair exists. */ + has_section_key(section: string, key: string): boolean + + /** Returns an array of all defined section identifiers. */ + get_sections(): PackedStringArray + + /** Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist. */ + get_section_keys(section: string): PackedStringArray + + /** Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. */ + erase_section(section: string): void + + /** Deletes the specified key in a section. Raises an error if either the section or the key do not exist. */ + erase_section_key(section: string, key: string): void + + /** Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + load(path: string): GError + + /** Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + parse(data: string): GError + + /** Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + save(path: string): GError + + /** Obtain the text version of this config file (the same text that would be written to a file). */ + encode_to_text(): string + + /** Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + load_encrypted(path: string, key: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + load_encrypted_pass(path: string, password: string): GError + + /** Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + save_encrypted(path: string, key: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure. + * Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed. + */ + save_encrypted_pass(path: string, password: string): GError + + /** Removes the entire contents of the config. */ + clear(): void + } + /** A dialog used for confirmation of actions. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_confirmationdialog.html + */ + class ConfirmationDialog extends AcceptDialog { + constructor(identifier?: any) + /** Returns the cancel button. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_cancel_button(): Button + + /** The text displayed by the cancel button (see [method get_cancel_button]). */ + get cancel_button_text(): string + set cancel_button_text(value: string) + } + class ConnectDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly connected: Signal0 + } + class ConnectDialogBinds extends Object { + constructor(identifier?: any) + } + class ConnectionInfoDialog extends AcceptDialog { + constructor(identifier?: any) + } + class ConnectionsDock extends VBoxContainer { + constructor(identifier?: any) + update_tree(): void + } + /** Base class for all GUI containers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_container.html + */ + class Container extends Control { + /** Notification just before children are going to be sorted, in case there's something to process beforehand. */ + static readonly NOTIFICATION_PRE_SORT_CHILDREN = 50 + + /** Notification for when sorting the children, it must be obeyed immediately. */ + static readonly NOTIFICATION_SORT_CHILDREN = 51 + constructor(identifier?: any) + + /** Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. + * + * **Note:** Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. + */ + /* gdvirtual */ _get_allowed_size_flags_horizontal(): PackedInt32Array + + /** Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. + * + * **Note:** Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. + */ + /* gdvirtual */ _get_allowed_size_flags_vertical(): PackedInt32Array + + /** Queue resort of the contained children. This is called automatically anyway, but can be called upon request. */ + queue_sort(): void + + /** Fit a child control in a given rect. This is mainly a helper for creating custom container classes. */ + fit_child_in_rect(child: Control, rect: Rect2): void + + /** Emitted when children are going to be sorted. */ + readonly pre_sort_children: Signal0 + + /** Emitted when sorting the children is needed. */ + readonly sort_children: Signal0 + } + namespace Control { + enum FocusMode { + /** The node cannot grab focus. Use with [member focus_mode]. */ + FOCUS_NONE = 0, + + /** The node can only grab focus on mouse clicks. Use with [member focus_mode]. */ + FOCUS_CLICK = 1, + + /** The node can grab focus on mouse click, using the arrows and the Tab keys on the keyboard, or using the D-pad buttons on a gamepad. Use with [member focus_mode]. */ + FOCUS_ALL = 2, + } + enum CursorShape { + /** Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape]. */ + CURSOR_ARROW = 0, + + /** Show the system's I-beam mouse cursor when the user hovers the node. The I-beam pointer has a shape similar to "I". It tells the user they can highlight or insert text. */ + CURSOR_IBEAM = 1, + + /** Show the system's pointing hand mouse cursor when the user hovers the node. */ + CURSOR_POINTING_HAND = 2, + + /** Show the system's cross mouse cursor when the user hovers the node. */ + CURSOR_CROSS = 3, + + /** Show the system's wait mouse cursor when the user hovers the node. Often an hourglass. */ + CURSOR_WAIT = 4, + + /** Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass. */ + CURSOR_BUSY = 5, + + /** Show the system's drag mouse cursor, often a closed fist or a cross symbol, when the user hovers the node. It tells the user they're currently dragging an item, like a node in the Scene dock. */ + CURSOR_DRAG = 6, + + /** Show the system's drop mouse cursor when the user hovers the node. It can be an open hand. It tells the user they can drop an item they're currently grabbing, like a node in the Scene dock. */ + CURSOR_CAN_DROP = 7, + + /** Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. */ + CURSOR_FORBIDDEN = 8, + + /** Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. */ + CURSOR_VSIZE = 9, + + /** Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. */ + CURSOR_HSIZE = 10, + + /** Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. */ + CURSOR_BDIAGSIZE = 11, + + /** Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. */ + CURSOR_FDIAGSIZE = 12, + + /** Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. */ + CURSOR_MOVE = 13, + + /** Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_VSIZE]. */ + CURSOR_VSPLIT = 14, + + /** Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_HSIZE]. */ + CURSOR_HSPLIT = 15, + + /** Show the system's help mouse cursor when the user hovers the node, a question mark. */ + CURSOR_HELP = 16, + } + enum LayoutPreset { + /** Snap all 4 anchors to the top-left of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_TOP_LEFT = 0, + + /** Snap all 4 anchors to the top-right of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_TOP_RIGHT = 1, + + /** Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_BOTTOM_LEFT = 2, + + /** Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_BOTTOM_RIGHT = 3, + + /** Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_CENTER_LEFT = 4, + + /** Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_CENTER_TOP = 5, + + /** Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_CENTER_RIGHT = 6, + + /** Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_CENTER_BOTTOM = 7, + + /** Snap all 4 anchors to the center of the parent control's bounds. Use with [method set_anchors_preset]. */ + PRESET_CENTER = 8, + + /** Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with [method set_anchors_preset]. */ + PRESET_LEFT_WIDE = 9, + + /** Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. */ + PRESET_TOP_WIDE = 10, + + /** Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with [method set_anchors_preset]. */ + PRESET_RIGHT_WIDE = 11, + + /** Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with [method set_anchors_preset]. */ + PRESET_BOTTOM_WIDE = 12, + + /** Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with [method set_anchors_preset]. */ + PRESET_VCENTER_WIDE = 13, + + /** Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset]. */ + PRESET_HCENTER_WIDE = 14, + + /** Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the [Control] will fit its parent control. Use with [method set_anchors_preset]. */ + PRESET_FULL_RECT = 15, + } + enum LayoutPresetMode { + /** The control will be resized to its minimum size. */ + PRESET_MODE_MINSIZE = 0, + + /** The control's width will not change. */ + PRESET_MODE_KEEP_WIDTH = 1, + + /** The control's height will not change. */ + PRESET_MODE_KEEP_HEIGHT = 2, + + /** The control's size will not change. */ + PRESET_MODE_KEEP_SIZE = 3, + } + enum SizeFlags { + /** Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + * + * **Note:** Setting this flag is equal to not having any size flags. + */ + SIZE_SHRINK_BEGIN = 0, + + /** Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. */ + SIZE_FILL = 1, + + /** Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical]. */ + SIZE_EXPAND = 2, + + /** Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information. */ + SIZE_EXPAND_FILL = 3, + + /** Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. */ + SIZE_SHRINK_CENTER = 4, + + /** Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. */ + SIZE_SHRINK_END = 8, + } + enum MouseFilter { + /** The control will receive mouse movement input events and mouse button input events if clicked on through [method _gui_input]. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. */ + MOUSE_FILTER_STOP = 0, + + /** The control will receive mouse movement input events and mouse button input events if clicked on through [method _gui_input]. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to [method Node._shortcut_input] for further processing. */ + MOUSE_FILTER_PASS = 1, + + /** The control will not receive mouse movement input events and mouse button input events if clicked on through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. + * + * **Note:** If the control has received [signal mouse_entered] but not [signal mouse_exited], changing the [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] will cause [signal mouse_exited] to be emitted. + */ + MOUSE_FILTER_IGNORE = 2, + } + enum GrowDirection { + /** The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. */ + GROW_DIRECTION_BEGIN = 0, + + /** The control will grow to the right or bottom to make up if its minimum size is changed to be greater than its current size on the respective axis. */ + GROW_DIRECTION_END = 1, + + /** The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size. */ + GROW_DIRECTION_BOTH = 2, + } + enum Anchor { + /** Snaps one of the 4 anchor's sides to the origin of the node's `Rect`, in the top left. Use it with one of the `anchor_*` member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]. */ + ANCHOR_BEGIN = 0, + + /** Snaps one of the 4 anchor's sides to the end of the node's `Rect`, in the bottom right. Use it with one of the `anchor_*` member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]. */ + ANCHOR_END = 1, + } + enum LayoutDirection { + /** Automatic layout direction, determined from the parent control layout direction. */ + LAYOUT_DIRECTION_INHERITED = 0, + + /** Automatic layout direction, determined from the current locale. */ + LAYOUT_DIRECTION_LOCALE = 1, + + /** Left-to-right layout direction. */ + LAYOUT_DIRECTION_LTR = 2, + + /** Right-to-left layout direction. */ + LAYOUT_DIRECTION_RTL = 3, + } + enum TextDirection { + /** Text writing direction is the same as layout direction. */ + TEXT_DIRECTION_INHERITED = 3, + + /** Automatic text writing direction, determined from the current locale and text content. */ + TEXT_DIRECTION_AUTO = 0, + + /** Left-to-right text writing direction. */ + TEXT_DIRECTION_LTR = 1, + + /** Right-to-left text writing direction. */ + TEXT_DIRECTION_RTL = 2, + } + } + /** Base class for all GUI controls. Adapts its position and size based on its parent control. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_control.html + */ + class Control extends CanvasItem { + /** Sent when the node changes size. Use [member size] to get the new size. */ + static readonly NOTIFICATION_RESIZED = 40 + + /** Sent when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect which Control receives the notification. + * See also [constant NOTIFICATION_MOUSE_ENTER_SELF]. + */ + static readonly NOTIFICATION_MOUSE_ENTER = 41 + + /** Sent when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect which Control receives the notification. + * See also [constant NOTIFICATION_MOUSE_EXIT_SELF]. + */ + static readonly NOTIFICATION_MOUSE_EXIT = 42 + + /** Sent when the mouse cursor enters the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect which Control receives the notification. + * See also [constant NOTIFICATION_MOUSE_ENTER]. + */ + static readonly NOTIFICATION_MOUSE_ENTER_SELF = 60 + + /** Sent when the mouse cursor leaves the control's visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect which Control receives the notification. + * See also [constant NOTIFICATION_MOUSE_EXIT]. + */ + static readonly NOTIFICATION_MOUSE_EXIT_SELF = 61 + + /** Sent when the node grabs focus. */ + static readonly NOTIFICATION_FOCUS_ENTER = 43 + + /** Sent when the node loses focus. */ + static readonly NOTIFICATION_FOCUS_EXIT = 44 + + /** Sent when the node needs to refresh its theme items. This happens in one of the following cases: + * - The [member theme] property is changed on this node or any of its ancestors. + * - The [member theme_type_variation] property is changed on this node. + * - One of the node's theme property overrides is changed. + * - The node enters the scene tree. + * + * **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. + * + * **Note:** This notification is received alongside [constant Node.NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method Node.is_node_ready]. + * + */ + static readonly NOTIFICATION_THEME_CHANGED = 45 + + /** Sent when this node is inside a [ScrollContainer] which has begun being scrolled when dragging the scrollable area *with a touch event* . This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + * + * **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled. + */ + static readonly NOTIFICATION_SCROLL_BEGIN = 47 + + /** Sent when this node is inside a [ScrollContainer] which has stopped being scrolled when dragging the scrollable area *with a touch event* . This notification is *not* sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events. + * + * **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled. + */ + static readonly NOTIFICATION_SCROLL_END = 48 + + /** Sent when control layout direction is changed. */ + static readonly NOTIFICATION_LAYOUT_DIRECTION_CHANGED = 49 + constructor(identifier?: any) + + /** Virtual method to be implemented by the user. Returns whether the given [param point] is inside this control. + * If not overridden, default behavior is checking if the point is within control's Rect. + * + * **Note:** If you want to check if a point is inside the control, you can use `Rect2(Vector2.ZERO, size).has_point(point)`. + */ + /* gdvirtual */ _has_point(point: Vector2): boolean + + /** User defined BiDi algorithm override function. + * Returns an [Array] of [Vector3i] text ranges and text base directions, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately. + */ + /* gdvirtual */ _structured_text_parser(args: GArray, text: string): GArray + + /** Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member custom_minimum_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). + * If not overridden, defaults to [constant Vector2.ZERO]. + * + * **Note:** This method will not be called when the script is attached to a [Control] node that already overrides its minimum size (e.g. [Label], [Button], [PanelContainer] etc.). It can only be used with most basic GUI nodes, like [Control], [Container], [Panel] etc. + */ + /* gdvirtual */ _get_minimum_size(): Vector2 + + /** Virtual method to be implemented by the user. Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. See [method get_tooltip]. + * + * **Note:** If this method returns an empty [String], no tooltip is displayed. + */ + /* gdvirtual */ _get_tooltip(at_position: Vector2): string + + /** Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns `null` if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [param at_position] is local to this control. Drag may be forced with [method force_drag]. + * A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. + * + */ + /* gdvirtual */ _get_drag_data(at_position: Vector2): any + + /** Godot calls this method to test if [param data] from a control's [method _get_drag_data] can be dropped at [param at_position]. [param at_position] is local to this control. + * This method should only be used to test the data. Process the data in [method _drop_data]. + * + */ + /* gdvirtual */ _can_drop_data(at_position: Vector2, data: any): boolean + + /** Godot calls this method to pass you the [param data] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [param data] is allowed to drop at [param at_position] where [param at_position] is local to this control. + * + */ + /* gdvirtual */ _drop_data(at_position: Vector2, data: any): void + + /** Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [param for_text] includes the contents of the [member tooltip_text] property. + * The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When `null` or a non-Control node is returned, the default tooltip will be used instead. + * The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type `"TooltipPanel"` (see [member tooltip_text] for an example). + * + * **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value. + * + * **Note:** The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. + * **Example of usage with a custom-constructed node:** + * + * **Example of usage with a custom scene instance:** + * + */ + /* gdvirtual */ _make_custom_tooltip(for_text: string): Object + + /** Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event]. + * **Example usage for clicking a control:** + * + * The event won't trigger if: + * * clicking outside the control (see [method _has_point]); + * * control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; + * * control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; + * * control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event; + * * it happens outside the parent's rectangle and the parent has either [member clip_contents] enabled. + * + * **Note:** Event position is relative to the control origin. + */ + /* gdvirtual */ _gui_input(event: InputEvent): void + + /** Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. + * + * **Note:** This does not affect the methods in [Input], only the way events are propagated. + */ + accept_event(): void + + /** Returns the minimum size for this control. See [member custom_minimum_size]. */ + get_minimum_size(): Vector2 + + /** Returns combined minimum size from [member custom_minimum_size] and [method get_minimum_size]. */ + get_combined_minimum_size(): Vector2 + + /** Sets the anchors to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. + * If [param keep_offsets] is `true`, control's position will also be updated. + */ + set_anchors_preset(preset: Control.LayoutPreset, keep_offsets: boolean = false): void + + /** Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. + * Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [constant PRESET_LEFT_WIDE]. + * Use parameter [param margin] to determine the gap between the [Control] and the edges. + */ + set_offsets_preset(preset: Control.LayoutPreset, resize_mode: Control.LayoutPresetMode = 0, margin: int64 = 0): void + + /** Sets both anchor preset and offset preset. See [method set_anchors_preset] and [method set_offsets_preset]. */ + set_anchors_and_offsets_preset(preset: Control.LayoutPreset, resize_mode: Control.LayoutPresetMode = 0, margin: int64 = 0): void + _set_anchor(side: Side, anchor: float64): void + + /** Sets the anchor for the specified [enum Side] to [param anchor]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. + * If [param keep_offset] is `true`, offsets aren't updated after this operation. + * If [param push_opposite_anchor] is `true` and the opposite anchor overlaps this anchor, the opposite one will have its value overridden. For example, when setting left anchor to 1 and the right anchor has value of 0.5, the right anchor will also get value of 1. If [param push_opposite_anchor] was `false`, the left anchor would get value 0.5. + */ + set_anchor(side: Side, anchor: float64, keep_offset: boolean = false, push_opposite_anchor: boolean = true): void + + /** Returns the anchor for the specified [enum Side]. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. */ + get_anchor(side: Side): float64 + + /** Sets the offset for the specified [enum Side] to [param offset]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. */ + set_offset(side: Side, offset: float64): void + + /** Returns the offset for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. */ + get_offset(offset: Side): float64 + + /** Works the same as [method set_anchor], but instead of `keep_offset` argument and automatic update of offset, it allows to set the offset yourself (see [method set_offset]). */ + set_anchor_and_offset(side: Side, anchor: float64, offset: float64, push_opposite_anchor: boolean = false): void + + /** Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member position]. */ + set_begin(position: Vector2): void + + /** Sets [member offset_right] and [member offset_bottom] at the same time. */ + set_end(position: Vector2): void + + /** Sets the [member position] to given [param position]. + * If [param keep_offsets] is `true`, control's anchors will be updated instead of offsets. + */ + set_position(position: Vector2, keep_offsets: boolean = false): void + + /** Sets the size (see [member size]). + * If [param keep_offsets] is `true`, control's anchors will be updated instead of offsets. + */ + set_size(size: Vector2, keep_offsets: boolean = false): void + + /** Resets the size to [method get_combined_minimum_size]. This is equivalent to calling `set_size(Vector2())` (or any size below the minimum). */ + reset_size(): void + + /** Sets the [member global_position] to given [param position]. + * If [param keep_offsets] is `true`, control's anchors will be updated instead of offsets. + */ + set_global_position(position: Vector2, keep_offsets: boolean = false): void + + /** Returns [member offset_left] and [member offset_top]. See also [member position]. */ + get_begin(): Vector2 + + /** Returns [member offset_right] and [member offset_bottom]. */ + get_end(): Vector2 + + /** Returns the width/height occupied in the parent control. */ + get_parent_area_size(): Vector2 + + /** Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. + * Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]). + * **Example usage for showing a popup:** + * + */ + get_screen_position(): Vector2 + + /** Returns the position and size of the control in the coordinate system of the containing node. See [member position], [member scale] and [member size]. + * + * **Note:** If [member rotation] is not the default rotation, the resulting size is not meaningful. + * + * **Note:** Setting [member Viewport.gui_snap_controls_to_pixels] to `true` can lead to rounding inaccuracies between the displayed control and the returned [Rect2]. + */ + get_rect(): Rect2 + + /** Returns the position and size of the control relative to the containing canvas. See [member global_position] and [member size]. + * + * **Note:** If the node itself or any parent [CanvasItem] between the node and the canvas have a non default rotation or skew, the resulting size is likely not meaningful. + * + * **Note:** Setting [member Viewport.gui_snap_controls_to_pixels] to `true` can lead to rounding inaccuracies between the displayed control and the returned [Rect2]. + */ + get_global_rect(): Rect2 + + /** Returns `true` if this is the current focused control. See [member focus_mode]. */ + has_focus(): boolean + + /** Steal the focus from another control and become the focused control (see [member focus_mode]). + * + * **Note:** Using this method together with [method Callable.call_deferred] makes it more reliable, especially when called inside [method Node._ready]. + */ + grab_focus(): void + + /** Give up the focus. No other control will be able to receive input. */ + release_focus(): void + + /** Finds the previous (above in the tree) [Control] that can receive the focus. */ + find_prev_valid_focus(): Control + + /** Finds the next (below in the tree) [Control] that can receive the focus. */ + find_next_valid_focus(): Control + + /** Finds the next [Control] that can receive the focus on the specified [enum Side]. + * + * **Note:** This is different from [method get_focus_neighbor], which returns the path of a specified focus neighbor. + */ + find_valid_focus_neighbor(side: Side): Control + + /** Prevents `*_theme_*_override` methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called. */ + begin_bulk_theme_override(): void + + /** Ends a bulk theme override update. See [method begin_bulk_theme_override]. */ + end_bulk_theme_override(): void + + /** Creates a local override for a theme icon with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. + * See also [method get_theme_icon]. + */ + add_theme_icon_override(name: StringName, texture: Texture2D): void + + /** Creates a local override for a theme [StyleBox] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. + * See also [method get_theme_stylebox]. + * **Example of modifying a property in a StyleBox by duplicating it:** + * + */ + add_theme_stylebox_override(name: StringName, stylebox: StyleBox): void + + /** Creates a local override for a theme [Font] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. + * See also [method get_theme_font]. + */ + add_theme_font_override(name: StringName, font: Font): void + + /** Creates a local override for a theme font size with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. + * See also [method get_theme_font_size]. + */ + add_theme_font_size_override(name: StringName, font_size: int64): void + + /** Creates a local override for a theme [Color] with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. + * See also [method get_theme_color]. + * **Example of overriding a label's color and resetting it later:** + * + */ + add_theme_color_override(name: StringName, color: Color): void + + /** Creates a local override for a theme constant with the specified [param name]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. + * See also [method get_theme_constant]. + */ + add_theme_constant_override(name: StringName, constant: int64): void + + /** Removes a local override for a theme icon with the specified [param name] previously added by [method add_theme_icon_override] or via the Inspector dock. */ + remove_theme_icon_override(name: StringName): void + + /** Removes a local override for a theme [StyleBox] with the specified [param name] previously added by [method add_theme_stylebox_override] or via the Inspector dock. */ + remove_theme_stylebox_override(name: StringName): void + + /** Removes a local override for a theme [Font] with the specified [param name] previously added by [method add_theme_font_override] or via the Inspector dock. */ + remove_theme_font_override(name: StringName): void + + /** Removes a local override for a theme font size with the specified [param name] previously added by [method add_theme_font_size_override] or via the Inspector dock. */ + remove_theme_font_size_override(name: StringName): void + + /** Removes a local override for a theme [Color] with the specified [param name] previously added by [method add_theme_color_override] or via the Inspector dock. */ + remove_theme_color_override(name: StringName): void + + /** Removes a local override for a theme constant with the specified [param name] previously added by [method add_theme_constant_override] or via the Inspector dock. */ + remove_theme_constant_override(name: StringName): void + + /** Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + get_theme_icon(name: StringName, theme_type: StringName = ''): Texture2D + + /** Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + get_theme_stylebox(name: StringName, theme_type: StringName = ''): StyleBox + + /** Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + get_theme_font(name: StringName, theme_type: StringName = ''): Font + + /** Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + get_theme_font_size(name: StringName, theme_type: StringName = ''): int64 + + /** Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [param name] and [param theme_type]. If [param theme_type] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. + * For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, the custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used (see [ThemeDB]). + * + */ + get_theme_color(name: StringName, theme_type: StringName = ''): Color + + /** Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + get_theme_constant(name: StringName, theme_type: StringName = ''): int64 + + /** Returns `true` if there is a local override for a theme icon with the specified [param name] in this [Control] node. + * See [method add_theme_icon_override]. + */ + has_theme_icon_override(name: StringName): boolean + + /** Returns `true` if there is a local override for a theme [StyleBox] with the specified [param name] in this [Control] node. + * See [method add_theme_stylebox_override]. + */ + has_theme_stylebox_override(name: StringName): boolean + + /** Returns `true` if there is a local override for a theme [Font] with the specified [param name] in this [Control] node. + * See [method add_theme_font_override]. + */ + has_theme_font_override(name: StringName): boolean + + /** Returns `true` if there is a local override for a theme font size with the specified [param name] in this [Control] node. + * See [method add_theme_font_size_override]. + */ + has_theme_font_size_override(name: StringName): boolean + + /** Returns `true` if there is a local override for a theme [Color] with the specified [param name] in this [Control] node. + * See [method add_theme_color_override]. + */ + has_theme_color_override(name: StringName): boolean + + /** Returns `true` if there is a local override for a theme constant with the specified [param name] in this [Control] node. + * See [method add_theme_constant_override]. + */ + has_theme_constant_override(name: StringName): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has an icon item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_icon(name: StringName, theme_type: StringName = ''): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has a stylebox item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_stylebox(name: StringName, theme_type: StringName = ''): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has a font item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_font(name: StringName, theme_type: StringName = ''): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has a font size item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_font_size(name: StringName, theme_type: StringName = ''): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has a color item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_color(name: StringName, theme_type: StringName = ''): boolean + + /** Returns `true` if there is a matching [Theme] in the tree that has a constant item with the specified [param name] and [param theme_type]. + * See [method get_theme_color] for details. + */ + has_theme_constant(name: StringName, theme_type: StringName = ''): boolean + + /** Returns the default base scale value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_base_scale] value. + * See [method get_theme_color] for details. + */ + get_theme_default_base_scale(): float64 + + /** Returns the default font from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font] value. + * See [method get_theme_color] for details. + */ + get_theme_default_font(): Font + + /** Returns the default font size value from the first matching [Theme] in the tree if that [Theme] has a valid [member Theme.default_font_size] value. + * See [method get_theme_color] for details. + */ + get_theme_default_font_size(): int64 + + /** Returns the parent control node. */ + get_parent_control(): Control + + /** Returns the tooltip text for the position [param at_position] in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text]. + * This method can be overridden to customize its behavior. See [method _get_tooltip]. + * + * **Note:** If this method returns an empty [String], no tooltip is displayed. + */ + get_tooltip(at_position: Vector2 = Vector2.ZERO): string + + /** Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape]. */ + get_cursor_shape(position: Vector2 = Vector2.ZERO): Control.CursorShape + + /** Sets the focus neighbor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. */ + set_focus_neighbor(side: Side, neighbor: NodePath | string): void + + /** Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. + * + * **Note:** To find the next [Control] on the specific [enum Side], even if a neighbor is not assigned, use [method find_valid_focus_neighbor]. + */ + get_focus_neighbor(side: Side): NodePath + + /** Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [param data] and [param preview]. Drag will start even if the mouse is neither over nor pressed on this control. + * The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data. + */ + force_drag(data: any, preview: Control): void + + /** Creates an [InputEventMouseButton] that attempts to click the control. If the event is received, the control acquires focus. + * + */ + grab_click_focus(): void + + /** Forwards the handling of this control's [method _get_drag_data], [method _can_drop_data] and [method _drop_data] virtual functions to delegate callables. + * For each argument, if not empty, the delegate callable is used, otherwise the local (virtual) function is used. + * The function format for each callable should be exactly the same as the virtual functions described above. + */ + set_drag_forwarding(drag_func: Callable, can_drop_func: Callable, drop_func: Callable): void + + /** Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. + * + */ + set_drag_preview(control: Control): void + + /** Returns `true` if a drag operation is successful. Alternative to [method Viewport.gui_is_drag_successful]. + * Best used with [constant Node.NOTIFICATION_DRAG_END]. + */ + is_drag_successful(): boolean + + /** Moves the mouse cursor to [param position], relative to [member position] of this [Control]. + * + * **Note:** [method warp_mouse] is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. + */ + warp_mouse(position: Vector2): void + + /** Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member custom_minimum_size] directly calls this method automatically. */ + update_minimum_size(): void + + /** Returns `true` if layout is right-to-left. */ + is_layout_rtl(): boolean + + /** Enables whether rendering of [CanvasItem] based children should be clipped to this control's rectangle. If `true`, parts of a child which would be visibly outside of this control's rectangle will not be rendered and won't receive input. */ + get clip_contents(): boolean + set clip_contents(value: boolean) + + /** 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. Note that [Control] nodes have their internal minimum size returned by [method get_minimum_size]. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see [method get_combined_minimum_size]). */ + get custom_minimum_size(): Vector2 + set custom_minimum_size(value: Vector2) + + /** Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). */ + get layout_direction(): int64 + set layout_direction(value: int64) + get layout_mode(): int64 + set layout_mode(value: int64) + get anchors_preset(): int64 + set anchors_preset(value: int64) + + /** Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. */ + get anchor_left(): float64 + set anchor_left(value: float64) + + /** Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. */ + get anchor_top(): float64 + set anchor_top(value: float64) + + /** Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. */ + get anchor_right(): float64 + set anchor_right(value: float64) + + /** Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. */ + get anchor_bottom(): float64 + set anchor_bottom(value: float64) + + /** Distance between the node's left edge and its parent control, based on [member anchor_left]. + * Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. + */ + get offset_left(): int64 + set offset_left(value: int64) + + /** Distance between the node's top edge and its parent control, based on [member anchor_top]. + * Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. + */ + get offset_top(): int64 + set offset_top(value: int64) + + /** Distance between the node's right edge and its parent control, based on [member anchor_right]. + * Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. + */ + get offset_right(): int64 + set offset_right(value: int64) + + /** Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. + * Offsets are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Offsets update automatically when you move or resize the node. + */ + get offset_bottom(): int64 + set offset_bottom(value: int64) + + /** Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. */ + get grow_horizontal(): int64 + set grow_horizontal(value: int64) + + /** Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. */ + get grow_vertical(): int64 + set grow_vertical(value: int64) + + /** The size of the node's bounding rectangle, in the node's coordinate system. [Container] nodes update this property automatically. */ + get size(): Vector2 + set size(value: Vector2) + + /** The node's position, relative to its containing node. It corresponds to the rectangle's top-left corner. The property is not affected by [member pivot_offset]. */ + get position(): Vector2 + set position(value: Vector2) + + /** The node's global position, relative to the world (usually to the [CanvasLayer]). */ + get global_position(): Vector2 + set global_position(value: Vector2) + + /** The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position. + * + * **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. + */ + get rotation(): float64 + set rotation(value: float64) + + /** Helper property to access [member rotation] in degrees instead of radians. */ + get rotation_degrees(): float64 + set rotation_degrees(value: float64) + + /** The node's scale, relative to its [member size]. Change this property to scale the node around its [member pivot_offset]. The Control's [member tooltip_text] will also scale according to this value. + * + * **Note:** This property is mainly intended to be used for animation purposes. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/4.3/tutorials/rendering/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. + * + * **Note:** [member FontFile.oversampling] does *not* take [Control] [member scale] into account. This means that scaling up/down will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated. To ensure text remains crisp regardless of scale, you can enable MSDF font rendering by enabling [member ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field] (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, [member SystemFont.multichannel_signed_distance_field] can be enabled in the inspector. + * + * **Note:** If the Control node is a child of a [Container] node, the scale will be reset to `Vector2(1, 1)` when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using `await get_tree().process_frame` then set its [member scale] property. + */ + get scale(): Vector2 + set scale(value: Vector2) + + /** By default, the node's pivot is its top-left corner. When you change its [member rotation] or [member scale], it will rotate or scale around this pivot. Set this property to [member size] / 2 to pivot around the Control's center. */ + get pivot_offset(): Vector2 + set pivot_offset(value: Vector2) + + /** Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use a combination of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. */ + get size_flags_horizontal(): int64 + set size_flags_horizontal(value: int64) + + /** Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use a combination of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. */ + get size_flags_vertical(): int64 + set size_flags_vertical(value: int64) + + /** If the node and at least one of its neighbors uses the [constant SIZE_EXPAND] 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 neighbor a ratio of 1, this node will take two thirds of the available space. */ + get size_flags_stretch_ratio(): float64 + set size_flags_stretch_ratio(value: float64) + + /** If `true`, automatically converts code line numbers, list indices, [SpinBox] and [ProgressBar] values from the Western Arabic (0..9) to the numeral systems used in current locale. + * + * **Note:** Numbers within the text are not automatically converted, it can be done manually, using [method TextServer.format_number]. + */ + get localize_numeral_system(): boolean + set localize_numeral_system(value: boolean) + + /** Toggles if any text should automatically change to its translated version depending on the current locale. */ + get auto_translate(): boolean + set auto_translate(value: boolean) + + /** The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] option. See also [method get_tooltip]. + * The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the `"TooltipPanel"` and `"TooltipLabel"` respectively. For example: + * + */ + get tooltip_text(): string + set tooltip_text(value: string) + + /** Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. 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. */ + get focus_neighbor_left(): NodePath + set focus_neighbor_left(value: NodePath | string) + + /** Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the top of this one. */ + get focus_neighbor_top(): NodePath + set focus_neighbor_top(value: NodePath | string) + + /** Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the right of this one. */ + get focus_neighbor_right(): NodePath + set focus_neighbor_right(value: NodePath | string) + + /** Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_down] input action. 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. */ + get focus_neighbor_bottom(): NodePath + set focus_neighbor_bottom(value: NodePath | string) + + /** Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action. + * If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + */ + get focus_next(): NodePath + set focus_next(value: NodePath | string) + + /** Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_prev] input action. + * If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. + */ + get focus_previous(): NodePath + set focus_previous(value: NodePath | string) + + /** The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard, gamepad, and mouse signals. */ + get focus_mode(): int64 + set focus_mode(value: int64) + + /** Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. */ + get mouse_filter(): int64 + set mouse_filter(value: int64) + + /** When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box. + * You should disable it on the root of your UI if you do not want scroll events to go to the [method Node._unhandled_input] processing. + */ + get mouse_force_pass_scroll_events(): boolean + set mouse_force_pass_scroll_events(value: boolean) + + /** The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. + * + * **Note:** On Linux, shapes may vary depending on the cursor theme of the system. + */ + get mouse_default_cursor_shape(): int64 + set mouse_default_cursor_shape(value: int64) + + /** The [Node] which must be a parent of the focused [Control] for the shortcut to be activated. If `null`, the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. */ + get shortcut_context(): Object + set shortcut_context(value: Object) + + /** The [Theme] resource this node and all its [Control] and [Window] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. + * + * **Note:** [Window] styles will have no effect unless the window is embedded. + */ + get theme(): Theme + set theme(value: Theme) + + /** The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code skip-lint]Button` for the [Button] control), as well as the class names of all parent classes (in order of inheritance). + * When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [method Theme.set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. + * + * **Note:** To look up [Control]'s own items use various `get_theme_*` methods without specifying `theme_type`. + * + * **Note:** Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. + */ + get theme_type_variation(): string + set theme_type_variation(value: string) + + /** Emitted when the control changes size. */ + readonly resized: Signal0 + + /** Emitted when the node receives an [InputEvent]. */ + readonly gui_input: Signal1 + + /** Emitted when the mouse cursor enters the control's (or any child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect, which Control receives the signal. + */ + readonly mouse_entered: Signal0 + + /** Emitted when the mouse cursor leaves the control's (and all child control's) visible area, that is not occluded behind other Controls or Windows, provided its [member mouse_filter] lets the event reach it and regardless if it's currently focused or not. + * + * **Note:** [member CanvasItem.z_index] doesn't affect, which Control receives the signal. + * + * **Note:** If you want to check whether the mouse truly left the area, ignoring any top nodes, you can use code like this: + * + */ + readonly mouse_exited: Signal0 + + /** Emitted when the node gains focus. */ + readonly focus_entered: Signal0 + + /** Emitted when the node loses focus. */ + readonly focus_exited: Signal0 + + /** Emitted when one of the size flags changes. See [member size_flags_horizontal] and [member size_flags_vertical]. */ + readonly size_flags_changed: Signal0 + + /** Emitted when the node's minimum size changes. */ + readonly minimum_size_changed: Signal0 + + /** Emitted when the [constant NOTIFICATION_THEME_CHANGED] notification is sent. */ + readonly theme_changed: Signal0 + } + class ControlEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class ControlEditorPopupButton extends Button { + constructor(identifier?: any) + } + class ControlEditorPresetPicker extends MarginContainer { + constructor(identifier?: any) + } + class ControlEditorToolbar extends HBoxContainer { + constructor(identifier?: any) + } + /** A 2D convex polygon shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_convexpolygonshape2d.html + */ + class ConvexPolygonShape2D extends Shape2D { + constructor(identifier?: any) + /** Based on the set of points provided, this assigns the [member points] property using the convex hull algorithm, removing all unneeded points. See [method Geometry2D.convex_hull] for details. */ + set_point_cloud(point_cloud: PackedVector2Array | Vector2[]): void + + /** The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. + * **Warning:** Only set this property to a list of points that actually form a convex hull. Use [method set_point_cloud] to generate the convex hull of an arbitrary set of points. + */ + get points(): PackedVector2Array + set points(value: PackedVector2Array | Vector2[]) + } + /** A 3D convex polyhedron shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_convexpolygonshape3d.html + */ + class ConvexPolygonShape3D extends Shape3D { + constructor(identifier?: any) + /** The list of 3D points forming the convex polygon shape. */ + get points(): GArray + set points(value: GArray) + } + class CreateDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly create: Signal0 + readonly favorites_updated: Signal0 + } + /** Provides access to advanced cryptographic functionalities. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_crypto.html + */ + class Crypto extends RefCounted { + constructor(identifier?: any) + /** Generates a [PackedByteArray] of cryptographically secure random bytes with given [param size]. */ + generate_random_bytes(size: int64): PackedByteArray + + /** Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerTLS.accept_stream]. */ + generate_rsa(size: int64): CryptoKey + + /** Generates a self-signed [X509Certificate] from the given [CryptoKey] and [param issuer_name]. The certificate validity will be defined by [param not_before] and [param not_after] (first valid date and last valid date). The [param issuer_name] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). + * A small example to generate an RSA key and an X509 self-signed certificate. + * + */ + generate_self_signed_certificate(key: CryptoKey, issuer_name: string = 'CN=myserver,O=myorganisation,C=IT', not_before: string = '20140101000000', not_after: string = '20340101000000'): X509Certificate + + /** Sign a given [param hash] of type [param hash_type] with the provided private [param key]. */ + sign(hash_type: HashingContext.HashType, hash: PackedByteArray | byte[] | ArrayBuffer, key: CryptoKey): PackedByteArray + + /** Verify that a given [param signature] for [param hash] of type [param hash_type] against the provided public [param key]. */ + verify(hash_type: HashingContext.HashType, hash: PackedByteArray | byte[] | ArrayBuffer, signature: PackedByteArray | byte[] | ArrayBuffer, key: CryptoKey): boolean + + /** Encrypt the given [param plaintext] with the provided public [param key]. + * + * **Note:** The maximum size of accepted plaintext is limited by the key size. + */ + encrypt(key: CryptoKey, plaintext: PackedByteArray | byte[] | ArrayBuffer): PackedByteArray + + /** Decrypt the given [param ciphertext] with the provided private [param key]. + * + * **Note:** The maximum size of accepted ciphertext is limited by the key size. + */ + decrypt(key: CryptoKey, ciphertext: PackedByteArray | byte[] | ArrayBuffer): PackedByteArray + + /** Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [param msg] using [param key]. The [param hash_type] parameter is the hashing algorithm that is used for the inner and outer hashes. + * Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported. + */ + hmac_digest(hash_type: HashingContext.HashType, key: PackedByteArray | byte[] | ArrayBuffer, msg: PackedByteArray | byte[] | ArrayBuffer): PackedByteArray + + /** Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks. + * See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information. + */ + constant_time_compare(trusted: PackedByteArray | byte[] | ArrayBuffer, received: PackedByteArray | byte[] | ArrayBuffer): boolean + } + /** A cryptographic key (RSA or elliptic-curve). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cryptokey.html + */ + class CryptoKey extends Resource { + constructor(identifier?: any) + /** Saves a key to the given [param path]. If [param public_only] is `true`, only the public key will be saved. + * + * **Note:** [param path] should be a "*.pub" file if [param public_only] is `true`, a "*.key" file otherwise. + */ + save(path: string, public_only: boolean = false): GError + + /** Loads a key from [param path]. If [param public_only] is `true`, only the public key will be loaded. + * + * **Note:** [param path] should be a "*.pub" file if [param public_only] is `true`, a "*.key" file otherwise. + */ + load(path: string, public_only: boolean = false): GError + + /** Returns `true` if this CryptoKey only has the public part, and not the private one. */ + is_public_only(): boolean + + /** Returns a string containing the key in PEM format. If [param public_only] is `true`, only the public key will be included. */ + save_to_string(public_only: boolean = false): string + + /** Loads a key from the given [param string_key]. If [param public_only] is `true`, only the public key will be loaded. */ + load_from_string(string_key: string, public_only: boolean = false): GError + } + /** Six square textures representing the faces of a cube. Commonly used as a skybox. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cubemap.html + */ + class Cubemap extends ImageTextureLayered { + constructor(identifier?: any) + /** Creates a placeholder version of this resource ([PlaceholderCubemap]). */ + create_placeholder(): Resource + } + /** An array of [Cubemap]s, stored together and with a single reference. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cubemaparray.html + */ + class CubemapArray extends ImageTextureLayered { + constructor(identifier?: any) + /** Creates a placeholder version of this resource ([PlaceholderCubemapArray]). */ + create_placeholder(): Resource + } + namespace Curve { + enum TangentMode { + /** The tangent on this side of the point is user-defined. */ + TANGENT_FREE = 0, + + /** The curve calculates the tangent on this side of the point as the slope halfway towards the adjacent point. */ + TANGENT_LINEAR = 1, + + /** The total number of available tangent modes. */ + TANGENT_MODE_COUNT = 2, + } + } + /** A mathematical curve. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_curve.html + */ + class Curve extends Resource { + constructor(identifier?: any) + /** Adds a point to the curve. For each side, if the `*_mode` is [constant TANGENT_LINEAR], the `*_tangent` angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the `*_tangent` angle if `*_mode` is set to [constant TANGENT_FREE]. */ + add_point(position: Vector2, left_tangent: float64 = 0, right_tangent: float64 = 0, left_mode: Curve.TangentMode = 0, right_mode: Curve.TangentMode = 0): int64 + + /** Removes the point at [param index] from the curve. */ + remove_point(index: int64): void + + /** Removes all points from the curve. */ + clear_points(): void + + /** Returns the curve coordinates for the point at [param index]. */ + get_point_position(index: int64): Vector2 + + /** Assigns the vertical position [param y] to the point at [param index]. */ + set_point_value(index: int64, y: float64): void + + /** Sets the offset from `0.5`. */ + set_point_offset(index: int64, offset: float64): int64 + + /** Returns the Y value for the point that would exist at the X position [param offset] along the curve. */ + sample(offset: float64): float64 + + /** Returns the Y value for the point that would exist at the X position [param offset] along the curve using the baked cache. Bakes the curve's points if not already baked. */ + sample_baked(offset: float64): float64 + + /** Returns the left tangent angle (in degrees) for the point at [param index]. */ + get_point_left_tangent(index: int64): float64 + + /** Returns the right tangent angle (in degrees) for the point at [param index]. */ + get_point_right_tangent(index: int64): float64 + + /** Returns the left [enum TangentMode] for the point at [param index]. */ + get_point_left_mode(index: int64): Curve.TangentMode + + /** Returns the right [enum TangentMode] for the point at [param index]. */ + get_point_right_mode(index: int64): Curve.TangentMode + + /** Sets the left tangent angle for the point at [param index] to [param tangent]. */ + set_point_left_tangent(index: int64, tangent: float64): void + + /** Sets the right tangent angle for the point at [param index] to [param tangent]. */ + set_point_right_tangent(index: int64, tangent: float64): void + + /** Sets the left [enum TangentMode] for the point at [param index] to [param mode]. */ + set_point_left_mode(index: int64, mode: Curve.TangentMode): void + + /** Sets the right [enum TangentMode] for the point at [param index] to [param mode]. */ + set_point_right_mode(index: int64, mode: Curve.TangentMode): void + + /** Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve. */ + clean_dupes(): void + + /** Recomputes the baked cache of points for the curve. */ + bake(): void + + /** The minimum value the curve can reach. */ + get min_value(): float64 + set min_value(value: float64) + + /** The maximum value the curve can reach. */ + get max_value(): float64 + set max_value(value: float64) + + /** The number of points to include in the baked (i.e. cached) curve data. */ + get bake_resolution(): int64 + set bake_resolution(value: int64) + get _data(): int64 + set _data(value: int64) + + /** The number of points describing the curve. */ + get point_count(): any /*Points,point_*/ + set point_count(value: any /*Points,point_*/) + + /** Emitted when [member max_value] or [member min_value] is changed. */ + readonly range_changed: Signal0 + } + /** Describes a Bézier curve in 2D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_curve2d.html + */ + class Curve2D extends Resource { + constructor(identifier?: any) + /** Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. + * If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See [member point_count]. + */ + add_point(position: Vector2, in_: Vector2 = Vector2.ZERO, out_: Vector2 = Vector2.ZERO, index: int64 = -1): void + + /** Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. */ + set_point_position(idx: int64, position: Vector2): void + + /** Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. */ + get_point_position(idx: int64): Vector2 + + /** Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. */ + set_point_in(idx: int64, position: Vector2): void + + /** Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. */ + get_point_in(idx: int64): Vector2 + + /** Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. */ + set_point_out(idx: int64, position: Vector2): void + + /** Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0)`. */ + get_point_out(idx: int64): Vector2 + + /** Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. */ + remove_point(idx: int64): void + + /** Removes all points from the curve. */ + clear_points(): void + + /** Returns the position between the vertex [param idx] and the vertex `idx + 1`, where [param t] controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of [param t] outside the range (`0.0 <= t <= 1.0`) give strange, but predictable results. + * If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0)`. + */ + sample(idx: int64, t: float64): Vector2 + + /** Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as `idx`, and its fractional part as `t`. */ + samplef(fofs: float64): Vector2 + + /** Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. */ + get_baked_length(): float64 + + /** Returns a point within the curve at position [param offset], where [param offset] is measured as a pixel distance along the curve. + * To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to `true`, or linear if set to `false`. + * Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + */ + sample_baked(offset: float64 = 0, cubic: boolean = false): Vector2 + + /** Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve, with [member Transform2D.origin] as the point position and the [member Transform2D.x] vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is `0`. + * + */ + sample_baked_with_rotation(offset: float64 = 0, cubic: boolean = false): Transform2D + + /** Returns the cache of points as a [PackedVector2Array]. */ + get_baked_points(): PackedVector2Array + + /** Returns the closest point on baked segments (in curve's local space) to [param to_point]. + * [param to_point] must be in this curve's local space. + */ + get_closest_point(to_point: Vector2): Vector2 + + /** Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked]. + * [param to_point] must be in this curve's local space. + */ + get_closest_offset(to_point: Vector2): float64 + + /** Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + * This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + * [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + * [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + */ + tessellate(max_stages: int64 = 5, tolerance_degrees: float64 = 4): PackedVector2Array + + /** Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + * [param tolerance_length] controls the maximal distance between two neighboring points, before the segment has to be subdivided. + */ + tessellate_even_length(max_stages: int64 = 5, tolerance_length: float64 = 20): PackedVector2Array + + /** The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. */ + get bake_interval(): float64 + set bake_interval(value: float64) + get _data(): int64 + set _data(value: int64) + + /** The number of points describing the curve. */ + get point_count(): any /*Points,point_*/ + set point_count(value: any /*Points,point_*/) + } + /** Describes a Bézier curve in 3D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_curve3d.html + */ + class Curve3D extends Resource { + constructor(identifier?: any) + /** Adds a point with the specified [param position] relative to the curve's own position, with control points [param in] and [param out]. Appends the new point at the end of the point list. + * If [param index] is given, the new point is inserted before the existing point identified by index [param index]. Every existing point starting from [param index] is shifted further down the list of points. The index must be greater than or equal to `0` and must not exceed the number of existing points in the line. See [member point_count]. + */ + add_point(position: Vector3, in_: Vector3 = new Vector3(0, 0, 0), out_: Vector3 = new Vector3(0, 0, 0), index: int64 = -1): void + + /** Sets the position for the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. */ + set_point_position(idx: int64, position: Vector3): void + + /** Returns the position of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. */ + get_point_position(idx: int64): Vector3 + + /** Sets the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console. + * The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates. + */ + set_point_tilt(idx: int64, tilt: float64): void + + /** Returns the tilt angle in radians for the point [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `0`. */ + get_point_tilt(idx: int64): float64 + + /** Sets the position of the control point leading to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. */ + set_point_in(idx: int64, position: Vector3): void + + /** Returns the position of the control point leading to the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. */ + get_point_in(idx: int64): Vector3 + + /** Sets the position of the control point leading out of the vertex [param idx]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. */ + set_point_out(idx: int64, position: Vector3): void + + /** Returns the position of the control point leading out of the vertex [param idx]. The returned position is relative to the vertex [param idx]. If the index is out of bounds, the function sends an error to the console, and returns `(0, 0, 0)`. */ + get_point_out(idx: int64): Vector3 + + /** Deletes the point [param idx] from the curve. Sends an error to the console if [param idx] is out of bounds. */ + remove_point(idx: int64): void + + /** Removes all points from the curve. */ + clear_points(): void + + /** Returns the position between the vertex [param idx] and the vertex `idx + 1`, where [param t] controls if the point is the first vertex (`t = 0.0`), the last vertex (`t = 1.0`), or in between. Values of [param t] outside the range (`0.0 >= t <=1`) give strange, but predictable results. + * If [param idx] is out of bounds it is truncated to the first or last vertex, and [param t] is ignored. If the curve has no points, the function sends an error to the console, and returns `(0, 0, 0)`. + */ + sample(idx: int64, t: float64): Vector3 + + /** Returns the position at the vertex [param fofs]. It calls [method sample] using the integer part of [param fofs] as `idx`, and its fractional part as `t`. */ + samplef(fofs: float64): Vector3 + + /** Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. */ + get_baked_length(): float64 + + /** Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to `true`, or linear if set to `false`. + * Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). + */ + sample_baked(offset: float64 = 0, cubic: boolean = false): Vector3 + + /** Returns a [Transform3D] with `origin` as point position, `basis.x` as sideway vector, `basis.y` as up vector, `basis.z` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also [method sample_baked]. */ + sample_baked_with_rotation(offset: float64 = 0, cubic: boolean = false, apply_tilt: boolean = false): Transform3D + + /** Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is `true`, an interpolated tilt is applied to the interpolated up vector. + * If the curve has no up vectors, the function sends an error to the console, and returns `(0, 1, 0)`. + */ + sample_baked_up_vector(offset: float64, apply_tilt: boolean = false): Vector3 + + /** Returns the cache of points as a [PackedVector3Array]. */ + get_baked_points(): PackedVector3Array + + /** Returns the cache of tilts as a [PackedFloat32Array]. */ + get_baked_tilts(): PackedFloat32Array + + /** Returns the cache of up vectors as a [PackedVector3Array]. + * If [member up_vector_enabled] is `false`, the cache will be empty. + */ + get_baked_up_vectors(): PackedVector3Array + + /** Returns the closest point on baked segments (in curve's local space) to [param to_point]. + * [param to_point] must be in this curve's local space. + */ + get_closest_point(to_point: Vector3): Vector3 + + /** Returns the closest offset to [param to_point]. This offset is meant to be used in [method sample_baked] or [method sample_baked_up_vector]. + * [param to_point] must be in this curve's local space. + */ + get_closest_offset(to_point: Vector3): float64 + + /** Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. + * This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. + * [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + * [param tolerance_degrees] controls how many degrees the midpoint of a segment may deviate from the real curve, before the segment has to be subdivided. + */ + tessellate(max_stages: int64 = 5, tolerance_degrees: float64 = 4): PackedVector3Array + + /** Returns a list of points along the curve, with almost uniform density. [param max_stages] controls how many subdivisions a curve segment may face before it is considered approximate enough. Each subdivision splits the segment in half, so the default 5 stages may mean up to 32 subdivisions per curve segment. Increase with care! + * [param tolerance_length] controls the maximal distance between two neighboring points, before the segment has to be subdivided. + */ + tessellate_even_length(max_stages: int64 = 5, tolerance_length: float64 = 0.2): PackedVector3Array + + /** The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. */ + get bake_interval(): float64 + set bake_interval(value: float64) + get _data(): int64 + set _data(value: int64) + + /** The number of points describing the curve. */ + get point_count(): any /*Points,point_*/ + set point_count(value: any /*Points,point_*/) + + /** If `true`, the curve will bake up vectors used for orientation. This is used when [member PathFollow3D.rotation_mode] is set to [constant PathFollow3D.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. */ + get up_vector_enabled(): boolean + set up_vector_enabled(value: boolean) + } + class CurveEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class CurvePreviewGenerator extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + namespace CurveTexture { + enum TextureMode { + /** Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values. */ + TEXTURE_MODE_RGB = 0, + + /** Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this. */ + TEXTURE_MODE_RED = 1, + } + } + /** A 1D texture where pixel brightness corresponds to points on a curve. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_curvetexture.html + */ + class CurveTexture extends Texture2D { + constructor(identifier?: any) + /** The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. */ + get width(): int64 + set width(value: int64) + + /** The format the texture should be generated with. When passing a CurveTexture as an input to a [Shader], this may need to be adjusted. */ + get texture_mode(): int64 + set texture_mode(value: int64) + + /** The [Curve] that is rendered onto the texture. */ + get curve(): Curve + set curve(value: Curve) + } + /** A 1D texture where the red, green, and blue color channels correspond to points on 3 curves. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_curvexyztexture.html + */ + class CurveXYZTexture extends Texture2D { + constructor(identifier?: any) + /** The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. */ + get width(): int64 + set width(value: int64) + + /** The [Curve] that is rendered onto the texture's red channel. */ + get curve_x(): Curve + set curve_x(value: Curve) + + /** The [Curve] that is rendered onto the texture's green channel. */ + get curve_y(): Curve + set curve_y(value: Curve) + + /** The [Curve] that is rendered onto the texture's blue channel. */ + get curve_z(): Curve + set curve_z(value: Curve) + } + /** Class representing a cylindrical [PrimitiveMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cylindermesh.html + */ + class CylinderMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** Top radius of the cylinder. If set to `0.0`, the top faces will not be generated, resulting in a conic shape. See also [member cap_top]. */ + get top_radius(): float64 + set top_radius(value: float64) + + /** Bottom radius of the cylinder. If set to `0.0`, the bottom faces will not be generated, resulting in a conic shape. See also [member cap_bottom]. */ + get bottom_radius(): float64 + set bottom_radius(value: float64) + + /** Full height of the cylinder. */ + get height(): float64 + set height(value: float64) + + /** Number of radial segments on the cylinder. Higher values result in a more detailed cylinder/cone at the cost of performance. */ + get radial_segments(): int64 + set radial_segments(value: int64) + + /** Number of edge rings along the height of the cylinder. Changing [member rings] does not have any visual impact unless a shader or procedural mesh tool is used to alter the vertex data. Higher values result in more subdivisions, which can be used to create smoother-looking effects with shaders or procedural mesh tools (at the cost of performance). When not altering the vertex data using a shader or procedural mesh tool, [member rings] should be kept to its default value. */ + get rings(): int64 + set rings(value: int64) + + /** If `true`, generates a cap at the top of the cylinder. This can be set to `false` to speed up generation and rendering when the cap is never seen by the camera. See also [member top_radius]. + * + * **Note:** If [member top_radius] is `0.0`, cap generation is always skipped even if [member cap_top] is `true`. + */ + get cap_top(): boolean + set cap_top(value: boolean) + + /** If `true`, generates a cap at the bottom of the cylinder. This can be set to `false` to speed up generation and rendering when the cap is never seen by the camera. See also [member bottom_radius]. + * + * **Note:** If [member bottom_radius] is `0.0`, cap generation is always skipped even if [member cap_bottom] is `true`. + */ + get cap_bottom(): boolean + set cap_bottom(value: boolean) + } + /** A 3D cylinder shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_cylindershape3d.html + */ + class CylinderShape3D extends Shape3D { + constructor(identifier?: any) + /** The cylinder's height. */ + get height(): float64 + set height(value: float64) + + /** The cylinder's radius. */ + get radius(): float64 + set radius(value: float64) + } + /** Helper class to implement a DTLS server. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_dtlsserver.html + */ + class DTLSServer extends RefCounted { + constructor(identifier?: any) + /** Setup the DTLS server to use the given [param server_options]. See [method TLSOptions.server]. */ + setup(server_options: TLSOptions): GError + + /** Try to initiate the DTLS handshake with the given [param udp_peer] which must be already connected (see [method PacketPeerUDP.connect_to_host]). + * + * **Note:** You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange. + */ + take_connection(udp_peer: PacketPeerUDP): PacketPeerDTLS + } + /** A physics joint that connects two 2D physics bodies with a spring-like force. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_dampedspringjoint2d.html + */ + class DampedSpringJoint2D extends Joint2D { + constructor(identifier?: any) + /** The spring joint's maximum length. The two attached bodies cannot stretch it past this value. */ + get length(): float64 + set length(value: float64) + + /** When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. */ + get rest_length(): float64 + set rest_length(value: float64) + + /** The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. */ + get stiffness(): float64 + set stiffness(value: float64) + + /** The spring joint's damping ratio. A value between `0` and `1`. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [member damping] value forces the attached bodies to align faster. */ + get damping(): float64 + set damping(value: float64) + } + class DebugAdapterParser extends Object { + constructor(identifier?: any) + req_initialize(params: GDictionary): GDictionary + req_disconnect(params: GDictionary): GDictionary + req_launch(params: GDictionary): GDictionary + req_attach(params: GDictionary): GDictionary + req_restart(params: GDictionary): GDictionary + req_terminate(params: GDictionary): GDictionary + req_configurationDone(params: GDictionary): GDictionary + req_pause(params: GDictionary): GDictionary + req_continue(params: GDictionary): GDictionary + req_threads(params: GDictionary): GDictionary + req_stackTrace(params: GDictionary): GDictionary + req_setBreakpoints(params: GDictionary): GDictionary + req_breakpointLocations(params: GDictionary): GDictionary + req_scopes(params: GDictionary): GDictionary + req_variables(params: GDictionary): GDictionary + req_next(params: GDictionary): GDictionary + req_stepIn(params: GDictionary): GDictionary + req_evaluate(params: GDictionary): GDictionary + ["req_godot/put_msg"]: (params: GDictionary) => GDictionary + } + class DebugAdapterServer extends EditorPlugin { + constructor(identifier?: any) + } + class DebuggerEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace Decal { + enum DecalTexture { + /** [Texture2D] corresponding to [member texture_albedo]. */ + TEXTURE_ALBEDO = 0, + + /** [Texture2D] corresponding to [member texture_normal]. */ + TEXTURE_NORMAL = 1, + + /** [Texture2D] corresponding to [member texture_orm]. */ + TEXTURE_ORM = 2, + + /** [Texture2D] corresponding to [member texture_emission]. */ + TEXTURE_EMISSION = 3, + + /** Max size of [enum DecalTexture] enum. */ + TEXTURE_MAX = 4, + } + } + /** Node that projects a texture onto a [MeshInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_decal.html + */ + class Decal extends VisualInstance3D { + constructor(identifier?: any) + /** Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. + * For example, instead of `$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)`, use `$Decal.texture_albedo = albedo_tex`. + * One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: + * + */ + set_texture(type: Decal.DecalTexture, texture: Texture2D): void + + /** Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. + * For example, instead of `albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)`, use `albedo_tex = $Decal.texture_albedo`. + * One case where this is better than accessing the texture directly is when you want to copy one Decal's textures to another. For example: + * + */ + get_texture(type: Decal.DecalTexture): Texture2D + + /** Sets the size of the [AABB] used by the decal. All dimensions must be set to a value greater than zero (they will be clamped to `0.001` if this is not the case). The AABB goes from `-size/2` to `size/2`. + * + * **Note:** To improve culling efficiency of "hard surface" decals, set their [member upper_fade] and [member lower_fade] to `0.0` and set the Y component of the [member size] as low as possible. This will reduce the decals' AABB size without affecting their appearance. + */ + get size(): Vector3 + set size(value: Vector3) + + /** [Texture2D] with the base [Color] of the Decal. Either this or the [member texture_emission] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. + * + * **Note:** Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter]. + */ + get texture_albedo(): Texture2D + set texture_albedo(value: Texture2D) + + /** [Texture2D] with the per-pixel normal map for the decal. Use this to add extra detail to decals. + * + * **Note:** Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter]. + * + * **Note:** Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a normal-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to `0.0`. The albedo texture's alpha channel will be used to determine where the underlying surface's normal map should be overridden (and its intensity). + */ + get texture_normal(): Texture2D + set texture_normal(value: Texture2D) + + /** [Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals. + * + * **Note:** Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter]. + * + * **Note:** Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create an ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to `0.0`. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity). + */ + get texture_orm(): Texture2D + set texture_orm(value: Texture2D) + + /** [Texture2D] with the emission [Color] of the Decal. Either this or the [member texture_albedo] must be set for the Decal to be visible. Use the alpha channel like a mask to smoothly blend the edges of the decal with the underlying object. + * + * **Note:** Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter]. + */ + get texture_emission(): Texture2D + set texture_emission(value: Texture2D) + + /** Energy multiplier for the emission texture. This will make the decal emit light at a higher or lower intensity, independently of the albedo color. See also [member modulate]. */ + get emission_energy(): float64 + set emission_energy(value: float64) + + /** Changes the [Color] of the Decal by multiplying the albedo and emission colors with this value. The alpha component is only taken into account when multiplying the albedo color, not the emission color. See also [member emission_energy] and [member albedo_mix] to change the emission and albedo intensity independently of each other. */ + get modulate(): Color + set modulate(value: Color) + + /** Blends the albedo [Color] of the decal with albedo [Color] of the underlying mesh. This can be set to `0.0` to create a decal that only affects normal or ORM. In this case, an albedo texture is still required as its alpha channel will determine where the normal and ORM will be overridden. See also [member modulate]. */ + get albedo_mix(): float64 + set albedo_mix(value: float64) + + /** Fades the Decal if the angle between the Decal's [AABB] and the target surface becomes too large. A value of `0` projects the Decal regardless of angle, a value of `1` limits the Decal to surfaces that are nearly perpendicular. + * + * **Note:** Setting [member normal_fade] to a value greater than `0.0` has a small performance cost due to the added normal angle computations. + */ + get normal_fade(): float64 + set normal_fade(value: float64) + + /** Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to `0.0`). See also [member lower_fade]. */ + get upper_fade(): float64 + set upper_fade(value: float64) + + /** Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to `0.0`). See also [member upper_fade]. */ + get lower_fade(): float64 + set lower_fade(value: float64) + + /** If `true`, decals will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. The Decal will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active Decals in a scene and thus improve performance. */ + get distance_fade_enabled(): boolean + set distance_fade_enabled(value: boolean) + + /** The distance from the camera at which the Decal begins to fade away (in 3D units). */ + get distance_fade_begin(): float64 + set distance_fade_begin(value: float64) + + /** The distance over which the Decal fades (in 3D units). The Decal becomes slowly more transparent over this distance and is completely invisible at the end. Higher values result in a smoother fade-out transition, which is more suited when the camera moves fast. */ + get distance_fade_length(): float64 + set distance_fade_length(value: float64) + + /** Specifies which [member VisualInstance3D.layers] this decal will project on. By default, Decals affect all layers. This is used so you can specify which types of objects receive the Decal and which do not. This is especially useful so you can ensure that dynamic objects don't accidentally receive a Decal intended for the terrain under them. */ + get cull_mask(): int64 + set cull_mask(value: int64) + } + class DecalGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + class DefaultThemeEditorPreview extends ThemeEditorPreview { + constructor(identifier?: any) + } + class DependencyEditor extends AcceptDialog { + constructor(identifier?: any) + } + class DependencyEditorOwners extends AcceptDialog { + constructor(identifier?: any) + } + class DependencyErrorDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + class DependencyRemoveDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly resource_removed: Signal1 + readonly file_removed: Signal1 + readonly folder_removed: Signal1 + } + /** Provides methods for managing directories and their content. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_diraccess.html + */ + class DirAccess extends RefCounted { + constructor(identifier?: any) + /** Creates a new [DirAccess] object and opens an existing directory of the filesystem. The [param path] argument can be within the project tree (`res://folder`), the user directory (`user://folder`) or an absolute path of the user filesystem (e.g. `/tmp/folder` or `C:\tmp\folder`). + * Returns `null` if opening the directory failed. You can use [method get_open_error] to check the error that occurred. + */ + static open(path: string): DirAccess + + /** Returns the result of the last [method open] call in the current thread. */ + static get_open_error(): GError + + /** Initializes the stream used to list all files and directories using the [method get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. + * Affected by [member include_hidden] and [member include_navigational]. + * + * **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use [method get_files] or [method get_directories]. + */ + list_dir_begin(): GError + + /** Returns the next element (file or directory) in the current directory. + * The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty [String] and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case). + */ + get_next(): string + + /** Returns whether the current item processed with the last [method get_next] call is a directory (`.` and `..` are considered directories). */ + current_is_dir(): boolean + + /** Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] does not matter). */ + list_dir_end(): void + + /** Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically. + * Affected by [member include_hidden]. + * + * **Note:** When used on a `res://` path in an exported project, only the files actually included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level `.godot/` folder, only paths to `*.gd` and `*.import` files are returned (plus a few files such as `project.godot` or `project.binary` and the project icon). In an exported project, the list of returned files will also vary depending on whether [member ProjectSettings.editor/export/convert_text_resources_to_binary] is `true`. + */ + get_files(): PackedStringArray + + /** Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories, at the given [param path]. The array is sorted alphabetically. + * Use [method get_files] if you want more control of what gets included. + */ + static get_files_at(path: string): PackedStringArray + + /** Returns a [PackedStringArray] containing filenames of the directory contents, excluding files. The array is sorted alphabetically. + * Affected by [member include_hidden] and [member include_navigational]. + */ + get_directories(): PackedStringArray + + /** Returns a [PackedStringArray] containing filenames of the directory contents, excluding files, at the given [param path]. The array is sorted alphabetically. + * Use [method get_directories] if you want more control of what gets included. + */ + static get_directories_at(path: string): PackedStringArray + + /** On Windows, returns the number of drives (partitions) mounted on the current filesystem. + * On macOS, returns the number of mounted volumes. + * On Linux, returns the number of mounted volumes and GTK 3 bookmarks. + * On other platforms, the method returns 0. + */ + static get_drive_count(): int64 + + /** On Windows, returns the name of the drive (partition) passed as an argument (e.g. `C:`). + * On macOS, returns the path to the mounted volume passed as an argument. + * On Linux, returns the path to the mounted volume or GTK 3 bookmark passed as an argument. + * On other platforms, or if the requested drive does not exist, the method returns an empty String. + */ + static get_drive_name(idx: int64): string + + /** Returns the currently opened directory's drive index. See [method get_drive_name] to convert returned index to the name of the drive. */ + get_current_drive(): int64 + + /** Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. `newdir` or `../newdir`), or an absolute path (e.g. `/tmp/newdir` or `res://somedir/newdir`). + * Returns one of the [enum Error] code constants ([constant OK] on success). + * + * **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside `res://`, you can't change it to `user://` directory. If you need to open a directory in another access scope, use [method open] to create a new instance instead. + */ + change_dir(to_dir: string): GError + + /** Returns the absolute path to the currently opened directory (e.g. `res://folder` or `C:\tmp\folder`). */ + get_current_dir(include_drive: boolean = true): string + + /** Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). + * Returns one of the [enum Error] code constants ([constant OK] on success). + */ + make_dir(path: string): GError + + /** Static version of [method make_dir]. Supports only absolute paths. */ + static make_dir_absolute(path: string): GError + + /** Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. + * Returns one of the [enum Error] code constants ([constant OK] on success). + */ + make_dir_recursive(path: string): GError + + /** Static version of [method make_dir_recursive]. Supports only absolute paths. */ + static make_dir_recursive_absolute(path: string): GError + + /** Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. + * For a static equivalent, use [method FileAccess.file_exists]. + */ + file_exists(path: string): boolean + + /** Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. */ + dir_exists(path: string): boolean + + /** Static version of [method dir_exists]. Supports only absolute paths. */ + static dir_exists_absolute(path: string): boolean + + /** Returns the available space on the current directory's disk, in bytes. Returns `0` if the platform-specific method to query the available space fails. */ + get_space_left(): int64 + + /** Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + * If [param chmod_flags] is different than `-1`, the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. + * Returns one of the [enum Error] code constants ([constant OK] on success). + */ + copy(from: string, to: string, chmod_flags: int64 = -1): GError + + /** Static version of [method copy]. Supports only absolute paths. */ + static copy_absolute(from: string, to: string, chmod_flags: int64 = -1): GError + + /** Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. + * Returns one of the [enum Error] code constants ([constant OK] on success). + */ + rename(from: string, to: string): GError + + /** Static version of [method rename]. Supports only absolute paths. */ + static rename_absolute(from: string, to: string): GError + + /** Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. + * If you don't want to delete the file/directory permanently, use [method OS.move_to_trash] instead. + * Returns one of the [enum Error] code constants ([constant OK] on success). + */ + remove(path: string): GError + + /** Static version of [method remove]. Supports only absolute paths. */ + static remove_absolute(path: string): GError + + /** Returns `true` if the file or directory is a symbolic link, directory junction, or other reparse point. + * + * **Note:** This method is implemented on macOS, Linux, and Windows. + */ + is_link(path: string): boolean + + /** Returns target of the symbolic link. + * + * **Note:** This method is implemented on macOS, Linux, and Windows. + */ + read_link(path: string): string + + /** Creates symbolic link between files or folders. + * + * **Note:** On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled. + * + * **Note:** This method is implemented on macOS, Linux, and Windows. + */ + create_link(source: string, target: string): GError + + /** Returns `true` if the file system or directory use case sensitive file names. + * + * **Note:** This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns `true`. + */ + is_case_sensitive(path: string): boolean + + /** If `true`, `.` and `..` are included when navigating the directory. + * Affects [method list_dir_begin] and [method get_directories]. + */ + get include_navigational(): boolean + set include_navigational(value: boolean) + + /** If `true`, hidden files are included when navigating the directory. + * Affects [method list_dir_begin], [method get_directories] and [method get_files]. + */ + get include_hidden(): boolean + set include_hidden(value: boolean) + } + /** Directional 2D light from a distance. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_directionallight2d.html + */ + class DirectionalLight2D extends Light2D { + constructor(identifier?: any) + /** The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to the plane) to 1 (perpendicular to the plane). */ + get height(): float64 + set height(value: float64) + + /** The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). [member Camera2D.zoom] is not taken into account by [member max_distance], which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point. */ + get max_distance(): float64 + set max_distance(value: float64) + } + namespace DirectionalLight3D { + enum ShadowMode { + /** Renders the entire scene's shadow map from an orthogonal point of view. This is the fastest directional shadow mode. May result in blurrier shadows on close objects. */ + SHADOW_ORTHOGONAL = 0, + + /** Splits the view frustum in 2 areas, each with its own shadow map. This shadow mode is a compromise between [constant SHADOW_ORTHOGONAL] and [constant SHADOW_PARALLEL_4_SPLITS] in terms of performance. */ + SHADOW_PARALLEL_2_SPLITS = 1, + + /** Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. */ + SHADOW_PARALLEL_4_SPLITS = 2, + } + enum SkyMode { + /** Makes the light visible in both scene lighting and sky rendering. */ + SKY_MODE_LIGHT_AND_SKY = 0, + + /** Makes the light visible in scene lighting only (including direct lighting and global illumination). When using this mode, the light will not be visible from sky shaders. */ + SKY_MODE_LIGHT_ONLY = 1, + + /** Makes the light visible to sky shaders only. When using this mode the light will not cast light into the scene (either through direct lighting or through global illumination), but can be accessed through sky shaders. This can be useful, for example, when you want to control sky effects without illuminating the scene (during a night cycle, for example). */ + SKY_MODE_SKY_ONLY = 2, + } + } + /** Directional light from a distance, as from the Sun. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_directionallight3d.html + */ + class DirectionalLight3D extends Light3D { + constructor(identifier?: any) + /** The light's shadow rendering algorithm. See [enum ShadowMode]. */ + get directional_shadow_mode(): int64 + set directional_shadow_mode(value: int64) + + /** The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_2_SPLITS] or [constant SHADOW_PARALLEL_4_SPLITS]. */ + get directional_shadow_split_1(): float64 + set directional_shadow_split_1(value: float64) + + /** The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS]. */ + get directional_shadow_split_2(): float64 + set directional_shadow_split_2(value: float64) + + /** The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [constant SHADOW_PARALLEL_4_SPLITS]. */ + get directional_shadow_split_3(): float64 + set directional_shadow_split_3(value: float64) + + /** If `true`, shadow detail is sacrificed in exchange for smoother transitions between splits. Enabling shadow blend splitting also has a moderate performance cost. This is ignored when [member directional_shadow_mode] is [constant SHADOW_ORTHOGONAL]. */ + get directional_shadow_blend_splits(): boolean + set directional_shadow_blend_splits(value: boolean) + + /** Proportion of [member directional_shadow_max_distance] at which point the shadow starts to fade. At [member directional_shadow_max_distance], the shadow will disappear. The default value is a balance between smooth fading and distant shadow visibility. If the camera moves fast and the [member directional_shadow_max_distance] is low, consider lowering [member directional_shadow_fade_start] below `0.8` to make shadow transitions less noticeable. On the other hand, if you tuned [member directional_shadow_max_distance] to cover the entire scene, you can set [member directional_shadow_fade_start] to `1.0` to prevent the shadow from fading in the distance (it will suddenly cut off instead). */ + get directional_shadow_fade_start(): float64 + set directional_shadow_fade_start(value: float64) + + /** The maximum distance for shadow splits. Increasing this value will make directional shadows visible from further away, at the cost of lower overall shadow detail and performance (since more objects need to be included in the directional shadow rendering). */ + get directional_shadow_max_distance(): float64 + set directional_shadow_max_distance(value: float64) + + /** Sets the size of the directional shadow pancake. The pancake offsets the start of the shadow's camera frustum to provide a higher effective depth resolution for the shadow. However, a high pancake size can cause artifacts in the shadows of large objects that are close to the edge of the frustum. Reducing the pancake size can help. Setting the size to `0` turns off the pancaking effect. */ + get directional_shadow_pancake_size(): float64 + set directional_shadow_pancake_size(value: float64) + + /** Set whether this [DirectionalLight3D] is visible in the sky, in the scene, or both in the sky and in the scene. See [enum SkyMode] for options. */ + get sky_mode(): int64 + set sky_mode(value: int64) + } + class DirectoryCreateDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly dir_created: Signal1 + } + class DockContextPopup extends PopupPanel { + constructor(identifier?: any) + } + class DockSplitContainer extends SplitContainer { + constructor(identifier?: any) + } + class DynamicFontImportSettingsData extends RefCounted { + constructor(identifier?: any) + } + class DynamicFontImportSettingsDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + namespace ENetConnection { + enum CompressionMode { + /** No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. This option may also be used to make network debugging using tools like Wireshark easier. */ + COMPRESS_NONE = 0, + + /** ENet's built-in range encoding. Works well on small packets, but is not the most efficient algorithm on packets larger than 4 KB. */ + COMPRESS_RANGE_CODER = 1, + + /** [url=https://fastlz.org/]FastLZ[/url] compression. This option uses less CPU resources compared to [constant COMPRESS_ZLIB], at the expense of using more bandwidth. */ + COMPRESS_FASTLZ = 2, + + /** [url=https://www.zlib.net/]Zlib[/url] compression. This option uses less bandwidth compared to [constant COMPRESS_FASTLZ], at the expense of using more CPU resources. */ + COMPRESS_ZLIB = 3, + + /** [url=https://facebook.github.io/zstd/]Zstandard[/url] compression. Note that this algorithm is not very efficient on packets smaller than 4 KB. Therefore, it's recommended to use other compression algorithms in most cases. */ + COMPRESS_ZSTD = 4, + } + enum EventType { + /** An error occurred during [method service]. You will likely need to [method destroy] the host and recreate it. */ + EVENT_ERROR = -1, + + /** No event occurred within the specified time limit. */ + EVENT_NONE = 0, + + /** A connection request initiated by enet_host_connect has completed. The array will contain the peer which successfully connected. */ + EVENT_CONNECT = 1, + + /** A peer has disconnected. This event is generated on a successful completion of a disconnect initiated by [method ENetPacketPeer.peer_disconnect], if a peer has timed out, or if a connection request initialized by [method connect_to_host] has timed out. The array will contain the peer which disconnected. The data field contains user supplied data describing the disconnection, or 0, if none is available. */ + EVENT_DISCONNECT = 2, + + /** A packet has been received from a peer. The array will contain the peer which sent the packet and the channel number upon which the packet was received. The received packet will be queued to the associated [ENetPacketPeer]. */ + EVENT_RECEIVE = 3, + } + enum HostStatistic { + /** Total data sent. */ + HOST_TOTAL_SENT_DATA = 0, + + /** Total UDP packets sent. */ + HOST_TOTAL_SENT_PACKETS = 1, + + /** Total data received. */ + HOST_TOTAL_RECEIVED_DATA = 2, + + /** Total UDP packets received. */ + HOST_TOTAL_RECEIVED_PACKETS = 3, + } + } + /** A wrapper class for an [url=http://enet.bespin.org/group__host.html]ENetHost[/url]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_enetconnection.html + */ + class ENetConnection extends RefCounted { + constructor(identifier?: any) + /** Creates an ENetHost bound to the given [param bind_address] and [param bind_port] that allows up to [param max_peers] connected peers, each allocating up to [param max_channels] channels, optionally limiting bandwidth to [param in_bandwidth] and [param out_bandwidth] (if greater than zero). + * + * **Note:** It is necessary to create a host in both client and server in order to establish a connection. + */ + create_host_bound(bind_address: string, bind_port: int64, max_peers: int64 = 32, max_channels: int64 = 0, in_bandwidth: int64 = 0, out_bandwidth: int64 = 0): GError + + /** Creates an ENetHost that allows up to [param max_peers] connected peers, each allocating up to [param max_channels] channels, optionally limiting bandwidth to [param in_bandwidth] and [param out_bandwidth] (if greater than zero). + * This method binds a random available dynamic UDP port on the host machine at the *unspecified* address. Use [method create_host_bound] to specify the address and port. + * + * **Note:** It is necessary to create a host in both client and server in order to establish a connection. + */ + create_host(max_peers: int64 = 32, max_channels: int64 = 0, in_bandwidth: int64 = 0, out_bandwidth: int64 = 0): GError + + /** Destroys the host and all resources associated with it. */ + destroy(): void + + /** Initiates a connection to a foreign [param address] using the specified [param port] and allocating the requested [param channels]. Optional [param data] can be passed during connection in the form of a 32 bit integer. + * + * **Note:** You must call either [method create_host] or [method create_host_bound] on both ends before calling this method. + */ + connect_to_host(address: string, port: int64, channels: int64 = 0, data: int64 = 0): ENetPacketPeer + + /** Waits for events on this connection and shuttles packets between the host and its peers, with the given [param timeout] (in milliseconds). The returned [Array] will have 4 elements. An [enum EventType], the [ENetPacketPeer] which generated the event, the event associated data (if any), the event associated channel (if any). If the generated event is [constant EVENT_RECEIVE], the received packet will be queued to the associated [ENetPacketPeer]. + * Call this function regularly to handle connections, disconnections, and to receive new packets. + * + * **Note:** This method must be called on both ends involved in the event (sending and receiving hosts). + */ + service(timeout: int64 = 0): GArray + + /** Sends any queued packets on the host specified to its designated peers. */ + flush(): void + + /** Adjusts the bandwidth limits of a host. */ + bandwidth_limit(in_bandwidth: int64 = 0, out_bandwidth: int64 = 0): void + + /** Limits the maximum allowed channels of future incoming connections. */ + channel_limit(limit: int64): void + + /** Queues a [param packet] to be sent to all peers associated with the host over the specified [param channel]. See [ENetPacketPeer] `FLAG_*` constants for available packet flags. */ + broadcast(channel: int64, packet: PackedByteArray | byte[] | ArrayBuffer, flags: int64): void + + /** Sets the compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. + * + * **Note:** Most games' network design involve sending many small packets frequently (smaller than 4 KB each). If in doubt, it is recommended to keep the default compression algorithm as it works best on these small packets. + * + * **Note:** The compression mode must be set to the same value on both the server and all its clients. Clients will fail to connect if the compression mode set on the client differs from the one set on the server. + */ + compress(mode: ENetConnection.CompressionMode): void + + /** Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet servers. Call this right after [method create_host_bound] to have ENet expect peers to connect using DTLS. See [method TLSOptions.server]. */ + dtls_server_setup(server_options: TLSOptions): GError + + /** Configure this ENetHost to use the custom Godot extension allowing DTLS encryption for ENet clients. Call this before [method connect_to_host] to have ENet connect using DTLS validating the server certificate against [param hostname]. You can pass the optional [param client_options] parameter to customize the trusted certification authorities, or disable the common name verification. See [method TLSOptions.client] and [method TLSOptions.client_unsafe]. */ + dtls_client_setup(hostname: string, client_options: TLSOptions = undefined): GError + + /** Configures the DTLS server to automatically drop new connections. + * + * **Note:** This method is only relevant after calling [method dtls_server_setup]. + */ + refuse_new_connections(refuse: boolean): void + + /** Returns and resets host statistics. See [enum HostStatistic] for more info. */ + pop_statistic(statistic: ENetConnection.HostStatistic): float64 + + /** Returns the maximum number of channels allowed for connected peers. */ + get_max_channels(): int64 + + /** Returns the local port to which this peer is bound. */ + get_local_port(): int64 + + /** Returns the list of peers associated with this host. + * + * **Note:** This list might include some peers that are not fully connected or are still being disconnected. + */ + get_peers(): GArray + + /** Sends a [param packet] toward a destination from the address and port currently bound by this ENetConnection instance. + * This is useful as it serves to establish entries in NAT routing tables on all devices between this bound instance and the public facing internet, allowing a prospective client's connection packets to be routed backward through the NAT device(s) between the public internet and this host. + * This requires forward knowledge of a prospective client's address and communication port as seen by the public internet - after any NAT devices have handled their connection request. This information can be obtained by a [url=https://en.wikipedia.org/wiki/STUN]STUN[/url] service, and must be handed off to your host by an entity that is not the prospective client. This will never work for a client behind a Symmetric NAT due to the nature of the Symmetric NAT routing algorithm, as their IP and Port cannot be known beforehand. + */ + socket_send(destination_address: string, destination_port: int64, packet: PackedByteArray | byte[] | ArrayBuffer): void + } + /** A MultiplayerPeer implementation using the [url=http://enet.bespin.org/index.html]ENet[/url] library. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_enetmultiplayerpeer.html + */ + class ENetMultiplayerPeer extends MultiplayerPeer { + constructor(identifier?: any) + /** Create server that listens to connections via [param port]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard `"*"`, which listens on all available interfaces. [param max_clients] is the maximum number of clients that are allowed at once, any number up to 4095 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client]. Returns [constant OK] if a server was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method MultiplayerPeer.close] first) or [constant ERR_CANT_CREATE] if the server could not be created. */ + create_server(port: int64, max_clients: int64 = 32, max_channels: int64 = 0, in_bandwidth: int64 = 0, out_bandwidth: int64 = 0): GError + + /** Create client that connects to a server at [param address] using specified [param port]. The given address needs to be either a fully qualified domain name (e.g. `"www.example.com"`) or an IP address in IPv4 or IPv6 format (e.g. `"192.168.1.1"`). The [param port] is the port the server is listening on. The [param channel_count] parameter can be used to specify the number of ENet channels allocated for the connection. The [param in_bandwidth] and [param out_bandwidth] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [constant OK] if a client was created, [constant ERR_ALREADY_IN_USE] if this ENetMultiplayerPeer instance already has an open connection (in which case you need to call [method MultiplayerPeer.close] first) or [constant ERR_CANT_CREATE] if the client could not be created. If [param local_port] is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. */ + create_client(address: string, port: int64, channel_count: int64 = 0, in_bandwidth: int64 = 0, out_bandwidth: int64 = 0, local_port: int64 = 0): GError + + /** Initialize this [MultiplayerPeer] in mesh mode. The provided [param unique_id] will be used as the local peer network unique ID once assigned as the [member MultiplayerAPI.multiplayer_peer]. In the mesh configuration you will need to set up each new peer manually using [ENetConnection] before calling [method add_mesh_peer]. While this technique is more advanced, it allows for better control over the connection process (e.g. when dealing with NAT punch-through) and for better distribution of the network load (which would otherwise be more taxing on the server). */ + create_mesh(unique_id: int64): GError + + /** Add a new remote peer with the given [param peer_id] connected to the given [param host]. + * + * **Note:** The [param host] must have exactly one peer in the [constant ENetPacketPeer.STATE_CONNECTED] state. + */ + add_mesh_peer(peer_id: int64, host: ENetConnection): GError + + /** The IP used when creating a server. This is set to the wildcard `"*"` by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: `"192.168.1.1"`. */ + set_bind_ip(ip: string): void + + /** Returns the [ENetPacketPeer] associated to the given [param id]. */ + get_peer(id: int64): ENetPacketPeer + + /** The underlying [ENetConnection] created after [method create_client] and [method create_server]. */ + get host(): ENetConnection + } + namespace ENetPacketPeer { + enum PeerState { + /** The peer is disconnected. */ + STATE_DISCONNECTED = 0, + + /** The peer is currently attempting to connect. */ + STATE_CONNECTING = 1, + + /** The peer has acknowledged the connection request. */ + STATE_ACKNOWLEDGING_CONNECT = 2, + + /** The peer is currently connecting. */ + STATE_CONNECTION_PENDING = 3, + + /** The peer has successfully connected, but is not ready to communicate with yet ([constant STATE_CONNECTED]). */ + STATE_CONNECTION_SUCCEEDED = 4, + + /** The peer is currently connected and ready to communicate with. */ + STATE_CONNECTED = 5, + + /** The peer is slated to disconnect after it has no more outgoing packets to send. */ + STATE_DISCONNECT_LATER = 6, + + /** The peer is currently disconnecting. */ + STATE_DISCONNECTING = 7, + + /** The peer has acknowledged the disconnection request. */ + STATE_ACKNOWLEDGING_DISCONNECT = 8, + + /** The peer has lost connection, but is not considered truly disconnected (as the peer didn't acknowledge the disconnection request). */ + STATE_ZOMBIE = 9, + } + enum PeerStatistic { + /** Mean packet loss of reliable packets as a ratio with respect to the [constant PACKET_LOSS_SCALE]. */ + PEER_PACKET_LOSS = 0, + + /** Packet loss variance. */ + PEER_PACKET_LOSS_VARIANCE = 1, + + /** The time at which packet loss statistics were last updated (in milliseconds since the connection started). The interval for packet loss statistics updates is 10 seconds, and at least one packet must have been sent since the last statistics update. */ + PEER_PACKET_LOSS_EPOCH = 2, + + /** Mean packet round trip time for reliable packets. */ + PEER_ROUND_TRIP_TIME = 3, + + /** Variance of the mean round trip time. */ + PEER_ROUND_TRIP_TIME_VARIANCE = 4, + + /** Last recorded round trip time for a reliable packet. */ + PEER_LAST_ROUND_TRIP_TIME = 5, + + /** Variance of the last trip time recorded. */ + PEER_LAST_ROUND_TRIP_TIME_VARIANCE = 6, + + /** The peer's current throttle status. */ + PEER_PACKET_THROTTLE = 7, + + /** The maximum number of unreliable packets that should not be dropped. This value is always greater than or equal to `1`. The initial value is equal to [constant PACKET_THROTTLE_SCALE]. */ + PEER_PACKET_THROTTLE_LIMIT = 8, + + /** Internal value used to increment the packet throttle counter. The value is hardcoded to `7` and cannot be changed. You probably want to look at [constant PEER_PACKET_THROTTLE_ACCELERATION] instead. */ + PEER_PACKET_THROTTLE_COUNTER = 9, + + /** The time at which throttle statistics were last updated (in milliseconds since the connection started). The interval for throttle statistics updates is [constant PEER_PACKET_THROTTLE_INTERVAL]. */ + PEER_PACKET_THROTTLE_EPOCH = 10, + + /** The throttle's acceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *more* often. The default value is `2`. */ + PEER_PACKET_THROTTLE_ACCELERATION = 11, + + /** The throttle's deceleration factor. Higher values will make ENet adapt to fluctuating network conditions faster, causing unrelaible packets to be sent *less* often. The default value is `2`. */ + PEER_PACKET_THROTTLE_DECELERATION = 12, + + /** The interval over which the lowest mean round trip time should be measured for use by the throttle mechanism (in milliseconds). The default value is `5000`. */ + PEER_PACKET_THROTTLE_INTERVAL = 13, + } + } + /** A wrapper class for an [url=http://enet.bespin.org/group__peer.html]ENetPeer[/url]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_enetpacketpeer.html + */ + class ENetPacketPeer extends PacketPeer { + /** The reference scale for packet loss. See [method get_statistic] and [constant PEER_PACKET_LOSS]. */ + static readonly PACKET_LOSS_SCALE = 65536 + + /** The reference value for throttle configuration. The default value is `32`. See [method throttle_configure]. */ + static readonly PACKET_THROTTLE_SCALE = 32 + + /** Mark the packet to be sent as reliable. */ + static readonly FLAG_RELIABLE = 1 + + /** Mark the packet to be sent unsequenced (unreliable). */ + static readonly FLAG_UNSEQUENCED = 2 + + /** Mark the packet to be sent unreliable even if the packet is too big and needs fragmentation (increasing the chance of it being dropped). */ + static readonly FLAG_UNRELIABLE_FRAGMENT = 8 + constructor(identifier?: any) + + /** Request a disconnection from a peer. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete. */ + peer_disconnect(data: int64 = 0): void + + /** Request a disconnection from a peer, but only after all queued outgoing packets are sent. An [constant ENetConnection.EVENT_DISCONNECT] will be generated during [method ENetConnection.service] once the disconnection is complete. */ + peer_disconnect_later(data: int64 = 0): void + + /** Force an immediate disconnection from a peer. No [constant ENetConnection.EVENT_DISCONNECT] will be generated. The foreign peer is not guaranteed to receive the disconnect notification, and is reset immediately upon return from this function. */ + peer_disconnect_now(data: int64 = 0): void + + /** Sends a ping request to a peer. ENet automatically pings all connected peers at regular intervals, however, this function may be called to ensure more frequent ping requests. */ + ping(): void + + /** Sets the [param ping_interval] in milliseconds at which pings will be sent to a peer. Pings are used both to monitor the liveness of the connection and also to dynamically adjust the throttle during periods of low traffic so that the throttle has reasonable responsiveness during traffic spikes. The default ping interval is `500` milliseconds. */ + ping_interval(ping_interval: int64): void + + /** Forcefully disconnects a peer. The foreign host represented by the peer is not notified of the disconnection and will timeout on its connection to the local host. */ + reset(): void + + /** Queues a [param packet] to be sent over the specified [param channel]. See `FLAG_*` constants for available packet flags. */ + send(channel: int64, packet: PackedByteArray | byte[] | ArrayBuffer, flags: int64): GError + + /** Configures throttle parameter for a peer. + * Unreliable packets are dropped by ENet in response to the varying conditions of the Internet connection to the peer. The throttle represents a probability that an unreliable packet should not be dropped and thus sent by ENet to the peer. By measuring fluctuations in round trip times of reliable packets over the specified [param interval], ENet will either increase the probability by the amount specified in the [param acceleration] parameter, or decrease it by the amount specified in the [param deceleration] parameter (both are ratios to [constant PACKET_THROTTLE_SCALE]). + * When the throttle has a value of [constant PACKET_THROTTLE_SCALE], no unreliable packets are dropped by ENet, and so 100% of all unreliable packets will be sent. + * When the throttle has a value of `0`, all unreliable packets are dropped by ENet, and so 0% of all unreliable packets will be sent. + * Intermediate values for the throttle represent intermediate probabilities between 0% and 100% of unreliable packets being sent. The bandwidth limits of the local and foreign hosts are taken into account to determine a sensible limit for the throttle probability above which it should not raise even in the best of conditions. + */ + throttle_configure(interval: int64, acceleration: int64, deceleration: int64): void + + /** Sets the timeout parameters for a peer. The timeout parameters control how and when a peer will timeout from a failure to acknowledge reliable traffic. Timeout values are expressed in milliseconds. + * The [param timeout] is a factor that, multiplied by a value based on the average round trip time, will determine the timeout limit for a reliable packet. When that limit is reached, the timeout will be doubled, and the peer will be disconnected if that limit has reached [param timeout_min]. The [param timeout_max] parameter, on the other hand, defines a fixed timeout for which any packet must be acknowledged or the peer will be dropped. + */ + set_timeout(timeout: int64, timeout_min: int64, timeout_max: int64): void + + /** Returns the IP address of this peer. */ + get_remote_address(): string + + /** Returns the remote port of this peer. */ + get_remote_port(): int64 + + /** Returns the requested [param statistic] for this peer. See [enum PeerStatistic]. */ + get_statistic(statistic: ENetPacketPeer.PeerStatistic): float64 + + /** Returns the current peer state. See [enum PeerState]. */ + get_state(): ENetPacketPeer.PeerState + + /** Returns the number of channels allocated for communication with peer. */ + get_channels(): int64 + + /** Returns `true` if the peer is currently active (i.e. the associated [ENetConnection] is still valid). */ + is_active(): boolean + } + class EditorAbout extends AcceptDialog { + constructor(identifier?: any) + } + class EditorAssetLibrary extends PanelContainer { + constructor(identifier?: any) + readonly install_asset: Signal2 + } + class EditorAudioBus extends PanelContainer { + constructor(identifier?: any) + update_bus(): void + update_send(): void + readonly duplicate_request: Signal0 + readonly delete_request: Signal0 + readonly vol_reset_request: Signal0 + readonly drop_end_request: Signal0 + readonly dropped: Signal0 + } + class EditorAudioBuses extends VBoxContainer { + constructor(identifier?: any) + _update_bus(_unnamed_arg0: int64): void + _update_sends(): void + } + class EditorAudioMeterNotches extends Control { + constructor(identifier?: any) + add_notch(_unnamed_arg0: float64, _unnamed_arg1: float64, _unnamed_arg2: boolean): void + _draw_audio_notches(): void + } + class EditorAudioStreamPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorAudioStreamTooltipPlugin extends EditorResourceTooltipPlugin { + constructor(identifier?: any) + } + class EditorAutoloadSettings extends VBoxContainer { + constructor(identifier?: any) + update_autoload(): void + autoload_add(_unnamed_arg0: string, _unnamed_arg1: string): boolean + autoload_remove(_unnamed_arg0: string): void + readonly autoload_changed: Signal0 + } + class EditorBitmapPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorBottomPanel extends PanelContainer { + constructor(identifier?: any) + } + namespace EditorBuildProfile { + enum BuildOption { + BUILD_OPTION_3D = 0, + BUILD_OPTION_PHYSICS_2D = 1, + BUILD_OPTION_PHYSICS_3D = 2, + BUILD_OPTION_NAVIGATION = 3, + BUILD_OPTION_XR = 4, + BUILD_OPTION_RENDERING_DEVICE = 5, + BUILD_OPTION_OPENGL = 6, + BUILD_OPTION_VULKAN = 7, + BUILD_OPTION_TEXT_SERVER_FALLBACK = 8, + BUILD_OPTION_TEXT_SERVER_ADVANCED = 9, + BUILD_OPTION_DYNAMIC_FONTS = 10, + BUILD_OPTION_WOFF2_FONTS = 11, + BUILD_OPTION_GRPAHITE_FONTS = 12, + BUILD_OPTION_MSDFGEN = 13, + BUILD_OPTION_MAX = 14, + } + enum BuildOptionCategory { + BUILD_OPTION_CATEGORY_GENERAL = 0, + BUILD_OPTION_CATEGORY_TEXT_SERVER = 1, + BUILD_OPTION_CATEGORY_MAX = 2, + } + } + class EditorBuildProfile extends RefCounted { + constructor(identifier?: any) + set_disable_class(class_name: StringName, disable: boolean): void + is_class_disabled(class_name: StringName): boolean + set_disable_build_option(build_option: EditorBuildProfile.BuildOption, disable: boolean): void + is_build_option_disabled(build_option: EditorBuildProfile.BuildOption): boolean + get_build_option_name(build_option: EditorBuildProfile.BuildOption): string + save_to_file(path: string): GError + load_from_file(path: string): GError + } + class EditorBuildProfileManager extends AcceptDialog { + constructor(identifier?: any) + _update_selected_profile(): void + } + /** Godot editor's command palette. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorcommandpalette.html + */ + class EditorCommandPalette extends ConfirmationDialog { + constructor(identifier?: any) + /** Adds a custom command to EditorCommandPalette. + * - [param command_name]: [String] (Name of the **Command**. This is displayed to the user.) + * - [param key_name]: [String] (Name of the key for a particular **Command**. This is used to uniquely identify the **Command**.) + * - [param binded_callable]: [Callable] (Callable of the **Command**. This will be executed when the **Command** is selected.) + * - [param shortcut_text]: [String] (Shortcut text of the **Command** if available.) + */ + add_command(command_name: string, key_name: string, binded_callable: Callable, shortcut_text: string = 'None'): void + + /** Removes the custom command from EditorCommandPalette. + * - [param key_name]: [String] (Name of the key for a particular **Command**.) + */ + remove_command(key_name: string): void + } + class EditorDebuggerInspector extends EditorInspector { + constructor(identifier?: any) + readonly object_selected: Signal1 + readonly object_edited: Signal3 + readonly object_property_updated: Signal2 + } + class EditorDebuggerNode extends MarginContainer { + constructor(identifier?: any) + live_debug_create_node(_unnamed_arg0: NodePath | string, _unnamed_arg1: string, _unnamed_arg2: string): void + live_debug_instantiate_node(_unnamed_arg0: NodePath | string, _unnamed_arg1: string, _unnamed_arg2: string): void + live_debug_remove_node(_unnamed_arg0: NodePath | string): void + live_debug_remove_and_keep_node(_unnamed_arg0: NodePath | string, _unnamed_arg1: int64): void + live_debug_restore_node(_unnamed_arg0: int64, _unnamed_arg1: NodePath | string, _unnamed_arg2: int64): void + live_debug_duplicate_node(_unnamed_arg0: NodePath | string, _unnamed_arg1: string): void + live_debug_reparent_node(_unnamed_arg0: NodePath | string, _unnamed_arg1: NodePath | string, _unnamed_arg2: string, _unnamed_arg3: int64): void + readonly goto_script_line: Signal0 + readonly set_execution: Signal2 + readonly clear_execution: Signal1 + readonly breaked: Signal2 + readonly breakpoint_toggled: Signal3 + readonly breakpoint_set_in_tree: Signal4 + readonly breakpoints_cleared_in_tree: Signal1 + } + /** A base class to implement debugger plugins. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editordebuggerplugin.html + */ + class EditorDebuggerPlugin extends RefCounted { + constructor(identifier?: any) + /** Override this method to be notified whenever a new [EditorDebuggerSession] is created (the session may be inactive during this stage). */ + /* gdvirtual */ _setup_session(session_id: int64): void + + /** Override this method to enable receiving messages from the debugger. If [param capture] is "my_message" then messages starting with "my_message:" will be passes to the [method _capture] method. */ + /* gdvirtual */ _has_capture(capture: string): boolean + + /** Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the message (which you can retrieve via [method get_session]). */ + /* gdvirtual */ _capture(message: string, data: GArray, session_id: int64): boolean + + /** Override this method to be notified when a breakpoint line has been clicked in the debugger breakpoint panel. */ + /* gdvirtual */ _goto_script_line(script: Script, line: int64): void + + /** Override this method to be notified when all breakpoints are cleared in the editor. */ + /* gdvirtual */ _breakpoints_cleared_in_tree(): void + + /** Override this method to be notified when a breakpoint is set in the editor. */ + /* gdvirtual */ _breakpoint_set_in_tree(script: Script, line: int64, enabled: boolean): void + + /** Returns the [EditorDebuggerSession] with the given [param id]. */ + get_session(id: int64): EditorDebuggerSession + + /** Returns an array of [EditorDebuggerSession] currently available to this debugger plugin. + * + * **Note:** Sessions in the array may be inactive, check their state via [method EditorDebuggerSession.is_active]. + */ + get_sessions(): GArray + } + class EditorDebuggerRemoteObject extends Object { + constructor(identifier?: any) + get_title(): string + get_variant(_unnamed_arg0: StringName): any + clear(): void + get_remote_object_id(): int64 + readonly value_edited: Signal3 + } + /** A class to interact with the editor debugger. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editordebuggersession.html + */ + class EditorDebuggerSession extends RefCounted { + constructor(identifier?: any) + /** Sends the given [param message] to the attached remote instance, optionally passing additionally [param data]. See [EngineDebugger] for how to retrieve those messages. */ + send_message(message: string, data: GArray = []): void + + /** Toggle the given [param profiler] on the attached remote instance, optionally passing additionally [param data]. See [EngineProfiler] for more details. */ + toggle_profiler(profiler: string, enable: boolean, data: GArray = []): void + + /** Returns `true` if the attached remote instance is currently in the debug loop. */ + is_breaked(): boolean + + /** Returns `true` if the attached remote instance can be debugged. */ + is_debuggable(): boolean + + /** Returns `true` if the debug session is currently attached to a remote instance. */ + is_active(): boolean + + /** Adds the given [param control] to the debug session UI in the debugger bottom panel. */ + add_session_tab(control: Control): void + + /** Removes the given [param control] from the debug session UI in the debugger bottom panel. */ + remove_session_tab(control: Control): void + + /** Enables or disables a specific breakpoint based on [param enabled], updating the Editor Breakpoint Panel accordingly. */ + set_breakpoint(path: string, line: int64, enabled: boolean): void + + /** Emitted when a remote instance is attached to this session (i.e. the session becomes active). */ + readonly started: Signal0 + + /** Emitted when a remote instance is detached from this session (i.e. the session becomes inactive). */ + readonly stopped: Signal0 + + /** Emitted when the attached remote instance enters a break state. If [param can_debug] is `true`, the remote instance will enter the debug loop. */ + readonly breaked: Signal1 + + /** Emitted when the attached remote instance exits a break state. */ + readonly continued: Signal0 + } + class EditorDebuggerTree extends Tree { + constructor(identifier?: any) + readonly object_selected: Signal2 + readonly save_node: Signal3 + readonly open: Signal0 + } + class EditorDirDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly copy_pressed: Signal1 + readonly move_pressed: Signal1 + } + class EditorDockManager extends Object { + constructor(identifier?: any) + } + class EditorExport extends Node { + constructor(identifier?: any) + readonly export_presets_updated: Signal0 + readonly export_presets_runnable_updated: Signal0 + } + class EditorExportGDScript extends EditorExportPlugin { + constructor(identifier?: any) + } + /** Identifies a supported export platform, and internally provides the functionality of exporting to that platform. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatform.html + */ + class EditorExportPlatform extends RefCounted { + constructor(identifier?: any) + /** Returns the name of the export operating system handled by this [EditorExportPlatform] class, as a friendly string. Possible return values are `Windows`, `Linux`, `macOS`, `Android`, `iOS`, and `Web`. */ + get_os_name(): string + } + /** Exporter for Android. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformandroid.html + */ + class EditorExportPlatformAndroid extends EditorExportPlatform { + constructor(identifier?: any) + } + /** Exporter for iOS. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformios.html + */ + class EditorExportPlatformIOS extends EditorExportPlatform { + constructor(identifier?: any) + } + /** Exporter for Linux/BSD. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformlinuxbsd.html + */ + class EditorExportPlatformLinuxBSD extends EditorExportPlatformPC { + constructor(identifier?: any) + } + /** Exporter for macOS. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformmacos.html + */ + class EditorExportPlatformMacOS extends EditorExportPlatform { + constructor(identifier?: any) + } + /** Base class for the desktop platform exporter (Windows and Linux/BSD). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformpc.html + */ + class EditorExportPlatformPC extends EditorExportPlatform { + constructor(identifier?: any) + } + /** Exporter for the Web. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformweb.html + */ + class EditorExportPlatformWeb extends EditorExportPlatform { + constructor(identifier?: any) + } + /** Exporter for Windows. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplatformwindows.html + */ + class EditorExportPlatformWindows extends EditorExportPlatformPC { + constructor(identifier?: any) + } + /** A script that is executed when exporting the project. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorexportplugin.html + */ + class EditorExportPlugin extends RefCounted { + constructor(identifier?: any) + /** Virtual method to be overridden by the user. Called for each exported file before [method _customize_resource] and [method _customize_scene]. The arguments can be used to identify the file. [param path] is the path of the file, [param type] is the [Resource] represented by the file (e.g. [PackedScene]), and [param features] is the list of features for the export. + * Calling [method skip] inside this callback will make the file not included in the export. + */ + /* gdvirtual */ _export_file(path: string, type: string, features: PackedStringArray | string[]): void + + /** Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [param features] is the list of features for the export, [param is_debug] is `true` for debug builds, [param path] is the target path for the exported project. [param flags] is only used when running a runnable profile, e.g. when using native run on Android. */ + /* gdvirtual */ _export_begin(features: PackedStringArray | string[], is_debug: boolean, path: string, flags: int64): void + + /** Virtual method to be overridden by the user. Called when the export is finished. */ + /* gdvirtual */ _export_end(): void + + /** Return `true` if this plugin will customize resources based on the platform and features used. + * When enabled, [method _get_customization_configuration_hash] and [method _customize_resource] will be called and must be implemented. + */ + /* gdvirtual */ _begin_customize_resources(platform: EditorExportPlatform, features: PackedStringArray | string[]): boolean + + /** Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return `null`. + * The *path* argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. + * Implementing this method is required if [method _begin_customize_resources] returns `true`. + */ + /* gdvirtual */ _customize_resource(resource: Resource, path: string): Resource + + /** Return `true` if this plugin will customize scenes based on the platform and features used. + * When enabled, [method _get_customization_configuration_hash] and [method _customize_scene] will be called and must be implemented. + */ + /* gdvirtual */ _begin_customize_scenes(platform: EditorExportPlatform, features: PackedStringArray | string[]): boolean + + /** Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return `null`. If a new scene is returned, it is up to you to dispose of the old one. + * Implementing this method is required if [method _begin_customize_scenes] returns `true`. + */ + /* gdvirtual */ _customize_scene(scene: Node, path: string): Node + + /** Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. + * Implementing this method is required if [method _begin_customize_resources] returns `true`. + */ + /* gdvirtual */ _get_customization_configuration_hash(): int64 + + /** This is called when the customization process for scenes ends. */ + /* gdvirtual */ _end_customize_scenes(): void + + /** This is called when the customization process for resources ends. */ + /* gdvirtual */ _end_customize_resources(): void + + /** Return a list of export options that can be configured for this export plugin. + * Each element in the return value is a [Dictionary] with the following keys: + * - `option`: A dictionary with the structure documented by [method Object.get_property_list], but all keys are optional. + * - `default_value`: The default value for this option. + * - `update_visibility`: An optional boolean value. If set to `true`, the preset will emit [signal Object.property_list_changed] when the option is changed. + */ + /* gdvirtual */ _get_export_options(platform: EditorExportPlatform): GArray + + /** Return a [Dictionary] of override values for export options, that will be used instead of user-provided values. Overridden options will be hidden from the user interface. + * + */ + /* gdvirtual */ _get_export_options_overrides(platform: EditorExportPlatform): GDictionary + + /** Return `true`, if the result of [method _get_export_options] has changed and the export options of preset corresponding to [param platform] should be updated. */ + /* gdvirtual */ _should_update_export_options(platform: EditorExportPlatform): boolean + + /** Check the requirements for the given [param option] and return a non-empty warning string if they are not met. + * + * **Note:** Use [method get_option] to check the value of the export options. + */ + /* gdvirtual */ _get_export_option_warning(platform: EditorExportPlatform, option: string): string + + /** Return a [PackedStringArray] of additional features this preset, for the given [param platform], should have. */ + /* gdvirtual */ _get_export_features(platform: EditorExportPlatform, debug: boolean): PackedStringArray + + /** Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. + * Implementing this method is required. + */ + /* gdvirtual */ _get_name(): string + + /** Return `true` if the plugin supports the given [param platform]. */ + /* gdvirtual */ _supports_platform(platform: EditorExportPlatform): boolean + + /** Virtual method to be overridden by the user. This is called to retrieve the set of Android dependencies provided by this plugin. Each returned Android dependency should have the format of an Android remote binary dependency: `org.godot.example:my-plugin:0.0.0` + * For more information see [url=https://developer.android.com/build/dependencies?agpversion=4.1#dependency-types]Android documentation on dependencies[/url]. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_dependencies(platform: EditorExportPlatform, debug: boolean): PackedStringArray + + /** Virtual method to be overridden by the user. This is called to retrieve the URLs of Maven repositories for the set of Android dependencies provided by this plugin. + * For more information see [url=https://docs.gradle.org/current/userguide/dependency_management.html#sec:maven_repo]Gradle documentation on dependency management[/url]. + * + * **Note:** Google's Maven repo and the Maven Central repo are already included by default. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_dependencies_maven_repos(platform: EditorExportPlatform, debug: boolean): PackedStringArray + + /** Virtual method to be overridden by the user. This is called to retrieve the local paths of the Android libraries archive (AAR) files provided by this plugin. + * + * **Note:** Relative paths **must** be relative to Godot's `res://addons/` directory. For example, an AAR file located under `res://addons/hello_world_plugin/HelloWorld.release.aar` can be returned as an absolute path using `res://addons/hello_world_plugin/HelloWorld.release.aar` or a relative path using `hello_world_plugin/HelloWorld.release.aar`. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_libraries(platform: EditorExportPlatform, debug: boolean): PackedStringArray + + /** Virtual method to be overridden by the user. This is used at export time to update the contents of the `activity` element in the generated Android manifest. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_manifest_activity_element_contents(platform: EditorExportPlatform, debug: boolean): string + + /** Virtual method to be overridden by the user. This is used at export time to update the contents of the `application` element in the generated Android manifest. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_manifest_application_element_contents(platform: EditorExportPlatform, debug: boolean): string + + /** Virtual method to be overridden by the user. This is used at export time to update the contents of the `manifest` element in the generated Android manifest. + * + * **Note:** Only supported on Android and requires [member EditorExportPlatformAndroid.gradle_build/use_gradle_build] to be enabled. + */ + /* gdvirtual */ _get_android_manifest_element_contents(platform: EditorExportPlatform, debug: boolean): string + + /** Adds a shared object or a directory containing only shared objects with the given [param tags] and destination [param path]. + * + * **Note:** In case of macOS exports, those shared objects will be added to `Frameworks` directory of app bundle. + * In case of a directory code-sign will error if you place non code object in directory. + */ + add_shared_object(path: string, tags: PackedStringArray | string[], target: string): void + + /** Adds a static lib from the given [param path] to the iOS project. */ + add_ios_project_static_lib(path: string): void + + /** Adds a custom file to be exported. [param path] is the virtual path that can be used to load the file, [param file] is the binary data of the file. + * When called inside [method _export_file] and [param remap] is `true`, the current file will not be exported, but instead remapped to this custom file. [param remap] is ignored when called in other places. + * [param file] will not be imported, so consider using [method _customize_resource] to remap imported resources. + */ + add_file(path: string, file: PackedByteArray | byte[] | ArrayBuffer, remap: boolean): void + + /** Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project. */ + add_ios_framework(path: string): void + + /** Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. + * + * **Note:** For static libraries (*.a) works in same way as [method add_ios_framework]. + * + * **Note:** This method should not be used for System libraries as they are already present on the device. + */ + add_ios_embedded_framework(path: string): void + + /** Adds content for iOS Property List files. */ + add_ios_plist_content(plist_content: string): void + + /** Adds linker flags for the iOS export. */ + add_ios_linker_flags(flags: string): void + + /** Adds an iOS bundle file from the given [param path] to the exported project. */ + add_ios_bundle_file(path: string): void + + /** Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. */ + add_ios_cpp_code(code: string): void + + /** Adds file or directory matching [param path] to `PlugIns` directory of macOS app bundle. + * + * **Note:** This is useful only for macOS exports. + */ + add_macos_plugin_file(path: string): void + + /** To be called inside [method _export_file]. Skips the current file, so it's not included in the export. */ + skip(): void + + /** Returns the current value of an export option supplied by [method _get_export_options]. */ + get_option(name: StringName): any + } + namespace EditorFeatureProfile { + enum Feature { + /** The 3D editor. If this feature is disabled, the 3D editor won't display but 3D nodes will still display in the Create New Node dialog. */ + FEATURE_3D = 0, + + /** The Script tab, which contains the script editor and class reference browser. If this feature is disabled, the Script tab won't display. */ + FEATURE_SCRIPT = 1, + + /** The AssetLib tab. If this feature is disabled, the AssetLib tab won't display. */ + FEATURE_ASSET_LIB = 2, + + /** Scene tree editing. If this feature is disabled, the Scene tree dock will still be visible but will be read-only. */ + FEATURE_SCENE_TREE = 3, + + /** The Node dock. If this feature is disabled, signals and groups won't be visible and modifiable from the editor. */ + FEATURE_NODE_DOCK = 4, + + /** The FileSystem dock. If this feature is disabled, the FileSystem dock won't be visible. */ + FEATURE_FILESYSTEM_DOCK = 5, + + /** The Import dock. If this feature is disabled, the Import dock won't be visible. */ + FEATURE_IMPORT_DOCK = 6, + + /** The History dock. If this feature is disabled, the History dock won't be visible. */ + FEATURE_HISTORY_DOCK = 7, + + /** Represents the size of the [enum Feature] enum. */ + FEATURE_MAX = 8, + } + } + /** An editor feature profile which can be used to disable specific features. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorfeatureprofile.html + */ + class EditorFeatureProfile extends RefCounted { + constructor(identifier?: any) + /** If [param disable] is `true`, disables the class specified by [param class_name]. When disabled, the class won't appear in the Create New Node dialog. */ + set_disable_class(class_name: StringName, disable: boolean): void + + /** Returns `true` if the class specified by [param class_name] is disabled. When disabled, the class won't appear in the Create New Node dialog. */ + is_class_disabled(class_name: StringName): boolean + + /** If [param disable] is `true`, disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. */ + set_disable_class_editor(class_name: StringName, disable: boolean): void + + /** Returns `true` if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. */ + is_class_editor_disabled(class_name: StringName): boolean + + /** If [param disable] is `true`, disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. */ + set_disable_class_property(class_name: StringName, property: StringName, disable: boolean): void + + /** Returns `true` if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. */ + is_class_property_disabled(class_name: StringName, property: StringName): boolean + + /** If [param disable] is `true`, disables the editor feature specified in [param feature]. When a feature is disabled, it will disappear from the editor entirely. */ + set_disable_feature(feature: EditorFeatureProfile.Feature, disable: boolean): void + + /** Returns `true` if the [param feature] is disabled. When a feature is disabled, it will disappear from the editor entirely. */ + is_feature_disabled(feature: EditorFeatureProfile.Feature): boolean + + /** Returns the specified [param feature]'s human-readable name. */ + get_feature_name(feature: EditorFeatureProfile.Feature): string + + /** Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the [method load_from_file] method. + * + * **Note:** Feature profiles created via the user interface are saved in the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir]. + */ + save_to_file(path: string): GError + + /** Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the [method save_to_file] method. + * + * **Note:** Feature profiles created via the user interface are loaded from the `feature_profiles` directory, as a file with the `.profile` extension. The editor configuration folder can be found by using [method EditorPaths.get_config_dir]. + */ + load_from_file(path: string): GError + } + class EditorFeatureProfileManager extends AcceptDialog { + constructor(identifier?: any) + readonly current_feature_profile_changed: Signal0 + } + namespace EditorFileDialog { + enum FileMode { + /** The [EditorFileDialog] can select only one file. Accepting the window will open the file. */ + FILE_MODE_OPEN_FILE = 0, + + /** The [EditorFileDialog] can select multiple files. Accepting the window will open all files. */ + FILE_MODE_OPEN_FILES = 1, + + /** The [EditorFileDialog] can select only one directory. Accepting the window will open the directory. */ + FILE_MODE_OPEN_DIR = 2, + + /** The [EditorFileDialog] can select a file or directory. Accepting the window will open it. */ + FILE_MODE_OPEN_ANY = 3, + + /** The [EditorFileDialog] can select only one file. Accepting the window will save the file. */ + FILE_MODE_SAVE_FILE = 4, + } + enum Access { + /** The [EditorFileDialog] can only view `res://` directory contents. */ + ACCESS_RESOURCES = 0, + + /** The [EditorFileDialog] can only view `user://` directory contents. */ + ACCESS_USERDATA = 1, + + /** The [EditorFileDialog] can view the entire local file system. */ + ACCESS_FILESYSTEM = 2, + } + enum DisplayMode { + /** The [EditorFileDialog] displays resources as thumbnails. */ + DISPLAY_THUMBNAILS = 0, + + /** The [EditorFileDialog] displays resources as a list of filenames. */ + DISPLAY_LIST = 1, + } + } + /** A modified version of [FileDialog] used by the editor. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorfiledialog.html + */ + class EditorFileDialog extends ConfirmationDialog { + constructor(identifier?: any) + _cancel_pressed(): void + + /** Removes all filters except for "All Files (*)". */ + clear_filters(): void + + /** Adds a comma-delimited file name [param filter] option to the [EditorFileDialog] with an optional [param description], which restricts what files can be picked. + * A [param filter] should be of the form `"filename.extension"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed. + * For example, a [param filter] of `"*.tscn, *.scn"` and a [param description] of `"Scenes"` results in filter text "Scenes (*.tscn, *.scn)". + */ + add_filter(filter: string, description: string = ''): void + + /** Returns the name of the [OptionButton] or [CheckBox] with index [param option]. */ + get_option_name(option: int64): string + + /** Returns an array of values of the [OptionButton] with index [param option]. */ + get_option_values(option: int64): PackedStringArray + + /** Returns the default value index of the [OptionButton] or [CheckBox] with index [param option]. */ + get_option_default(option: int64): int64 + + /** Sets the name of the [OptionButton] or [CheckBox] with index [param option]. */ + set_option_name(option: int64, name: string): void + + /** Sets the option values of the [OptionButton] with index [param option]. */ + set_option_values(option: int64, values: PackedStringArray | string[]): void + + /** Sets the default value index of the [OptionButton] or [CheckBox] with index [param option]. */ + set_option_default(option: int64, default_value_index: int64): void + + /** Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead. + * [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either `1` (checked), or `0` (unchecked). + */ + add_option(name: string, values: PackedStringArray | string[], default_value_index: int64): void + + /** Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices. */ + get_selected_options(): GDictionary + + /** Returns the [VBoxContainer] used to display the file system. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_vbox(): VBoxContainer + + /** Returns the LineEdit for the selected file. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_line_edit(): LineEdit + _thumbnail_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + _thumbnail_result(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + + /** Adds the given [param menu] to the side of the file dialog with the given [param title] text on top. Only one side menu is allowed. */ + add_side_menu(menu: Control, title: string = ''): void + + /** Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file. */ + popup_file_dialog(): void + + /** Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update. */ + invalidate(): void + + /** The location from which the user may select a file, including `res://`, `user://`, and the local file system. */ + get access(): int64 + set access(value: int64) + + /** The view format in which the [EditorFileDialog] displays resources to the user. */ + get display_mode(): int64 + set display_mode(value: int64) + + /** The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]. */ + get file_mode(): int64 + set file_mode(value: int64) + + /** The currently occupied directory. */ + get current_dir(): string + set current_dir(value: string) + + /** The currently selected file. */ + get current_file(): string + set current_file(value: string) + + /** The file system path in the address bar. */ + get current_path(): string + set current_path(value: string) + + /** The available file type filters. For example, this shows only `.png` and `.gd` files: `set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))`. Multiple file types can also be specified in a single filter. `"*.png, *.jpg, *.jpeg ; Supported Images"` will show both PNG and JPEG files when selected. */ + get filters(): PackedStringArray + set filters(value: PackedStringArray | string[]) + + /** The number of additional [OptionButton]s and [CheckBox]es in the dialog. */ + get option_count(): any /*Options,option_*/ + set option_count(value: any /*Options,option_*/) + + /** If `true`, hidden files and directories will be visible in the [EditorFileDialog]. This property is synchronized with [member EditorSettings.filesystem/file_dialog/show_hidden_files]. */ + get show_hidden_files(): boolean + set show_hidden_files(value: boolean) + + /** If `true`, the [EditorFileDialog] will not warn the user before overwriting files. */ + get disable_overwrite_warning(): boolean + set disable_overwrite_warning(value: boolean) + + /** Emitted when a file is selected. */ + readonly file_selected: Signal1 + + /** Emitted when multiple files are selected. */ + readonly files_selected: Signal1 + + /** Emitted when a directory is selected. */ + readonly dir_selected: Signal1 + } + class EditorFileServer extends Object { + constructor(identifier?: any) + } + /** Resource filesystem, as the editor sees it. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorfilesystem.html + */ + class EditorFileSystem extends Node { + constructor(identifier?: any) + /** Gets the root directory object. */ + get_filesystem(): EditorFileSystemDirectory + + /** Returns `true` if the filesystem is being scanned. */ + is_scanning(): boolean + + /** Returns the scan progress for 0 to 1 if the FS is being scanned. */ + get_scanning_progress(): float64 + + /** Scan the filesystem for changes. */ + scan(): void + + /** Check if the source of any imported resource changed. */ + scan_sources(): void + + /** Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. + * This will not import the file. To reimport, call [method reimport_files] or [method scan] methods. + */ + update_file(path: string): void + + /** Returns a view into the filesystem at [param path]. */ + get_filesystem_path(path: string): EditorFileSystemDirectory + + /** Returns the resource type of the file, given the full path. This returns a string such as `"Resource"` or `"GDScript"`, *not* a file extension such as `".gd"`. */ + get_file_type(path: string): string + + /** Reimports a set of files. Call this if these files or their `.import` files were directly edited by script or an external program. + * If the file type changed or the file was newly created, use [method update_file] or [method scan]. + * + * **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and [method Node._process], will occur during the import process due to progress bar updates. Avoid calls to [method reimport_files] or [method scan] while an import is in progress. + */ + reimport_files(files: PackedStringArray | string[]): void + + /** Emitted if the filesystem changed. */ + readonly filesystem_changed: Signal0 + + /** Emitted when the list of global script classes gets updated. */ + readonly script_classes_updated: Signal0 + + /** Emitted if the source of any imported file changed. */ + readonly sources_changed: Signal1 + + /** Emitted before a resource is reimported. */ + readonly resources_reimporting: Signal1 + + /** Emitted if a resource is reimported. */ + readonly resources_reimported: Signal1 + + /** Emitted if at least one resource is reloaded when the filesystem is scanned. */ + readonly resources_reload: Signal1 + } + /** A directory for the resource filesystem. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorfilesystemdirectory.html + */ + class EditorFileSystemDirectory extends Object { + constructor(identifier?: any) + /** Returns the number of subdirectories in this directory. */ + get_subdir_count(): int64 + + /** Returns the subdirectory at index [param idx]. */ + get_subdir(idx: int64): EditorFileSystemDirectory + + /** Returns the number of files in this directory. */ + get_file_count(): int64 + + /** Returns the name of the file at index [param idx]. */ + get_file(idx: int64): string + + /** Returns the path to the file at index [param idx]. */ + get_file_path(idx: int64): string + + /** Returns the resource type of the file at index [param idx]. This returns a string such as `"Resource"` or `"GDScript"`, *not* a file extension such as `".gd"`. */ + get_file_type(idx: int64): StringName + + /** Returns the name of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. */ + get_file_script_class_name(idx: int64): string + + /** Returns the base class of the script class defined in the file at index [param idx]. If the file doesn't define a script class using the `class_name` syntax, this will return an empty string. */ + get_file_script_class_extends(idx: int64): string + + /** Returns `true` if the file at index [param idx] imported properly. */ + get_file_import_is_valid(idx: int64): boolean + + /** Returns the name of this directory. */ + get_name(): string + + /** Returns the path to this directory. */ + get_path(): string + + /** Returns the parent directory for this directory or `null` if called on a directory at `res://` or `user://`. */ + get_parent(): EditorFileSystemDirectory + + /** Returns the index of the file with name [param name] or `-1` if not found. */ + find_file_index(name: string): int64 + + /** Returns the index of the directory with name [param name] or `-1` if not found. */ + find_dir_index(name: string): int64 + } + /** Used to query and configure import format support. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorfilesystemimportformatsupportquery.html + */ + class EditorFileSystemImportFormatSupportQuery extends RefCounted { + constructor(identifier?: any) + /** Return whether this importer is active. */ + /* gdvirtual */ _is_active(): boolean + + /** Return the file extensions supported. */ + /* gdvirtual */ _get_file_extensions(): PackedStringArray + + /** Query support. Return false if import must not continue. */ + /* gdvirtual */ _query(): boolean + } + class EditorFileSystemImportFormatSupportQueryBlend extends EditorFileSystemImportFormatSupportQuery { + constructor(identifier?: any) + } + class EditorFontPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorGradientPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorHelpBit extends VBoxContainer { + constructor(identifier?: any) + readonly request_hide: Signal0 + } + class EditorHelpSearch extends ConfirmationDialog { + constructor(identifier?: any) + readonly go_to_help: Signal0 + } + class EditorImagePreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorImportBlendRunner extends Node { + constructor(identifier?: any) + } + /** Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorimportplugin.html + */ + class EditorImportPlugin extends ResourceImporter { + constructor(identifier?: any) + /** Gets the unique name of the importer. */ + /* gdvirtual */ _get_importer_name(): string + + /** Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". */ + /* gdvirtual */ _get_visible_name(): string + + /** Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset. */ + /* gdvirtual */ _get_preset_count(): int64 + + /** Gets the name of the options preset at this index. */ + /* gdvirtual */ _get_preset_name(preset_index: int64): string + + /** Gets the list of file extensions to associate with this loader (case-insensitive). e.g. `["obj"]`. */ + /* gdvirtual */ _get_recognized_extensions(): PackedStringArray + + /** Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: `name`, `default_value`, `property_hint` (optional), `hint_string` (optional), `usage` (optional). */ + /* gdvirtual */ _get_import_options(path: string, preset_index: int64): GArray + + /** Gets the extension used to save this resource in the `.godot/imported` directory (see [member ProjectSettings.application/config/use_hidden_project_data_directory]). */ + /* gdvirtual */ _get_save_extension(): string + + /** Gets the Godot resource type associated with this loader. e.g. `"Mesh"` or `"Animation"`. */ + /* gdvirtual */ _get_resource_type(): string + + /** Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is `1.0`. */ + /* gdvirtual */ _get_priority(): float64 + + /** Gets the order of this importer to be run when importing resources. Importers with *lower* import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is `0` unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values. */ + /* gdvirtual */ _get_import_order(): int64 + + /** This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: + * + * Returns `true` to make all options always visible. + */ + /* gdvirtual */ _get_option_visibility(path: string, option_name: StringName, options: GDictionary): boolean + + /** Imports [param source_file] into [param save_path] with the import [param options] specified. The [param platform_variants] and [param gen_files] arrays will be modified by this function. + * This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. + */ + /* gdvirtual */ _import(source_file: string, save_path: string, options: GDictionary, platform_variants: GArray, gen_files: GArray): GError + + /** Tells whether this importer can be run in parallel on threads, or, on the contrary, it's only safe for the editor to call it from the main thread, for one file at a time. + * If this method is not overridden, it will return `true` by default (i.e., safe for parallel importing). + */ + /* gdvirtual */ _can_import_threaded(): boolean + + /** This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code skip-lint]generator_parameters` in the `remap` section of the `.import` file, for example to store a md5 hash of the source data. */ + append_import_external_resource(path: string, custom_options: GDictionary = new GDictionary(), custom_importer: string = '', generator_parameters: any = {}): GError + } + /** A control used to edit properties of an object. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorinspector.html + */ + class EditorInspector extends ScrollContainer { + constructor(identifier?: any) + _edit_request_change(_unnamed_arg0: Object, _unnamed_arg1: string): void + + /** Gets the path of the currently selected property. */ + get_selected_path(): string + + /** Returns the object currently selected in this inspector. */ + get_edited_object(): Object + + /** Emitted when a property is selected in the inspector. */ + readonly property_selected: Signal1 + + /** Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. */ + readonly property_keyed: Signal3 + + /** Emitted when a property is removed from the inspector. */ + readonly property_deleted: Signal1 + + /** Emitted when a resource is selected in the inspector. */ + readonly resource_selected: Signal2 + + /** Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. */ + readonly object_id_selected: Signal1 + + /** Emitted when a property is edited in the inspector. */ + readonly property_edited: Signal1 + + /** Emitted when a boolean property is toggled in the inspector. + * + * **Note:** This signal is never emitted if the internal `autoclear` property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. + */ + readonly property_toggled: Signal2 + + /** Emitted when the object being edited by the inspector has changed. */ + readonly edited_object_changed: Signal0 + + /** Emitted when a property that requires a restart to be applied is edited in the inspector. This is only used in the Project Settings and Editor Settings. */ + readonly restart_requested: Signal0 + } + class EditorInspectorCategory extends Control { + constructor(identifier?: any) + } + class EditorInspectorDefaultPlugin extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorParticleProcessMaterialPlugin extends EditorInspectorPlugin { + constructor(identifier?: any) + } + /** Plugin for adding custom property editors on the inspector. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorinspectorplugin.html + */ + class EditorInspectorPlugin extends RefCounted { + constructor(identifier?: any) + /** Returns `true` if this object can be handled by this plugin. */ + /* gdvirtual */ _can_handle(object: Object): boolean + + /** Called to allow adding controls at the beginning of the property list for [param object]. */ + /* gdvirtual */ _parse_begin(object: Object): void + + /** Called to allow adding controls at the beginning of a category in the property list for [param object]. */ + /* gdvirtual */ _parse_category(object: Object, category: string): void + + /** Called to allow adding controls at the beginning of a group or a sub-group in the property list for [param object]. */ + /* gdvirtual */ _parse_group(object: Object, group: string): void + + /** Called to allow adding property-specific editors to the property list for [param object]. The added editor control must extend [EditorProperty]. Returning `true` removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. */ + /* gdvirtual */ _parse_property(object: Object, type: Variant.Type, name: string, hint_type: PropertyHint, hint_string: string, usage_flags: PropertyUsageFlags, wide: boolean): boolean + + /** Called to allow adding controls at the end of the property list for [param object]. */ + /* gdvirtual */ _parse_end(object: Object): void + + /** Adds a custom control, which is not necessarily a property editor. */ + add_custom_control(control: Control): void + + /** Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty]. + * There can be multiple property editors for a property. If [param add_to_end] is `true`, this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is `false`. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor. + * [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead. + */ + add_property_editor(property: string, editor: Control, add_to_end: boolean = false, label: string = ''): void + + /** Adds an editor that allows modifying multiple properties. The [param editor] control must extend [EditorProperty]. */ + add_property_editor_for_multiple_properties(label: string, properties: PackedStringArray | string[], editor: Control): void + } + class EditorInspectorPlugin3DTexture extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginAnimationTrackKeyEdit extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginAudioStream extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginAudioStreamInteractive extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginBitMap extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginBoneMap extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginControl extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginCurve extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginFontPreview extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginFontVariation extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginGradient extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginGradientTexture2D extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginInputEvent extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginLayeredTexture extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginMaterial extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginMesh extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginPackedScene extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginSkeleton extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginStyleBox extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginSubViewportPreview extends EditorInspectorPluginTexture { + constructor(identifier?: any) + } + class EditorInspectorPluginSystemFont extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginTexture extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginTextureRegion extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorPluginTileData extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorRootMotionPlugin extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorInspectorSection extends Container { + constructor(identifier?: any) + setup(section: string, label: string, object: Object, bg_color: Color, foldable: boolean, indent_depth: int64 = 0, level: int64 = 1): void + get_vbox(): VBoxContainer + unfold(): void + fold(): void + } + class EditorInspectorVisualShaderModePlugin extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class EditorJSONSyntaxHighlighter extends EditorSyntaxHighlighter { + constructor(identifier?: any) + } + class EditorLayoutsDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly name_confirmed: Signal1 + } + class EditorLocaleDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly locale_selected: Signal1 + } + class EditorLog extends HBoxContainer { + constructor(identifier?: any) + } + class EditorMaterialPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorMeshPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorNativeShaderSourceVisualizer extends AcceptDialog { + constructor(identifier?: any) + _inspect_shader(_unnamed_arg0: RID): void + } + class EditorNetworkProfiler extends VBoxContainer { + constructor(identifier?: any) + readonly enable_profiling: Signal1 + readonly open_request: Signal1 + } + class EditorNode extends Node { + constructor(identifier?: any) + push_item(object: Object, property: string = '', inspector_only: boolean = false): void + set_edited_scene(_unnamed_arg0: Node): void + stop_child_process(_unnamed_arg0: int64): void + readonly request_help_search: Signal0 + readonly script_add_function_request: Signal3 + readonly resource_saved: Signal1 + readonly scene_saved: Signal1 + readonly scene_changed: Signal0 + readonly scene_closed: Signal1 + } + /** Gizmo for editing [Node3D] objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editornode3dgizmo.html + */ + class EditorNode3DGizmo extends Node3DGizmo { + constructor(identifier?: any) + /** Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method clear] at the beginning of this method and then add visual elements depending on the node's properties. */ + /* gdvirtual */ _redraw(): void + + /** Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing. + * The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information). + */ + /* gdvirtual */ _get_handle_name(id: int64, secondary: boolean): string + + /** Override this method to return `true` whenever the given handle should be highlighted in the editor. + * The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information). + */ + /* gdvirtual */ _is_handle_highlighted(id: int64, secondary: boolean): boolean + + /** Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in [method _commit_handle]. + * The [param secondary] argument is `true` when the requested handle is secondary (see [method add_handles] for more information). + */ + /* gdvirtual */ _get_handle_value(id: int64, secondary: boolean): any + /* gdvirtual */ _begin_handle_action(id: int64, secondary: boolean): void + + /** Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [param point] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. + * The [param secondary] argument is `true` when the edited handle is secondary (see [method add_handles] for more information). + */ + /* gdvirtual */ _set_handle(id: int64, secondary: boolean, camera: Camera3D, point: Vector2): void + + /** Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". + * If the [param cancel] argument is `true`, the [param restore] value should be directly set, without any [UndoRedo] action. + * The [param secondary] argument is `true` when the committed handle is secondary (see [method add_handles] for more information). + */ + /* gdvirtual */ _commit_handle(id: int64, secondary: boolean, restore: any, cancel: boolean): void + + /** Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param point] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. */ + /* gdvirtual */ _subgizmos_intersect_ray(camera: Camera3D, point: Vector2): int64 + + /** Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. */ + /* gdvirtual */ _subgizmos_intersect_frustum(camera: Camera3D, frustum: GArray): PackedInt32Array + + /** Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the [Node3D]'s local coordinate system. */ + /* gdvirtual */ _set_subgizmo_transform(id: int64, transform: Transform3D): void + + /** Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the `restore` argument in [method _commit_subgizmos]. */ + /* gdvirtual */ _get_subgizmo_transform(id: int64): Transform3D + + /** Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". + * If the [param cancel] argument is `true`, the [param restores] transforms should be directly set, without any [UndoRedo] action. + */ + /* gdvirtual */ _commit_subgizmos(ids: PackedInt32Array | int32[], restores: GArray, cancel: boolean): void + + /** Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during [method _redraw]. */ + add_lines(lines: PackedVector3Array | Vector3[], material: Material, billboard: boolean = false, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Adds a mesh to the gizmo with the specified [param material], local [param transform] and [param skeleton]. Call this method during [method _redraw]. */ + add_mesh(mesh: Mesh, material: Material = undefined, transform: Transform3D = new Transform3D(), skeleton: SkinReference = undefined): void + + /** Adds the specified [param segments] to the gizmo's collision shape for picking. Call this method during [method _redraw]. */ + add_collision_segments(segments: PackedVector3Array | Vector3[]): void + + /** Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this method during [method _redraw]. */ + add_collision_triangles(triangles: TriangleMesh): void + + /** Adds an unscaled billboard for visualization and selection. Call this method during [method _redraw]. */ + add_unscaled_billboard(material: Material, default_scale: float64 = 1, modulate: Color = new Color(1, 1, 1, 1)): void + + /** Adds a list of handles (points) which can be used to edit the properties of the gizmo's [Node3D]. The [param ids] argument can be used to specify a custom identifier for each handle, if an empty array is passed, the ids will be assigned automatically from the [param handles] argument order. + * The [param secondary] argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. + * There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw]. + */ + add_handles(handles: PackedVector3Array | Vector3[], material: Material, ids: PackedInt32Array | int32[], billboard: boolean = false, secondary: boolean = false): void + + /** Sets the reference [Node3D] node for the gizmo. [param node] must inherit from [Node3D]. */ + set_node_3d(node: Node): void + + /** Returns the [Node3D] node associated with this gizmo. */ + get_node_3d(): Node3D + + /** Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material]. */ + get_plugin(): EditorNode3DGizmoPlugin + + /** Removes everything in the gizmo including meshes, collisions and handles. */ + clear(): void + + /** Sets the gizmo's hidden state. If `true`, the gizmo will be hidden. If `false`, it will be shown. */ + set_hidden(hidden: boolean): void + + /** Returns `true` if the given subgizmo is currently selected. Can be used to highlight selected elements during [method _redraw]. */ + is_subgizmo_selected(id: int64): boolean + + /** Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw]. */ + get_subgizmo_selection(): PackedInt32Array + } + /** A class used by the editor to define Node3D gizmo types. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editornode3dgizmoplugin.html + */ + class EditorNode3DGizmoPlugin extends Resource { + constructor(identifier?: any) + /** Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns `true` the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos. */ + /* gdvirtual */ _has_gizmo(for_node_3d: Node3D): boolean + + /** Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return `null` for the rest of nodes. See also [method _has_gizmo]. */ + /* gdvirtual */ _create_gizmo(for_node_3d: Node3D): EditorNode3DGizmo + + /** Override this method to provide the name that will appear in the gizmo visibility menu. */ + /* gdvirtual */ _get_gizmo_name(): string + + /** Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. + * All built-in editor gizmos return a priority of `-1`. If not overridden, this method will return `0`, which means custom gizmos will automatically get higher priority than built-in gizmos. + */ + /* gdvirtual */ _get_priority(): int64 + + /** Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns `true` if not overridden. */ + /* gdvirtual */ _can_be_hidden(): boolean + + /** Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. */ + /* gdvirtual */ _is_selectable_when_hidden(): boolean + + /** Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method EditorNode3DGizmo.clear] at the beginning of this method and then add visual elements depending on the node's properties. */ + /* gdvirtual */ _redraw(gizmo: EditorNode3DGizmo): void + + /** Override this method to provide gizmo's handle names. The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. */ + /* gdvirtual */ _get_handle_name(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): string + + /** Override this method to return `true` whenever to given handle should be highlighted in the editor. The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). Called for this plugin's active gizmos. */ + /* gdvirtual */ _is_handle_highlighted(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): boolean + + /** Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the `restore` argument in [method _commit_handle]. + * The [param secondary] argument is `true` when the requested handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + * Called for this plugin's active gizmos. + */ + /* gdvirtual */ _get_handle_value(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): any + /* gdvirtual */ _begin_handle_action(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean): void + + /** Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [param screen_pos] is the mouse position in screen coordinates and the [param camera] can be used to convert it to raycasts. + * The [param secondary] argument is `true` when the edited handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + * Called for this plugin's active gizmos. + */ + /* gdvirtual */ _set_handle(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean, camera: Camera3D, screen_pos: Vector2): void + + /** Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [param restore] argument as "undo". + * If the [param cancel] argument is `true`, the [param restore] value should be directly set, without any [UndoRedo] action. + * The [param secondary] argument is `true` when the committed handle is secondary (see [method EditorNode3DGizmo.add_handles] for more information). + * Called for this plugin's active gizmos. + */ + /* gdvirtual */ _commit_handle(gizmo: EditorNode3DGizmo, handle_id: int64, secondary: boolean, restore: any, cancel: boolean): void + + /** Override this method to allow selecting subgizmos using mouse clicks. Given a [param camera] and a [param screen_pos] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. */ + /* gdvirtual */ _subgizmos_intersect_ray(gizmo: EditorNode3DGizmo, camera: Camera3D, screen_pos: Vector2): int64 + + /** Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. */ + /* gdvirtual */ _subgizmos_intersect_frustum(gizmo: EditorNode3DGizmo, camera: Camera3D, frustum_planes: GArray): PackedInt32Array + + /** Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the `restore` argument in [method _commit_subgizmos]. Called for this plugin's active gizmos. */ + /* gdvirtual */ _get_subgizmo_transform(gizmo: EditorNode3DGizmo, subgizmo_id: int64): Transform3D + + /** Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [param transform] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. */ + /* gdvirtual */ _set_subgizmo_transform(gizmo: EditorNode3DGizmo, subgizmo_id: int64, transform: Transform3D): void + + /** Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [param restores] transforms as "undo". + * If the [param cancel] argument is `true`, the [param restores] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. + */ + /* gdvirtual */ _commit_subgizmos(gizmo: EditorNode3DGizmo, ids: PackedInt32Array | int32[], restores: GArray, cancel: boolean): void + + /** Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden. */ + create_material(name: string, color: Color, billboard: boolean = false, on_top: boolean = false, use_vertex_color: boolean = false): void + + /** Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden. */ + create_icon_material(name: string, texture: Texture2D, on_top: boolean = false, color: Color = new Color(1, 1, 1, 1)): void + + /** Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden. + * You can optionally provide a texture to use instead of the default icon. + */ + create_handle_material(name: string, billboard: boolean = false, texture: Texture2D = undefined): void + + /** Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. */ + add_material(name: string, material: StandardMaterial3D): void + + /** Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). */ + get_material(name: string, gizmo: EditorNode3DGizmo = undefined): StandardMaterial3D + } + class EditorOBJImporter extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + class EditorObjectSelector extends Button { + constructor(identifier?: any) + } + class EditorPackedScenePreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + /** Editor-only singleton that returns paths to various OS-specific data folders and files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorpaths.html + */ + class EditorPaths extends Object { + constructor(identifier?: any) + /** Returns the absolute path to the user's data folder. This folder should be used for *persistent* user data files such as installed export templates. + * **Default paths per platform:** + * [codeblock lang=text] + * - Windows: %APPDATA%\Godot\ (same as `get_config_dir()`) + * - macOS: ~/Library/Application Support/Godot/ (same as `get_config_dir()`) + * - Linux: ~/.local/share/godot/ + * [/codeblock] + */ + get_data_dir(): string + + /** Returns the absolute path to the user's configuration folder. This folder should be used for *persistent* user configuration files. + * **Default paths per platform:** + * [codeblock lang=text] + * - Windows: %APPDATA%\Godot\ (same as `get_data_dir()`) + * - macOS: ~/Library/Application Support/Godot/ (same as `get_data_dir()`) + * - Linux: ~/.config/godot/ + * [/codeblock] + */ + get_config_dir(): string + + /** Returns the absolute path to the user's cache folder. This folder should be used for temporary data that can be removed safely whenever the editor is closed (such as generated resource thumbnails). + * **Default paths per platform:** + * [codeblock lang=text] + * - Windows: %LOCALAPPDATA%\Godot\ + * - macOS: ~/Library/Caches/Godot/ + * - Linux: ~/.cache/godot/ + * [/codeblock] + */ + get_cache_dir(): string + + /** Returns `true` if the editor is marked as self-contained, `false` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an `editor_data/` folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. + * Self-contained mode can be enabled by creating a file named `._sc_` or `_sc_` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also [method get_self_contained_file]. + * + * **Note:** On macOS, quarantine flag should be manually removed before using self-contained mode, see [url=https://docs.godotengine.org/en/stable/tutorials/export/running_on_macos.html]Running on macOS[/url]. + * + * **Note:** On macOS, placing `_sc_` or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead. + * + * **Note:** The Steam release of Godot uses self-contained mode by default. + */ + is_self_contained(): boolean + + /** Returns the absolute path to the self-contained file that makes the current Godot editor instance be considered as self-contained. Returns an empty string if the current Godot editor instance isn't self-contained. See also [method is_self_contained]. */ + get_self_contained_file(): string + + /** Returns the project-specific editor settings path. Projects all have a unique subdirectory inside the settings path where project-specific editor settings are saved. */ + get_project_settings_dir(): string + } + class EditorPerformanceProfiler extends HSplitContainer { + constructor(identifier?: any) + } + class EditorPlainTextSyntaxHighlighter extends EditorSyntaxHighlighter { + constructor(identifier?: any) + } + namespace EditorPlugin { + enum CustomControlContainer { + /** Main editor toolbar, next to play buttons. */ + CONTAINER_TOOLBAR = 0, + + /** The toolbar that appears when 3D editor is active. */ + CONTAINER_SPATIAL_EDITOR_MENU = 1, + + /** Left sidebar of the 3D editor. */ + CONTAINER_SPATIAL_EDITOR_SIDE_LEFT = 2, + + /** Right sidebar of the 3D editor. */ + CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT = 3, + + /** Bottom panel of the 3D editor. */ + CONTAINER_SPATIAL_EDITOR_BOTTOM = 4, + + /** The toolbar that appears when 2D editor is active. */ + CONTAINER_CANVAS_EDITOR_MENU = 5, + + /** Left sidebar of the 2D editor. */ + CONTAINER_CANVAS_EDITOR_SIDE_LEFT = 6, + + /** Right sidebar of the 2D editor. */ + CONTAINER_CANVAS_EDITOR_SIDE_RIGHT = 7, + + /** Bottom panel of the 2D editor. */ + CONTAINER_CANVAS_EDITOR_BOTTOM = 8, + + /** Bottom section of the inspector. */ + CONTAINER_INSPECTOR_BOTTOM = 9, + + /** Tab of Project Settings dialog, to the left of other tabs. */ + CONTAINER_PROJECT_SETTING_TAB_LEFT = 10, + + /** Tab of Project Settings dialog, to the right of other tabs. */ + CONTAINER_PROJECT_SETTING_TAB_RIGHT = 11, + } + enum DockSlot { + /** Dock slot, left side, upper-left (empty in default layout). */ + DOCK_SLOT_LEFT_UL = 0, + + /** Dock slot, left side, bottom-left (empty in default layout). */ + DOCK_SLOT_LEFT_BL = 1, + + /** Dock slot, left side, upper-right (in default layout includes Scene and Import docks). */ + DOCK_SLOT_LEFT_UR = 2, + + /** Dock slot, left side, bottom-right (in default layout includes FileSystem dock). */ + DOCK_SLOT_LEFT_BR = 3, + + /** Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks). */ + DOCK_SLOT_RIGHT_UL = 4, + + /** Dock slot, right side, bottom-left (empty in default layout). */ + DOCK_SLOT_RIGHT_BL = 5, + + /** Dock slot, right side, upper-right (empty in default layout). */ + DOCK_SLOT_RIGHT_UR = 6, + + /** Dock slot, right side, bottom-right (empty in default layout). */ + DOCK_SLOT_RIGHT_BR = 7, + + /** Represents the size of the [enum DockSlot] enum. */ + DOCK_SLOT_MAX = 8, + } + enum AfterGUIInput { + /** Forwards the [InputEvent] to other EditorPlugins. */ + AFTER_GUI_INPUT_PASS = 0, + + /** Prevents the [InputEvent] from reaching other Editor classes. */ + AFTER_GUI_INPUT_STOP = 1, + + /** Pass the [InputEvent] to other editor plugins except the main [Node3D] one. This can be used to prevent node selection changes and work with sub-gizmos instead. */ + AFTER_GUI_INPUT_CUSTOM = 2, + } + } + /** Used by the editor to extend its functionality. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorplugin.html + */ + class EditorPlugin extends Node { + constructor(identifier?: any) + /** Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if `return true` [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. + * **Example:** + * + * Must `return false` in order to forward the [InputEvent] to other Editor classes. + * **Example:** + * + */ + /* gdvirtual */ _forward_canvas_gui_input(event: InputEvent): boolean + + /** Called by the engine when the 2D editor's viewport is updated. Use the `overlay` [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + * + */ + /* gdvirtual */ _forward_canvas_draw_over_viewport(viewport_control: Control): void + + /** This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + * You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. + */ + /* gdvirtual */ _forward_canvas_force_draw_over_viewport(viewport_control: Control): void + + /** Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. + * **Example:** + * + * Must `return EditorPlugin.AFTER_GUI_INPUT_PASS` in order to forward the [InputEvent] to other Editor classes. + * **Example:** + * + */ + /* gdvirtual */ _forward_3d_gui_input(viewport_camera: Camera3D, event: InputEvent): int64 + + /** Called by the engine when the 3D editor's viewport is updated. Use the `overlay` [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + * + */ + /* gdvirtual */ _forward_3d_draw_over_viewport(viewport_control: Control): void + + /** This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + * You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. + */ + /* gdvirtual */ _forward_3d_force_draw_over_viewport(viewport_control: Control): void + + /** Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. + * For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. + */ + /* gdvirtual */ _get_plugin_name(): string + + /** Override this method in your plugin to return a [Texture2D] in order to give it an icon. + * For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. + * Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size. + * + */ + /* gdvirtual */ _get_plugin_icon(): Texture2D + + /** Returns `true` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). + * When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of [method EditorInterface.get_editor_main_screen] and made visible inside [method _make_visible]. + * Use [method _get_plugin_name] and [method _get_plugin_icon] to customize the plugin button's appearance. + * + */ + /* gdvirtual */ _has_main_screen(): boolean + + /** This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. + * Remember that you have to manage the visibility of all your editor controls manually. + */ + /* gdvirtual */ _make_visible(visible: boolean): void + + /** This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. + * [param object] can be `null` if the plugin was editing an object, but there is no longer any selected object handled by this plugin. It can be used to cleanup editing state. + */ + /* gdvirtual */ _edit(object: Object): void + + /** Implement this function if your plugin edits a specific type of object (Resource or Node). If you return `true`, then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too. + * + * **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors. + */ + /* gdvirtual */ _handles(object: Object): boolean + + /** Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an `editstate` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use [method _get_window_layout] instead. + * Use [method _set_state] to restore your saved state. + * + * **Note:** This method should not be used to save important settings that should persist with the project. + * + * **Note:** You must implement [method _get_plugin_name] for the state to be stored and restored correctly. + * + */ + /* gdvirtual */ _get_state(): GDictionary + + /** Restore the state saved by [method _get_state]. This method is called when the current scene tab is changed in the editor. + * + * **Note:** Your plugin must implement [method _get_plugin_name], otherwise it will not be recognized and this method will not be called. + * + */ + /* gdvirtual */ _set_state(state: GDictionary): void + + /** Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. */ + /* gdvirtual */ _clear(): void + + /** Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes. + * When closing a scene, [param for_scene] is the path to the scene being closed. You can use it to handle built-in resources in that scene. + * If the user confirms saving, [method _save_external_data] will be called, before closing the editor. + * + * If the plugin has no scene-specific changes, you can ignore the calls when closing scenes: + * + */ + /* gdvirtual */ _get_unsaved_status(for_scene: string): string + + /** This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. */ + /* gdvirtual */ _save_external_data(): void + + /** This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. + * This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. + */ + /* gdvirtual */ _apply_changes(): void + + /** This is for editors that edit script-based objects. You can return a list of breakpoints in the format (`script:line`), for example: `res://path_to_script.gd:25`. */ + /* gdvirtual */ _get_breakpoints(): PackedStringArray + + /** Restore the plugin GUI layout and data saved by [method _get_window_layout]. This method is called for every plugin on editor startup. Use the provided [param configuration] file to read your saved data. + * + */ + /* gdvirtual */ _set_window_layout(configuration: ConfigFile): void + + /** Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the `editor_layout.cfg` file in the editor metadata directory. + * Use [method _set_window_layout] to restore your saved layout. + * + */ + /* gdvirtual */ _get_window_layout(configuration: ConfigFile): void + + /** This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. + * This method must return a boolean. If this method returns `false`, the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running. + */ + /* gdvirtual */ _build(): boolean + + /** Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window. */ + /* gdvirtual */ _enable_plugin(): void + + /** Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window. */ + /* gdvirtual */ _disable_plugin(): void + + /** Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI. + * Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). + * When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free]. + */ + add_control_to_container(container: EditorPlugin.CustomControlContainer, control: Control): void + + /** Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free]. + * Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier. + */ + add_control_to_bottom_panel(control: Control, title: string, shortcut: Shortcut = undefined): Button + + /** Adds the control to a specific dock slot (see [enum DockSlot] for options). + * If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. + * When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free]. + * Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use [kbd]Alt[/kbd] modifier. + */ + add_control_to_dock(slot: EditorPlugin.DockSlot, control: Control, shortcut: Shortcut = undefined): void + + /** Removes the control from the dock. You have to manually [method Node.queue_free] the control. */ + remove_control_from_docks(control: Control): void + + /** Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control. */ + remove_control_from_bottom_panel(control: Control): void + + /** Removes the control from the specified container. You have to manually [method Node.queue_free] the control. */ + remove_control_from_container(container: EditorPlugin.CustomControlContainer, control: Control): void + + /** Sets the tab icon for the given control in a dock slot. Setting to `null` removes the icon. */ + set_dock_tab_icon(control: Control, icon: Texture2D): void + + /** Adds a custom menu item to **Project > Tools** named [param name]. When clicked, the provided [param callable] will be called. */ + add_tool_menu_item(name: string, callable: Callable): void + + /** Adds a custom [PopupMenu] submenu under **Project > Tools >** [param name]. Use [method remove_tool_menu_item] on plugin clean up to remove the menu. */ + add_tool_submenu_item(name: string, submenu: PopupMenu): void + + /** Removes a menu [param name] from **Project > Tools**. */ + remove_tool_menu_item(name: string): void + + /** Returns the [PopupMenu] under **Scene > Export As...**. */ + get_export_as_menu(): PopupMenu + + /** Adds a custom type, which will appear in the list of nodes or resources. + * When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. + * + * **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. + * You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the `is` keyword. + * During run-time, this will be a simple object with a script so this function does not need to be called then. + * + * **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script. + */ + add_custom_type(type: string, base: string, script: Script, icon: Texture2D): void + + /** Removes a custom type added by [method add_custom_type]. */ + remove_custom_type(type: string): void + + /** Adds a script at [param path] to the Autoload list as [param name]. */ + add_autoload_singleton(name: string, path: string): void + + /** Removes an Autoload [param name] from the list. */ + remove_autoload_singleton(name: string): void + + /** Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called. */ + update_overlays(): int64 + + /** Makes a specific item in the bottom panel visible. */ + make_bottom_panel_item_visible(item: Control): void + + /** Minimizes the bottom panel. */ + hide_bottom_panel(): void + + /** Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. */ + get_undo_redo(): EditorUndoRedoManager + + /** Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. + * The callback should have 4 arguments: [Object] `undo_redo`, [Object] `modified_object`, [String] `property` and [Variant] `new_value`. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take. + */ + add_undo_redo_inspector_hook_callback(callable: Callable): void + + /** Removes a callback previously added by [method add_undo_redo_inspector_hook_callback]. */ + remove_undo_redo_inspector_hook_callback(callable: Callable): void + + /** Queue save the project's editor layout. */ + queue_save_layout(): void + + /** Registers a custom translation parser plugin for extracting translatable strings from custom files. */ + add_translation_parser_plugin(parser: EditorTranslationParserPlugin): void + + /** Removes a custom translation parser plugin registered by [method add_translation_parser_plugin]. */ + remove_translation_parser_plugin(parser: EditorTranslationParserPlugin): void + + /** Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. + * If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + * + * **Note:** If you want to import custom 3D asset formats use [method add_scene_format_importer_plugin] instead. + * See [method add_inspector_plugin] for an example of how to register a plugin. + */ + add_import_plugin(importer: EditorImportPlugin, first_priority: boolean = false): void + + /** Removes an import plugin registered by [method add_import_plugin]. */ + remove_import_plugin(importer: EditorImportPlugin): void + + /** Registers a new [EditorSceneFormatImporter]. Scene importers are used to import custom 3D asset formats as scenes. + * If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + */ + add_scene_format_importer_plugin(scene_format_importer: EditorSceneFormatImporter, first_priority: boolean = false): void + + /** Removes a scene format importer registered by [method add_scene_format_importer_plugin]. */ + remove_scene_format_importer_plugin(scene_format_importer: EditorSceneFormatImporter): void + + /** Add a [EditorScenePostImportPlugin]. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. + * If [param first_priority] is `true`, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. + */ + add_scene_post_import_plugin(scene_import_plugin: EditorScenePostImportPlugin, first_priority: boolean = false): void + + /** Remove the [EditorScenePostImportPlugin], added with [method add_scene_post_import_plugin]. */ + remove_scene_post_import_plugin(scene_import_plugin: EditorScenePostImportPlugin): void + + /** Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported. + * See [method add_inspector_plugin] for an example of how to register a plugin. + */ + add_export_plugin(plugin: EditorExportPlugin): void + + /** Removes an export plugin registered by [method add_export_plugin]. */ + remove_export_plugin(plugin: EditorExportPlugin): void + + /** Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D]. + * See [method add_inspector_plugin] for an example of how to register a plugin. + */ + add_node_3d_gizmo_plugin(plugin: EditorNode3DGizmoPlugin): void + + /** Removes a gizmo plugin registered by [method add_node_3d_gizmo_plugin]. */ + remove_node_3d_gizmo_plugin(plugin: EditorNode3DGizmoPlugin): void + + /** Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties. + * + * **Note:** Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior. + * + */ + add_inspector_plugin(plugin: EditorInspectorPlugin): void + + /** Removes an inspector plugin registered by [method add_import_plugin] */ + remove_inspector_plugin(plugin: EditorInspectorPlugin): void + + /** Registers a new [EditorResourceConversionPlugin]. Resource conversion plugins are used to add custom resource converters to the editor inspector. + * See [EditorResourceConversionPlugin] for an example of how to create a resource conversion plugin. + */ + add_resource_conversion_plugin(plugin: EditorResourceConversionPlugin): void + + /** Removes a resource conversion plugin registered by [method add_resource_conversion_plugin]. */ + remove_resource_conversion_plugin(plugin: EditorResourceConversionPlugin): void + + /** Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. */ + set_input_event_forwarding_always_enabled(): void + + /** Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. */ + set_force_draw_over_forwarding_enabled(): void + + /** Returns the [EditorInterface] singleton instance. */ + get_editor_interface(): EditorInterface + + /** Gets the Editor's dialog used for making scripts. + * + * **Note:** Users can configure it before use. + * **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. + */ + get_script_create_dialog(): ScriptCreateDialog + + /** Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. */ + add_debugger_plugin(script: EditorDebuggerPlugin): void + + /** Removes the debugger plugin with given script from the Debugger. */ + remove_debugger_plugin(script: EditorDebuggerPlugin): void + + /** Provide the version of the plugin declared in the `plugin.cfg` config file. */ + get_plugin_version(): string + + /** Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be `null`. */ + readonly scene_changed: Signal1 + + /** Emitted when user closes a scene. The argument is a file path to the closed scene. */ + readonly scene_closed: Signal1 + + /** Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. */ + readonly main_screen_changed: Signal1 + + /** Emitted when the given [param resource] was saved on disc. See also [signal scene_saved]. */ + readonly resource_saved: Signal1 + + /** Emitted when a scene was saved on disc. The argument is a file path to the saved scene. See also [signal resource_saved]. */ + readonly scene_saved: Signal1 + + /** Emitted when any project setting has changed. */ + readonly project_settings_changed: Signal0 + } + class EditorPluginCSG extends EditorPlugin { + constructor(identifier?: any) + } + class EditorPluginSettings extends VBoxContainer { + constructor(identifier?: any) + } + class EditorProfiler extends VBoxContainer { + constructor(identifier?: any) + readonly enable_profiling: Signal1 + readonly break_request: Signal0 + } + /** Custom control for editing properties that can be added to the [EditorInspector]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorproperty.html + */ + class EditorProperty extends Container { + constructor(identifier?: any) + /** When this virtual function is called, you must update your editor. */ + /* gdvirtual */ _update_property(): void + + /** Called when the read-only status of the property is changed. It may be used to change custom controls into a read-only or modifiable state. */ + /* gdvirtual */ _set_read_only(read_only: boolean): void + + /** Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property. */ + get_edited_property(): StringName + + /** Gets the edited object. */ + get_edited_object(): Object + + /** Forces refresh of the property display. */ + update_property(): void + + /** If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed. */ + add_focusable(control: Control): void + + /** Puts the [param editor] control below the property label. The control must be previously added using [method Node.add_child]. */ + set_bottom_editor(editor: Control): void + + /** If one or several properties have changed, this must be called. [param field] is used in case your editor can modify fields separately (as an example, Vector3.x). The [param changing] argument avoids the editor requesting this property to be refreshed (leave as `false` if unsure). */ + emit_changed(property: StringName, value: any, field: StringName = '', changing: boolean = false): void + _update_editor_property_status(): void + + /** Set this property to change the label (if you want to show one). */ + get label(): string + set label(value: string) + + /** Used by the inspector, set to `true` when the property is read-only. */ + get read_only(): boolean + set read_only(value: boolean) + + /** Used by the inspector, set to `true` when the property is checkable. */ + get checkable(): boolean + set checkable(value: boolean) + + /** Used by the inspector, set to `true` when the property is checked. */ + get checked(): boolean + set checked(value: boolean) + + /** Used by the inspector, set to `true` when the property is drawn with the editor theme's warning color. This is used for editable children's properties. */ + get draw_warning(): boolean + set draw_warning(value: boolean) + + /** Used by the inspector, set to `true` when the property can add keys for animation. */ + get keying(): boolean + set keying(value: boolean) + + /** Used by the inspector, set to `true` when the property can be deleted by the user. */ + get deletable(): boolean + set deletable(value: boolean) + + /** Do not emit this manually, use the [method emit_changed] method instead. */ + readonly property_changed: Signal4 + + /** Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property]. */ + readonly multiple_properties_changed: Signal2 + + /** Emit it if you want to add this value as an animation key (check for keying being enabled first). */ + readonly property_keyed: Signal1 + + /** Emitted when a property was deleted. Used internally. */ + readonly property_deleted: Signal1 + + /** Emit it if you want to key a property with a single value. */ + readonly property_keyed_with_value: Signal2 + + /** Emitted when a property was checked. Used internally. */ + readonly property_checked: Signal2 + + /** Emit it if you want to mark (or unmark) the value of a property for being saved regardless of being equal to the default value. + * The default value is the one the property will get when the node is just instantiated and can come from an ancestor scene in the inheritance/instantiation chain, a script or a builtin class. + */ + readonly property_pinned: Signal2 + + /** Emitted when the revertability (i.e., whether it has a non-default value and thus is displayed with a revert icon) of a property has changed. */ + readonly property_can_revert_changed: Signal2 + + /** If you want a sub-resource to be edited, emit this signal with the resource. */ + readonly resource_selected: Signal2 + + /** Used by sub-inspectors. Emit it if what was selected was an Object ID. */ + readonly object_id_selected: Signal2 + + /** Emitted when selected. Used internally. */ + readonly selected: Signal2 + } + class EditorPropertyCheck extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyColor extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyDictionaryObject extends RefCounted { + constructor(identifier?: any) + } + class EditorPropertyEnum extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyFloat extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyInteger extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyLayers extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyLayersGrid extends Control { + constructor(identifier?: any) + readonly flag_changed: Signal1 + readonly rename_confirmed: Signal2 + } + class EditorPropertyLocalizableString extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyMultilineText extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyNameProcessor extends Node { + constructor(identifier?: any) + } + class EditorPropertyNodePath extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyPath extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyResource extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyText extends EditorProperty { + constructor(identifier?: any) + } + class EditorPropertyVector2 extends EditorPropertyVectorN { + constructor(identifier?: any) + } + class EditorPropertyVector2i extends EditorPropertyVectorN { + constructor(identifier?: any) + } + class EditorPropertyVector3 extends EditorPropertyVectorN { + constructor(identifier?: any) + } + class EditorPropertyVectorN extends EditorProperty { + constructor(identifier?: any) + } + class EditorQuickOpen extends ConfirmationDialog { + constructor(identifier?: any) + readonly quick_open: Signal0 + } + /** Plugin for adding custom converters from one resource format to another in the editor resource picker context menu; for example, converting a [StandardMaterial3D] to a [ShaderMaterial]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorresourceconversionplugin.html + */ + class EditorResourceConversionPlugin extends RefCounted { + constructor(identifier?: any) + /** Returns the class name of the target type of [Resource] that this plugin converts source resources to. */ + /* gdvirtual */ _converts_to(): string + + /** Called to determine whether a particular [Resource] can be converted to the target resource type by this plugin. */ + /* gdvirtual */ _handles(resource: Resource): boolean + + /** Takes an input [Resource] and converts it to the type given in [method _converts_to]. The returned [Resource] is the result of the conversion, and the input [Resource] remains unchanged. */ + /* gdvirtual */ _convert(resource: Resource): Resource + } + /** Godot editor's control for selecting [Resource] type properties. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorresourcepicker.html + */ + class EditorResourcePicker extends HBoxContainer { + constructor(identifier?: any) + /** This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [param menu_node] is a reference to the [PopupMenu] node. + * + * **Note:** Implement [method _handle_menu_selected] to handle these custom items. + */ + /* gdvirtual */ _set_create_options(menu_node: Object): void + + /** This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options]. */ + /* gdvirtual */ _handle_menu_selected(id: int64): boolean + _update_resource_preview(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: int64): void + + /** Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned. */ + get_allowed_types(): PackedStringArray + + /** Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to `true`. */ + set_toggle_pressed(pressed: boolean): void + + /** The base type of allowed resource types. Can be a comma-separated list of several options. */ + get base_type(): string + set base_type(value: string) + + /** The edited resource value. */ + get edited_resource(): Resource + set edited_resource(value: Resource) + + /** If `true`, the value can be selected and edited. */ + get editable(): boolean + set editable(value: boolean) + + /** If `true`, the main button with the resource preview works in the toggle mode. Use [method set_toggle_pressed] to manually set the state. */ + get toggle_mode(): boolean + set toggle_mode(value: boolean) + + /** Emitted when the resource value was set and user clicked to edit it. When [param inspect] is `true`, the signal was caused by the context menu "Edit" or "Inspect" option. */ + readonly resource_selected: Signal2 + + /** Emitted when the value of the edited resource was changed. */ + readonly resource_changed: Signal1 + } + /** A node used to generate previews of resources or files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorresourcepreview.html + */ + class EditorResourcePreview extends Node { + constructor(identifier?: any) + /** Queue a resource file located at [param path] for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. + * + * **Note:** If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null. + */ + queue_resource_preview(path: string, receiver: Object, receiver_func: StringName, userdata: any): void + + /** Queue the [param resource] being edited for preview. Once the preview is ready, the [param receiver]'s [param receiver_func] will be called. The [param receiver_func] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [param userdata] can be anything, and will be returned when [param receiver_func] is called. + * + * **Note:** If it was not possible to create the preview the [param receiver_func] will still be called, but the preview will be null. + */ + queue_edited_resource_preview(resource: Resource, receiver: Object, receiver_func: StringName, userdata: any): void + + /** Create an own, custom preview generator. */ + add_preview_generator(generator: EditorResourcePreviewGenerator): void + + /** Removes a custom preview generator. */ + remove_preview_generator(generator: EditorResourcePreviewGenerator): void + + /** Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. */ + check_for_invalidation(path: string): void + + /** Emitted if a preview was invalidated (changed). [param path] corresponds to the path of the preview. */ + readonly preview_invalidated: Signal1 + } + /** Custom generator of previews. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorresourcepreviewgenerator.html + */ + class EditorResourcePreviewGenerator extends RefCounted { + constructor(identifier?: any) + /** Returns `true` if your generator supports the resource of type [param type]. */ + /* gdvirtual */ _handles(type: string): boolean + + /** Generate a preview from a given resource with the specified size. This must always be implemented. + * Returning an empty texture is an OK way to fail and let another generator take care. + * Care must be taken because this function is always called from a thread (not the main thread). + * [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.). + */ + /* gdvirtual */ _generate(resource: Resource, size: Vector2i, metadata: GDictionary): Texture2D + + /** Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate]. + * Returning an empty texture is an OK way to fail and let another generator take care. + * Care must be taken because this function is always called from a thread (not the main thread). + * [param metadata] dictionary can be modified to store file-specific metadata that can be used in [method EditorResourceTooltipPlugin._make_tooltip_for_path] (like image size, sample length etc.). + */ + /* gdvirtual */ _generate_from_path(path: string, size: Vector2i, metadata: GDictionary): Texture2D + + /** If this function returns `true`, the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path]. + * By default, it returns `false`. + */ + /* gdvirtual */ _generate_small_preview_automatically(): boolean + + /** If this function returns `true`, the generator will call [method _generate] or [method _generate_from_path] for small previews as well. + * By default, it returns `false`. + */ + /* gdvirtual */ _can_generate_small_preview(): boolean + } + /** A plugin that advanced tooltip for its handled resource type. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorresourcetooltipplugin.html + */ + class EditorResourceTooltipPlugin extends RefCounted { + constructor(identifier?: any) + /** Return `true` if the plugin is going to handle the given [Resource] [param type]. */ + /* gdvirtual */ _handles(type: string): boolean + + /** Create and return a tooltip that will be displayed when the user hovers a resource under the given [param path] in filesystem dock. + * The [param metadata] dictionary is provided by preview generator (see [method EditorResourcePreviewGenerator._generate]). + * [param base] is the base default tooltip, which is a [VBoxContainer] with a file name, type and size labels. If another plugin handled the same file type, [param base] will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned [Control]. + * + * **Note:** It's unadvised to use [method ResourceLoader.load], especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use [method request_thumbnail] if you want to display a preview in your tooltip. + * + * **Note:** If you decide to discard the [param base], make sure to call [method Node.queue_free], because it's not freed automatically. + * + */ + /* gdvirtual */ _make_tooltip_for_path(path: string, metadata: GDictionary, base: Control): Control + _thumbnail_ready(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + + /** Requests a thumbnail for the given [TextureRect]. The thumbnail is created asynchronously by [EditorResourcePreview] and automatically set when available. */ + request_thumbnail(path: string, control: TextureRect): void + } + class EditorRunBar extends MarginContainer { + constructor(identifier?: any) + readonly play_pressed: Signal0 + readonly stop_pressed: Signal0 + } + class EditorRunNative extends HBoxContainer { + constructor(identifier?: any) + readonly native_run: Signal1 + } + class EditorSceneExporterGLTFSettings extends RefCounted { + constructor(identifier?: any) + get copyright(): string + set copyright(value: string) + get bake_fps(): float64 + set bake_fps(value: float64) + } + /** Imports scenes from third-parties' 3D files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsceneformatimporter.html + */ + class EditorSceneFormatImporter extends RefCounted { + static readonly IMPORT_SCENE = 1 + static readonly IMPORT_ANIMATION = 2 + static readonly IMPORT_FAIL_ON_MISSING_DEPENDENCIES = 4 + static readonly IMPORT_GENERATE_TANGENT_ARRAYS = 8 + static readonly IMPORT_USE_NAMED_SKIN_BINDS = 16 + static readonly IMPORT_DISCARD_MESHES_AND_MATERIALS = 32 + static readonly IMPORT_FORCE_DISABLE_MESH_COMPRESSION = 64 + constructor(identifier?: any) + /* gdvirtual */ _get_import_flags(): int64 + /* gdvirtual */ _get_extensions(): PackedStringArray + /* gdvirtual */ _import_scene(path: string, flags: int64, options: GDictionary): Object + /* gdvirtual */ _get_import_options(path: string): void + /* gdvirtual */ _get_option_visibility(path: string, for_animation: boolean, option: string): any + } + /** Importer for Blender's `.blend` scene file format. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsceneformatimporterblend.html + */ + class EditorSceneFormatImporterBlend extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + class EditorSceneFormatImporterCollada extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + class EditorSceneFormatImporterESCN extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + /** Importer for the `.fbx` scene file format. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsceneformatimporterfbx2gltf.html + */ + class EditorSceneFormatImporterFBX2GLTF extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_editorsceneformatimportergltf.html */ + class EditorSceneFormatImporterGLTF extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + /** Import FBX files using the ufbx library. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsceneformatimporterufbx.html + */ + class EditorSceneFormatImporterUFBX extends EditorSceneFormatImporter { + constructor(identifier?: any) + } + /** Post-processes scenes after import. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorscenepostimport.html + */ + class EditorScenePostImport extends RefCounted { + constructor(identifier?: any) + /** Called after the scene was imported. This method must return the modified version of the scene. */ + /* gdvirtual */ _post_import(scene: Node): Object + + /** Returns the source file path which got imported (e.g. `res://scene.dae`). */ + get_source_file(): string + } + namespace EditorScenePostImportPlugin { + enum InternalImportCategory { + INTERNAL_IMPORT_CATEGORY_NODE = 0, + INTERNAL_IMPORT_CATEGORY_MESH_3D_NODE = 1, + INTERNAL_IMPORT_CATEGORY_MESH = 2, + INTERNAL_IMPORT_CATEGORY_MATERIAL = 3, + INTERNAL_IMPORT_CATEGORY_ANIMATION = 4, + INTERNAL_IMPORT_CATEGORY_ANIMATION_NODE = 5, + INTERNAL_IMPORT_CATEGORY_SKELETON_3D_NODE = 6, + INTERNAL_IMPORT_CATEGORY_MAX = 7, + } + } + /** Plugin to control and modifying the process of importing a scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorscenepostimportplugin.html + */ + class EditorScenePostImportPlugin extends RefCounted { + constructor(identifier?: any) + /** Override to add internal import options. These will appear in the 3D scene import dialog. Add options via [method add_import_option] and [method add_import_option_advanced]. */ + /* gdvirtual */ _get_internal_import_options(category: int64): void + + /** Return true or false whether a given option should be visible. Return null to ignore. */ + /* gdvirtual */ _get_internal_option_visibility(category: int64, for_animation: boolean, option: string): any + + /** Return true whether updating the 3D view of the import dialog needs to be updated if an option has changed. */ + /* gdvirtual */ _get_internal_option_update_view_required(category: int64, option: string): any + + /** Process a specific node or resource for a given category. */ + /* gdvirtual */ _internal_process(category: int64, base_node: Node, node: Node, resource: Resource): void + + /** Override to add general import options. These will appear in the main import dock on the editor. Add options via [method add_import_option] and [method add_import_option_advanced]. */ + /* gdvirtual */ _get_import_options(path: string): void + + /** Return true or false whether a given option should be visible. Return null to ignore. */ + /* gdvirtual */ _get_option_visibility(path: string, for_animation: boolean, option: string): any + + /** Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. */ + /* gdvirtual */ _pre_process(scene: Node): void + + /** Post process the scene. This function is called after the final scene has been configured. */ + /* gdvirtual */ _post_process(scene: Node): void + + /** Query the value of an option. This function can only be called from those querying visibility, or processing. */ + get_option_value(name: StringName): any + + /** Add a specific import option (name and default value only). This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. */ + add_import_option(name: string, value: any): void + + /** Add a specific import option. This function can only be called from [method _get_import_options] and [method _get_internal_import_options]. */ + add_import_option_advanced(type: Variant.Type, name: string, default_value: any, hint: PropertyHint = 0, hint_string: string = '', usage_flags: int64 = 6): void + } + class EditorSceneTabs extends MarginContainer { + constructor(identifier?: any) + _tab_preview_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + readonly tab_changed: Signal1 + readonly tab_closed: Signal1 + } + /** Base script that can be used to add extension functions to the editor. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorscript.html + */ + class EditorScript extends RefCounted { + constructor(identifier?: any) + /** This method is executed by the Editor when **File > Run** is used. */ + /* gdvirtual */ _run(): void + + /** Makes [param node] root of the currently opened scene. Only works if the scene is empty. If the [param node] is a scene instance, an inheriting scene will be created. */ + add_root_node(node: Node): void + + /** Returns the edited (current) scene's root [Node]. Equivalent of [method EditorInterface.get_edited_scene_root]. */ + get_scene(): Node + + /** Returns the [EditorInterface] singleton instance. */ + get_editor_interface(): EditorInterface + } + /** Godot editor's control for selecting the `script` property of a [Node]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorscriptpicker.html + */ + class EditorScriptPicker extends EditorResourcePicker { + constructor(identifier?: any) + /** The owner [Node] of the script property that holds the edited resource. */ + get script_owner(): Node + set script_owner(value: Node) + } + class EditorScriptPreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + /** Manages the SceneTree selection in the editor. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorselection.html + */ + class EditorSelection extends Object { + constructor(identifier?: any) + /** Clear the selection. */ + clear(): void + + /** Adds a node to the selection. + * + * **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node]. + */ + add_node(node: Node): void + + /** Removes a node from the selection. */ + remove_node(node: Node): void + + /** Returns the list of selected nodes. */ + get_selected_nodes(): GArray + + /** Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild. */ + get_transformable_selected_nodes(): GArray + + /** Emitted when the selection changes. */ + readonly selection_changed: Signal0 + } + /** Object that holds the project-independent editor settings. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsettings.html + */ + class EditorSettings extends Resource { + /** Emitted after any editor setting has changed. It's used by various editor plugins to update their visuals on theme changes or logic on configuration changes. */ + static readonly NOTIFICATION_EDITOR_SETTINGS_CHANGED = 10000 + constructor(identifier?: any) + + /** Returns `true` if the setting specified by [param name] exists, `false` otherwise. */ + has_setting(name: string): boolean + + /** Sets the [param value] of the setting specified by [param name]. This is equivalent to using [method Object.set] on the EditorSettings instance. */ + set_setting(name: string, value: any): void + + /** Returns the value of the setting specified by [param name]. This is equivalent to using [method Object.get] on the EditorSettings instance. */ + get_setting(name: string): any + + /** Erases the setting whose name is specified by [param property]. */ + erase(property: string): void + + /** Sets the initial value of the setting specified by [param name] to [param value]. This is used to provide a value for the Revert button in the Editor Settings. If [param update_current] is true, the current value of the setting will be set to [param value] as well. */ + set_initial_value(name: StringName, value: any, update_current: boolean): void + + /** Adds a custom property info to a property. The dictionary must contain: + * - `name`: [String] (the name of the property) + * - `type`: [int] (see [enum Variant.Type]) + * - optionally `hint`: [int] (see [enum PropertyHint]) and `hint_string`: [String] + * **Example:** + * + */ + add_property_info(info: GDictionary): void + + /** Sets project-specific metadata with the [param section], [param key] and [param data] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. */ + set_project_metadata(section: string, key: string, data: any): void + + /** Returns project-specific metadata for the [param section] and [param key] specified. If the metadata doesn't exist, [param default] will be returned instead. See also [method set_project_metadata]. */ + get_project_metadata(section: string, key: string, default_: any = {}): any + + /** Sets the list of favorite files and directories for this project. */ + set_favorites(dirs: PackedStringArray | string[]): void + + /** Returns the list of favorite files and directories for this project. */ + get_favorites(): PackedStringArray + + /** Sets the list of recently visited folders in the file dialog for this project. */ + set_recent_dirs(dirs: PackedStringArray | string[]): void + + /** Returns the list of recently visited folders in the file dialog for this project. */ + get_recent_dirs(): PackedStringArray + + /** Overrides the built-in editor action [param name] with the input actions defined in [param actions_list]. */ + set_builtin_action_override(name: string, actions_list: GArray): void + + /** Checks if any settings with the prefix [param setting_prefix] exist in the set of changed settings. See also [method get_changed_settings]. */ + check_changed_settings_in_group(setting_prefix: string): boolean + + /** Gets an array of the settings which have been changed since the last save. Note that internally `changed_settings` is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]. */ + get_changed_settings(): PackedStringArray + + /** Marks the passed editor setting as being changed, see [method get_changed_settings]. Only settings which exist (see [method has_setting]) will be accepted. */ + mark_setting_changed(setting: string): void + + /** Emitted after any editor setting has changed. */ + readonly settings_changed: Signal0 + } + class EditorSettingsDialog extends AcceptDialog { + constructor(identifier?: any) + _update_shortcuts(): void + _settings_changed(): void + } + /** Godot editor's control for editing numeric values. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorspinslider.html + */ + class EditorSpinSlider extends Range { + constructor(identifier?: any) + /** The text that displays to the left of the value. */ + get label(): string + set label(value: string) + + /** The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. */ + get suffix(): string + set suffix(value: string) + + /** If `true`, the slider can't be interacted with. */ + get read_only(): boolean + set read_only(value: boolean) + + /** If `true`, the slider will not draw background. */ + get flat(): boolean + set flat(value: boolean) + + /** If `true`, the slider and up/down arrows are hidden. */ + get hide_slider(): boolean + set hide_slider(value: boolean) + + /** Emitted when the spinner/slider is grabbed. */ + readonly grabbed: Signal0 + + /** Emitted when the spinner/slider is ungrabbed. */ + readonly ungrabbed: Signal0 + + /** Emitted when the value form gains focus. */ + readonly value_focus_entered: Signal0 + + /** Emitted when the value form loses focus. */ + readonly value_focus_exited: Signal0 + } + class EditorStandardSyntaxHighlighter extends EditorSyntaxHighlighter { + constructor(identifier?: any) + } + /** Base class for [SyntaxHighlighter] used by the [ScriptEditor]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorsyntaxhighlighter.html + */ + class EditorSyntaxHighlighter extends SyntaxHighlighter { + constructor(identifier?: any) + /** Virtual method which can be overridden to return the syntax highlighter name. */ + /* gdvirtual */ _get_name(): string + + /** Virtual method which can be overridden to return the supported language names. */ + /* gdvirtual */ _get_supported_languages(): PackedStringArray + _get_edited_resource(): RefCounted + } + class EditorTexturePreviewPlugin extends EditorResourcePreviewGenerator { + constructor(identifier?: any) + } + class EditorTextureTooltipPlugin extends EditorResourceTooltipPlugin { + constructor(identifier?: any) + } + class EditorTheme extends Theme { + constructor(identifier?: any) + } + class EditorTitleBar extends HBoxContainer { + constructor(identifier?: any) + } + class EditorToaster extends HBoxContainer { + constructor(identifier?: any) + } + /** Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editortranslationparserplugin.html + */ + class EditorTranslationParserPlugin extends RefCounted { + constructor(identifier?: any) + /** Override this method to define a custom parsing logic to extract the translatable strings. */ + /* gdvirtual */ _parse_file(path: string, msgids: GArray, msgids_context_plural: GArray): void + + /** Gets the list of file extensions to associate with this parser, e.g. `["csv"]`. */ + /* gdvirtual */ _get_recognized_extensions(): PackedStringArray + } + namespace EditorUndoRedoManager { + enum SpecialHistory { + /** Global history not associated with any scene, but with external resources etc. */ + GLOBAL_HISTORY = 0, + + /** History associated with remote inspector. Used when live editing a running project. */ + REMOTE_HISTORY = -9, + + /** Invalid "null" history. It's a special value, not associated with any object. */ + INVALID_HISTORY = -99, + } + } + /** Manages undo history of scenes opened in the editor. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorundoredomanager.html + */ + class EditorUndoRedoManager extends Object { + constructor(identifier?: any) + /** Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. + * The way actions are merged is dictated by the [param merge_mode] argument. See [enum UndoRedo.MergeMode] for details. + * If [param custom_context] object is provided, it will be used for deducing target history (instead of using the first operation). + * The way undo operation are ordered in actions is dictated by [param backward_undo_ops]. When [param backward_undo_ops] is `false` undo option are ordered in the same order they were added. Which means the first operation to be added will be the first to be undone. + */ + create_action(name: string, merge_mode: UndoRedo.MergeMode = 0, custom_context: Object = undefined, backward_undo_ops: boolean = false): void + + /** Commit the action. If [param execute] is true (default), all "do" methods/properties are called/set when this function is called. */ + commit_action(execute: boolean = true): void + + /** Returns `true` if the [EditorUndoRedoManager] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]). */ + is_committing_action(): boolean + + /** Forces the next operation (e.g. [method add_do_method]) to use the action's history rather than guessing it from the object. This is sometimes needed when a history can't be correctly determined, like for a nested resource that doesn't have a path yet. + * This method should only be used when absolutely necessary, otherwise it might cause invalid history state. For most of complex cases, the `custom_context` parameter of [method create_action] is sufficient. + */ + force_fixed_history(): void + + /** Register a method that will be called when the action is committed (i.e. the "do" action). + * If this is the first operation, the [param object] will be used to deduce target undo history. + */ + add_do_method(object: Object, method: StringName, ...vargargs: any[]): void + + /** Register a method that will be called when the action is undone (i.e. the "undo" action). + * If this is the first operation, the [param object] will be used to deduce target undo history. + */ + add_undo_method(object: Object, method: StringName, ...vargargs: any[]): void + + /** Register a property value change for "do". + * If this is the first operation, the [param object] will be used to deduce target undo history. + */ + add_do_property(object: Object, property: StringName, value: any): void + + /** Register a property value change for "undo". + * If this is the first operation, the [param object] will be used to deduce target undo history. + */ + add_undo_property(object: Object, property: StringName, value: any): void + + /** Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. */ + add_do_reference(object: Object): void + + /** Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). */ + add_undo_reference(object: Object): void + + /** Returns the history ID deduced from the given [param object]. It can be used with [method get_history_undo_redo]. */ + get_object_history_id(object: Object): int64 + + /** Returns the [UndoRedo] object associated with the given history [param id]. + * [param id] above `0` are mapped to the opened scene tabs (but it doesn't match their order). [param id] of `0` or lower have special meaning (see [enum SpecialHistory]). + * Best used with [method get_object_history_id]. This method is only provided in case you need some more advanced methods of [UndoRedo] (but keep in mind that directly operating on the [UndoRedo] object might affect editor's stability). + */ + get_history_undo_redo(id: int64): UndoRedo + + /** Emitted when the list of actions in any history has changed, either when an action is committed or a history is cleared. */ + readonly history_changed: Signal0 + + /** Emitted when the version of any history has changed as a result of undo or redo call. */ + readonly version_changed: Signal0 + } + namespace EditorVCSInterface { + enum ChangeType { + /** A new file has been added. */ + CHANGE_TYPE_NEW = 0, + + /** An earlier added file has been modified. */ + CHANGE_TYPE_MODIFIED = 1, + + /** An earlier added file has been renamed. */ + CHANGE_TYPE_RENAMED = 2, + + /** An earlier added file has been deleted. */ + CHANGE_TYPE_DELETED = 3, + + /** An earlier added file has been typechanged. */ + CHANGE_TYPE_TYPECHANGE = 4, + + /** A file is left unmerged. */ + CHANGE_TYPE_UNMERGED = 5, + } + enum TreeArea { + /** A commit is encountered from the commit area. */ + TREE_AREA_COMMIT = 0, + + /** A file is encountered from the staged area. */ + TREE_AREA_STAGED = 1, + + /** A file is encountered from the unstaged area. */ + TREE_AREA_UNSTAGED = 2, + } + } + /** Version Control System (VCS) interface, which reads and writes to the local VCS in use. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_editorvcsinterface.html + */ + class EditorVCSInterface extends Object { + constructor(identifier?: any) + /** Initializes the VCS plugin when called from the editor. Returns whether or not the plugin was successfully initialized. A VCS project is initialized at [param project_path]. */ + /* gdvirtual */ _initialize(project_path: string): boolean + + /** Set user credentials in the underlying VCS. [param username] and [param password] are used only during HTTPS authentication unless not already mentioned in the remote URL. [param ssh_public_key_path], [param ssh_private_key_path], and [param ssh_passphrase] are only used during SSH authentication. */ + /* gdvirtual */ _set_credentials(username: string, password: string, ssh_public_key_path: string, ssh_private_key_path: string, ssh_passphrase: string): void + + /** Returns an [Array] of [Dictionary] items (see [method create_status_file]), each containing the status data of every modified file in the project folder. */ + /* gdvirtual */ _get_modified_files_data(): GArray + + /** Stages the file present at [param file_path] to the staged area. */ + /* gdvirtual */ _stage_file(file_path: string): void + + /** Unstages the file present at [param file_path] from the staged area to the unstaged area. */ + /* gdvirtual */ _unstage_file(file_path: string): void + + /** Discards the changes made in a file present at [param file_path]. */ + /* gdvirtual */ _discard_file(file_path: string): void + + /** Commits the currently staged changes and applies the commit [param msg] to the resulting commit. */ + /* gdvirtual */ _commit(msg: string): void + + /** Returns an array of [Dictionary] items (see [method create_diff_file], [method create_diff_hunk], [method create_diff_line], [method add_line_diffs_into_diff_hunk] and [method add_diff_hunks_into_diff_file]), each containing information about a diff. If [param identifier] is a file path, returns a file diff, and if it is a commit identifier, then returns a commit diff. */ + /* gdvirtual */ _get_diff(identifier: string, area: int64): GArray + + /** Shuts down VCS plugin instance. Called when the user either closes the editor or shuts down the VCS plugin through the editor UI. */ + /* gdvirtual */ _shut_down(): boolean + + /** Returns the name of the underlying VCS provider. */ + /* gdvirtual */ _get_vcs_name(): string + + /** Returns an [Array] of [Dictionary] items (see [method create_commit]), each containing the data for a past commit. */ + /* gdvirtual */ _get_previous_commits(max_commits: int64): GArray + + /** Gets an instance of an [Array] of [String]s containing available branch names in the VCS. */ + /* gdvirtual */ _get_branch_list(): GArray + + /** Returns an [Array] of [String]s, each containing the name of a remote configured in the VCS. */ + /* gdvirtual */ _get_remotes(): GArray + + /** Creates a new branch named [param branch_name] in the VCS. */ + /* gdvirtual */ _create_branch(branch_name: string): void + + /** Remove a branch from the local VCS. */ + /* gdvirtual */ _remove_branch(branch_name: string): void + + /** Creates a new remote destination with name [param remote_name] and points it to [param remote_url]. This can be an HTTPS remote or an SSH remote. */ + /* gdvirtual */ _create_remote(remote_name: string, remote_url: string): void + + /** Remove a remote from the local VCS. */ + /* gdvirtual */ _remove_remote(remote_name: string): void + + /** Gets the current branch name defined in the VCS. */ + /* gdvirtual */ _get_current_branch_name(): string + + /** Checks out a [param branch_name] in the VCS. */ + /* gdvirtual */ _checkout_branch(branch_name: string): boolean + + /** Pulls changes from the remote. This can give rise to merge conflicts. */ + /* gdvirtual */ _pull(remote: string): void + + /** Pushes changes to the [param remote]. If [param force] is `true`, a force push will override the change history already present on the remote. */ + /* gdvirtual */ _push(remote: string, force: boolean): void + + /** Fetches new changes from the [param remote], but doesn't write changes to the current working directory. Equivalent to `git fetch`. */ + /* gdvirtual */ _fetch(remote: string): void + + /** Returns an [Array] of [Dictionary] items (see [method create_diff_hunk]), each containing a line diff between a file at [param file_path] and the [param text] which is passed in. */ + /* gdvirtual */ _get_line_diff(file_path: string, text: string): GArray + + /** Helper function to create a [Dictionary] for storing a line diff. [param new_line_no] is the line number in the new file (can be `-1` if the line is deleted). [param old_line_no] is the line number in the old file (can be `-1` if the line is added). [param content] is the diff text. [param status] is a single character string which stores the line origin. */ + create_diff_line(new_line_no: int64, old_line_no: int64, content: string, status: string): GDictionary + + /** Helper function to create a [Dictionary] for storing diff hunk data. [param old_start] is the starting line number in old file. [param new_start] is the starting line number in new file. [param old_lines] is the number of lines in the old file. [param new_lines] is the number of lines in the new file. */ + create_diff_hunk(old_start: int64, new_start: int64, old_lines: int64, new_lines: int64): GDictionary + + /** Helper function to create a [Dictionary] for storing old and new diff file paths. */ + create_diff_file(new_file: string, old_file: string): GDictionary + + /** Helper function to create a commit [Dictionary] item. [param msg] is the commit message of the commit. [param author] is a single human-readable string containing all the author's details, e.g. the email and name configured in the VCS. [param id] is the identifier of the commit, in whichever format your VCS may provide an identifier to commits. [param unix_timestamp] is the UTC Unix timestamp of when the commit was created. [param offset_minutes] is the timezone offset in minutes, recorded from the system timezone where the commit was created. */ + create_commit(msg: string, author: string, id: string, unix_timestamp: int64, offset_minutes: int64): GDictionary + + /** Helper function to create a [Dictionary] used by editor to read the status of a file. */ + create_status_file(file_path: string, change_type: EditorVCSInterface.ChangeType, area: EditorVCSInterface.TreeArea): GDictionary + + /** Helper function to add an array of [param diff_hunks] into a [param diff_file]. */ + add_diff_hunks_into_diff_file(diff_file: GDictionary, diff_hunks: GArray): GDictionary + + /** Helper function to add an array of [param line_diffs] into a [param diff_hunk]. */ + add_line_diffs_into_diff_hunk(diff_hunk: GDictionary, line_diffs: GArray): GDictionary + + /** Pops up an error message in the editor which is shown as coming from the underlying VCS. Use this to show VCS specific error messages. */ + popup_error(msg: string): void + } + class EditorValidationPanel extends PanelContainer { + constructor(identifier?: any) + } + class EditorVisualProfiler extends VBoxContainer { + constructor(identifier?: any) + readonly enable_profiling: Signal1 + } + class EditorZoomWidget extends HBoxContainer { + constructor(identifier?: any) + set_zoom_by_increments(increment: int64, integer_only: boolean): void + get zoom(): float64 + set zoom(value: float64) + readonly zoom_changed: Signal1 + } + /** Holds a reference to an [Object]'s instance ID. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_encodedobjectasid.html + */ + class EncodedObjectAsID extends RefCounted { + constructor(identifier?: any) + /** The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GlobalScope.instance_from_id]. */ + get object_id(): int64 + set object_id(value: int64) + } + /** Base class for creating custom profilers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_engineprofiler.html + */ + class EngineProfiler extends RefCounted { + constructor(identifier?: any) + /** Called when the profiler is enabled/disabled, along with a set of [param options]. */ + /* gdvirtual */ _toggle(enable: boolean, options: GArray): void + + /** Called when data is added to profiler using [method EngineDebugger.profiler_add_frame_data]. */ + /* gdvirtual */ _add_frame(data: GArray): void + + /** Called once every engine iteration when the profiler is active with information about the current frame. All time values are in seconds. Lower values represent faster processing times and are therefore considered better. */ + /* gdvirtual */ _tick(frame_time: float64, process_time: float64, physics_time: float64, physics_frame_time: float64): void + } + namespace Environment { + enum BGMode { + /** Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color]. */ + BG_CLEAR_COLOR = 0, + + /** Clears the background using a custom clear color. */ + BG_COLOR = 1, + + /** Displays a user-defined sky in the background. */ + BG_SKY = 2, + + /** Displays a [CanvasLayer] in the background. */ + BG_CANVAS = 3, + + /** Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. */ + BG_KEEP = 4, + + /** Displays a camera feed in the background. */ + BG_CAMERA_FEED = 5, + + /** Represents the size of the [enum BGMode] enum. */ + BG_MAX = 6, + } + enum AmbientSource { + /** Gather ambient light from whichever source is specified as the background. */ + AMBIENT_SOURCE_BG = 0, + + /** Disable ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. */ + AMBIENT_SOURCE_DISABLED = 1, + + /** Specify a specific [Color] for ambient light. This provides a slight performance boost over [constant AMBIENT_SOURCE_SKY]. */ + AMBIENT_SOURCE_COLOR = 2, + + /** Gather ambient light from the [Sky] regardless of what the background is. */ + AMBIENT_SOURCE_SKY = 3, + } + enum ReflectionSource { + /** Use the background for reflections. */ + REFLECTION_SOURCE_BG = 0, + + /** Disable reflections. This provides a slight performance boost over other options. */ + REFLECTION_SOURCE_DISABLED = 1, + + /** Use the [Sky] for reflections regardless of what the background is. */ + REFLECTION_SOURCE_SKY = 2, + } + enum ToneMapper { + /** Linear tonemapper operator. Reads the linear data and passes it on unmodified. This can cause bright lighting to look blown out, with noticeable clipping in the output colors. */ + TONE_MAPPER_LINEAR = 0, + + /** Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: `color = color / (1 + color)`. This avoids clipping bright highlights, but the resulting image can look a bit dull. */ + TONE_MAPPER_REINHARDT = 1, + + /** Filmic tonemapper operator. This avoids clipping bright highlights, with a resulting image that usually looks more vivid than [constant TONE_MAPPER_REINHARDT]. */ + TONE_MAPPER_FILMIC = 2, + + /** Use the Academy Color Encoding System tonemapper. ACES is slightly more expensive than other options, but it handles bright lighting in a more realistic fashion by desaturating it as it becomes brighter. ACES typically has a more contrasted output compared to [constant TONE_MAPPER_REINHARDT] and [constant TONE_MAPPER_FILMIC]. + * + * **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x. + */ + TONE_MAPPER_ACES = 3, + } + enum GlowBlendMode { + /** Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. */ + GLOW_BLEND_MODE_ADDITIVE = 0, + + /** Screen glow blending mode. Increases brightness, used frequently with bloom. */ + GLOW_BLEND_MODE_SCREEN = 1, + + /** Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). */ + GLOW_BLEND_MODE_SOFTLIGHT = 2, + + /** Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. */ + GLOW_BLEND_MODE_REPLACE = 3, + + /** Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect. */ + GLOW_BLEND_MODE_MIX = 4, + } + enum FogMode { + /** Use a physically-based fog model defined primarily by fog density. */ + FOG_MODE_EXPONENTIAL = 0, + + /** Use a simple fog model defined by start and end positions and a custom curve. While not physically accurate, this model can be useful when you need more artistic control. */ + FOG_MODE_DEPTH = 1, + } + enum SDFGIYScale { + /** Use 50% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be twice as short as they are wide. This allows providing increased GI detail and reduced light leaking with thin floors and ceilings. This is usually the best choice for scenes that don't feature much verticality. */ + SDFGI_Y_SCALE_50_PERCENT = 0, + + /** Use 75% scale for SDFGI on the Y (vertical) axis. This is a balance between the 50% and 100% SDFGI Y scales. */ + SDFGI_Y_SCALE_75_PERCENT = 1, + + /** Use 100% scale for SDFGI on the Y (vertical) axis. SDFGI cells will be as tall as they are wide. This is usually the best choice for highly vertical scenes. The downside is that light leaking may become more noticeable with thin floors and ceilings. */ + SDFGI_Y_SCALE_100_PERCENT = 2, + } + } + /** Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_environment.html + */ + class Environment extends Resource { + constructor(identifier?: any) + /** Sets the intensity of the glow level [param idx]. A value above `0.0` enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. */ + set_glow_level(idx: int64, intensity: float64): void + + /** Returns the intensity of the glow level [param idx]. */ + get_glow_level(idx: int64): float64 + + /** The background mode. See [enum BGMode] for possible values. */ + get background_mode(): int64 + set background_mode(value: int64) + + /** The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] background mode. */ + get background_color(): Color + set background_color(value: Color) + + /** Multiplier for background energy. Increase to make background brighter, decrease to make background dimmer. */ + get background_energy_multiplier(): float64 + set background_energy_multiplier(value: float64) + + /** Luminance of background measured in nits (candela per square meter). Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled. The default value is roughly equivalent to the sky at midday. */ + get background_intensity(): float64 + set background_intensity(value: float64) + + /** The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. */ + get background_canvas_max_layer(): int64 + set background_canvas_max_layer(value: int64) + + /** The ID of the camera feed to show in the background. */ + get background_camera_feed_id(): int64 + set background_camera_feed_id(value: int64) + + /** The [Sky] resource used for this [Environment]. */ + get sky(): Sky + set sky(value: Sky) + + /** If set to a value greater than `0.0`, overrides the field of view to use for sky rendering. If set to `0.0`, the same FOV as the current [Camera3D] is used for sky rendering. */ + get sky_custom_fov(): float64 + set sky_custom_fov(value: float64) + + /** The rotation to use for sky rendering. */ + get sky_rotation(): Vector3 + set sky_rotation(value: Vector3) + + /** The ambient light source to use for rendering materials and global illumination. */ + get ambient_light_source(): int64 + set ambient_light_source(value: int64) + + /** The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than `1.0` (exclusive). */ + get ambient_light_color(): Color + set ambient_light_color(value: Color) + + /** Defines the amount of light that the sky brings on the scene. A value of `0.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.0` 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. + * + * **Note:** [member ambient_light_sky_contribution] is internally clamped between `0.0` and `1.0` (inclusive). + */ + get ambient_light_sky_contribution(): float64 + set ambient_light_sky_contribution(value: float64) + + /** The ambient light's energy. The higher the value, the stronger the light. Only effective if [member ambient_light_sky_contribution] is lower than `1.0` (exclusive). */ + get ambient_light_energy(): float64 + set ambient_light_energy(value: float64) + + /** The reflected (specular) light source. */ + get reflected_light_source(): int64 + set reflected_light_source(value: int64) + + /** The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on an LDR display. (Godot doesn't support rendering on HDR displays yet.) */ + get tonemap_mode(): int64 + set tonemap_mode(value: int64) + + /** The default exposure used for tonemapping. Higher values result in a brighter image. See also [member tonemap_white]. */ + get tonemap_exposure(): float64 + set tonemap_exposure(value: float64) + + /** The white reference value for tonemapping (also called "whitepoint"). Higher values can make highlights look less blown out, and will also slightly darken the whole scene as a result. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. See also [member tonemap_exposure]. */ + get tonemap_white(): float64 + set tonemap_white(value: float64) + + /** If `true`, screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [VoxelGI]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. + * + * **Note:** SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility. + */ + get ssr_enabled(): boolean + set ssr_enabled(value: boolean) + + /** The maximum number of steps for screen-space reflections. Higher values are slower. */ + get ssr_max_steps(): int64 + set ssr_max_steps(value: int64) + + /** The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to `0.0`). */ + get ssr_fade_in(): float64 + set ssr_fade_in(value: float64) + + /** The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to `0.0`). */ + get ssr_fade_out(): float64 + set ssr_fade_out(value: float64) + + /** The depth tolerance for screen-space reflections. */ + get ssr_depth_tolerance(): float64 + set ssr_depth_tolerance(value: float64) + + /** If `true`, the screen-space ambient occlusion effect is enabled. This darkens objects' corners and cavities to simulate ambient light not reaching the entire object as in real life. This works well for small, dynamic objects, but baked lighting or ambient occlusion textures will do a better job at displaying ambient occlusion on large static objects. Godot uses a form of SSAO called Adaptive Screen Space Ambient Occlusion which is itself a form of Horizon Based Ambient Occlusion. + * + * **Note:** SSAO is only supported in the Forward+ rendering method, not Mobile or Compatibility. + */ + get ssao_enabled(): boolean + set ssao_enabled(value: boolean) + + /** The distance at which objects can occlude each other when calculating screen-space ambient occlusion. Higher values will result in occlusion over a greater distance at the cost of performance and quality. */ + get ssao_radius(): float64 + set ssao_radius(value: float64) + + /** The primary screen-space ambient occlusion intensity. Acts as a multiplier for the screen-space ambient occlusion effect. A higher value results in darker occlusion. */ + get ssao_intensity(): float64 + set ssao_intensity(value: float64) + + /** The distribution of occlusion. A higher value results in darker occlusion, similar to [member ssao_intensity], but with a sharper falloff. */ + get ssao_power(): float64 + set ssao_power(value: float64) + + /** Sets the strength of the additional level of detail for the screen-space ambient occlusion effect. A high value makes the detail pass more prominent, but it may contribute to aliasing in your final image. */ + get ssao_detail(): float64 + set ssao_detail(value: float64) + + /** The threshold for considering whether a given point on a surface is occluded or not represented as an angle from the horizon mapped into the `0.0-1.0` range. A value of `1.0` results in no occlusion. */ + get ssao_horizon(): float64 + set ssao_horizon(value: float64) + + /** The amount that the screen-space ambient occlusion effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. */ + get ssao_sharpness(): float64 + set ssao_sharpness(value: float64) + + /** The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than `0` will make the SSAO effect visible in direct light. */ + get ssao_light_affect(): float64 + set ssao_light_affect(value: float64) + + /** The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than `0` will make the SSAO effect visible in areas darkened by AO textures. */ + get ssao_ao_channel_affect(): float64 + set ssao_ao_channel_affect(value: float64) + + /** If `true`, the screen-space indirect lighting effect is enabled. Screen space indirect lighting is a form of indirect lighting that allows diffuse light to bounce between nearby objects. Screen-space indirect lighting works very similarly to screen-space ambient occlusion, in that it only affects a limited range. It is intended to be used along with a form of proper global illumination like SDFGI or [VoxelGI]. Screen-space indirect lighting is not affected by individual light's [member Light3D.light_indirect_energy]. + * + * **Note:** SSIL is only supported in the Forward+ rendering method, not Mobile or Compatibility. + */ + get ssil_enabled(): boolean + set ssil_enabled(value: boolean) + + /** The distance that bounced lighting can travel when using the screen space indirect lighting effect. A larger value will result in light bouncing further in a scene, but may result in under-sampling artifacts which look like long spikes surrounding light sources. */ + get ssil_radius(): float64 + set ssil_radius(value: float64) + + /** The brightness multiplier for the screen-space indirect lighting effect. A higher value will result in brighter light. */ + get ssil_intensity(): float64 + set ssil_intensity(value: float64) + + /** The amount that the screen-space indirect lighting effect is allowed to blur over the edges of objects. Setting too high will result in aliasing around the edges of objects. Setting too low will make object edges appear blurry. */ + get ssil_sharpness(): float64 + set ssil_sharpness(value: float64) + + /** Amount of normal rejection used when calculating screen-space indirect lighting. Normal rejection uses the normal of a given sample point to reject samples that are facing away from the current pixel. Normal rejection is necessary to avoid light leaking when only one side of an object is illuminated. However, normal rejection can be disabled if light leaking is desirable, such as when the scene mostly contains emissive objects that emit light from faces that cannot be seen from the camera. */ + get ssil_normal_rejection(): float64 + set ssil_normal_rejection(value: float64) + + /** If `true`, enables signed distance field global illumination for meshes that have their [member GeometryInstance3D.gi_mode] set to [constant GeometryInstance3D.GI_MODE_STATIC]. SDFGI is a real-time global illumination technique that works well with procedurally generated and user-built levels, including in situations where geometry is created during gameplay. The signed distance field is automatically generated around the camera as it moves. Dynamic lights are supported, but dynamic occluders and emissive surfaces are not. + * + * **Note:** SDFGI is only supported in the Forward+ rendering method, not Mobile or Compatibility. + * **Performance:** SDFGI is relatively demanding on the GPU and is not suited to low-end hardware such as integrated graphics (consider [LightmapGI] instead). To improve SDFGI performance, enable [member ProjectSettings.rendering/global_illumination/gi/use_half_resolution] in the Project Settings. + * + * **Note:** Meshes should have sufficiently thick walls to avoid light leaks (avoid one-sided walls). For interior levels, enclose your level geometry in a sufficiently large box and bridge the loops to close the mesh. + */ + get sdfgi_enabled(): boolean + set sdfgi_enabled(value: boolean) + + /** If `true`, SDFGI uses an occlusion detection approach to reduce light leaking. Occlusion may however introduce dark blotches in certain spots, which may be undesired in mostly outdoor scenes. [member sdfgi_use_occlusion] has a performance impact and should only be enabled when needed. */ + get sdfgi_use_occlusion(): boolean + set sdfgi_use_occlusion(value: boolean) + + /** If `true`, SDFGI takes the environment lighting into account. This should be set to `false` for interior scenes. */ + get sdfgi_read_sky_light(): boolean + set sdfgi_read_sky_light(value: boolean) + + /** The energy multiplier applied to light every time it bounces from a surface when using SDFGI. Values greater than `0.0` will simulate multiple bounces, resulting in a more realistic appearance. Increasing [member sdfgi_bounce_feedback] generally has no performance impact. See also [member sdfgi_energy]. + * + * **Note:** Values greater than `0.5` can cause infinite feedback loops and should be avoided in scenes with bright materials. + * + * **Note:** If [member sdfgi_bounce_feedback] is `0.0`, indirect lighting will not be represented in reflections as light will only bounce one time. + */ + get sdfgi_bounce_feedback(): float64 + set sdfgi_bounce_feedback(value: float64) + + /** The number of cascades to use for SDFGI (between 1 and 8). A higher number of cascades allows displaying SDFGI further away while preserving detail up close, at the cost of performance. When using SDFGI on small-scale levels, [member sdfgi_cascades] can often be decreased between `1` and `4` to improve performance. */ + get sdfgi_cascades(): int64 + set sdfgi_cascades(value: int64) + + /** The cell size to use for the closest SDFGI cascade (in 3D units). Lower values allow SDFGI to be more precise up close, at the cost of making SDFGI updates more demanding. This can cause stuttering when the camera moves fast. Higher values allow SDFGI to cover more ground, while also reducing the performance impact of SDFGI updates. + * + * **Note:** This property is linked to [member sdfgi_max_distance] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. + */ + get sdfgi_min_cell_size(): float64 + set sdfgi_min_cell_size(value: float64) + + /** + * **Note:** This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_max_distance]. Changing its value will automatically change those properties as well. + */ + get sdfgi_cascade0_distance(): float64 + set sdfgi_cascade0_distance(value: float64) + + /** The maximum distance at which SDFGI is visible. Beyond this distance, environment lighting or other sources of GI such as [ReflectionProbe] will be used as a fallback. + * + * **Note:** This property is linked to [member sdfgi_min_cell_size] and [member sdfgi_cascade0_distance]. Changing its value will automatically change those properties as well. + */ + get sdfgi_max_distance(): float64 + set sdfgi_max_distance(value: float64) + + /** The Y scale to use for SDFGI cells. Lower values will result in SDFGI cells being packed together more closely on the Y axis. This is used to balance between quality and covering a lot of vertical ground. [member sdfgi_y_scale] should be set depending on how vertical your scene is (and how fast your camera may move on the Y axis). */ + get sdfgi_y_scale(): int64 + set sdfgi_y_scale(value: int64) + + /** The energy multiplier to use for SDFGI. Higher values will result in brighter indirect lighting and reflections. See also [member sdfgi_bounce_feedback]. */ + get sdfgi_energy(): float64 + set sdfgi_energy(value: float64) + + /** The normal bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. */ + get sdfgi_normal_bias(): float64 + set sdfgi_normal_bias(value: float64) + + /** The constant bias to use for SDFGI probes. Increasing this value can reduce visible streaking artifacts on sloped surfaces, at the cost of increased light leaking. */ + get sdfgi_probe_bias(): float64 + set sdfgi_probe_bias(value: float64) + + /** If `true`, the glow effect is enabled. This simulates real world eye/camera behavior where bright pixels bleed onto surrounding pixels. + * + * **Note:** When using the Mobile rendering method, glow looks different due to the lower dynamic range available in the Mobile rendering method. + * + * **Note:** When using the Compatibility rendering method, glow uses a different implementation with some properties being unavailable and hidden from the inspector: `glow_levels/*`, [member glow_normalized], [member glow_strength], [member glow_blend_mode], [member glow_mix], [member glow_map], and [member glow_map_strength]. This implementation is optimized to run on low-end devices and is less flexible as a result. + */ + get glow_enabled(): boolean + set glow_enabled(value: boolean) + + /** If `true`, glow levels will be normalized so that summed together their intensities equal `1.0`. + * + * **Note:** [member glow_normalized] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_normalized(): boolean + set glow_normalized(value: boolean) + + /** The overall brightness multiplier of the glow effect. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this should be increased to `1.5` to compensate. */ + get glow_intensity(): float64 + set glow_intensity(value: float64) + + /** The strength of the glow effect. This applies as the glow is blurred across the screen and increases the distance and intensity of the blur. When using the Mobile rendering method, this should be increased to compensate for the lower dynamic range. + * + * **Note:** [member glow_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_strength(): float64 + set glow_strength(value: float64) + + /** When using the [constant GLOW_BLEND_MODE_MIX] [member glow_blend_mode], this controls how much the source image is blended with the glow layer. A value of `0.0` makes the glow rendering invisible, while a value of `1.0` is equivalent to [constant GLOW_BLEND_MODE_REPLACE]. + * + * **Note:** [member glow_mix] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_mix(): float64 + set glow_mix(value: float64) + + /** The bloom's intensity. If set to a value higher than `0`, this will make glow visible in areas darker than the [member glow_hdr_threshold]. */ + get glow_bloom(): float64 + set glow_bloom(value: float64) + + /** The glow blending mode. + * + * **Note:** [member glow_blend_mode] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_blend_mode(): int64 + set glow_blend_mode(value: int64) + + /** The lower threshold of the HDR glow. When using the Mobile rendering method (which only supports a lower dynamic range up to `2.0`), this may need to be below `1.0` for glow to be visible. A value of `0.9` works well in this case. This value also needs to be decreased below `1.0` when using glow in 2D, as 2D rendering is performed in SDR. */ + get glow_hdr_threshold(): float64 + set glow_hdr_threshold(value: float64) + + /** The bleed scale of the HDR glow. */ + get glow_hdr_scale(): float64 + set glow_hdr_scale(value: float64) + + /** The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. */ + get glow_hdr_luminance_cap(): float64 + set glow_hdr_luminance_cap(value: float64) + + /** How strong of an impact the [member glow_map] should have on the overall glow effect. A strength of `0.0` means the glow map has no effect on the overall glow effect. A strength of `1.0` means the glow has a full effect on the overall glow effect (and can turn off glow entirely in specific areas of the screen if the glow map has black areas). + * + * **Note:** [member glow_map_strength] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_map_strength(): float64 + set glow_map_strength(value: float64) + + /** The texture that should be used as a glow map to *multiply* the resulting glow color according to [member glow_map_strength]. This can be used to create a "lens dirt" effect. The texture's RGB color channels are used for modulation, but the alpha channel is ignored. + * + * **Note:** The texture will be stretched to fit the screen. Therefore, it's recommended to use a texture with an aspect ratio that matches your project's base aspect ratio (typically 16:9). + * + * **Note:** [member glow_map] has no effect when using the Compatibility rendering method, due to this rendering method using a simpler glow implementation optimized for low-end devices. + */ + get glow_map(): Texture2D + set glow_map(value: Texture2D) + + /** If `true`, fog effects are enabled. */ + get fog_enabled(): boolean + set fog_enabled(value: boolean) + + /** The fog mode. See [enum FogMode] for possible values. */ + get fog_mode(): int64 + set fog_mode(value: int64) + + /** The fog's color. */ + get fog_light_color(): Color + set fog_light_color(value: Color) + + /** The fog's brightness. Higher values result in brighter fog. */ + get fog_light_energy(): float64 + set fog_light_energy(value: float64) + + /** If set above `0.0`, renders the scene's directional light(s) in the fog color depending on the view angle. This can be used to give the impression that the sun is "piercing" through the fog. */ + get fog_sun_scatter(): float64 + set fog_sun_scatter(value: float64) + + /** The fog density to be used. This is demonstrated in different ways depending on the [member fog_mode] mode chosen: + * **Exponential Fog Mode:** Higher values result in denser fog. The fog rendering is exponential like in real life. + * **Depth Fog mode:** The maximum intensity of the deep fog, effect will appear in the distance (relative to the camera). At `1.0` the fog will fully obscure the scene, at `0.0` the fog will not be visible. + */ + get fog_density(): float64 + set fog_density(value: float64) + + /** If set above `0.0` (exclusive), blends between the fog's color and the color of the background [Sky]. This has a small performance cost when set above `0.0`. Must have [member background_mode] set to [constant BG_SKY]. + * This is useful to simulate [url=https://en.wikipedia.org/wiki/Aerial_perspective]aerial perspective[/url] in large scenes with low density fog. However, it is not very useful for high-density fog, as the sky will shine through. When set to `1.0`, the fog color comes completely from the [Sky]. If set to `0.0`, aerial perspective is disabled. + */ + get fog_aerial_perspective(): float64 + set fog_aerial_perspective(value: float64) + + /** The factor to use when affecting the sky with non-volumetric fog. `1.0` means that fog can fully obscure the sky. Lower values reduce the impact of fog on sky rendering, with `0.0` not affecting sky rendering at all. + * + * **Note:** [member fog_sky_affect] has no visual effect if [member fog_aerial_perspective] is `1.0`. + */ + get fog_sky_affect(): float64 + set fog_sky_affect(value: float64) + + /** The height at which the height fog effect begins. */ + get fog_height(): float64 + set fog_height(value: float64) + + /** The density used to increase fog as height decreases. To make fog increase as height increases, use a negative value. */ + get fog_height_density(): float64 + set fog_height_density(value: float64) + + /** The fog depth's intensity curve. A number of presets are available in the Inspector by right-clicking the curve. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */ + get fog_depth_curve(): float64 + set fog_depth_curve(value: float64) + + /** The fog's depth starting distance from the camera. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */ + get fog_depth_begin(): float64 + set fog_depth_begin(value: float64) + + /** The fog's depth end distance from the camera. If this value is set to `0`, it will be equal to the current camera's [member Camera3D.far] value. Only available when [member fog_mode] is set to [constant FOG_MODE_DEPTH]. */ + get fog_depth_end(): float64 + set fog_depth_end(value: float64) + + /** Enables the volumetric fog effect. Volumetric fog uses a screen-aligned froxel buffer to calculate accurate volumetric scattering in the short to medium range. Volumetric fog interacts with [FogVolume]s and lights to calculate localized and global fog. Volumetric fog uses a PBR single-scattering model based on extinction, scattering, and emission which it exposes to users as density, albedo, and emission. + * + * **Note:** Volumetric fog is only supported in the Forward+ rendering method, not Mobile or Compatibility. + */ + get volumetric_fog_enabled(): boolean + set volumetric_fog_enabled(value: boolean) + + /** The base *exponential* density of the volumetric fog. Set this to the lowest density you want to have globally. [FogVolume]s can be used to add to or subtract from this density in specific areas. Fog rendering is exponential as in real life. + * A value of `0.0` disables global volumetric fog while allowing [FogVolume]s to display volumetric fog in specific areas. + * To make volumetric fog work as a volumetric *lighting* solution, set [member volumetric_fog_density] to the lowest non-zero value (`0.0001`) then increase lights' [member Light3D.light_volumetric_fog_energy] to values between `10000` and `100000` to compensate for the very low density. + */ + get volumetric_fog_density(): float64 + set volumetric_fog_density(value: float64) + + /** The [Color] of the volumetric fog when interacting with lights. Mist and fog have an albedo close to `Color(1, 1, 1, 1)` while smoke has a darker albedo. */ + get volumetric_fog_albedo(): Color + set volumetric_fog_albedo(value: Color) + + /** The emitted light from the volumetric fog. Even with emission, volumetric fog will not cast light onto other surfaces. Emission is useful to establish an ambient color. As the volumetric fog effect uses single-scattering only, fog tends to need a little bit of emission to soften the harsh shadows. */ + get volumetric_fog_emission(): Color + set volumetric_fog_emission(value: Color) + + /** The brightness of the emitted light from the volumetric fog. */ + get volumetric_fog_emission_energy(): float64 + set volumetric_fog_emission_energy(value: float64) + + /** Scales the strength of Global Illumination used in the volumetric fog's albedo color. A value of `0.0` means that Global Illumination will not impact the volumetric fog. [member volumetric_fog_gi_inject] has a small performance cost when set above `0.0`. + * + * **Note:** This has no visible effect if [member volumetric_fog_density] is `0.0` or if [member volumetric_fog_albedo] is a fully black color. + * + * **Note:** Only [VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) are taken into account when using [member volumetric_fog_gi_inject]. Global illumination from [LightmapGI], [ReflectionProbe] and SSIL (see [member ssil_enabled]) will be ignored by volumetric fog. + */ + get volumetric_fog_gi_inject(): float64 + set volumetric_fog_gi_inject(value: float64) + + /** The direction of scattered light as it goes through the volumetric fog. A value close to `1.0` means almost all light is scattered forward. A value close to `0.0` means light is scattered equally in all directions. A value close to `-1.0` means light is scattered mostly backward. Fog and mist scatter light slightly forward, while smoke scatters light equally in all directions. */ + get volumetric_fog_anisotropy(): float64 + set volumetric_fog_anisotropy(value: float64) + + /** The distance over which the volumetric fog is computed. Increase to compute fog over a greater range, decrease to add more detail when a long range is not needed. For best quality fog, keep this as low as possible. See also [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth]. */ + get volumetric_fog_length(): float64 + set volumetric_fog_length(value: float64) + + /** The distribution of size down the length of the froxel buffer. A higher value compresses the froxels closer to the camera and places more detail closer to the camera. */ + get volumetric_fog_detail_spread(): float64 + set volumetric_fog_detail_spread(value: float64) + + /** Scales the strength of ambient light used in the volumetric fog. A value of `0.0` means that ambient light will not impact the volumetric fog. [member volumetric_fog_ambient_inject] has a small performance cost when set above `0.0`. + * + * **Note:** This has no visible effect if [member volumetric_fog_density] is `0.0` or if [member volumetric_fog_albedo] is a fully black color. + */ + get volumetric_fog_ambient_inject(): float64 + set volumetric_fog_ambient_inject(value: float64) + + /** The factor to use when affecting the sky with volumetric fog. `1.0` means that volumetric fog can fully obscure the sky. Lower values reduce the impact of volumetric fog on sky rendering, with `0.0` not affecting sky rendering at all. + * + * **Note:** [member volumetric_fog_sky_affect] also affects [FogVolume]s, even if [member volumetric_fog_density] is `0.0`. If you notice [FogVolume]s are disappearing when looking towards the sky, set [member volumetric_fog_sky_affect] to `1.0`. + */ + get volumetric_fog_sky_affect(): float64 + set volumetric_fog_sky_affect(value: float64) + + /** Enables temporal reprojection in the volumetric fog. Temporal reprojection blends the current frame's volumetric fog with the last frame's volumetric fog to smooth out jagged edges. The performance cost is minimal; however, it leads to moving [FogVolume]s and [Light3D]s "ghosting" and leaving a trail behind them. When temporal reprojection is enabled, try to avoid moving [FogVolume]s or [Light3D]s too fast. Short-lived dynamic lighting effects should have [member Light3D.light_volumetric_fog_energy] set to `0.0` to avoid ghosting. */ + get volumetric_fog_temporal_reprojection_enabled(): boolean + set volumetric_fog_temporal_reprojection_enabled(value: boolean) + + /** The amount by which to blend the last frame with the current frame. A higher number results in smoother volumetric fog, but makes "ghosting" much worse. A lower value reduces ghosting but can result in the per-frame temporal jitter becoming visible. */ + get volumetric_fog_temporal_reprojection_amount(): float64 + set volumetric_fog_temporal_reprojection_amount(value: float64) + + /** If `true`, enables the `adjustment_*` properties provided by this resource. If `false`, modifications to the `adjustment_*` properties will have no effect on the rendered scene. */ + get adjustment_enabled(): boolean + set adjustment_enabled(value: boolean) + + /** The global brightness value of the rendered scene. Effective only if [member adjustment_enabled] is `true`. */ + get adjustment_brightness(): float64 + set adjustment_brightness(value: float64) + + /** The global contrast value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is `true`. */ + get adjustment_contrast(): float64 + set adjustment_contrast(value: float64) + + /** The global color saturation value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is `true`. */ + get adjustment_saturation(): float64 + set adjustment_saturation(value: float64) + + /** The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture1D] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [member adjustment_enabled] is `true`. */ + get adjustment_color_correction(): Texture2D | Texture3D + set adjustment_color_correction(value: Texture2D | Texture3D) + } + class EventListenerLineEdit extends LineEdit { + constructor(identifier?: any) + readonly event_changed: Signal1 + } + class ExportTemplateManager extends AcceptDialog { + constructor(identifier?: any) + } + /** A class that stores an expression you can execute. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_expression.html + */ + class Expression extends RefCounted { + constructor(identifier?: any) + /** Parses the expression and returns an [enum Error] code. + * You can optionally specify names of variables that may appear in the expression with [param input_names], so that you can bind them when it gets executed. + */ + parse(expression: string, input_names: PackedStringArray | string[] = []): GError + + /** Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. + * If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order. + */ + execute(inputs: GArray = [], base_instance: Object = undefined, show_error: boolean = true, const_calls_only: boolean = false): any + + /** Returns `true` if [method execute] has failed. */ + has_execute_failed(): boolean + + /** Returns the error text if [method parse] or [method execute] has failed. */ + get_error_text(): string + } + /** Handles FBX documents. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fbxdocument.html + */ + class FBXDocument extends GLTFDocument { + constructor(identifier?: any) + } + class FBXImporterManager extends ConfirmationDialog { + constructor(identifier?: any) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_fbxstate.html */ + class FBXState extends GLTFState { + constructor(identifier?: any) + /** If `true`, the import process used auxiliary nodes called geometry helper nodes. These nodes help preserve the pivots and transformations of the original 3D model during import. */ + get allow_geometry_helper_nodes(): boolean + set allow_geometry_helper_nodes(value: boolean) + } + namespace FastNoiseLite { + enum NoiseType { + /** A lattice of points are assigned random values then interpolated based on neighboring values. */ + TYPE_VALUE = 5, + + /** Similar to Value noise, but slower. Has more variance in peaks and valleys. + * Cubic noise can be used to avoid certain artifacts when using value noise to create a bumpmap. In general, you should always use this mode if the value noise is being used for a heightmap or bumpmap. + */ + TYPE_VALUE_CUBIC = 4, + + /** A lattice of random gradients. Their dot products are interpolated to obtain values in between the lattices. */ + TYPE_PERLIN = 3, + + /** Cellular includes both Worley noise and Voronoi diagrams which creates various regions of the same value. */ + TYPE_CELLULAR = 2, + + /** As opposed to [constant TYPE_PERLIN], gradients exist in a simplex lattice rather than a grid lattice, avoiding directional artifacts. */ + TYPE_SIMPLEX = 0, + + /** Modified, higher quality version of [constant TYPE_SIMPLEX], but slower. */ + TYPE_SIMPLEX_SMOOTH = 1, + } + enum FractalType { + /** No fractal noise. */ + FRACTAL_NONE = 0, + + /** Method using Fractional Brownian Motion to combine octaves into a fractal. */ + FRACTAL_FBM = 1, + + /** Method of combining octaves into a fractal resulting in a "ridged" look. */ + FRACTAL_RIDGED = 2, + + /** Method of combining octaves into a fractal with a ping pong effect. */ + FRACTAL_PING_PONG = 3, + } + enum CellularDistanceFunction { + /** Euclidean distance to the nearest point. */ + DISTANCE_EUCLIDEAN = 0, + + /** Squared Euclidean distance to the nearest point. */ + DISTANCE_EUCLIDEAN_SQUARED = 1, + + /** Manhattan distance (taxicab metric) to the nearest point. */ + DISTANCE_MANHATTAN = 2, + + /** Blend of [constant DISTANCE_EUCLIDEAN] and [constant DISTANCE_MANHATTAN] to give curved cell boundaries */ + DISTANCE_HYBRID = 3, + } + enum CellularReturnType { + /** The cellular distance function will return the same value for all points within a cell. */ + RETURN_CELL_VALUE = 0, + + /** The cellular distance function will return a value determined by the distance to the nearest point. */ + RETURN_DISTANCE = 1, + + /** The cellular distance function returns the distance to the second-nearest point. */ + RETURN_DISTANCE2 = 2, + + /** The distance to the nearest point is added to the distance to the second-nearest point. */ + RETURN_DISTANCE2_ADD = 3, + + /** The distance to the nearest point is subtracted from the distance to the second-nearest point. */ + RETURN_DISTANCE2_SUB = 4, + + /** The distance to the nearest point is multiplied with the distance to the second-nearest point. */ + RETURN_DISTANCE2_MUL = 5, + + /** The distance to the nearest point is divided by the distance to the second-nearest point. */ + RETURN_DISTANCE2_DIV = 6, + } + enum DomainWarpType { + /** The domain is warped using the simplex noise algorithm. */ + DOMAIN_WARP_SIMPLEX = 0, + + /** The domain is warped using a simplified version of the simplex noise algorithm. */ + DOMAIN_WARP_SIMPLEX_REDUCED = 1, + + /** The domain is warped using a simple noise grid (not as smooth as the other methods, but more performant). */ + DOMAIN_WARP_BASIC_GRID = 2, + } + enum DomainWarpFractalType { + /** No fractal noise for warping the space. */ + DOMAIN_WARP_FRACTAL_NONE = 0, + + /** Warping the space progressively, octave for octave, resulting in a more "liquified" distortion. */ + DOMAIN_WARP_FRACTAL_PROGRESSIVE = 1, + + /** Warping the space independently for each octave, resulting in a more chaotic distortion. */ + DOMAIN_WARP_FRACTAL_INDEPENDENT = 2, + } + } + /** Generates noise using the FastNoiseLite library. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fastnoiselite.html + */ + class FastNoiseLite extends Noise { + constructor(identifier?: any) + _changed(): void + + /** The noise algorithm used. See [enum NoiseType]. */ + get noise_type(): int64 + set noise_type(value: int64) + + /** The random number seed for all noise types. */ + get seed(): int64 + set seed(value: int64) + + /** The frequency for all noise types. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. */ + get frequency(): float64 + set frequency(value: float64) + + /** Translate the noise input coordinates by the given [Vector3]. */ + get offset(): Vector3 + set offset(value: Vector3) + + /** The method for combining octaves into a fractal. See [enum FractalType]. */ + get fractal_type(): int64 + set fractal_type(value: int64) + + /** The number of noise layers that are sampled to get the final value for fractal noise types. */ + get fractal_octaves(): int64 + set fractal_octaves(value: int64) + + /** Frequency multiplier between subsequent octaves. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. */ + get fractal_lacunarity(): float64 + set fractal_lacunarity(value: float64) + + /** Determines the strength of each subsequent layer of noise in fractal noise. + * A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + */ + get fractal_gain(): float64 + set fractal_gain(value: float64) + + /** Higher weighting means higher octaves have less impact if lower octaves have a large impact. */ + get fractal_weighted_strength(): float64 + set fractal_weighted_strength(value: float64) + + /** Sets the strength of the fractal ping pong type. */ + get fractal_ping_pong_strength(): float64 + set fractal_ping_pong_strength(value: float64) + + /** Determines how the distance to the nearest/second-nearest point is computed. See [enum CellularDistanceFunction] for options. */ + get cellular_distance_function(): int64 + set cellular_distance_function(value: int64) + + /** Maximum distance a point can move off of its grid position. Set to `0` for an even grid. */ + get cellular_jitter(): float64 + set cellular_jitter(value: float64) + + /** Return type from cellular noise calculations. See [enum CellularReturnType]. */ + get cellular_return_type(): int64 + set cellular_return_type(value: int64) + + /** If enabled, another FastNoiseLite instance is used to warp the space, resulting in a distortion of the noise. */ + get domain_warp_enabled(): boolean + set domain_warp_enabled(value: boolean) + + /** Sets the warp algorithm. See [enum DomainWarpType]. */ + get domain_warp_type(): int64 + set domain_warp_type(value: int64) + + /** Sets the maximum warp distance from the origin. */ + get domain_warp_amplitude(): float64 + set domain_warp_amplitude(value: float64) + + /** Frequency of the noise which warps the space. Low frequency results in smooth noise while high frequency results in rougher, more granular noise. */ + get domain_warp_frequency(): float64 + set domain_warp_frequency(value: float64) + + /** The method for combining octaves into a fractal which is used to warp the space. See [enum DomainWarpFractalType]. */ + get domain_warp_fractal_type(): int64 + set domain_warp_fractal_type(value: int64) + + /** The number of noise layers that are sampled to get the final value for the fractal noise which warps the space. */ + get domain_warp_fractal_octaves(): int64 + set domain_warp_fractal_octaves(value: int64) + + /** Octave lacunarity of the fractal noise which warps the space. Increasing this value results in higher octaves producing noise with finer details and a rougher appearance. */ + get domain_warp_fractal_lacunarity(): float64 + set domain_warp_fractal_lacunarity(value: float64) + + /** Determines the strength of each subsequent layer of the noise which is used to warp the space. + * A low value places more emphasis on the lower frequency base layers, while a high value puts more emphasis on the higher frequency layers. + */ + get domain_warp_fractal_gain(): float64 + set domain_warp_fractal_gain(value: float64) + } + namespace FileAccess { + enum ModeFlags { + /** Opens the file for read operations. The cursor is positioned at the beginning of the file. */ + READ = 1, + + /** Opens the file for write operations. The file is created if it does not exist, and truncated if it does. + * + * **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]. + */ + WRITE = 2, + + /** Opens the file for read and write operations. Does not truncate the file. The cursor is positioned at the beginning of the file. */ + READ_WRITE = 3, + + /** Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. + * + * **Note:** When creating a file it must be in an already existing directory. To recursively create directories for a file path, see [method DirAccess.make_dir_recursive]. + */ + WRITE_READ = 7, + } + enum CompressionMode { + /** Uses the [url=https://fastlz.org/]FastLZ[/url] compression method. */ + COMPRESSION_FASTLZ = 0, + + /** Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method. */ + COMPRESSION_DEFLATE = 1, + + /** Uses the [url=https://facebook.github.io/zstd/]Zstandard[/url] compression method. */ + COMPRESSION_ZSTD = 2, + + /** Uses the [url=https://www.gzip.org/]gzip[/url] compression method. */ + COMPRESSION_GZIP = 3, + + /** Uses the [url=https://github.com/google/brotli]brotli[/url] compression method (only decompression is supported). */ + COMPRESSION_BROTLI = 4, + } + enum UnixPermissionFlags { + /** Read for owner bit. */ + UNIX_READ_OWNER = 256, + + /** Write for owner bit. */ + UNIX_WRITE_OWNER = 128, + + /** Execute for owner bit. */ + UNIX_EXECUTE_OWNER = 64, + + /** Read for group bit. */ + UNIX_READ_GROUP = 32, + + /** Write for group bit. */ + UNIX_WRITE_GROUP = 16, + + /** Execute for group bit. */ + UNIX_EXECUTE_GROUP = 8, + + /** Read for other bit. */ + UNIX_READ_OTHER = 4, + + /** Write for other bit. */ + UNIX_WRITE_OTHER = 2, + + /** Execute for other bit. */ + UNIX_EXECUTE_OTHER = 1, + + /** Set user id on execution bit. */ + UNIX_SET_USER_ID = 2048, + + /** Set group id on execution bit. */ + UNIX_SET_GROUP_ID = 1024, + + /** Restricted deletion (sticky) bit. */ + UNIX_RESTRICTED_DELETE = 512, + } + } + /** Provides methods for file reading and writing operations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fileaccess.html + */ + class FileAccess extends RefCounted { + constructor(identifier?: any) + /** Creates a new [FileAccess] object and opens the file for writing or reading, depending on the flags. + * Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred. + */ + static open(path: string, flags: FileAccess.ModeFlags): FileAccess + + /** Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. + * + * **Note:** The provided key must be 32 bytes long. + * Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred. + */ + static open_encrypted(path: string, mode_flags: FileAccess.ModeFlags, key: PackedByteArray | byte[] | ArrayBuffer): FileAccess + + /** Creates a new [FileAccess] object and opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. + * Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred. + */ + static open_encrypted_with_pass(path: string, mode_flags: FileAccess.ModeFlags, pass: string): FileAccess + + /** Creates a new [FileAccess] object and opens a compressed file for reading or writing. + * + * **Note:** [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround. + * Returns `null` if opening the file failed. You can use [method get_open_error] to check the error that occurred. + */ + static open_compressed(path: string, mode_flags: FileAccess.ModeFlags, compression_mode: FileAccess.CompressionMode = 0): FileAccess + + /** Returns the result of the last [method open] call in the current thread. */ + static get_open_error(): GError + + /** Returns the whole [param path] file contents as a [PackedByteArray] without any decoding. + * Returns an empty [PackedByteArray] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred. + */ + static get_file_as_bytes(path: string): PackedByteArray + + /** Returns the whole [param path] file contents as a [String]. Text is interpreted as being UTF-8 encoded. + * Returns an empty [String] if an error occurred while opening the file. You can use [method get_open_error] to check the error that occurred. + */ + static get_file_as_string(path: string): string + + /** Resizes the file to a specified length. The file must be open in a mode that permits writing. If the file is extended, NUL characters are appended. If the file is truncated, all data from the end file to the original length of the file is lost. */ + resize(length: int64): GError + + /** Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. + * + * **Note:** Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes. + */ + flush(): void + + /** Returns the path as a [String] for the current open file. */ + get_path(): string + + /** Returns the absolute path as a [String] for the current open file. */ + get_path_absolute(): string + + /** Returns `true` if the file is currently opened. */ + is_open(): boolean + + /** Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). */ + seek(position: int64): void + + /** Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). + * + * **Note:** This is an offset, so you should use negative numbers or the cursor will be at the end of the file. + */ + seek_end(position: int64 = 0): void + + /** Returns the file cursor's position. */ + get_position(): int64 + + /** Returns the size of the file in bytes. */ + get_length(): int64 + + /** Returns `true` if the file cursor has already read past the end of the file. + * + * **Note:** `eof_reached() == false` cannot be used to check whether there is more data available. To loop while there is more data available, use: + * + */ + eof_reached(): boolean + + /** Returns the next 8 bits from the file as an integer. See [method store_8] for details on what values can be stored and retrieved this way. */ + get_8(): int64 + + /** Returns the next 16 bits from the file as an integer. See [method store_16] for details on what values can be stored and retrieved this way. */ + get_16(): int64 + + /** Returns the next 32 bits from the file as an integer. See [method store_32] for details on what values can be stored and retrieved this way. */ + get_32(): int64 + + /** Returns the next 64 bits from the file as an integer. See [method store_64] for details on what values can be stored and retrieved this way. */ + get_64(): int64 + + /** Returns the next 32 bits from the file as a floating-point number. */ + get_float(): float64 + + /** Returns the next 64 bits from the file as a floating-point number. */ + get_double(): float64 + + /** Returns the next bits from the file as a floating-point number. */ + get_real(): float64 + + /** Returns next [param length] bytes of the file as a [PackedByteArray]. */ + get_buffer(length: int64): PackedByteArray + + /** Returns the next line of the file as a [String]. The returned string doesn't include newline (`\n`) or carriage return (`\r`) characters, but does include any other leading or trailing whitespace. + * Text is interpreted as being UTF-8 encoded. + */ + get_line(): string + + /** Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default `","` (comma). This delimiter must be one-character long, and cannot be a double quotation mark. + * Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. + * For example, the following CSV lines are valid and will be properly parsed as two strings each: + * [codeblock lang=text] + * Alice,"Hello, Bob!" + * Bob,Alice! What a surprise! + * Alice,"I thought you'd reply with ""Hello, world""." + * [/codeblock] + * Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it *could* very well use quotes, it was only written without for demonstration purposes. The third line must use `""` for each quotation mark that needs to be interpreted as such instead of the end of a text value. + */ + get_csv_line(delim: string = ','): PackedStringArray + + /** Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded. + * If [param skip_cr] is `true`, carriage return characters (`\r`, CR) will be ignored when parsing the UTF-8, so that only line feed characters (`\n`, LF) represent a new line (Unix convention). + */ + get_as_text(skip_cr: boolean = false): string + + /** Returns an MD5 String representing the file at the given path or an empty [String] on failure. */ + static get_md5(path: string): string + + /** Returns an SHA-256 [String] representing the file at the given path or an empty [String] on failure. */ + static get_sha256(path: string): string + + /** Returns the last error that happened when trying to perform operations. Compare with the `ERR_FILE_*` constants from [enum Error]. */ + get_error(): GError + + /** Returns the next [Variant] value from the file. If [param allow_objects] is `true`, decoding objects is allowed. + * Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. + * **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + */ + get_var(allow_objects: boolean = false): any + + /** Stores an integer as 8 bits in the file. + * + * **Note:** The [param value] should lie in the interval `[0, 255]`. Any other value will overflow and wrap around. + * To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example). + */ + store_8(value: int64): void + + /** Stores an integer as 16 bits in the file. + * + * **Note:** The [param value] should lie in the interval `[0, 2^16 - 1]`. Any other value will overflow and wrap around. + * To store a signed integer, use [method store_64] or store a signed integer from the interval `[-2^15, 2^15 - 1]` (i.e. keeping one bit for the signedness) and compute its sign manually when reading. For example: + * + */ + store_16(value: int64): void + + /** Stores an integer as 32 bits in the file. + * + * **Note:** The [param value] should lie in the interval `[0, 2^32 - 1]`. Any other value will overflow and wrap around. + * To store a signed integer, use [method store_64], or convert it manually (see [method store_16] for an example). + */ + store_32(value: int64): void + + /** Stores an integer as 64 bits in the file. + * + * **Note:** The [param value] must lie in the interval `[-2^63, 2^63 - 1]` (i.e. be a valid [int] value). + */ + store_64(value: int64): void + + /** Stores a floating-point number as 32 bits in the file. */ + store_float(value: float64): void + + /** Stores a floating-point number as 64 bits in the file. */ + store_double(value: float64): void + + /** Stores a floating-point number in the file. */ + store_real(value: float64): void + + /** Stores the given array of bytes in the file. */ + store_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): void + + /** Appends [param line] to the file followed by a line return character (`\n`), encoding the text as UTF-8. */ + store_line(line: string): void + + /** Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [param delim] to use other than the default `","` (comma). This delimiter must be one-character long. + * Text will be encoded as UTF-8. + */ + store_csv_line(values: PackedStringArray | string[], delim: string = ','): void + + /** Appends [param string] to the file without a line return, encoding the text as UTF-8. + * + * **Note:** This method is intended to be used to write text files. The string is stored as a UTF-8 encoded buffer without string length or terminating zero, which means that it can't be loaded back easily. If you want to store a retrievable string in a binary file, consider using [method store_pascal_string] instead. For retrieving strings from a text file, you can use `get_buffer(length).get_string_from_utf8()` (if you know the length) or [method get_as_text]. + */ + store_string(string_: string): void + + /** Stores any Variant value in the file. If [param full_objects] is `true`, encoding objects is allowed (and can potentially include code). + * Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method. + * + * **Note:** Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags. + */ + store_var(value: any, full_objects: boolean = false): void + + /** Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). + * Text will be encoded as UTF-8. + */ + store_pascal_string(string_: string): void + + /** Returns a [String] saved in Pascal format from the file. + * Text is interpreted as being UTF-8 encoded. + */ + get_pascal_string(): string + + /** Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file. + * + * **Note:** [FileAccess] will automatically close when it's freed, which happens when it goes out of scope or when it gets assigned with `null`. In C# the reference must be disposed after we are done using it, this can be done with the `using` statement or calling the `Dispose` method directly. + */ + close(): void + + /** Returns `true` if the file exists in the given path. + * + * **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. + * For a non-static, relative equivalent, use [method DirAccess.file_exists]. + */ + static file_exists(path: string): boolean + + /** Returns the last time the [param file] was modified in Unix timestamp format, or `0` on error. This Unix timestamp can be converted to another format using the [Time] singleton. */ + static get_modified_time(file: string): int64 + + /** Returns file UNIX permissions. + * + * **Note:** This method is implemented on iOS, Linux/BSD, and macOS. + */ + static get_unix_permissions(file: string): FileAccess.UnixPermissionFlags + + /** Sets file UNIX permissions. + * + * **Note:** This method is implemented on iOS, Linux/BSD, and macOS. + */ + static set_unix_permissions(file: string, permissions: FileAccess.UnixPermissionFlags): GError + + /** Returns `true`, if file `hidden` attribute is set. + * + * **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + */ + static get_hidden_attribute(file: string): boolean + + /** Sets file **hidden** attribute. + * + * **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + */ + static set_hidden_attribute(file: string, hidden: boolean): GError + + /** Sets file **read only** attribute. + * + * **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + */ + static set_read_only_attribute(file: string, ro: boolean): GError + + /** Returns `true`, if file `read only` attribute is set. + * + * **Note:** This method is implemented on iOS, BSD, macOS, and Windows. + */ + static get_read_only_attribute(file: string): boolean + + /** If `true`, the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If `false`, the file is read with little-endian endianness. If in doubt, leave this to `false` as most files are written with little-endian endianness. + * + * **Note:** [member big_endian] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written. + * + * **Note:** This is always reset to `false` whenever you open the file. Therefore, you must set [member big_endian] *after* opening the file, not before. + */ + get big_endian(): boolean + set big_endian(value: boolean) + } + namespace FileDialog { + enum FileMode { + /** The dialog allows selecting one, and only one file. */ + FILE_MODE_OPEN_FILE = 0, + + /** The dialog allows selecting multiple files. */ + FILE_MODE_OPEN_FILES = 1, + + /** The dialog only allows selecting a directory, disallowing the selection of any file. */ + FILE_MODE_OPEN_DIR = 2, + + /** The dialog allows selecting one file or directory. */ + FILE_MODE_OPEN_ANY = 3, + + /** The dialog will warn when a file exists. */ + FILE_MODE_SAVE_FILE = 4, + } + enum Access { + /** The dialog only allows accessing files under the [Resource] path (`res://`). */ + ACCESS_RESOURCES = 0, + + /** The dialog only allows accessing files under user data path (`user://`). */ + ACCESS_USERDATA = 1, + + /** The dialog allows accessing files on the whole file system. */ + ACCESS_FILESYSTEM = 2, + } + } + /** A dialog for selecting files or directories in the filesystem. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_filedialog.html + */ + class FileDialog extends ConfirmationDialog { + constructor(identifier?: any) + _cancel_pressed(): void + + /** Clear all the added filters in the dialog. */ + clear_filters(): void + + /** Adds a comma-delimited file name [param filter] option to the [FileDialog] with an optional [param description], which restricts what files can be picked. + * A [param filter] should be of the form `"filename.extension"`, where filename and extension can be `*` to match any string. Filters starting with `.` (i.e. empty filenames) are not allowed. + * For example, a [param filter] of `"*.png, *.jpg"` and a [param description] of `"Images"` results in filter text "Images (*.png, *.jpg)". + */ + add_filter(filter: string, description: string = ''): void + + /** Returns the name of the [OptionButton] or [CheckBox] with index [param option]. */ + get_option_name(option: int64): string + + /** Returns an array of values of the [OptionButton] with index [param option]. */ + get_option_values(option: int64): PackedStringArray + + /** Returns the default value index of the [OptionButton] or [CheckBox] with index [param option]. */ + get_option_default(option: int64): int64 + + /** Sets the name of the [OptionButton] or [CheckBox] with index [param option]. */ + set_option_name(option: int64, name: string): void + + /** Sets the option values of the [OptionButton] with index [param option]. */ + set_option_values(option: int64, values: PackedStringArray | string[]): void + + /** Sets the default value index of the [OptionButton] or [CheckBox] with index [param option]. */ + set_option_default(option: int64, default_value_index: int64): void + + /** Adds an additional [OptionButton] to the file dialog. If [param values] is empty, a [CheckBox] is added instead. + * [param default_value_index] should be an index of the value in the [param values]. If [param values] is empty it should be either `1` (checked), or `0` (unchecked). + */ + add_option(name: string, values: PackedStringArray | string[], default_value_index: int64): void + + /** Returns a [Dictionary] with the selected values of the additional [OptionButton]s and/or [CheckBox]es. [Dictionary] keys are names and values are selected value indices. */ + get_selected_options(): GDictionary + + /** Returns the vertical box container of the dialog, custom controls can be added to it. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + * + * **Note:** Changes to this node are ignored by native file dialogs, use [method add_option] to add custom elements to the dialog instead. + */ + get_vbox(): VBoxContainer + + /** Returns the LineEdit for the selected file. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_line_edit(): LineEdit + + /** Clear all currently selected items in the dialog. */ + deselect_all(): void + + /** Invalidate and update the current dialog content list. + * + * **Note:** This method does nothing on native file dialogs. + */ + invalidate(): void + + /** If `true`, changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File"). */ + get mode_overrides_title(): boolean + set mode_overrides_title(value: boolean) + + /** The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]. */ + get file_mode(): int64 + set file_mode(value: int64) + + /** The file system access scope. See [enum Access] constants. + * **Warning:** In Web builds, FileDialog cannot access the host file system. In sandboxed Linux and macOS environments, [member use_native_dialog] is automatically used to allow limited access to host file system. + */ + get access(): int64 + set access(value: int64) + + /** If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory. + * + * **Note:** This property is ignored by native file dialogs. + */ + get root_subfolder(): string + set root_subfolder(value: string) + + /** The available file type filters. Each filter string in the array should be formatted like this: `*.txt,*.doc;Text Files`. The description text of the filter is optional and can be omitted. */ + get filters(): PackedStringArray + set filters(value: PackedStringArray | string[]) + + /** The number of additional [OptionButton]s and [CheckBox]es in the dialog. */ + get option_count(): any /*Options,option_*/ + set option_count(value: any /*Options,option_*/) + + /** If `true`, the dialog will show hidden files. + * + * **Note:** This property is ignored by native file dialogs on Linux. + */ + get show_hidden_files(): boolean + set show_hidden_files(value: boolean) + + /** If `true`, [member access] is set to [constant ACCESS_FILESYSTEM], and it is supported by the current [DisplayServer], OS native dialog will be used instead of custom one. + * + * **Note:** On Linux and macOS, sandboxed apps always use native dialogs to access the host file system. + * + * **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks. + * + * **Note:** Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown. + */ + get use_native_dialog(): boolean + set use_native_dialog(value: boolean) + + /** The current working directory of the file dialog. + * + * **Note:** For native file dialogs, this property is only treated as a hint and may not be respected by specific OS implementations. + */ + get current_dir(): string + set current_dir(value: string) + + /** The currently selected file of the file dialog. */ + get current_file(): string + set current_file(value: string) + + /** The currently selected file path of the file dialog. */ + get current_path(): string + set current_path(value: string) + + /** Emitted when the user selects a file by double-clicking it or pressing the **OK** button. */ + readonly file_selected: Signal1 + + /** Emitted when the user selects multiple files. */ + readonly files_selected: Signal1 + + /** Emitted when the user selects a directory. */ + readonly dir_selected: Signal1 + } + /** Godot editor's dock for managing files in the project. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_filesystemdock.html + */ + class FileSystemDock extends VBoxContainer { + constructor(identifier?: any) + _file_list_thumbnail_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + _tree_thumbnail_done(_unnamed_arg0: string, _unnamed_arg1: Texture2D, _unnamed_arg2: Texture2D, _unnamed_arg3: any): void + + /** Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible. */ + navigate_to_path(path: string): void + + /** Registers a new [EditorResourceTooltipPlugin]. */ + add_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin): void + + /** Removes an [EditorResourceTooltipPlugin]. Fails if the plugin wasn't previously added. */ + remove_resource_tooltip_plugin(plugin: EditorResourceTooltipPlugin): void + _set_dock_horizontal(enable: boolean): void + _can_dock_horizontal(): boolean + + /** Emitted when a new scene is created that inherits the scene at [param file] path. */ + readonly inherit: Signal1 + + /** Emitted when the given scenes are being instantiated in the editor. */ + readonly instantiate: Signal1 + + /** Emitted when an external [param resource] had its file removed. */ + readonly resource_removed: Signal1 + + /** Emitted when the given [param file] was removed. */ + readonly file_removed: Signal1 + + /** Emitted when the given [param folder] was removed. */ + readonly folder_removed: Signal1 + + /** Emitted when a file is moved from [param old_file] path to [param new_file] path. */ + readonly files_moved: Signal2 + + /** Emitted when a folder is moved from [param old_folder] path to [param new_folder] path. */ + readonly folder_moved: Signal2 + + /** Emitted when folders change color. */ + readonly folder_color_changed: Signal0 + + /** Emitted when the user switches file display mode or split mode. */ + readonly display_mode_changed: Signal0 + } + class FileSystemList extends ItemList { + constructor(identifier?: any) + readonly item_edited: Signal0 + } + class FindInFiles extends Node { + constructor(identifier?: any) + readonly result_found: Signal5 + readonly finished: Signal0 + } + class FindInFilesDialog extends AcceptDialog { + constructor(identifier?: any) + readonly find_requested: Signal0 + readonly replace_requested: Signal0 + } + class FindInFilesPanel extends Control { + constructor(identifier?: any) + _on_result_found(_unnamed_arg0: string, _unnamed_arg1: int64, _unnamed_arg2: int64, _unnamed_arg3: int64, _unnamed_arg4: string): void + _on_finished(): void + readonly result_selected: Signal4 + readonly files_modified: Signal1 + readonly close_button_clicked: Signal0 + } + class FindReplaceBar extends HBoxContainer { + constructor(identifier?: any) + _search_current(): boolean + readonly error: Signal0 + } + namespace FlowContainer { + enum AlignmentMode { + /** The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). */ + ALIGNMENT_BEGIN = 0, + + /** The child controls will be centered in the container. */ + ALIGNMENT_CENTER = 1, + + /** The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). */ + ALIGNMENT_END = 2, + } + enum LastWrapAlignmentMode { + /** The last partially filled row or column will wrap aligned to the previous row or column in accordance with [member alignment]. */ + LAST_WRAP_ALIGNMENT_INHERIT = 0, + + /** The last partially filled row or column will wrap aligned to the beginning of the previous row or column. */ + LAST_WRAP_ALIGNMENT_BEGIN = 1, + + /** The last partially filled row or column will wrap aligned to the center of the previous row or column. */ + LAST_WRAP_ALIGNMENT_CENTER = 2, + + /** The last partially filled row or column will wrap aligned to the end of the previous row or column. */ + LAST_WRAP_ALIGNMENT_END = 3, + } + } + /** A container that arranges its child controls horizontally or vertically and wraps them around at the borders. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_flowcontainer.html + */ + class FlowContainer extends Container { + constructor(identifier?: any) + /** Returns the current line count. */ + get_line_count(): int64 + + /** The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]). */ + get alignment(): int64 + set alignment(value: int64) + + /** The wrap behavior of the last, partially filled row or column (must be one of [constant LAST_WRAP_ALIGNMENT_INHERIT], [constant LAST_WRAP_ALIGNMENT_BEGIN], [constant LAST_WRAP_ALIGNMENT_CENTER], or [constant LAST_WRAP_ALIGNMENT_END]). */ + get last_wrap_alignment(): int64 + set last_wrap_alignment(value: int64) + + /** If `true`, the [FlowContainer] will arrange its children vertically, rather than horizontally. + * Can't be changed when using [HFlowContainer] and [VFlowContainer]. + */ + get vertical(): boolean + set vertical(value: boolean) + + /** If `true`, reverses fill direction. Horizontal [FlowContainer]s will fill rows bottom to top, vertical [FlowContainer]s will fill columns right to left. + * When using a vertical [FlowContainer] with a right to left [member Control.layout_direction], columns will fill left to right instead. + */ + get reverse_fill(): boolean + set reverse_fill(value: boolean) + } + /** A material that controls how volumetric fog is rendered, to be assigned to a [FogVolume]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fogmaterial.html + */ + class FogMaterial extends Material { + constructor(identifier?: any) + /** The density of the [FogVolume]. Denser objects are more opaque, but may suffer from under-sampling artifacts that look like stripes. Negative values can be used to subtract fog from other [FogVolume]s or global volumetric fog. + * + * **Note:** Due to limited precision, [member density] values between `-0.001` and `0.001` (exclusive) act like `0.0`. This does not apply to [member Environment.volumetric_fog_density]. + */ + get density(): float64 + set density(value: float64) + + /** The single-scattering [Color] of the [FogVolume]. Internally, [member albedo] is converted into single-scattering, which is additively blended with other [FogVolume]s and the [member Environment.volumetric_fog_albedo]. */ + get albedo(): Color + set albedo(value: Color) + + /** The [Color] of the light emitted by the [FogVolume]. Emitted light will not cast light or shadows on other objects, but can be useful for modulating the [Color] of the [FogVolume] independently from light sources. */ + get emission(): Color + set emission(value: Color) + + /** The rate by which the height-based fog decreases in density as height increases in world space. A high falloff will result in a sharp transition, while a low falloff will result in a smoother transition. A value of `0.0` results in uniform-density fog. The height threshold is determined by the height of the associated [FogVolume]. */ + get height_falloff(): float64 + set height_falloff(value: float64) + + /** The hardness of the edges of the [FogVolume]. A higher value will result in softer edges, while a lower value will result in harder edges. */ + get edge_fade(): float64 + set edge_fade(value: float64) + + /** The 3D texture that is used to scale the [member density] of the [FogVolume]. This can be used to vary fog density within the [FogVolume] with any kind of static pattern. For animated effects, consider using a custom [url=https://docs.godotengine.org/en/4.3/tutorials/shaders/shader_reference/fog_shader.html]fog shader[/url]. */ + get density_texture(): Texture3D + set density_texture(value: Texture3D) + } + class FogMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + /** A region that contributes to the default volumetric fog from the world environment. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fogvolume.html + */ + class FogVolume extends VisualInstance3D { + constructor(identifier?: any) + /** The size of the [FogVolume] when [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER] or [constant RenderingServer.FOG_VOLUME_SHAPE_BOX]. + * + * **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing [member ProjectSettings.rendering/environment/volumetric_fog/volume_depth] (at a performance cost) or by decreasing [member Environment.volumetric_fog_length] (at no performance cost, but at the cost of lower fog range). Alternatively, the [FogVolume] can be made thicker and use a lower density in the [member material]. + * + * **Note:** If [member shape] is [constant RenderingServer.FOG_VOLUME_SHAPE_CONE] or [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], the cone/cylinder will be adjusted to fit within the size. Non-uniform scaling of cone/cylinder shapes via the [member size] property is not supported, but you can scale the [FogVolume] node instead. + */ + get size(): Vector3 + set size(value: Vector3) + + /** The shape of the [FogVolume]. This can be set to either [constant RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID], [constant RenderingServer.FOG_VOLUME_SHAPE_CONE], [constant RenderingServer.FOG_VOLUME_SHAPE_CYLINDER], [constant RenderingServer.FOG_VOLUME_SHAPE_BOX] or [constant RenderingServer.FOG_VOLUME_SHAPE_WORLD]. */ + get shape(): int64 + set shape(value: int64) + + /** The [Material] used by the [FogVolume]. Can be either a built-in [FogMaterial] or a custom [ShaderMaterial]. */ + get material(): FogMaterial | ShaderMaterial + set material(value: FogMaterial | ShaderMaterial) + } + class FogVolumeGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Abstract base class for fonts and font variations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_font.html + */ + class Font extends Resource { + constructor(identifier?: any) + /** Returns [TextServer] RID of the font cache for specific variation. */ + find_variation(variation_coordinates: GDictionary, face_index: int64 = 0, strength: float64 = 0, transform: Transform2D = new Transform2D(), spacing_top: int64 = 0, spacing_bottom: int64 = 0, spacing_space: int64 = 0, spacing_glyph: int64 = 0, baseline_offset: float64 = 0): RID + + /** Returns [Array] of valid [Font] [RID]s, which can be passed to the [TextServer] methods. */ + get_rids(): GArray + + /** Returns the total average font height (ascent plus descent) in pixels. + * + * **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line). + */ + get_height(font_size: int64 = 16): float64 + + /** Returns the average font ascent (number of pixels above the baseline). + * + * **Note:** Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line). + */ + get_ascent(font_size: int64 = 16): float64 + + /** Returns the average font descent (number of pixels below the baseline). + * + * **Note:** Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). + */ + get_descent(font_size: int64 = 16): float64 + + /** Returns average pixel offset of the underline below the baseline. + * + * **Note:** Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. + */ + get_underline_position(font_size: int64 = 16): float64 + + /** Returns average thickness of the underline. + * + * **Note:** Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. + */ + get_underline_thickness(font_size: int64 = 16): float64 + + /** Returns font family name. */ + get_font_name(): string + + /** Returns font style name. */ + get_font_style_name(): string + + /** Returns [Dictionary] with OpenType font name strings (localized font names, version, description, license information, sample text, etc.). */ + get_ot_name_strings(): GDictionary + + /** Returns font style flags, see [enum TextServer.FontStyle]. */ + get_font_style(): TextServer.FontStyle + + /** Returns weight (boldness) of the font. A value in the `100...999` range, normal font weight is `400`, bold font weight is `700`. */ + get_font_weight(): int64 + + /** Returns font stretch amount, compared to a normal width. A percentage value between `50%` and `200%`. */ + get_font_stretch(): int64 + + /** Returns the spacing for the given `type` (see [enum TextServer.SpacingType]). */ + get_spacing(spacing: TextServer.SpacingType): int64 + + /** Returns a set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. */ + get_opentype_features(): GDictionary + + /** Sets LRU cache capacity for `draw_*` methods. */ + set_cache_capacity(single_line: int64, multi_line: int64): void + + /** Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also [method get_multiline_string_size] and [method draw_string]. + * For example, to get the string size as displayed by a single-line Label, use: + * + * + * **Note:** Since kerning, advance and subpixel positioning are taken into account by [method get_string_size], using separate [method get_string_size] calls on substrings of a string then adding the results together will return a different result compared to using a single [method get_string_size] call on the full string. + * + * **Note:** Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height]. + */ + get_string_size(text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): Vector2 + + /** Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. + * See also [method draw_multiline_string]. + */ + get_multiline_string_size(text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, max_lines: int64 = -1, brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): Vector2 + + /** Draw [param text] into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. + * See also [method CanvasItem.draw_string]. + */ + draw_string(canvas_item: RID, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, modulate: Color = new Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Breaks [param text] into lines using rules specified by [param brk_flags] and draws it into a canvas item using the font, at a given position, with [param modulate] color, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. + * See also [method CanvasItem.draw_multiline_string]. + */ + draw_multiline_string(canvas_item: RID, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, max_lines: int64 = -1, modulate: Color = new Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Draw [param text] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. + * See also [method CanvasItem.draw_string_outline]. + */ + draw_string_outline(canvas_item: RID, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, size: int64 = 1, modulate: Color = new Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Breaks [param text] to the lines using rules specified by [param brk_flags] and draws text outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size, optionally clipping the width and aligning horizontally. [param pos] specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. + * See also [method CanvasItem.draw_multiline_string_outline]. + */ + draw_multiline_string_outline(canvas_item: RID, pos: Vector2, text: string, alignment: HorizontalAlignment = 0, width: float64 = -1, font_size: int64 = 16, max_lines: int64 = -1, size: int64 = 1, modulate: Color = new Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0): void + + /** Returns the size of a character. Does not take kerning into account. + * + * **Note:** Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height. + */ + get_char_size(char: int64, font_size: int64): Vector2 + + /** Draw a single Unicode character [param char] into a canvas item using the font, at a given position, with [param modulate] color. [param pos] specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. + * + * **Note:** Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. + */ + draw_char(canvas_item: RID, pos: Vector2, char: int64, font_size: int64, modulate: Color = new Color(1, 1, 1, 1)): float64 + + /** Draw a single Unicode character [param char] outline into a canvas item using the font, at a given position, with [param modulate] color and [param size] outline size. [param pos] specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. + * + * **Note:** Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. + */ + draw_char_outline(canvas_item: RID, pos: Vector2, char: int64, font_size: int64, size: int64 = -1, modulate: Color = new Color(1, 1, 1, 1)): float64 + + /** Returns `true` if a Unicode [param char] is available in the font. */ + has_char(char: int64): boolean + + /** Returns a string containing all the characters available in the font. + * If a given character is included in more than one font data source, it appears only once in the returned string. + */ + get_supported_chars(): string + + /** Returns `true`, if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). */ + is_language_supported(language: string): boolean + + /** Returns `true`, if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code). */ + is_script_supported(script: string): boolean + + /** Returns list of OpenType features supported by font. */ + get_supported_feature_list(): GDictionary + + /** Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as `tag: Vector3i(min_value,max_value,default_value)`. + * Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + * To print available variation axes of a variable font: + * + * + * **Note:** To set and get variation coordinates of a [FontVariation], use [member FontVariation.variation_opentype]. + */ + get_supported_variation_list(): GDictionary + + /** Returns number of faces in the TrueType / OpenType collection. */ + get_face_count(): int64 + + /** Array of fallback [Font]s to use as a substitute if a glyph is not found in this current [Font]. + * If this array is empty in a [FontVariation], the [member FontVariation.base_font]'s fallbacks are used instead. + */ + get fallbacks(): GArray + set fallbacks(value: GArray) + } + class FontEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Holds font source data and prerendered glyph cache, imported from a dynamic or a bitmap font. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fontfile.html + */ + class FontFile extends Font { + constructor(identifier?: any) + /** Loads an AngelCode BMFont (.fnt, .font) bitmap font from file [param path]. + * **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the `user://` directory. + */ + load_bitmap_font(path: string): GError + + /** Loads a TrueType (.ttf), OpenType (.otf), WOFF (.woff), WOFF2 (.woff2) or Type 1 (.pfb, .pfm) dynamic font from file [param path]. + * **Warning:** This method should only be used in the editor or in cases when you need to load external fonts at run-time, such as fonts located at the `user://` directory. + */ + load_dynamic_font(path: string): GError + + /** Returns number of the font cache entries. */ + get_cache_count(): int64 + + /** Removes all font cache entries. */ + clear_cache(): void + + /** Removes specified font cache entry. */ + remove_cache(cache_index: int64): void + + /** Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size. */ + get_size_cache_list(cache_index: int64): GArray + + /** Removes all font sizes from the cache entry */ + clear_size_cache(cache_index: int64): void + + /** Removes specified font size from the cache entry. */ + remove_size_cache(cache_index: int64, size: Vector2i): void + + /** Sets variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info. */ + set_variation_coordinates(cache_index: int64, variation_coordinates: GDictionary): void + + /** Returns variation coordinates for the specified font cache entry. See [method Font.get_supported_variation_list] for more info. */ + get_variation_coordinates(cache_index: int64): GDictionary + + /** Sets embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. */ + set_embolden(cache_index: int64, strength: float64): void + + /** Returns embolden strength, if is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. */ + get_embolden(cache_index: int64): float64 + + /** Sets 2D transform, applied to the font outlines, can be used for slanting, flipping, and rotating glyphs. */ + set_transform(cache_index: int64, transform: Transform2D): void + + /** Returns 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. */ + get_transform(cache_index: int64): Transform2D + + /** Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size). */ + set_extra_spacing(cache_index: int64, spacing: TextServer.SpacingType, value: int64): void + + /** Returns spacing for [param spacing] (see [enum TextServer.SpacingType]) in pixels (not relative to the font size). */ + get_extra_spacing(cache_index: int64, spacing: TextServer.SpacingType): int64 + + /** Sets extra baseline offset (as a fraction of font height). */ + set_extra_baseline_offset(cache_index: int64, baseline_offset: float64): void + + /** Returns extra baseline offset (as a fraction of font height). */ + get_extra_baseline_offset(cache_index: int64): float64 + + /** Sets an active face index in the TrueType / OpenType collection. */ + set_face_index(cache_index: int64, face_index: int64): void + + /** Returns an active face index in the TrueType / OpenType collection. */ + get_face_index(cache_index: int64): int64 + + /** Sets the font ascent (number of pixels above the baseline). */ + set_cache_ascent(cache_index: int64, size: int64, ascent: float64): void + + /** Returns the font ascent (number of pixels above the baseline). */ + get_cache_ascent(cache_index: int64, size: int64): float64 + + /** Sets the font descent (number of pixels below the baseline). */ + set_cache_descent(cache_index: int64, size: int64, descent: float64): void + + /** Returns the font descent (number of pixels below the baseline). */ + get_cache_descent(cache_index: int64, size: int64): float64 + + /** Sets pixel offset of the underline below the baseline. */ + set_cache_underline_position(cache_index: int64, size: int64, underline_position: float64): void + + /** Returns pixel offset of the underline below the baseline. */ + get_cache_underline_position(cache_index: int64, size: int64): float64 + + /** Sets thickness of the underline in pixels. */ + set_cache_underline_thickness(cache_index: int64, size: int64, underline_thickness: float64): void + + /** Returns thickness of the underline in pixels. */ + get_cache_underline_thickness(cache_index: int64, size: int64): float64 + + /** Sets scaling factor of the color bitmap font. */ + set_cache_scale(cache_index: int64, size: int64, scale: float64): void + + /** Returns scaling factor of the color bitmap font. */ + get_cache_scale(cache_index: int64, size: int64): float64 + + /** Returns number of textures used by font cache entry. */ + get_texture_count(cache_index: int64, size: Vector2i): int64 + + /** Removes all textures from font cache entry. + * + * **Note:** This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually. + */ + clear_textures(cache_index: int64, size: Vector2i): void + + /** Removes specified texture from the cache entry. + * + * **Note:** This function will not remove glyphs associated with the texture. Remove them manually using [method remove_glyph]. + */ + remove_texture(cache_index: int64, size: Vector2i, texture_index: int64): void + + /** Sets font cache texture image. */ + set_texture_image(cache_index: int64, size: Vector2i, texture_index: int64, image: Image): void + + /** Returns a copy of the font cache texture image. */ + get_texture_image(cache_index: int64, size: Vector2i, texture_index: int64): Image + + /** Sets array containing glyph packing data. */ + set_texture_offsets(cache_index: int64, size: Vector2i, texture_index: int64, offset: PackedInt32Array | int32[]): void + + /** Returns a copy of the array containing glyph packing data. */ + get_texture_offsets(cache_index: int64, size: Vector2i, texture_index: int64): PackedInt32Array + + /** Returns list of rendered glyphs in the cache entry. */ + get_glyph_list(cache_index: int64, size: Vector2i): PackedInt32Array + + /** Removes all rendered glyph information from the cache entry. + * + * **Note:** This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. + */ + clear_glyphs(cache_index: int64, size: Vector2i): void + + /** Removes specified rendered glyph information from the cache entry. + * + * **Note:** This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. + */ + remove_glyph(cache_index: int64, size: Vector2i, glyph: int64): void + + /** Sets glyph advance (offset of the next glyph). + * + * **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. + */ + set_glyph_advance(cache_index: int64, size: int64, glyph: int64, advance: Vector2): void + + /** Returns glyph advance (offset of the next glyph). + * + * **Note:** Advance for glyphs outlines is the same as the base glyph advance and is not saved. + */ + get_glyph_advance(cache_index: int64, size: int64, glyph: int64): Vector2 + + /** Sets glyph offset from the baseline. */ + set_glyph_offset(cache_index: int64, size: Vector2i, glyph: int64, offset: Vector2): void + + /** Returns glyph offset from the baseline. */ + get_glyph_offset(cache_index: int64, size: Vector2i, glyph: int64): Vector2 + + /** Sets glyph size. */ + set_glyph_size(cache_index: int64, size: Vector2i, glyph: int64, gl_size: Vector2): void + + /** Returns glyph size. */ + get_glyph_size(cache_index: int64, size: Vector2i, glyph: int64): Vector2 + + /** Sets rectangle in the cache texture containing the glyph. */ + set_glyph_uv_rect(cache_index: int64, size: Vector2i, glyph: int64, uv_rect: Rect2): void + + /** Returns rectangle in the cache texture containing the glyph. */ + get_glyph_uv_rect(cache_index: int64, size: Vector2i, glyph: int64): Rect2 + + /** Sets index of the cache texture containing the glyph. */ + set_glyph_texture_idx(cache_index: int64, size: Vector2i, glyph: int64, texture_idx: int64): void + + /** Returns index of the cache texture containing the glyph. */ + get_glyph_texture_idx(cache_index: int64, size: Vector2i, glyph: int64): int64 + + /** Returns list of the kerning overrides. */ + get_kerning_list(cache_index: int64, size: int64): GArray + + /** Removes all kerning overrides. */ + clear_kerning_map(cache_index: int64, size: int64): void + + /** Removes kerning override for the pair of glyphs. */ + remove_kerning(cache_index: int64, size: int64, glyph_pair: Vector2i): void + + /** Sets kerning for the pair of glyphs. */ + set_kerning(cache_index: int64, size: int64, glyph_pair: Vector2i, kerning: Vector2): void + + /** Returns kerning for the pair of glyphs. */ + get_kerning(cache_index: int64, size: int64, glyph_pair: Vector2i): Vector2 + + /** Renders the range of characters to the font cache texture. */ + render_range(cache_index: int64, size: Vector2i, start: int64, end: int64): void + + /** Renders specified glyph to the font cache texture. */ + render_glyph(cache_index: int64, size: Vector2i, index: int64): void + + /** Adds override for [method Font.is_language_supported]. */ + set_language_support_override(language: string, supported: boolean): void + + /** Returns `true` if support override is enabled for the [param language]. */ + get_language_support_override(language: string): boolean + + /** Remove language support override. */ + remove_language_support_override(language: string): void + + /** Returns list of language support overrides. */ + get_language_support_overrides(): PackedStringArray + + /** Adds override for [method Font.is_script_supported]. */ + set_script_support_override(script: string, supported: boolean): void + + /** Returns `true` if support override is enabled for the [param script]. */ + get_script_support_override(script: string): boolean + + /** Removes script support override. */ + remove_script_support_override(script: string): void + + /** Returns list of script support overrides. */ + get_script_support_overrides(): PackedStringArray + + /** Returns the glyph index of a [param char], optionally modified by the [param variation_selector]. */ + get_glyph_index(size: int64, char: int64, variation_selector: int64): int64 + + /** Returns character code associated with [param glyph_index], or `0` if [param glyph_index] is invalid. See [method get_glyph_index]. */ + get_char_from_glyph_index(size: int64, glyph_index: int64): int64 + + /** Contents of the dynamic font source file. */ + get data(): PackedByteArray + set data(value: PackedByteArray | byte[] | ArrayBuffer) + + /** If set to `true`, generate mipmaps for the font textures. */ + get generate_mipmaps(): boolean + set generate_mipmaps(value: boolean) + + /** If set to `true`, embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). */ + get disable_embedded_bitmaps(): boolean + set disable_embedded_bitmaps(value: boolean) + + /** Font anti-aliasing mode. */ + get antialiasing(): int64 + set antialiasing(value: int64) + + /** Font family name. */ + get font_name(): string + set font_name(value: string) + + /** Font style name. */ + get style_name(): string + set style_name(value: string) + + /** Font style flags, see [enum TextServer.FontStyle]. */ + get font_style(): int64 + set font_style(value: int64) + + /** Weight (boldness) of the font. A value in the `100...999` range, normal font weight is `400`, bold font weight is `700`. */ + get font_weight(): int64 + set font_weight(value: int64) + + /** Font stretch amount, compared to a normal width. A percentage value between `50%` and `200%`. */ + get font_stretch(): int64 + set font_stretch(value: int64) + + /** Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of higher memory usage and lower font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. */ + get subpixel_positioning(): int64 + set subpixel_positioning(value: int64) + + /** If set to `true`, glyphs of all sizes are rendered using single multichannel signed distance field (MSDF) generated from the dynamic font vector data. Since this approach does not rely on rasterizing the font every time its size changes, this allows for resizing the font in real-time without any performance penalty. Text will also not look grainy for [Control]s that are scaled down (or for [Label3D]s viewed from a long distance). As a downside, font hinting is not available with MSDF. The lack of font hinting may result in less crisp and less readable fonts at small sizes. + * + * **Note:** If using font outlines, [member msdf_pixel_range] must be set to at least *twice* the size of the largest font outline. + * + * **Note:** MSDF font rendering does not render glyphs with overlapping shapes correctly. Overlapping shapes are not valid per the OpenType standard, but are still commonly found in many font files, especially those converted by Google Fonts. To avoid issues with overlapping glyphs, consider downloading the font file directly from the type foundry instead of relying on Google Fonts. + */ + get multichannel_signed_distance_field(): boolean + set multichannel_signed_distance_field(value: boolean) + + /** The width of the range around the shape between the minimum and maximum representable signed distance. If using font outlines, [member msdf_pixel_range] must be set to at least *twice* the size of the largest font outline. The default [member msdf_pixel_range] value of `16` allows outline sizes up to `8` to look correct. */ + get msdf_pixel_range(): int64 + set msdf_pixel_range(value: int64) + + /** Source font size used to generate MSDF textures. Higher values allow for more precision, but are slower to render and require more memory. Only increase this value if you notice a visible lack of precision in glyph rendering. */ + get msdf_size(): int64 + set msdf_size(value: int64) + + /** If set to `true`, system fonts can be automatically used as fallbacks. */ + get allow_system_fallback(): boolean + set allow_system_fallback(value: boolean) + + /** If set to `true`, auto-hinting is supported and preferred over font built-in hinting. Used by dynamic fonts only (MSDF fonts don't support hinting). */ + get force_autohinter(): boolean + set force_autohinter(value: boolean) + + /** Font hinting mode. Used by dynamic fonts only. */ + get hinting(): int64 + set hinting(value: int64) + + /** Font oversampling factor. If set to `0.0`, the global oversampling factor is used instead. Used by dynamic fonts only (MSDF fonts ignore oversampling). */ + get oversampling(): float64 + set oversampling(value: float64) + + /** Font size, used only for the bitmap fonts. */ + get fixed_size(): int64 + set fixed_size(value: int64) + + /** Scaling mode, used only for the bitmap fonts with [member fixed_size] greater than zero. */ + get fixed_size_scale_mode(): int64 + set fixed_size_scale_mode(value: int64) + + /** Font OpenType feature set override. */ + get opentype_feature_overrides(): GDictionary + set opentype_feature_overrides(value: GDictionary) + } + /** A variation of a font with additional settings. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_fontvariation.html + */ + class FontVariation extends Font { + constructor(identifier?: any) + /** Sets the spacing for [param spacing] (see [enum TextServer.SpacingType]) to [param value] in pixels (not relative to the font size). */ + set_spacing(spacing: TextServer.SpacingType, value: int64): void + + /** Base font used to create a variation. If not set, default [Theme] font is used. */ + get base_font(): Font + set base_font(value: Font) + + /** Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url]. + * + * **Note:** This [Dictionary] uses OpenType tags as keys. Variation axes can be identified both by tags ([int], e.g. `0x77678674`) and names ([String], e.g. `wght`). Some axes might be accessible by multiple names. For example, `wght` refers to the same axis as `weight`. Tags on the other hand are unique. To convert between names and tags, use [method TextServer.name_to_tag] and [method TextServer.tag_to_name]. + * + * **Note:** To get available variation axes of a font, use [method Font.get_supported_variation_list]. + */ + get variation_opentype(): GDictionary + set variation_opentype(value: GDictionary) + + /** Active face index in the TrueType / OpenType collection file. */ + get variation_face_index(): int64 + set variation_face_index(value: int64) + + /** If is not equal to zero, emboldens the font outlines. Negative values reduce the outline thickness. + * + * **Note:** Emboldened fonts might have self-intersecting outlines, which will prevent MSDF fonts and [TextMesh] from working correctly. + */ + get variation_embolden(): float64 + set variation_embolden(value: float64) + + /** 2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs. + * For example, to simulate italic typeface by slanting, apply the following transform `Transform2D(1.0, slant, 0.0, 1.0, 0.0, 0.0)`. + */ + get variation_transform(): Transform2D + set variation_transform(value: Transform2D) + + /** A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. */ + get opentype_features(): GDictionary + set opentype_features(value: GDictionary) + + /** Extra spacing between graphical glyphs. */ + get spacing_glyph(): int64 + set spacing_glyph(value: int64) + + /** Extra width of the space glyphs. */ + get spacing_space(): int64 + set spacing_space(value: int64) + + /** Extra spacing at the top of the line in pixels. */ + get spacing_top(): int64 + set spacing_top(value: int64) + + /** Extra spacing at the bottom of the line in pixels. */ + get spacing_bottom(): int64 + set spacing_bottom(value: int64) + + /** Extra baseline offset (as a fraction of font height). */ + get baseline_offset(): float64 + set baseline_offset(value: float64) + } + /** Framebuffer cache manager for Rendering Device based renderers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_framebuffercacherd.html + */ + class FramebufferCacheRD extends Object { + constructor(identifier?: any) + /** Creates, or obtains a cached, framebuffer. [param textures] lists textures accessed. [param passes] defines the subpasses and texture allocation, if left empty a single pass is created and textures are allocated depending on their usage flags. [param views] defines the number of views used when rendering. */ + static get_cache_multipass(textures: GArray, passes: GArray, views: int64): RID + } + namespace GDExtension { + enum InitializationLevel { + /** The library is initialized at the same time as the core features of the engine. */ + INITIALIZATION_LEVEL_CORE = 0, + + /** The library is initialized at the same time as the engine's servers (such as [RenderingServer] or [PhysicsServer3D]). */ + INITIALIZATION_LEVEL_SERVERS = 1, + + /** The library is initialized at the same time as the engine's scene-related classes. */ + INITIALIZATION_LEVEL_SCENE = 2, + + /** The library is initialized at the same time as the engine's editor classes. Only happens when loading the GDExtension in the editor. */ + INITIALIZATION_LEVEL_EDITOR = 3, + } + } + /** A native library for GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gdextension.html + */ + class GDExtension extends Resource { + constructor(identifier?: any) + /** Returns `true` if this extension's library has been opened. */ + is_library_open(): boolean + + /** Returns the lowest level required for this extension to be properly initialized (see the [enum InitializationLevel] enum). */ + get_minimum_library_initialization_level(): GDExtension.InitializationLevel + } + class GDScriptLanguageServer extends EditorPlugin { + constructor(identifier?: any) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gdscripttextdocument.html */ + class GDScriptTextDocument extends RefCounted { + constructor(identifier?: any) + didOpen(_unnamed_arg0: any): void + didClose(_unnamed_arg0: any): void + didChange(_unnamed_arg0: any): void + willSaveWaitUntil(_unnamed_arg0: any): void + didSave(_unnamed_arg0: any): void + nativeSymbol(_unnamed_arg0: GDictionary): any + documentSymbol(_unnamed_arg0: GDictionary): GArray + completion(_unnamed_arg0: GDictionary): GArray + resolve(_unnamed_arg0: GDictionary): GDictionary + rename(_unnamed_arg0: GDictionary): GDictionary + prepareRename(_unnamed_arg0: GDictionary): any + references(_unnamed_arg0: GDictionary): GArray + foldingRange(_unnamed_arg0: GDictionary): GArray + codeLens(_unnamed_arg0: GDictionary): GArray + documentLink(_unnamed_arg0: GDictionary): GArray + colorPresentation(_unnamed_arg0: GDictionary): GArray + hover(_unnamed_arg0: GDictionary): any + definition(_unnamed_arg0: GDictionary): GArray + declaration(_unnamed_arg0: GDictionary): any + signatureHelp(_unnamed_arg0: GDictionary): any + show_native_symbol_in_editor(_unnamed_arg0: string): void + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gdscriptworkspace.html */ + class GDScriptWorkspace extends RefCounted { + constructor(identifier?: any) + apply_new_signal(_unnamed_arg0: Object, _unnamed_arg1: string, _unnamed_arg2: PackedStringArray | string[]): void + didDeleteFiles(_unnamed_arg0: GDictionary): void + parse_script(path: string, content: string): GError + parse_local_script(path: string): GError + get_file_path(uri: string): string + get_file_uri(path: string): string + publish_diagnostics(path: string): void + generate_script_api(path: string): GDictionary + } + namespace GLTFAccessor { + enum GLTFAccessorType { + /** Accessor type "SCALAR". For the glTF object model, this can be used to map to a single float, int, or bool value, or a float array. */ + TYPE_SCALAR = 0, + + /** Accessor type "VEC2". For the glTF object model, this maps to "float2", represented in the glTF JSON as an array of two floats. */ + TYPE_VEC2 = 1, + + /** Accessor type "VEC3". For the glTF object model, this maps to "float3", represented in the glTF JSON as an array of three floats. */ + TYPE_VEC3 = 2, + + /** Accessor type "VEC4". For the glTF object model, this maps to "float4", represented in the glTF JSON as an array of four floats. */ + TYPE_VEC4 = 3, + + /** Accessor type "MAT2". For the glTF object model, this maps to "float2x2", represented in the glTF JSON as an array of four floats. */ + TYPE_MAT2 = 4, + + /** Accessor type "MAT3". For the glTF object model, this maps to "float3x3", represented in the glTF JSON as an array of nine floats. */ + TYPE_MAT3 = 5, + + /** Accessor type "MAT4". For the glTF object model, this maps to "float4x4", represented in the glTF JSON as an array of sixteen floats. */ + TYPE_MAT4 = 6, + } + } + /** Represents a GLTF accessor. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfaccessor.html + */ + class GLTFAccessor extends Resource { + constructor(identifier?: any) + /** The index of the buffer view this accessor is referencing. If `-1`, this accessor is not referencing any buffer view. */ + get buffer_view(): int64 + set buffer_view(value: int64) + + /** The offset relative to the start of the buffer view in bytes. */ + get byte_offset(): int64 + set byte_offset(value: int64) + + /** The GLTF component type as an enum. Possible values are 5120 for "BYTE", 5121 for "UNSIGNED_BYTE", 5122 for "SHORT", 5123 for "UNSIGNED_SHORT", 5125 for "UNSIGNED_INT", and 5126 for "FLOAT". A value of 5125 or "UNSIGNED_INT" must not be used for any accessor that is not referenced by mesh.primitive.indices. */ + get component_type(): int64 + set component_type(value: int64) + + /** Specifies whether integer data values are normalized before usage. */ + get normalized(): boolean + set normalized(value: boolean) + + /** The number of elements referenced by this accessor. */ + get count(): int64 + set count(value: int64) + + /** The GLTF accessor type as an enum. Possible values are 0 for "SCALAR", 1 for "VEC2", 2 for "VEC3", 3 for "VEC4", 4 for "MAT2", 5 for "MAT3", and 6 for "MAT4". */ + get accessor_type(): int64 + set accessor_type(value: int64) + + /** The GLTF accessor type as an enum. Use [member accessor_type] instead. */ + get type(): int64 + set type(value: int64) + + /** Minimum value of each component in this accessor. */ + get min(): PackedFloat64Array + set min(value: PackedFloat64Array | float64[]) + + /** Maximum value of each component in this accessor. */ + get max(): PackedFloat64Array + set max(value: PackedFloat64Array | float64[]) + + /** Number of deviating accessor values stored in the sparse array. */ + get sparse_count(): int64 + set sparse_count(value: int64) + + /** The index of the buffer view with sparse indices. The referenced buffer view MUST NOT have its target or byteStride properties defined. The buffer view and the optional byteOffset MUST be aligned to the componentType byte length. */ + get sparse_indices_buffer_view(): int64 + set sparse_indices_buffer_view(value: int64) + + /** The offset relative to the start of the buffer view in bytes. */ + get sparse_indices_byte_offset(): int64 + set sparse_indices_byte_offset(value: int64) + + /** The indices component data type as an enum. Possible values are 5121 for "UNSIGNED_BYTE", 5123 for "UNSIGNED_SHORT", and 5125 for "UNSIGNED_INT". */ + get sparse_indices_component_type(): int64 + set sparse_indices_component_type(value: int64) + + /** The index of the bufferView with sparse values. The referenced buffer view MUST NOT have its target or byteStride properties defined. */ + get sparse_values_buffer_view(): int64 + set sparse_values_buffer_view(value: int64) + + /** The offset relative to the start of the bufferView in bytes. */ + get sparse_values_byte_offset(): int64 + set sparse_values_byte_offset(value: int64) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gltfanimation.html */ + class GLTFAnimation extends Resource { + constructor(identifier?: any) + /** Gets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + */ + get_additional_data(extension_name: StringName): any + + /** Sets additional arbitrary data in this [GLTFAnimation] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + */ + set_additional_data(extension_name: StringName, additional_data: any): void + + /** The original name of the animation. */ + get original_name(): string + set original_name(value: string) + get loop(): boolean + set loop(value: boolean) + } + /** Represents a GLTF buffer view. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfbufferview.html + */ + class GLTFBufferView extends Resource { + constructor(identifier?: any) + /** Loads the buffer view data from the buffer referenced by this buffer view in the given [GLTFState]. Interleaved data with a byte stride is not yet supported by this method. The data is returned as a [PackedByteArray]. */ + load_buffer_view_data(state: GLTFState): PackedByteArray + + /** The index of the buffer this buffer view is referencing. If `-1`, this buffer view is not referencing any buffer. */ + get buffer(): int64 + set buffer(value: int64) + + /** The offset, in bytes, from the start of the buffer to the start of this buffer view. */ + get byte_offset(): int64 + set byte_offset(value: int64) + + /** The length, in bytes, of this buffer view. If `0`, this buffer view is empty. */ + get byte_length(): int64 + set byte_length(value: int64) + + /** The stride, in bytes, between interleaved data. If `-1`, this buffer view is not interleaved. */ + get byte_stride(): int64 + set byte_stride(value: int64) + + /** True if the GLTFBufferView's OpenGL GPU buffer type is an `ELEMENT_ARRAY_BUFFER` used for vertex indices (integer constant `34963`). False if the buffer type is any other value. See [url=https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md]Buffers, BufferViews, and Accessors[/url] for possible values. This property is set on import and used on export. */ + get indices(): boolean + set indices(value: boolean) + + /** True if the GLTFBufferView's OpenGL GPU buffer type is an `ARRAY_BUFFER` used for vertex attributes (integer constant `34962`). False if the buffer type is any other value. See [url=https://github.com/KhronosGroup/glTF-Tutorials/blob/master/gltfTutorial/gltfTutorial_005_BuffersBufferViewsAccessors.md]Buffers, BufferViews, and Accessors[/url] for possible values. This property is set on import and used on export. */ + get vertex_attributes(): boolean + set vertex_attributes(value: boolean) + } + /** Represents a GLTF camera. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfcamera.html + */ + class GLTFCamera extends Resource { + constructor(identifier?: any) + /** Create a new GLTFCamera instance from the given Godot [Camera3D] node. */ + static from_node(camera_node: Camera3D): GLTFCamera + + /** Converts this GLTFCamera instance into a Godot [Camera3D] node. */ + to_node(): Camera3D + + /** Creates a new GLTFCamera instance by parsing the given [Dictionary]. */ + static from_dictionary(dictionary: GDictionary): GLTFCamera + + /** Serializes this GLTFCamera instance into a [Dictionary]. */ + to_dictionary(): GDictionary + + /** Whether or not the camera is in perspective mode. If false, the camera is in orthographic/orthogonal mode. This maps to GLTF's camera `type` property. See [member Camera3D.projection] and the GLTF spec for more information. */ + get perspective(): boolean + set perspective(value: boolean) + + /** The FOV of the camera. This class and GLTF define the camera FOV in radians, while Godot uses degrees. This maps to GLTF's `yfov` property. This value is only used for perspective cameras, when [member perspective] is true. */ + get fov(): float64 + set fov(value: float64) + + /** The size of the camera. This class and GLTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to GLTF's `ymag` property. This value is only used for orthographic/orthogonal cameras, when [member perspective] is false. */ + get size_mag(): float64 + set size_mag(value: float64) + + /** The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's `zfar` property. */ + get depth_far(): float64 + set depth_far(value: float64) + + /** The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to GLTF's `znear` property. */ + get depth_near(): float64 + set depth_near(value: float64) + } + namespace GLTFDocument { + enum RootNodeMode { + /** Treat the Godot scene's root node as the root node of the glTF file, and mark it as the single root node via the `GODOT_single_root` glTF extension. This will be parsed the same as [constant ROOT_NODE_MODE_KEEP_ROOT] if the implementation does not support `GODOT_single_root`. */ + ROOT_NODE_MODE_SINGLE_ROOT = 0, + + /** Treat the Godot scene's root node as the root node of the glTF file, but do not mark it as anything special. An extra root node will be generated when importing into Godot. This uses only vanilla glTF features. This is equivalent to the behavior in Godot 4.1 and earlier. */ + ROOT_NODE_MODE_KEEP_ROOT = 1, + + /** Treat the Godot scene's root node as the name of the glTF scene, and add all of its children as root nodes of the glTF file. This uses only vanilla glTF features. This avoids an extra root node, but only the name of the Godot scene's root node will be preserved, as it will not be saved as a node. */ + ROOT_NODE_MODE_MULTI_ROOT = 2, + } + } + /** Class for importing and exporting glTF files in and out of Godot. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfdocument.html + */ + class GLTFDocument extends Resource { + constructor(identifier?: any) + /** Takes a path to a GLTF file and imports the data at that file path to the given [GLTFState] object through the [param state] parameter. + * + * **Note:** The [param base_path] tells [method append_from_file] where to find dependencies and can be empty. + */ + append_from_file(path: string, state: GLTFState, flags: int64 = 0, base_path: string = ''): GError + + /** Takes a [PackedByteArray] defining a GLTF and imports the data to the given [GLTFState] object through the [param state] parameter. + * + * **Note:** The [param base_path] tells [method append_from_buffer] where to find dependencies and can be empty. + */ + append_from_buffer(bytes: PackedByteArray | byte[] | ArrayBuffer, base_path: string, state: GLTFState, flags: int64 = 0): GError + + /** Takes a Godot Engine scene node and exports it and its descendants to the given [GLTFState] object through the [param state] parameter. */ + append_from_scene(node: Node, state: GLTFState, flags: int64 = 0): GError + + /** Takes a [GLTFState] object through the [param state] parameter and returns a Godot Engine scene node. + * The [param bake_fps] parameter overrides the bake_fps in [param state]. + */ + generate_scene(state: GLTFState, bake_fps: float64 = 30, trimming: boolean = false, remove_immutable_tracks: boolean = true): Node + + /** Takes a [GLTFState] object through the [param state] parameter and returns a GLTF [PackedByteArray]. */ + generate_buffer(state: GLTFState): PackedByteArray + + /** Takes a [GLTFState] object through the [param state] parameter and writes a glTF file to the filesystem. + * + * **Note:** The extension of the glTF file determines if it is a .glb binary file or a .gltf text file. + */ + write_to_filesystem(state: GLTFState, path: string): GError + + /** Registers the given [GLTFDocumentExtension] instance with GLTFDocument. If [param first_priority] is true, this extension will be run first. Otherwise, it will be run last. + * + * **Note:** Like GLTFDocument itself, all GLTFDocumentExtension classes must be stateless in order to function properly. If you need to store data, use the `set_additional_data` and `get_additional_data` methods in [GLTFState] or [GLTFNode]. + */ + static register_gltf_document_extension(extension: GLTFDocumentExtension, first_priority: boolean = false): void + + /** Unregisters the given [GLTFDocumentExtension] instance. */ + static unregister_gltf_document_extension(extension: GLTFDocumentExtension): void + + /** The user-friendly name of the export image format. This is used when exporting the GLTF file, including writing to a file and writing to a byte array. + * By default, Godot allows the following options: "None", "PNG", "JPEG", "Lossless WebP", and "Lossy WebP". Support for more image formats can be added in [GLTFDocumentExtension] classes. + */ + get image_format(): string + set image_format(value: string) + + /** If [member image_format] is a lossy image format, this determines the lossy quality of the image. On a range of `0.0` to `1.0`, where `0.0` is the lowest quality and `1.0` is the highest quality. A lossy quality of `1.0` is not the same as lossless. */ + get lossy_quality(): float64 + set lossy_quality(value: float64) + + /** How to process the root node during export. See [enum RootNodeMode] for details. The default and recommended value is [constant ROOT_NODE_MODE_SINGLE_ROOT]. + * + * **Note:** Regardless of how the glTF file is exported, when importing, the root node type and name can be overridden in the scene import settings tab. + */ + get root_node_mode(): int64 + set root_node_mode(value: int64) + } + /** [GLTFDocument] extension class. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfdocumentextension.html + */ + class GLTFDocumentExtension extends Resource { + constructor(identifier?: any) + /** Part of the import process. This method is run first, before all other parts of the import process. + * The return value is used to determine if this [GLTFDocumentExtension] instance should be used for importing a given GLTF file. If [constant OK], the import will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned. + */ + /* gdvirtual */ _import_preflight(state: GLTFState, extensions: PackedStringArray | string[]): GError + + /** Part of the import process. This method is run after [method _import_preflight] and before [method _parse_node_extensions]. + * Returns an array of the GLTF extensions supported by this GLTFDocumentExtension class. This is used to validate if a GLTF file with required extensions can be loaded. + */ + /* gdvirtual */ _get_supported_extensions(): PackedStringArray + + /** Part of the import process. This method is run after [method _get_supported_extensions] and before [method _import_post_parse]. + * Runs when parsing the node extensions of a GLTFNode. This method can be used to process the extension JSON data into a format that can be used by [method _generate_scene_node]. The return value should be a member of the [enum Error] enum. + */ + /* gdvirtual */ _parse_node_extensions(state: GLTFState, gltf_node: GLTFNode, extensions: GDictionary): GError + + /** Part of the import process. This method is run after [method _parse_node_extensions] and before [method _parse_texture_json]. + * Runs when parsing image data from a GLTF file. The data could be sourced from a separate file, a URI, or a buffer, and then is passed as a byte array. + */ + /* gdvirtual */ _parse_image_data(state: GLTFState, image_data: PackedByteArray | byte[] | ArrayBuffer, mime_type: string, ret_image: Image): GError + + /** Returns the file extension to use for saving image data into, for example, `".png"`. If defined, when this extension is used to handle images, and the images are saved to a separate file, the image bytes will be copied to a file with this extension. If this is set, there should be a [ResourceImporter] class able to import the file. If not defined or empty, Godot will save the image into a PNG file. */ + /* gdvirtual */ _get_image_file_extension(): string + + /** Part of the import process. This method is run after [method _parse_image_data] and before [method _generate_scene_node]. + * Runs when parsing the texture JSON from the GLTF textures array. This can be used to set the source image index to use as the texture. + */ + /* gdvirtual */ _parse_texture_json(state: GLTFState, texture_json: GDictionary, ret_gltf_texture: GLTFTexture): GError + + /** Part of the import process. This method is run after [method _import_post_parse] and before [method _import_node]. + * Runs when generating a Godot scene node from a GLTFNode. The returned node will be added to the scene tree. Multiple nodes can be generated in this step if they are added as a child of the returned node. + * + * **Note:** The [param scene_parent] parameter may be null if this is the single root node. + */ + /* gdvirtual */ _generate_scene_node(state: GLTFState, gltf_node: GLTFNode, scene_parent: Node): Node3D + + /** Part of the import process. This method is run after [method _parse_node_extensions] and before [method _generate_scene_node]. + * This method can be used to modify any of the data imported so far after parsing, before generating the nodes and then running the final per-node import step. + */ + /* gdvirtual */ _import_post_parse(state: GLTFState): GError + + /** Part of the import process. This method is run after [method _generate_scene_node] and before [method _import_post]. + * This method can be used to make modifications to each of the generated Godot scene nodes. + */ + /* gdvirtual */ _import_node(state: GLTFState, gltf_node: GLTFNode, json: GDictionary, node: Node): GError + + /** Part of the import process. This method is run last, after all other parts of the import process. + * This method can be used to modify the final Godot scene generated by the import process. + */ + /* gdvirtual */ _import_post(state: GLTFState, root: Node): GError + + /** Part of the export process. This method is run first, before all other parts of the export process. + * The return value is used to determine if this [GLTFDocumentExtension] instance should be used for exporting a given GLTF file. If [constant OK], the export will use this [GLTFDocumentExtension] instance. If not overridden, [constant OK] is returned. + */ + /* gdvirtual */ _export_preflight(state: GLTFState, root: Node): GError + + /** Part of the export process. This method is run after [method _export_preflight] and before [method _export_preserialize]. + * Runs when converting the data from a Godot scene node. This method can be used to process the Godot scene node data into a format that can be used by [method _export_node]. + */ + /* gdvirtual */ _convert_scene_node(state: GLTFState, gltf_node: GLTFNode, scene_node: Node): void + + /** Part of the export process. This method is run after [method _convert_scene_node] and before [method _get_saveable_image_formats]. + * This method can be used to alter the state before performing serialization. It runs every time when generating a buffer with [method GLTFDocument.generate_buffer] or writing to the file system with [method GLTFDocument.write_to_filesystem]. + */ + /* gdvirtual */ _export_preserialize(state: GLTFState): GError + + /** Part of the export process. This method is run after [method _convert_scene_node] and before [method _export_node]. + * Returns an array of the image formats that can be saved/exported by this extension. This extension will only be selected as the image exporter if the [GLTFDocument]'s [member GLTFDocument.image_format] is in this array. If this [GLTFDocumentExtension] is selected as the image exporter, one of the [method _save_image_at_path] or [method _serialize_image_to_bytes] methods will run next, otherwise [method _export_node] will run next. If the format name contains `"Lossy"`, the lossy quality slider will be displayed. + */ + /* gdvirtual */ _get_saveable_image_formats(): PackedStringArray + + /** Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json]. + * This method is run when embedding images in the GLTF file. When images are saved separately, [method _save_image_at_path] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter. + * This method must set the image MIME type in the [param image_dict] with the `"mimeType"` key. For example, for a PNG image, it would be set to `"image/png"`. The return value must be a [PackedByteArray] containing the image data. + */ + /* gdvirtual */ _serialize_image_to_bytes(state: GLTFState, image: Image, image_dict: GDictionary, image_format: string, lossy_quality: float64): PackedByteArray + + /** Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _serialize_texture_json]. + * This method is run when saving images separately from the GLTF file. When images are embedded, [method _serialize_image_to_bytes] runs instead. Note that these methods only run when this [GLTFDocumentExtension] is selected as the image exporter. + */ + /* gdvirtual */ _save_image_at_path(state: GLTFState, image: Image, file_path: string, image_format: string, lossy_quality: float64): GError + + /** Part of the export process. This method is run after [method _save_image_at_path] or [method _serialize_image_to_bytes], and before [method _export_node]. Note that this method only runs when this [GLTFDocumentExtension] is selected as the image exporter. + * This method can be used to set up the extensions for the texture JSON by editing [param texture_json]. The extension must also be added as used extension with [method GLTFState.add_used_extension], be sure to set `required` to `true` if you are not providing a fallback. + */ + /* gdvirtual */ _serialize_texture_json(state: GLTFState, texture_json: GDictionary, gltf_texture: GLTFTexture, image_format: string): GError + + /** Part of the export process. This method is run after [method _get_saveable_image_formats] and before [method _export_post]. If this [GLTFDocumentExtension] is used for exporting images, this runs after [method _serialize_texture_json]. + * This method can be used to modify the final JSON of each node. Data should be primarily stored in [param gltf_node] prior to serializing the JSON, but the original Godot [param node] is also provided if available. The node may be null if not available, such as when exporting GLTF data not generated from a Godot scene. + */ + /* gdvirtual */ _export_node(state: GLTFState, gltf_node: GLTFNode, json: GDictionary, node: Node): GError + + /** Part of the export process. This method is run last, after all other parts of the export process. + * This method can be used to modify the final JSON of the generated GLTF file. + */ + /* gdvirtual */ _export_post(state: GLTFState): GError + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gltfdocumentextensionconvertimportermesh.html */ + class GLTFDocumentExtensionConvertImporterMesh extends GLTFDocumentExtension { + constructor(identifier?: any) + } + class GLTFDocumentExtensionPhysics extends GLTFDocumentExtension { + constructor(identifier?: any) + } + class GLTFDocumentExtensionTextureKTX extends GLTFDocumentExtension { + constructor(identifier?: any) + } + class GLTFDocumentExtensionTextureWebP extends GLTFDocumentExtension { + constructor(identifier?: any) + } + /** Represents a GLTF light. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltflight.html + */ + class GLTFLight extends Resource { + constructor(identifier?: any) + /** Create a new GLTFLight instance from the given Godot [Light3D] node. */ + static from_node(light_node: Light3D): GLTFLight + + /** Converts this GLTFLight instance into a Godot [Light3D] node. */ + to_node(): Light3D + + /** Creates a new GLTFLight instance by parsing the given [Dictionary]. */ + static from_dictionary(dictionary: GDictionary): GLTFLight + + /** Serializes this GLTFLight instance into a [Dictionary]. */ + to_dictionary(): GDictionary + get_additional_data(extension_name: StringName): any + set_additional_data(extension_name: StringName, additional_data: any): void + + /** The [Color] of the light. Defaults to white. A black color causes the light to have no effect. */ + get color(): Color + set color(value: Color) + + /** The intensity of the light. This is expressed in candelas (lumens per steradian) for point and spot lights, and lux (lumens per m²) for directional lights. When creating a Godot light, this value is converted to a unitless multiplier. */ + get intensity(): float64 + set intensity(value: float64) + + /** The type of the light. The values accepted by Godot are "point", "spot", and "directional", which correspond to Godot's [OmniLight3D], [SpotLight3D], and [DirectionalLight3D] respectively. */ + get light_type(): string + set light_type(value: string) + + /** The range of the light, beyond which the light has no effect. GLTF lights with no range defined behave like physical lights (which have infinite range). When creating a Godot light, the range is clamped to 4096. */ + get range(): float64 + set range(value: float64) + + /** The inner angle of the cone in a spotlight. Must be less than or equal to the outer cone angle. + * Within this angle, the light is at full brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. When creating a Godot [SpotLight3D], the ratio between the inner and outer cone angles is used to calculate the attenuation of the light. + */ + get inner_cone_angle(): float64 + set inner_cone_angle(value: float64) + + /** The outer angle of the cone in a spotlight. Must be greater than or equal to the inner angle. + * At this angle, the light drops off to zero brightness. Between the inner and outer cone angles, there is a transition from full brightness to zero brightness. If this angle is a half turn, then the spotlight emits in all directions. When creating a Godot [SpotLight3D], the outer cone angle is used as the angle of the spotlight. + */ + get outer_cone_angle(): float64 + set outer_cone_angle(value: float64) + } + /** GLTFMesh represents a GLTF mesh. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfmesh.html + */ + class GLTFMesh extends Resource { + constructor(identifier?: any) + /** Gets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + */ + get_additional_data(extension_name: StringName): any + + /** Sets additional arbitrary data in this [GLTFMesh] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + */ + set_additional_data(extension_name: StringName, additional_data: any): void + + /** The original name of the mesh. */ + get original_name(): string + set original_name(value: string) + + /** The [ImporterMesh] object representing the mesh itself. */ + get mesh(): Object + set mesh(value: Object) + + /** An array of floats representing the blend weights of the mesh. */ + get blend_weights(): PackedFloat32Array + set blend_weights(value: PackedFloat32Array | float32[]) + + /** An array of Material objects representing the materials used in the mesh. */ + get instance_materials(): GArray + set instance_materials(value: GArray) + } + /** GLTF node class. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfnode.html + */ + class GLTFNode extends Resource { + constructor(identifier?: any) + /** Gets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + */ + get_additional_data(extension_name: StringName): any + + /** Sets additional arbitrary data in this [GLTFNode] instance. This can be used to keep per-node state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + */ + set_additional_data(extension_name: StringName, additional_data: any): void + + /** The original name of the node. */ + get original_name(): string + set original_name(value: string) + + /** The index of the parent node in the [GLTFState]. If -1, this node is a root node. */ + get parent(): int64 + set parent(value: int64) + + /** How deep into the node hierarchy this node is. A root node will have a height of 0, its children will have a height of 1, and so on. If -1, the height has not been calculated. */ + get height(): int64 + set height(value: int64) + + /** The transform of the GLTF node relative to its parent. This property is usually unused since the position, rotation, and scale properties are preferred. */ + get xform(): Transform3D + set xform(value: Transform3D) + + /** If this GLTF node is a mesh, the index of the [GLTFMesh] in the [GLTFState] that describes the mesh's properties. If -1, this node is not a mesh. */ + get mesh(): int64 + set mesh(value: int64) + + /** If this GLTF node is a camera, the index of the [GLTFCamera] in the [GLTFState] that describes the camera's properties. If -1, this node is not a camera. */ + get camera(): int64 + set camera(value: int64) + + /** If this GLTF node has a skin, the index of the [GLTFSkin] in the [GLTFState] that describes the skin's properties. If -1, this node does not have a skin. */ + get skin(): int64 + set skin(value: int64) + + /** If this GLTF node has a skeleton, the index of the [GLTFSkeleton] in the [GLTFState] that describes the skeleton's properties. If -1, this node does not have a skeleton. */ + get skeleton(): int64 + set skeleton(value: int64) + + /** The position of the GLTF node relative to its parent. */ + get position(): Vector3 + set position(value: Vector3) + + /** The rotation of the GLTF node relative to its parent. */ + get rotation(): Quaternion + set rotation(value: Quaternion) + + /** The scale of the GLTF node relative to its parent. */ + get scale(): Vector3 + set scale(value: Vector3) + + /** The indices of the child nodes in the [GLTFState]. If this GLTF node has no children, this will be an empty array. */ + get children(): PackedInt32Array + set children(value: PackedInt32Array | int32[]) + + /** If this GLTF node is a light, the index of the [GLTFLight] in the [GLTFState] that describes the light's properties. If -1, this node is not a light. */ + get light(): int64 + set light(value: int64) + } + /** Represents a GLTF physics body. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfphysicsbody.html + */ + class GLTFPhysicsBody extends Resource { + constructor(identifier?: any) + /** Creates a new GLTFPhysicsBody instance from the given Godot [CollisionObject3D] node. */ + static from_node(body_node: CollisionObject3D): GLTFPhysicsBody + + /** Converts this GLTFPhysicsBody instance into a Godot [CollisionObject3D] node. */ + to_node(): CollisionObject3D + + /** Creates a new GLTFPhysicsBody instance by parsing the given [Dictionary] in the `OMI_physics_body` GLTF extension format. */ + static from_dictionary(dictionary: GDictionary): GLTFPhysicsBody + + /** Serializes this GLTFPhysicsBody instance into a [Dictionary]. It will be in the format expected by the `OMI_physics_body` GLTF extension. */ + to_dictionary(): GDictionary + + /** The type of the body. When importing, this controls what type of [CollisionObject3D] node Godot should generate. Valid values are "static", "animatable", "character", "rigid", "vehicle", and "trigger". When exporting, this will be squashed down to one of "static", "kinematic", or "dynamic" motion types, or the "trigger" property. */ + get body_type(): string + set body_type(value: string) + + /** The mass of the physics body, in kilograms. This is only used when the body type is "rigid" or "vehicle". */ + get mass(): float64 + set mass(value: float64) + + /** The linear velocity of the physics body, in meters per second. This is only used when the body type is "rigid" or "vehicle". */ + get linear_velocity(): Vector3 + set linear_velocity(value: Vector3) + + /** The angular velocity of the physics body, in radians per second. This is only used when the body type is "rigid" or "vehicle". */ + get angular_velocity(): Vector3 + set angular_velocity(value: Vector3) + + /** The center of mass of the body, in meters. This is in local space relative to the body. By default, the center of the mass is the body's origin. */ + get center_of_mass(): Vector3 + set center_of_mass(value: Vector3) + + /** The inertia strength of the physics body, in kilogram meter squared (kg⋅m²). This represents the inertia around the principle axes, the diagonal of the inertia tensor matrix. This is only used when the body type is "rigid" or "vehicle". + * When converted to a Godot [RigidBody3D] node, if this value is zero, then the inertia will be calculated automatically. + */ + get inertia_diagonal(): Vector3 + set inertia_diagonal(value: Vector3) + + /** The inertia orientation of the physics body. This defines the rotation of the inertia's principle axes relative to the object's local axes. This is only used when the body type is "rigid" or "vehicle" and [member inertia_diagonal] is set to a non-zero value. */ + get inertia_orientation(): Quaternion + set inertia_orientation(value: Quaternion) + + /** The inertia tensor of the physics body, in kilogram meter squared (kg⋅m²). This is only used when the body type is "rigid" or "vehicle". + * When converted to a Godot [RigidBody3D] node, if this value is zero, then the inertia will be calculated automatically. + */ + get inertia_tensor(): Basis + set inertia_tensor(value: Basis) + } + /** Represents a GLTF physics shape. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfphysicsshape.html + */ + class GLTFPhysicsShape extends Resource { + constructor(identifier?: any) + /** Creates a new GLTFPhysicsShape instance from the given Godot [CollisionShape3D] node. */ + static from_node(shape_node: CollisionShape3D): GLTFPhysicsShape + + /** Converts this GLTFPhysicsShape instance into a Godot [CollisionShape3D] node. */ + to_node(cache_shapes: boolean = false): CollisionShape3D + + /** Creates a new GLTFPhysicsShape instance from the given Godot [Shape3D] resource. */ + static from_resource(shape_resource: Shape3D): GLTFPhysicsShape + + /** Converts this GLTFPhysicsShape instance into a Godot [Shape3D] resource. */ + to_resource(cache_shapes: boolean = false): Shape3D + + /** Creates a new GLTFPhysicsShape instance by parsing the given [Dictionary]. */ + static from_dictionary(dictionary: GDictionary): GLTFPhysicsShape + + /** Serializes this GLTFPhysicsShape instance into a [Dictionary] in the format defined by `OMI_physics_shape`. */ + to_dictionary(): GDictionary + + /** The type of shape this shape represents. Valid values are "box", "capsule", "cylinder", "sphere", "hull", and "trimesh". */ + get shape_type(): string + set shape_type(value: string) + + /** The size of the shape, in meters. This is only used when the shape type is "box", and it represents the "diameter" of the box. This value should not be negative. */ + get size(): Vector3 + set size(value: Vector3) + + /** The radius of the shape, in meters. This is only used when the shape type is "capsule", "cylinder", or "sphere". This value should not be negative. */ + get radius(): float64 + set radius(value: float64) + + /** The height of the shape, in meters. This is only used when the shape type is "capsule" or "cylinder". This value should not be negative, and for "capsule" it should be at least twice the radius. */ + get height(): float64 + set height(value: float64) + + /** If `true`, indicates that this shape is a trigger. For Godot, this means that the shape should be a child of an Area3D node. + * This is the only variable not used in the [method to_node] method, it's intended to be used alongside when deciding where to add the generated node as a child. + */ + get is_trigger(): boolean + set is_trigger(value: boolean) + + /** The index of the shape's mesh in the GLTF file. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). */ + get mesh_index(): int64 + set mesh_index(value: int64) + + /** The [ImporterMesh] resource of the shape. This is only used when the shape type is "hull" (convex hull) or "trimesh" (concave trimesh). */ + get importer_mesh(): ImporterMesh + set importer_mesh(value: ImporterMesh) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gltfskeleton.html */ + class GLTFSkeleton extends Resource { + constructor(identifier?: any) + get_godot_skeleton(): Skeleton3D + get_bone_attachment_count(): int64 + get_bone_attachment(idx: int64): BoneAttachment3D + get joints(): PackedInt32Array + set joints(value: PackedInt32Array | int32[]) + get roots(): PackedInt32Array + set roots(value: PackedInt32Array | int32[]) + get unique_names(): GArray + set unique_names(value: GArray) + get godot_bone_node(): GDictionary + set godot_bone_node(value: GDictionary) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_gltfskin.html */ + class GLTFSkin extends Resource { + constructor(identifier?: any) + get skin_root(): int64 + set skin_root(value: int64) + get joints_original(): PackedInt32Array + set joints_original(value: PackedInt32Array | int32[]) + get inverse_binds(): GArray + set inverse_binds(value: GArray) + get joints(): PackedInt32Array + set joints(value: PackedInt32Array | int32[]) + get non_joints(): PackedInt32Array + set non_joints(value: PackedInt32Array | int32[]) + get roots(): PackedInt32Array + set roots(value: PackedInt32Array | int32[]) + get skeleton(): int64 + set skeleton(value: int64) + get joint_i_to_bone_i(): GDictionary + set joint_i_to_bone_i(value: GDictionary) + get joint_i_to_name(): GDictionary + set joint_i_to_name(value: GDictionary) + get godot_skin(): Skin + set godot_skin(value: Skin) + } + /** Archived GLTF extension for specular/glossy materials. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfspecgloss.html + */ + class GLTFSpecGloss extends Resource { + constructor(identifier?: any) + /** The diffuse texture. */ + get diffuse_img(): Object + set diffuse_img(value: Object) + + /** The reflected diffuse factor of the material. */ + get diffuse_factor(): Color + set diffuse_factor(value: Color) + + /** The glossiness or smoothness of the material. */ + get gloss_factor(): float64 + set gloss_factor(value: float64) + + /** The specular RGB color of the material. The alpha channel is unused. */ + get specular_factor(): Color + set specular_factor(value: Color) + + /** The specular-glossiness texture. */ + get spec_gloss_img(): Object + set spec_gloss_img(value: Object) + } + /** Represents all data of a GLTF file. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltfstate.html + */ + class GLTFState extends Resource { + /** Discards all embedded textures and uses untextured materials. */ + static readonly HANDLE_BINARY_DISCARD_TEXTURES = 0 + + /** Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime. */ + static readonly HANDLE_BINARY_EXTRACT_TEXTURES = 1 + + /** Embeds textures VRAM compressed with Basis Universal into the generated scene. */ + static readonly HANDLE_BINARY_EMBED_AS_BASISU = 2 + + /** Embeds textures compressed losslessly into the generated scene, matching old behavior. */ + static readonly HANDLE_BINARY_EMBED_AS_UNCOMPRESSED = 3 + constructor(identifier?: any) + + /** Appends an extension to the list of extensions used by this GLTF file during serialization. If [param required] is true, the extension will also be added to the list of required extensions. Do not run this in [method GLTFDocumentExtension._export_post], as that stage is too late to add extensions. The final list is sorted alphabetically. */ + add_used_extension(extension_name: string, required: boolean): void + + /** Appends the given byte array data to the buffers and creates a [GLTFBufferView] for it. The index of the destination [GLTFBufferView] is returned. If [param deduplication] is true, the buffers will first be searched for duplicate data, otherwise new bytes will always be appended. */ + append_data_to_buffers(data: PackedByteArray | byte[] | ArrayBuffer, deduplication: boolean): int64 + + /** Returns the number of [AnimationPlayer] nodes in this [GLTFState]. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to GLTF animations. */ + get_animation_players_count(idx: int64): int64 + + /** Returns the [AnimationPlayer] node with the given index. These nodes are only used during the export process when converting Godot [AnimationPlayer] nodes to GLTF animations. */ + get_animation_player(idx: int64): AnimationPlayer + + /** Returns the Godot scene node that corresponds to the same index as the [GLTFNode] it was generated from. This is the inverse of [method get_node_index]. Useful during the import process. + * + * **Note:** Not every [GLTFNode] will have a scene node generated, and not every generated scene node will have a corresponding [GLTFNode]. If there is no scene node for this [GLTFNode] index, `null` is returned. + */ + get_scene_node(idx: int64): Node + + /** Returns the index of the [GLTFNode] corresponding to this Godot scene node. This is the inverse of [method get_scene_node]. Useful during the export process. + * + * **Note:** Not every Godot scene node will have a corresponding [GLTFNode], and not every [GLTFNode] will have a scene node generated. If there is no [GLTFNode] index for this scene node, `-1` is returned. + */ + get_node_index(scene_node: Node): int64 + + /** Gets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null. + */ + get_additional_data(extension_name: StringName): any + + /** Sets additional arbitrary data in this [GLTFState] instance. This can be used to keep per-file state data in [GLTFDocumentExtension] classes, which is important because they are stateless. + * The first argument should be the [GLTFDocumentExtension] name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want. + */ + set_additional_data(extension_name: StringName, additional_data: any): void + + /** The original raw JSON document corresponding to this GLTFState. */ + get json(): GDictionary + set json(value: GDictionary) + get major_version(): int64 + set major_version(value: int64) + get minor_version(): int64 + set minor_version(value: int64) + + /** The copyright string in the asset header of the GLTF file. This is set during import if present and export if non-empty. See the GLTF asset header documentation for more information. */ + get copyright(): string + set copyright(value: string) + + /** The binary buffer attached to a .glb file. */ + get glb_data(): PackedByteArray + set glb_data(value: PackedByteArray | byte[] | ArrayBuffer) + get use_named_skin_binds(): boolean + set use_named_skin_binds(value: boolean) + get nodes(): GArray + set nodes(value: GArray) + get buffers(): GArray + set buffers(value: GArray) + get buffer_views(): GArray + set buffer_views(value: GArray) + get accessors(): GArray + set accessors(value: GArray) + get meshes(): GArray + set meshes(value: GArray) + get materials(): GArray + set materials(value: GArray) + + /** The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file. */ + get scene_name(): string + set scene_name(value: string) + + /** The folder path associated with this GLTF data. This is used to find other files the GLTF file references, like images or binary buffers. This will be set during import when appending from a file, and will be set during export when writing to a file. */ + get base_path(): string + set base_path(value: string) + + /** The file name associated with this GLTF data. If it ends with `.gltf`, this is text-based GLTF, otherwise this is binary GLB. This will be set during import when appending from a file, and will be set during export when writing to a file. If writing to a buffer, this will be an empty string. */ + get filename(): string + set filename(value: string) + + /** The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene. */ + get root_nodes(): PackedInt32Array + set root_nodes(value: PackedInt32Array | int32[]) + get textures(): GArray + set textures(value: GArray) + get texture_samplers(): GArray + set texture_samplers(value: GArray) + get images(): GArray + set images(value: GArray) + get skins(): GArray + set skins(value: GArray) + get cameras(): GArray + set cameras(value: GArray) + get lights(): GArray + set lights(value: GArray) + get unique_names(): GArray + set unique_names(value: GArray) + get unique_animation_names(): GArray + set unique_animation_names(value: GArray) + get skeletons(): GArray + set skeletons(value: GArray) + get create_animations(): boolean + set create_animations(value: boolean) + + /** True to force all GLTFNodes in the document to be bones of a single Skeleton3D godot node. */ + get import_as_skeleton_bones(): boolean + set import_as_skeleton_bones(value: boolean) + get animations(): GArray + set animations(value: GArray) + get handle_binary_image(): int64 + set handle_binary_image(value: int64) + + /** The baking fps of the animation for either import or export. */ + get bake_fps(): float64 + set bake_fps(value: float64) + } + /** GLTFTexture represents a texture in a GLTF file. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltftexture.html + */ + class GLTFTexture extends Resource { + constructor(identifier?: any) + /** The index of the image associated with this texture, see [method GLTFState.get_images]. If -1, then this texture does not have an image assigned. */ + get src_image(): int64 + set src_image(value: int64) + + /** ID of the texture sampler to use when sampling the image. If -1, then the default texture sampler is used (linear filtering, and repeat wrapping in both axes). */ + get sampler(): int64 + set sampler(value: int64) + } + /** Represents a GLTF texture sampler + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gltftexturesampler.html + */ + class GLTFTextureSampler extends Resource { + constructor(identifier?: any) + /** Texture's magnification filter, used when texture appears larger on screen than the source image. */ + get mag_filter(): int64 + set mag_filter(value: int64) + + /** Texture's minification filter, used when the texture appears smaller on screen than the source image. */ + get min_filter(): int64 + set min_filter(value: int64) + + /** Wrapping mode to use for S-axis (horizontal) texture coordinates. */ + get wrap_s(): int64 + set wrap_s(value: int64) + + /** Wrapping mode to use for T-axis (vertical) texture coordinates. */ + get wrap_t(): int64 + set wrap_t(value: int64) + } + namespace GPUParticles2D { + enum DrawOrder { + /** Particles are drawn in the order emitted. */ + DRAW_ORDER_INDEX = 0, + + /** Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. */ + DRAW_ORDER_LIFETIME = 1, + + /** Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. */ + DRAW_ORDER_REVERSE_LIFETIME = 2, + } + enum EmitFlags { + /** Particle starts at the specified position. */ + EMIT_FLAG_POSITION = 1, + + /** Particle starts with specified rotation and scale. */ + EMIT_FLAG_ROTATION_SCALE = 2, + + /** Particle starts with the specified velocity vector, which defines the emission direction and speed. */ + EMIT_FLAG_VELOCITY = 4, + + /** Particle starts with specified color. */ + EMIT_FLAG_COLOR = 8, + + /** Particle starts with specified `CUSTOM` data. */ + EMIT_FLAG_CUSTOM = 16, + } + } + /** A 2D particle emitter. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticles2d.html + */ + class GPUParticles2D extends Node2D { + constructor(identifier?: any) + /** Returns a rectangle containing the positions of all existing particles. + * + * **Note:** When using threaded rendering this method synchronizes the rendering thread. Calling it often may have a negative impact on performance. + */ + capture_rect(): Rect2 + + /** Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. + * + * **Note:** The [signal finished] signal is only emitted by [member one_shot] emitters. + */ + restart(): void + + /** Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. + * The default ParticleProcessMaterial will overwrite [param color] and use the contents of [param custom] as `(rotation, age, animation, lifetime)`. + */ + emit_particle(xform: Transform2D, velocity: Vector2, color: Color, custom: Color, flags: int64): void + + /** Sets this node's properties to match a given [CPUParticles2D] node. */ + convert_from_particles(particles: Node): void + + /** If `true`, particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is `true` setting [member emitting] to `true` will not restart the emission cycle unless all active particles have finished processing. Use the [signal finished] signal to be notified once all active particles finish processing. + * + * **Note:** For [member one_shot] emitters, due to the particles being computed on the GPU, there may be a short period after receiving the [signal finished] signal during which setting this to `true` will not restart the emission cycle. + * **Tip:** If your [member one_shot] emitter needs to immediately restart emitting particles once [signal finished] signal is received, consider calling [method restart] instead of setting [member emitting]. + */ + get emitting(): boolean + set emitting(value: boolean) + + /** The number of particles to emit in one emission cycle. The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if [member amount_ratio] is decreased. + * + * **Note:** Changing this value will cause the particle system to restart. To avoid this, change [member amount_ratio] instead. + */ + get amount(): int64 + set amount(value: int64) + + /** The ratio of particles that should actually be emitted. If set to a value lower than `1.0`, this will set the amount of emitted particles throughout the lifetime to `amount * amount_ratio`. Unlike changing [member amount], changing [member amount_ratio] while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. [member amount_ratio] can be used to create effects that make the number of emitted particles vary over time. + * + * **Note:** Reducing the [member amount_ratio] has no performance benefit, since resources need to be allocated and processed for the total [member amount] of particles regardless of the [member amount_ratio]. If you don't intend to change the number of particles emitted while the particles are emitting, make sure [member amount_ratio] is set to `1` and change [member amount] to your liking instead. + */ + get amount_ratio(): float64 + set amount_ratio(value: float64) + + /** Path to another [GPUParticles2D] node that will be used as a subemitter (see [member ParticleProcessMaterial.sub_emitter_mode]). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. + * + * **Note:** When [member sub_emitter] is set, the target [GPUParticles2D] node will no longer emit particles on its own. + */ + get sub_emitter(): NodePath + set sub_emitter(value: NodePath | string) + + /** [Material] for processing particles. Can be a [ParticleProcessMaterial] or a [ShaderMaterial]. */ + get process_material(): ParticleProcessMaterial | ShaderMaterial + set process_material(value: ParticleProcessMaterial | ShaderMaterial) + + /** Particle texture. If `null`, particles will be squares with a size of 1×1 pixels. + * + * **Note:** To use a flipbook texture, assign a new [CanvasItemMaterial] to the [GPUParticles2D]'s [member CanvasItem.material] property, then enable [member CanvasItemMaterial.particles_animation] and set [member CanvasItemMaterial.particles_anim_h_frames], [member CanvasItemMaterial.particles_anim_v_frames], and [member CanvasItemMaterial.particles_anim_loop] to match the flipbook texture. + */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** The amount of time each particle will exist (in seconds). The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. */ + get lifetime(): float64 + set lifetime(value: float64) + + /** If `true`, only one emission cycle occurs. If set `true` during a cycle, emission will stop at the cycle's end. */ + get one_shot(): boolean + set one_shot(value: boolean) + + /** Particle system starts as if it had already run for this many seconds. */ + get preprocess(): float64 + set preprocess(value: float64) + + /** Particle system's running speed scaling ratio. A value of `0` can be used to pause the particles. */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** 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. */ + get explosiveness(): float64 + set explosiveness(value: float64) + + /** Emission lifetime randomness ratio. */ + get randomness(): float64 + set randomness(value: float64) + + /** The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. */ + get fixed_fps(): int64 + set fixed_fps(value: int64) + + /** Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate. */ + get interpolate(): boolean + set interpolate(value: boolean) + + /** If `true`, results in fractional delta calculation which has a smoother particles display effect. */ + get fract_delta(): boolean + set fract_delta(value: boolean) + + /** Causes all the particles in this node to interpolate towards the end of their lifetime. + * + * **Note:** This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. + */ + get interp_to_end(): float64 + set interp_to_end(value: float64) + + /** Multiplier for particle's collision radius. `1.0` corresponds to the size of the sprite. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if [member ParticleProcessMaterial.collision_mode] is [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT]. + * + * **Note:** Particles always have a spherical collision shape. + */ + get collision_base_size(): float64 + set collision_base_size(value: float64) + + /** The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active. + * Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the **Particles → Generate Visibility Rect** editor tool. + */ + get visibility_rect(): Rect2 + set visibility_rect(value: Rect2) + + /** If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the [GPUParticles2D] node (and its parents) when it is moved or rotated. */ + get local_coords(): boolean + set local_coords(value: boolean) + + /** Particle draw order. Uses [enum DrawOrder] values. */ + get draw_order(): int64 + set draw_order(value: int64) + + /** If `true`, enables particle trails using a mesh skinning system. + * + * **Note:** Unlike [GPUParticles3D], the number of trail sections and subdivisions is set with the [member trail_sections] and [member trail_section_subdivisions] properties. + */ + get trail_enabled(): boolean + set trail_enabled(value: boolean) + + /** The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is `true`. */ + get trail_lifetime(): float64 + set trail_lifetime(value: float64) + + /** The number of sections to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_section_subdivisions]. Only effective if [member trail_enabled] is `true`. */ + get trail_sections(): int64 + set trail_sections(value: int64) + + /** The number of subdivisions to use for the particle trail rendering. Higher values can result in smoother trail curves, at the cost of performance due to increased mesh complexity. See also [member trail_sections]. Only effective if [member trail_enabled] is `true`. */ + get trail_section_subdivisions(): int64 + set trail_section_subdivisions(value: int64) + + /** Emitted when all active particles have finished processing. To immediately restart the emission cycle, call [method restart]. + * Never emitted when [member one_shot] is disabled, as particles will be emitted and processed continuously. + * + * **Note:** For [member one_shot] emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting [member emitting] to `true` will not restart the emission cycle. This delay is avoided by instead calling [method restart]. + */ + readonly finished: Signal0 + } + class GPUParticles2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace GPUParticles3D { + enum DrawOrder { + /** Particles are drawn in the order emitted. */ + DRAW_ORDER_INDEX = 0, + + /** Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. */ + DRAW_ORDER_LIFETIME = 1, + + /** Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. */ + DRAW_ORDER_REVERSE_LIFETIME = 2, + + /** Particles are drawn in order of depth. */ + DRAW_ORDER_VIEW_DEPTH = 3, + } + enum EmitFlags { + /** Particle starts at the specified position. */ + EMIT_FLAG_POSITION = 1, + + /** Particle starts with specified rotation and scale. */ + EMIT_FLAG_ROTATION_SCALE = 2, + + /** Particle starts with the specified velocity vector, which defines the emission direction and speed. */ + EMIT_FLAG_VELOCITY = 4, + + /** Particle starts with specified color. */ + EMIT_FLAG_COLOR = 8, + + /** Particle starts with specified `CUSTOM` data. */ + EMIT_FLAG_CUSTOM = 16, + } + enum TransformAlign { + TRANSFORM_ALIGN_DISABLED = 0, + TRANSFORM_ALIGN_Z_BILLBOARD = 1, + TRANSFORM_ALIGN_Y_TO_VELOCITY = 2, + TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY = 3, + } + } + /** A 3D particle emitter. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticles3d.html + */ + class GPUParticles3D extends GeometryInstance3D { + /** Maximum number of draw passes supported. */ + static readonly MAX_DRAW_PASSES = 4 + constructor(identifier?: any) + + /** Sets the [Mesh] that is drawn at index [param pass]. */ + set_draw_pass_mesh(pass: int64, mesh: Mesh): void + + /** Returns the [Mesh] that is drawn at index [param pass]. */ + get_draw_pass_mesh(pass: int64): Mesh + + /** Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. + * + * **Note:** The [signal finished] signal is only emitted by [member one_shot] emitters. + */ + restart(): void + + /** Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. */ + capture_aabb(): AABB + + /** Emits a single particle. Whether [param xform], [param velocity], [param color] and [param custom] are applied depends on the value of [param flags]. See [enum EmitFlags]. + * The default ParticleProcessMaterial will overwrite [param color] and use the contents of [param custom] as `(rotation, age, animation, lifetime)`. + */ + emit_particle(xform: Transform3D, velocity: Vector3, color: Color, custom: Color, flags: int64): void + + /** Sets this node's properties to match a given [CPUParticles3D] node. */ + convert_from_particles(particles: Node): void + + /** If `true`, particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is `true` setting [member emitting] to `true` will not restart the emission cycle unless all active particles have finished processing. Use the [signal finished] signal to be notified once all active particles finish processing. + * + * **Note:** For [member one_shot] emitters, due to the particles being computed on the GPU, there may be a short period after receiving the [signal finished] signal during which setting this to `true` will not restart the emission cycle. + * **Tip:** If your [member one_shot] emitter needs to immediately restart emitting particles once [signal finished] signal is received, consider calling [method restart] instead of setting [member emitting]. + */ + get emitting(): boolean + set emitting(value: boolean) + + /** The number of particles to emit in one emission cycle. The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. Higher values will increase GPU requirements, even if not all particles are visible at a given time or if [member amount_ratio] is decreased. + * + * **Note:** Changing this value will cause the particle system to restart. To avoid this, change [member amount_ratio] instead. + */ + get amount(): int64 + set amount(value: int64) + + /** The ratio of particles that should actually be emitted. If set to a value lower than `1.0`, this will set the amount of emitted particles throughout the lifetime to `amount * amount_ratio`. Unlike changing [member amount], changing [member amount_ratio] while emitting does not affect already-emitted particles and doesn't cause the particle system to restart. [member amount_ratio] can be used to create effects that make the number of emitted particles vary over time. + * + * **Note:** Reducing the [member amount_ratio] has no performance benefit, since resources need to be allocated and processed for the total [member amount] of particles regardless of the [member amount_ratio]. If you don't intend to change the number of particles emitted while the particles are emitting, make sure [member amount_ratio] is set to `1` and change [member amount] to your liking instead. + */ + get amount_ratio(): float64 + set amount_ratio(value: float64) + + /** Path to another [GPUParticles3D] node that will be used as a subemitter (see [member ParticleProcessMaterial.sub_emitter_mode]). Subemitters can be used to achieve effects such as fireworks, sparks on collision, bubbles popping into water drops, and more. + * + * **Note:** When [member sub_emitter] is set, the target [GPUParticles3D] node will no longer emit particles on its own. + */ + get sub_emitter(): NodePath + set sub_emitter(value: NodePath | string) + + /** The amount of time each particle will exist (in seconds). The effective emission rate is `(amount * amount_ratio) / lifetime` particles per second. */ + get lifetime(): float64 + set lifetime(value: float64) + + /** Causes all the particles in this node to interpolate towards the end of their lifetime. + * + * **Note:** This only works when used with a [ParticleProcessMaterial]. It needs to be manually implemented for custom process shaders. + */ + get interp_to_end(): float64 + set interp_to_end(value: float64) + + /** If `true`, only the number of particles equal to [member amount] will be emitted. */ + get one_shot(): boolean + set one_shot(value: boolean) + + /** Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. */ + get preprocess(): float64 + set preprocess(value: float64) + + /** Speed scaling ratio. A value of `0` can be used to pause the particles. */ + get speed_scale(): float64 + set speed_scale(value: float64) + + /** Time ratio between each emission. If `0`, particles are emitted continuously. If `1`, all particles are emitted simultaneously. */ + get explosiveness(): float64 + set explosiveness(value: float64) + + /** Emission randomness ratio. */ + get randomness(): float64 + set randomness(value: float64) + + /** The particle system's frame rate is fixed to a value. For example, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. */ + get fixed_fps(): int64 + set fixed_fps(value: int64) + + /** Enables particle interpolation, which makes the particle movement smoother when their [member fixed_fps] is lower than the screen refresh rate. */ + get interpolate(): boolean + set interpolate(value: boolean) + + /** If `true`, results in fractional delta calculation which has a smoother particles display effect. */ + get fract_delta(): boolean + set fract_delta(value: boolean) + + /** The base diameter for particle collision in meters. If particles appear to sink into the ground when colliding, increase this value. If particles appear to float when colliding, decrease this value. Only effective if [member ParticleProcessMaterial.collision_mode] is [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT]. + * + * **Note:** Particles always have a spherical collision shape. + */ + get collision_base_size(): float64 + set collision_base_size(value: float64) + + /** The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active. [member GeometryInstance3D.extra_cull_margin] is added on each of the AABB's axes. Particle collisions and attraction will only occur within this area. + * Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the **Particles → Generate AABB** editor tool. + * + * **Note:** [member visibility_aabb] is overridden by [member GeometryInstance3D.custom_aabb] if that property is set to a non-default value. + */ + get visibility_aabb(): AABB + set visibility_aabb(value: AABB) + + /** If `true`, particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. If `false`, particles use global coordinates; they will not move or rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. */ + get local_coords(): boolean + set local_coords(value: boolean) + + /** Particle draw order. Uses [enum DrawOrder] values. + * + * **Note:** [constant DRAW_ORDER_INDEX] is the only option that supports motion vectors for effects like TAA. It is suggested to use this draw order if the particles are opaque to fix ghosting artifacts. + */ + get draw_order(): int64 + set draw_order(value: int64) + get transform_align(): int64 + set transform_align(value: int64) + + /** If `true`, enables particle trails using a mesh skinning system. Designed to work with [RibbonTrailMesh] and [TubeTrailMesh]. + * + * **Note:** [member BaseMaterial3D.use_particle_trails] must also be enabled on the particle mesh's material. Otherwise, setting [member trail_enabled] to `true` will have no effect. + * + * **Note:** Unlike [GPUParticles2D], the number of trail sections and subdivisions is set in the [RibbonTrailMesh] or the [TubeTrailMesh]'s properties. + */ + get trail_enabled(): boolean + set trail_enabled(value: boolean) + + /** The amount of time the particle's trail should represent (in seconds). Only effective if [member trail_enabled] is `true`. */ + get trail_lifetime(): float64 + set trail_lifetime(value: float64) + + /** [Material] for processing particles. Can be a [ParticleProcessMaterial] or a [ShaderMaterial]. */ + get process_material(): ParticleProcessMaterial | ShaderMaterial + set process_material(value: ParticleProcessMaterial | ShaderMaterial) + + /** The number of draw passes when rendering particles. */ + get draw_passes(): int64 + set draw_passes(value: int64) + + /** [Mesh] that is drawn for the first draw pass. */ + get draw_pass_1(): Mesh + set draw_pass_1(value: Mesh) + + /** [Mesh] that is drawn for the second draw pass. */ + get draw_pass_2(): Mesh + set draw_pass_2(value: Mesh) + + /** [Mesh] that is drawn for the third draw pass. */ + get draw_pass_3(): Mesh + set draw_pass_3(value: Mesh) + + /** [Mesh] that is drawn for the fourth draw pass. */ + get draw_pass_4(): Mesh + set draw_pass_4(value: Mesh) + get draw_skin(): Skin + set draw_skin(value: Skin) + + /** Emitted when all active particles have finished processing. To immediately emit new particles, call [method restart]. + * Never emitted when [member one_shot] is disabled, as particles will be emitted and processed continuously. + * + * **Note:** For [member one_shot] emitters, due to the particles being computed on the GPU, there may be a short period after receiving the signal during which setting [member emitting] to `true` will not restart the emission cycle. This delay is avoided by instead calling [method restart]. + */ + readonly finished: Signal0 + } +} diff --git a/godot/typings/godot3.gen.d.ts b/godot/typings/godot3.gen.d.ts new file mode 100644 index 0000000..1dda299 --- /dev/null +++ b/godot/typings/godot3.gen.d.ts @@ -0,0 +1,9536 @@ +// AUTO-GENERATED +/// +declare module "godot" { + class GPUParticles3DEditor extends GPUParticles3DEditorBase { + constructor(identifier?: any) + } + class GPUParticles3DEditorBase extends Control { + constructor(identifier?: any) + } + class GPUParticles3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class GPUParticles3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Abstract base class for 3D particle attractors. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlesattractor3d.html + */ + class GPUParticlesAttractor3D extends VisualInstance3D { + constructor(identifier?: any) + /** Adjusts the strength of the attractor. If [member strength] is negative, particles will be pushed in the opposite direction. Particles will be pushed *away* from the attractor's origin if [member directionality] is `0.0`, or towards local +Z if [member directionality] is greater than `0.0`. */ + get strength(): float64 + set strength(value: float64) + + /** The particle attractor's attenuation. Higher values result in more gradual pushing of particles as they come closer to the attractor's origin. Zero or negative values will cause particles to be pushed very fast as soon as the touch the attractor's edges. */ + get attenuation(): float64 + set attenuation(value: float64) + + /** Adjusts how directional the attractor is. At `0.0`, the attractor is not directional at all: it will attract particles towards its center. At `1.0`, the attractor is fully directional: particles will always be pushed towards local -Z (or +Z if [member strength] is negative). + * + * **Note:** If [member directionality] is greater than `0.0`, the direction in which particles are pushed can be changed by rotating the [GPUParticlesAttractor3D] node. + */ + get directionality(): float64 + set directionality(value: float64) + + /** The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the attractor. By default, all particles are affected by an attractor. + * After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + * Particle attraction can also be disabled on a per-process material basis by setting [member ParticleProcessMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. + */ + get cull_mask(): int64 + set cull_mask(value: int64) + } + /** A box-shaped attractor that influences particles from [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlesattractorbox3d.html + */ + class GPUParticlesAttractorBox3D extends GPUParticlesAttractor3D { + constructor(identifier?: any) + /** The attractor box's size in 3D units. */ + get size(): Vector3 + set size(value: Vector3) + } + /** A spheroid-shaped attractor that influences particles from [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlesattractorsphere3d.html + */ + class GPUParticlesAttractorSphere3D extends GPUParticlesAttractor3D { + constructor(identifier?: any) + /** The attractor sphere's radius in 3D units. + * + * **Note:** Stretched ellipses can be obtained by using non-uniform scaling on the [GPUParticlesAttractorSphere3D] node. + */ + get radius(): float64 + set radius(value: float64) + } + /** A box-shaped attractor with varying directions and strengths defined in it that influences particles from [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlesattractorvectorfield3d.html + */ + class GPUParticlesAttractorVectorField3D extends GPUParticlesAttractor3D { + constructor(identifier?: any) + /** The size of the vector field box in 3D units. */ + get size(): Vector3 + set size(value: Vector3) + + /** The 3D texture to be used. Values are linearly interpolated between the texture's pixels. + * + * **Note:** To get better performance, the 3D texture's resolution should reflect the [member size] of the attractor. Since particle attraction is usually low-frequency data, the texture can be kept at a low resolution such as 64×64×64. + */ + get texture(): Texture3D + set texture(value: Texture3D) + } + /** Abstract base class for 3D particle collision shapes affecting [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlescollision3d.html + */ + class GPUParticlesCollision3D extends VisualInstance3D { + constructor(identifier?: any) + /** The particle rendering layers ([member VisualInstance3D.layers]) that will be affected by the collision shape. By default, all particles that have [member ParticleProcessMaterial.collision_mode] set to [constant ParticleProcessMaterial.COLLISION_RIGID] or [constant ParticleProcessMaterial.COLLISION_HIDE_ON_CONTACT] will be affected by a collision shape. + * After configuring particle nodes accordingly, specific layers can be unchecked to prevent certain particles from being affected by attractors. For example, this can be used if you're using an attractor as part of a spell effect but don't want the attractor to affect unrelated weather particles at the same position. + * Particle attraction can also be disabled on a per-process material basis by setting [member ParticleProcessMaterial.attractor_interaction_enabled] on the [GPUParticles3D] node. + */ + get cull_mask(): int64 + set cull_mask(value: int64) + } + class GPUParticlesCollision3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** A box-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlescollisionbox3d.html + */ + class GPUParticlesCollisionBox3D extends GPUParticlesCollision3D { + constructor(identifier?: any) + /** The collision box's size in 3D units. */ + get size(): Vector3 + set size(value: Vector3) + } + namespace GPUParticlesCollisionHeightField3D { + enum Resolution { + /** Generate a 256×256 heightmap. Intended for small-scale scenes, or larger scenes with no distant particles. */ + RESOLUTION_256 = 0, + + /** Generate a 512×512 heightmap. Intended for medium-scale scenes, or larger scenes with no distant particles. */ + RESOLUTION_512 = 1, + + /** Generate a 1024×1024 heightmap. Intended for large scenes with distant particles. */ + RESOLUTION_1024 = 2, + + /** Generate a 2048×2048 heightmap. Intended for very large scenes with distant particles. */ + RESOLUTION_2048 = 3, + + /** Generate a 4096×4096 heightmap. Intended for huge scenes with distant particles. */ + RESOLUTION_4096 = 4, + + /** Generate a 8192×8192 heightmap. Intended for gigantic scenes with distant particles. */ + RESOLUTION_8192 = 5, + + /** Represents the size of the [enum Resolution] enum. */ + RESOLUTION_MAX = 6, + } + enum UpdateMode { + /** Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is `true`. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction, or by calling [method RenderingServer.particles_collision_height_field_update]. */ + UPDATE_MODE_WHEN_MOVED = 0, + + /** Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay. */ + UPDATE_MODE_ALWAYS = 1, + } + } + /** A real-time heightmap-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlescollisionheightfield3d.html + */ + class GPUParticlesCollisionHeightField3D extends GPUParticlesCollision3D { + constructor(identifier?: any) + /** The collision heightmap's size in 3D units. To improve heightmap quality, [member size] should be set as small as possible while covering the parts of the scene you need. */ + get size(): Vector3 + set size(value: Vector3) + + /** Higher resolutions can represent small details more accurately in large scenes, at the cost of lower performance. If [member update_mode] is [constant UPDATE_MODE_ALWAYS], consider using the lowest resolution possible. */ + get resolution(): int64 + set resolution(value: int64) + + /** The update policy to use for the generated heightmap. */ + get update_mode(): int64 + set update_mode(value: int64) + + /** If `true`, the [GPUParticlesCollisionHeightField3D] will follow the current camera in global space. The [GPUParticlesCollisionHeightField3D] does not need to be a child of the [Camera3D] node for this to work. + * Following the camera has a performance cost, as it will force the heightmap to update whenever the camera moves. Consider lowering [member resolution] to improve performance if [member follow_camera_enabled] is `true`. + */ + get follow_camera_enabled(): boolean + set follow_camera_enabled(value: boolean) + } + namespace GPUParticlesCollisionSDF3D { + enum Resolution { + /** Bake a 16×16×16 signed distance field. This is the fastest option, but also the least precise. */ + RESOLUTION_16 = 0, + + /** Bake a 32×32×32 signed distance field. */ + RESOLUTION_32 = 1, + + /** Bake a 64×64×64 signed distance field. */ + RESOLUTION_64 = 2, + + /** Bake a 128×128×128 signed distance field. */ + RESOLUTION_128 = 3, + + /** Bake a 256×256×256 signed distance field. */ + RESOLUTION_256 = 4, + + /** Bake a 512×512×512 signed distance field. This is the slowest option, but also the most precise. */ + RESOLUTION_512 = 5, + + /** Represents the size of the [enum Resolution] enum. */ + RESOLUTION_MAX = 6, + } + } + /** A baked signed distance field 3D particle collision shape affecting [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlescollisionsdf3d.html + */ + class GPUParticlesCollisionSDF3D extends GPUParticlesCollision3D { + constructor(identifier?: any) + /** Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32. */ + set_bake_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_bake_mask_value(layer_number: int64): boolean + + /** The collision SDF's size in 3D units. To improve SDF quality, the [member size] should be set as small as possible while covering the parts of the scene you need. */ + get size(): Vector3 + set size(value: Vector3) + + /** The bake resolution to use for the signed distance field [member texture]. The texture must be baked again for changes to the [member resolution] property to be effective. Higher resolutions have a greater performance cost and take more time to bake. Higher resolutions also result in larger baked textures, leading to increased VRAM and storage space requirements. To improve performance and reduce bake times, use the lowest resolution possible for the object you're representing the collision of. */ + get resolution(): int64 + set resolution(value: int64) + + /** The collision shape's thickness. Unlike other particle colliders, [GPUParticlesCollisionSDF3D] is actually hollow on the inside. [member thickness] can be increased to prevent particles from tunneling through the collision shape at high speeds, or when the [GPUParticlesCollisionSDF3D] is moved. */ + get thickness(): float64 + set thickness(value: float64) + + /** The visual layers to account for when baking the particle collision SDF. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated particle collision SDF. By default, all objects are taken into account for the particle collision SDF baking. */ + get bake_mask(): int64 + set bake_mask(value: int64) + + /** The 3D texture representing the signed distance field. */ + get texture(): Texture3D + set texture(value: Texture3D) + } + class GPUParticlesCollisionSDF3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A sphere-shaped 3D particle collision shape affecting [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gpuparticlescollisionsphere3d.html + */ + class GPUParticlesCollisionSphere3D extends GPUParticlesCollision3D { + constructor(identifier?: any) + /** The collision sphere's radius in 3D units. */ + get radius(): float64 + set radius(value: float64) + } + namespace Generic6DOFJoint3D { + enum Param { + /** The minimum difference between the pivot points' axes. */ + PARAM_LINEAR_LOWER_LIMIT = 0, + + /** The maximum difference between the pivot points' axes. */ + PARAM_LINEAR_UPPER_LIMIT = 1, + + /** A factor applied to the movement across the axes. The lower, the slower the movement. */ + PARAM_LINEAR_LIMIT_SOFTNESS = 2, + + /** The amount of restitution on the axes' movement. The lower, the more momentum gets lost. */ + PARAM_LINEAR_RESTITUTION = 3, + + /** The amount of damping that happens at the linear motion across the axes. */ + PARAM_LINEAR_DAMPING = 4, + + /** The velocity the linear motor will try to reach. */ + PARAM_LINEAR_MOTOR_TARGET_VELOCITY = 5, + + /** The maximum force the linear motor will apply while trying to reach the velocity target. */ + PARAM_LINEAR_MOTOR_FORCE_LIMIT = 6, + PARAM_LINEAR_SPRING_STIFFNESS = 7, + PARAM_LINEAR_SPRING_DAMPING = 8, + PARAM_LINEAR_SPRING_EQUILIBRIUM_POINT = 9, + + /** The minimum rotation in negative direction to break loose and rotate around the axes. */ + PARAM_ANGULAR_LOWER_LIMIT = 10, + + /** The minimum rotation in positive direction to break loose and rotate around the axes. */ + PARAM_ANGULAR_UPPER_LIMIT = 11, + + /** The speed of all rotations across the axes. */ + PARAM_ANGULAR_LIMIT_SOFTNESS = 12, + + /** The amount of rotational damping across the axes. The lower, the more damping occurs. */ + PARAM_ANGULAR_DAMPING = 13, + + /** The amount of rotational restitution across the axes. The lower, the more restitution occurs. */ + PARAM_ANGULAR_RESTITUTION = 14, + + /** The maximum amount of force that can occur, when rotating around the axes. */ + PARAM_ANGULAR_FORCE_LIMIT = 15, + + /** When rotating across the axes, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. */ + PARAM_ANGULAR_ERP = 16, + + /** Target speed for the motor at the axes. */ + PARAM_ANGULAR_MOTOR_TARGET_VELOCITY = 17, + + /** Maximum acceleration for the motor at the axes. */ + PARAM_ANGULAR_MOTOR_FORCE_LIMIT = 18, + PARAM_ANGULAR_SPRING_STIFFNESS = 19, + PARAM_ANGULAR_SPRING_DAMPING = 20, + PARAM_ANGULAR_SPRING_EQUILIBRIUM_POINT = 21, + + /** Represents the size of the [enum Param] enum. */ + PARAM_MAX = 22, + } + enum Flag { + /** If enabled, linear motion is possible within the given limits. */ + FLAG_ENABLE_LINEAR_LIMIT = 0, + + /** If enabled, rotational motion is possible within the given limits. */ + FLAG_ENABLE_ANGULAR_LIMIT = 1, + FLAG_ENABLE_LINEAR_SPRING = 3, + FLAG_ENABLE_ANGULAR_SPRING = 2, + + /** If enabled, there is a rotational motor across these axes. */ + FLAG_ENABLE_MOTOR = 4, + + /** If enabled, there is a linear motor across these axes. */ + FLAG_ENABLE_LINEAR_MOTOR = 5, + + /** Represents the size of the [enum Flag] enum. */ + FLAG_MAX = 6, + } + } + /** A physics joint that allows for complex movement and rotation between two 3D physics bodies. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_generic6dofjoint3d.html + */ + class Generic6DOFJoint3D extends Joint3D { + constructor(identifier?: any) + set_param_x(param: Generic6DOFJoint3D.Param, value: float64): void + get_param_x(param: Generic6DOFJoint3D.Param): float64 + set_param_y(param: Generic6DOFJoint3D.Param, value: float64): void + get_param_y(param: Generic6DOFJoint3D.Param): float64 + set_param_z(param: Generic6DOFJoint3D.Param, value: float64): void + get_param_z(param: Generic6DOFJoint3D.Param): float64 + set_flag_x(flag: Generic6DOFJoint3D.Flag, value: boolean): void + get_flag_x(flag: Generic6DOFJoint3D.Flag): boolean + set_flag_y(flag: Generic6DOFJoint3D.Flag, value: boolean): void + get_flag_y(flag: Generic6DOFJoint3D.Flag): boolean + set_flag_z(flag: Generic6DOFJoint3D.Flag, value: boolean): void + get_flag_z(flag: Generic6DOFJoint3D.Flag): boolean + } + namespace GeometryInstance3D { + enum ShadowCastingSetting { + /** Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris). */ + SHADOW_CASTING_SETTING_OFF = 0, + + /** Will cast shadows from all visible faces in the GeometryInstance3D. + * Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. + */ + SHADOW_CASTING_SETTING_ON = 1, + + /** Will cast shadows from all visible faces in the GeometryInstance3D. + * Will not take culling into account, so all faces will be taken into account when shadow casting. + */ + SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2, + + /** Will only show the shadows casted from this object. + * In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be. + */ + SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3, + } + enum GIMode { + /** Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using [VoxelGI] and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking. */ + GI_MODE_DISABLED = 0, + + /** Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using [VoxelGI], SDFGI and [LightmapGI]. */ + GI_MODE_STATIC = 1, + + /** Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using [VoxelGI], but it has a higher performance impact than [constant GI_MODE_STATIC]. When using other GI methods, this will act the same as [constant GI_MODE_DISABLED]. When using [LightmapGI], the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture. */ + GI_MODE_DYNAMIC = 2, + } + enum LightmapScale { + /** The standard texel density for lightmapping with [LightmapGI]. */ + LIGHTMAP_SCALE_1X = 0, + + /** Multiplies texel density by 2× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0. */ + LIGHTMAP_SCALE_2X = 1, + + /** Multiplies texel density by 4× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0. */ + LIGHTMAP_SCALE_4X = 2, + + /** Multiplies texel density by 8× for lightmapping with [LightmapGI]. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0. */ + LIGHTMAP_SCALE_8X = 3, + + /** Represents the size of the [enum LightmapScale] enum. */ + LIGHTMAP_SCALE_MAX = 4, + } + enum VisibilityRangeFadeMode { + /** Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information. */ + VISIBILITY_RANGE_FADE_DISABLED = 0, + + /** Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. + * + * **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled. + */ + VISIBILITY_RANGE_FADE_SELF = 1, + + /** Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. + * + * **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled. + */ + VISIBILITY_RANGE_FADE_DEPENDENCIES = 2, + } + } + /** Base node for geometry-based visual instances. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_geometryinstance3d.html + */ + class GeometryInstance3D extends VisualInstance3D { + constructor(identifier?: any) + /** Set the value of a shader uniform for this instance only ([url=https://docs.godotengine.org/en/4.3/tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms]per-instance uniform[/url]). See also [method ShaderMaterial.set_shader_parameter] to assign a uniform on all instances using the same [ShaderMaterial]. + * + * **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with `instance uniform ...` rather than `uniform ...` in the shader code. + * + * **Note:** [param name] is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector). + * + * **Note:** Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method. + */ + set_instance_shader_parameter(name: StringName, value: any): void + + /** Get the value of a shader parameter as set on this instance. */ + get_instance_shader_parameter(name: StringName): any + + /** The material override for the whole geometry. + * If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh. + */ + get material_override(): BaseMaterial3D | ShaderMaterial + set material_override(value: BaseMaterial3D | ShaderMaterial) + + /** The material overlay for the whole geometry. + * If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces. + */ + get material_overlay(): BaseMaterial3D | ShaderMaterial + set material_overlay(value: BaseMaterial3D | ShaderMaterial) + + /** The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). `0.0` is fully opaque, while `1.0` is fully transparent. Values greater than `0.0` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than `0.0` (exclusive) will *not* disable shadow rendering. + * In spatial shaders, `1.0 - transparency` is set as the default value of the `ALPHA` built-in. + * + * **Note:** [member transparency] is clamped between `0.0` and `1.0`, so this property cannot be used to make transparent materials more opaque than they originally are. + * + * **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, [member transparency] is ignored and is considered as always being `0.0`. + */ + get transparency(): float64 + set transparency(value: float64) + + /** The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. */ + get cast_shadow(): int64 + set cast_shadow(value: int64) + + /** The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box. */ + get extra_cull_margin(): float64 + set extra_cull_margin(value: float64) + + /** Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive [AABB] recalculation that happens when a skeleton is used with a [MeshInstance3D] or to have precise control over the [MeshInstance3D]'s bounding box. To use the default AABB, set value to an [AABB] with all fields set to `0.0`. To avoid frustum culling, set [member custom_aabb] to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. To disable all forms of culling (including occlusion culling), call [method RenderingServer.instance_set_ignore_culling] on the [GeometryInstance3D]'s [RID]. */ + get custom_aabb(): AABB + set custom_aabb(value: AABB) + + /** Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances. + * Useful for testing level of detail transitions in the editor. + */ + get lod_bias(): float64 + set lod_bias(value: float64) + + /** If `true`, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use. + * + * **Note:** [member ignore_occlusion_culling] does not affect frustum culling (which is what happens when an object is not visible given the camera's angle). To avoid frustum culling, set [member custom_aabb] to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. + */ + get ignore_occlusion_culling(): boolean + set ignore_occlusion_culling(value: boolean) + + /** The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic). + * + * **Note:** Lights' bake mode will also affect the global illumination rendering. See [member Light3D.light_bake_mode]. + */ + get gi_mode(): int64 + set gi_mode(value: int64) + + /** The texel density to use for lightmapping in [LightmapGI]. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes. */ + get gi_lightmap_scale(): int64 + set gi_lightmap_scale(value: int64) + + /** Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check. */ + get visibility_range_begin(): float64 + set visibility_range_begin(value: float64) + + /** Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount. + * If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as a hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than `0.0` for the effect to be noticeable. + */ + get visibility_range_begin_margin(): float64 + set visibility_range_begin_margin(value: float64) + + /** Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check. */ + get visibility_range_end(): float64 + set visibility_range_end(value: float64) + + /** Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount. + * If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_DISABLED], this acts as a hysteresis distance. If [member visibility_range_fade_mode] is [constant VISIBILITY_RANGE_FADE_SELF] or [constant VISIBILITY_RANGE_FADE_DEPENDENCIES], this acts as a fade transition distance and must be set to a value greater than `0.0` for the effect to be noticeable. + */ + get visibility_range_end_margin(): float64 + set visibility_range_end_margin(value: float64) + + /** Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values. */ + get visibility_range_fade_mode(): int64 + set visibility_range_fade_mode(value: int64) + } + class GeometryInstance3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + class Gizmo3DHelper extends RefCounted { + constructor(identifier?: any) + } + class GodotJSDockedPanel extends MarginContainer { + constructor(identifier?: any) + } + class GodotJSMonitor extends Object { + constructor(identifier?: any) + get_value_objects(): any + get_value_native_classes(): any + get_value_script_classes(): any + get_value_cached_string_names(): any + get_value_persistent_objects(): any + get_value_allocated_variants(): any + get_value_memory_used_size(): any + } + class GodotJSStatisticsViewer extends VBoxContainer { + constructor(identifier?: any) + } + class GodotNavigationServer2D extends NavigationServer2D { + constructor(identifier?: any) + } + class GodotPhysicsDirectSpaceState2D extends PhysicsDirectSpaceState2D { + constructor(identifier?: any) + } + class GodotPhysicsServer2D extends PhysicsServer2D { + constructor(identifier?: any) + } + class GodotPhysicsServer3D extends PhysicsServer3D { + constructor(identifier?: any) + } + class GotoLineDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + namespace Gradient { + enum InterpolationMode { + /** Linear interpolation. */ + GRADIENT_INTERPOLATE_LINEAR = 0, + + /** Constant interpolation, color changes abruptly at each point and stays uniform between. This might cause visible aliasing when used for a gradient texture in some cases. */ + GRADIENT_INTERPOLATE_CONSTANT = 1, + + /** Cubic interpolation. */ + GRADIENT_INTERPOLATE_CUBIC = 2, + } + enum ColorSpace { + /** sRGB color space. */ + GRADIENT_COLOR_SPACE_SRGB = 0, + + /** Linear sRGB color space. */ + GRADIENT_COLOR_SPACE_LINEAR_SRGB = 1, + + /** [url=https://bottosson.github.io/posts/oklab/]Oklab[/url] color space. This color space provides a smooth and uniform-looking transition between colors. */ + GRADIENT_COLOR_SPACE_OKLAB = 2, + } + } + /** A color transition. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gradient.html + */ + class Gradient extends Resource { + constructor(identifier?: any) + /** Adds the specified color to the gradient, with the specified offset. */ + add_point(offset: float64, color: Color): void + + /** Removes the color at index [param point]. */ + remove_point(point: int64): void + + /** Sets the offset for the gradient color at index [param point]. */ + set_offset(point: int64, offset: float64): void + + /** Returns the offset of the gradient color at index [param point]. */ + get_offset(point: int64): float64 + + /** Reverses/mirrors the gradient. + * + * **Note:** This method mirrors all points around the middle of the gradient, which may produce unexpected results when [member interpolation_mode] is set to [constant GRADIENT_INTERPOLATE_CONSTANT]. + */ + reverse(): void + + /** Sets the color of the gradient color at index [param point]. */ + set_color(point: int64, color: Color): void + + /** Returns the color of the gradient color at index [param point]. */ + get_color(point: int64): Color + + /** Returns the interpolated color specified by [param offset]. */ + sample(offset: float64): Color + + /** Returns the number of colors in the gradient. */ + get_point_count(): int64 + + /** The algorithm used to interpolate between points of the gradient. See [enum InterpolationMode] for available modes. */ + get interpolation_mode(): int64 + set interpolation_mode(value: int64) + + /** The color space used to interpolate between points of the gradient. It does not affect the returned colors, which will always be in sRGB space. See [enum ColorSpace] for available modes. + * + * **Note:** This setting has no effect when [member interpolation_mode] is set to [constant GRADIENT_INTERPOLATE_CONSTANT]. + */ + get interpolation_color_space(): int64 + set interpolation_color_space(value: int64) + + /** Gradient's offsets as a [PackedFloat32Array]. + * + * **Note:** Setting this property updates all offsets at once. To update any offset individually use [method set_offset]. + */ + get offsets(): PackedFloat32Array + set offsets(value: PackedFloat32Array | float32[]) + + /** Gradient's colors as a [PackedColorArray]. + * + * **Note:** Setting this property updates all colors at once. To update any color individually use [method set_color]. + */ + get colors(): PackedColorArray + set colors(value: PackedColorArray | Color[]) + } + class GradientEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A 1D texture that uses colors obtained from a [Gradient]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gradienttexture1d.html + */ + class GradientTexture1D extends Texture2D { + constructor(identifier?: any) + /** The [Gradient] used to fill the texture. */ + get gradient(): Gradient + set gradient(value: Gradient) + + /** The number of color samples that will be obtained from the [Gradient]. */ + get width(): int64 + set width(value: int64) + + /** If `true`, the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format). */ + get use_hdr(): boolean + set use_hdr(value: boolean) + } + namespace GradientTexture2D { + enum Fill { + /** The colors are linearly interpolated in a straight line. */ + FILL_LINEAR = 0, + + /** The colors are linearly interpolated in a circular pattern. */ + FILL_RADIAL = 1, + + /** The colors are linearly interpolated in a square pattern. */ + FILL_SQUARE = 2, + } + enum Repeat { + /** The gradient fill is restricted to the range defined by [member fill_from] to [member fill_to] offsets. */ + REPEAT_NONE = 0, + + /** The texture is filled starting from [member fill_from] to [member fill_to] offsets, repeating the same pattern in both directions. */ + REPEAT = 1, + + /** The texture is filled starting from [member fill_from] to [member fill_to] offsets, mirroring the pattern in both directions. */ + REPEAT_MIRROR = 2, + } + } + /** A 2D texture that creates a pattern with colors obtained from a [Gradient]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gradienttexture2d.html + */ + class GradientTexture2D extends Texture2D { + constructor(identifier?: any) + /** The [Gradient] used to fill the texture. */ + get gradient(): Gradient + set gradient(value: Gradient) + + /** The number of horizontal color samples that will be obtained from the [Gradient], which also represents the texture's width. */ + get width(): int64 + set width(value: int64) + + /** The number of vertical color samples that will be obtained from the [Gradient], which also represents the texture's height. */ + get height(): int64 + set height(value: int64) + + /** If `true`, the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is `true`. If `false`, the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format). */ + get use_hdr(): boolean + set use_hdr(value: boolean) + + /** The gradient fill type, one of the [enum Fill] values. The texture is filled by interpolating colors starting from [member fill_from] to [member fill_to] offsets. */ + get fill(): int64 + set fill(value: int64) + + /** The initial offset used to fill the texture specified in UV coordinates. */ + get fill_from(): Vector2 + set fill_from(value: Vector2) + + /** The final offset used to fill the texture specified in UV coordinates. */ + get fill_to(): Vector2 + set fill_to(value: Vector2) + + /** The gradient repeat type, one of the [enum Repeat] values. The texture is filled starting from [member fill_from] to [member fill_to] offsets by default, but the gradient fill can be repeated to cover the entire texture. */ + get repeat(): int64 + set repeat(value: int64) + } + class GradientTexture2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace GraphEdit { + enum PanningScheme { + /** [kbd]Mouse Wheel[/kbd] will zoom, [kbd]Ctrl + Mouse Wheel[/kbd] will move the view. */ + SCROLL_ZOOMS = 0, + + /** [kbd]Mouse Wheel[/kbd] will move the view, [kbd]Ctrl + Mouse Wheel[/kbd] will zoom. */ + SCROLL_PANS = 1, + } + enum GridPattern { + /** Draw the grid using solid lines. */ + GRID_PATTERN_LINES = 0, + + /** Draw the grid using dots. */ + GRID_PATTERN_DOTS = 1, + } + } + /** An editor for graph-like structures, using [GraphNode]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_graphedit.html + */ + class GraphEdit extends Control { + constructor(identifier?: any) + /** Returns whether the [param mouse_position] is in the input hot zone. + * By default, a hot zone is a [Rect2] positioned such that its center is at [param in_node].[method GraphNode.get_input_port_position]([param in_port]) (For output's case, call [method GraphNode.get_output_port_position] instead). The hot zone's width is twice the Theme Property `port_grab_distance_horizontal`, and its height is twice the `port_grab_distance_vertical`. + * Below is a sample code to help get started: + * + */ + /* gdvirtual */ _is_in_input_hotzone(in_node: Object, in_port: int64, mouse_position: Vector2): boolean + + /** Returns whether the [param mouse_position] is in the output hot zone. For more information on hot zones, see [method _is_in_input_hotzone]. + * Below is a sample code to help get started: + * + */ + /* gdvirtual */ _is_in_output_hotzone(in_node: Object, in_port: int64, mouse_position: Vector2): boolean + + /** Virtual method which can be overridden to customize how connections are drawn. */ + /* gdvirtual */ _get_connection_line(from_position: Vector2, to_position: Vector2): PackedVector2Array + + /** This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port. + * Return `true` if the connection is indeed valid or return `false` if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen. + * In this example a connection to same node is suppressed: + * + */ + /* gdvirtual */ _is_node_hover_valid(from_node: StringName, from_port: int64, to_node: StringName, to_port: int64): boolean + + /** Create a connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection already exists, no connection is created. */ + connect_node(from_node: StringName, from_port: int64, to_node: StringName, to_port: int64): GError + + /** Returns `true` if the [param from_port] of the [param from_node] [GraphNode] is connected to the [param to_port] of the [param to_node] [GraphNode]. */ + is_node_connected(from_node: StringName, from_port: int64, to_node: StringName, to_port: int64): boolean + + /** Removes the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode]. If the connection does not exist, no connection is removed. */ + disconnect_node(from_node: StringName, from_port: int64, to_node: StringName, to_port: int64): void + + /** Sets the coloration of the connection between [param from_node]'s [param from_port] and [param to_node]'s [param to_port] with the color provided in the [theme_item activity] theme property. The color is linearly interpolated between the connection color and the activity color using [param amount] as weight. */ + set_connection_activity(from_node: StringName, from_port: int64, to_node: StringName, to_port: int64, amount: float64): void + + /** Returns an [Array] containing the list of connections. A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. */ + get_connection_list(): GArray + + /** Returns the closest connection to the given point in screen space. If no connection is found within [param max_distance] pixels, an empty [Dictionary] is returned. + * A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. + * For example, getting a connection at a given mouse position can be achieved like this: + * + */ + get_closest_connection_at_point(point: Vector2, max_distance: float64 = 4): GDictionary + + /** Returns an [Array] containing the list of connections that intersect with the given [Rect2]. A connection consists in a structure of the form `{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }`. */ + get_connections_intersecting_with_rect(rect: Rect2): GArray + + /** Removes all connections between nodes. */ + clear_connections(): void + + /** Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor. + * This is best used together with [signal connection_drag_started] and [signal connection_drag_ended] to add custom behavior like node addition through shortcuts. + * + * **Note:** This method suppresses any other connection request signals apart from [signal connection_drag_ended]. + */ + force_connection_drag_end(): void + + /** Allows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_right_disconnect_type]. */ + add_valid_right_disconnect_type(type: int64): void + + /** Disallows to disconnect nodes when dragging from the right port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_right_disconnect_type]. */ + remove_valid_right_disconnect_type(type: int64): void + + /** Allows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. See also [method remove_valid_left_disconnect_type]. */ + add_valid_left_disconnect_type(type: int64): void + + /** Disallows to disconnect nodes when dragging from the left port of the [GraphNode]'s slot if it has the specified type. Use this to disable disconnection previously allowed with [method add_valid_left_disconnect_type]. */ + remove_valid_left_disconnect_type(type: int64): void + + /** Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. + * See also [method is_valid_connection_type] and [method remove_valid_connection_type]. + */ + add_valid_connection_type(from_type: int64, to_type: int64): void + + /** Disallows the connection between two different port types previously allowed by [method add_valid_connection_type]. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. + * See also [method is_valid_connection_type]. + */ + remove_valid_connection_type(from_type: int64, to_type: int64): void + + /** Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the [method GraphNode.set_slot] method. + * See also [method add_valid_connection_type] and [method remove_valid_connection_type]. + */ + is_valid_connection_type(from_type: int64, to_type: int64): boolean + + /** Returns the points which would make up a connection between [param from_node] and [param to_node]. */ + get_connection_line(from_node: Vector2, to_node: Vector2): PackedVector2Array + + /** Attaches the [param element] [GraphElement] to the [param frame] [GraphFrame]. */ + attach_graph_element_to_frame(element: StringName, frame: StringName): void + + /** Detaches the [param element] [GraphElement] from the [GraphFrame] it is currently attached to. */ + detach_graph_element_from_frame(element: StringName): void + + /** Returns the [GraphFrame] that contains the [GraphElement] with the given name. */ + get_element_frame(element: StringName): GraphFrame + + /** Returns an array of node names that are attached to the [GraphFrame] with the given name. */ + get_attached_nodes_of_frame(frame: StringName): GArray + + /** Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_menu_hbox(): HBoxContainer + + /** Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. */ + arrange_nodes(): void + + /** Sets the specified [param node] as the one selected. */ + set_selected(node: Node): void + + /** The scroll offset. */ + get scroll_offset(): Vector2 + set scroll_offset(value: Vector2) + + /** If `true`, the grid is visible. */ + get show_grid(): boolean + set show_grid(value: boolean) + + /** The pattern used for drawing the grid. */ + get grid_pattern(): int64 + set grid_pattern(value: int64) + + /** If `true`, enables snapping. */ + get snapping_enabled(): boolean + set snapping_enabled(value: boolean) + + /** The snapping distance in pixels, also determines the grid line distance. */ + get snapping_distance(): int64 + set snapping_distance(value: int64) + + /** Defines the control scheme for panning with mouse wheel. */ + get panning_scheme(): int64 + set panning_scheme(value: int64) + + /** If `true`, enables disconnection of existing connections in the GraphEdit by dragging the right end. */ + get right_disconnects(): boolean + set right_disconnects(value: boolean) + + /** The curvature of the lines between the nodes. 0 results in straight lines. */ + get connection_lines_curvature(): float64 + set connection_lines_curvature(value: float64) + + /** The thickness of the lines between the nodes. */ + get connection_lines_thickness(): float64 + set connection_lines_thickness(value: float64) + + /** If `true`, the lines between nodes will use antialiasing. */ + get connection_lines_antialiased(): boolean + set connection_lines_antialiased(value: boolean) + + /** The current zoom value. */ + get zoom(): float64 + set zoom(value: float64) + + /** The lower zoom limit. */ + get zoom_min(): float64 + set zoom_min(value: float64) + + /** The upper zoom limit. */ + get zoom_max(): float64 + set zoom_max(value: float64) + + /** The step of each zoom level. */ + get zoom_step(): float64 + set zoom_step(value: float64) + + /** If `true`, the minimap is visible. */ + get minimap_enabled(): boolean + set minimap_enabled(value: boolean) + + /** The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle. */ + get minimap_size(): Vector2 + set minimap_size(value: Vector2) + + /** The opacity of the minimap rectangle. */ + get minimap_opacity(): float64 + set minimap_opacity(value: float64) + + /** If `true`, the menu toolbar is visible. */ + get show_menu(): boolean + set show_menu(value: boolean) + + /** If `true`, the label with the current zoom level is visible. The zoom level is displayed in percents. */ + get show_zoom_label(): boolean + set show_zoom_label(value: boolean) + + /** If `true`, buttons that allow to change and reset the zoom level are visible. */ + get show_zoom_buttons(): boolean + set show_zoom_buttons(value: boolean) + + /** If `true`, buttons that allow to configure grid and snapping options are visible. */ + get show_grid_buttons(): boolean + set show_grid_buttons(value: boolean) + + /** If `true`, the button to toggle the minimap is visible. */ + get show_minimap_button(): boolean + set show_minimap_button(value: boolean) + + /** If `true`, the button to automatically arrange graph nodes is visible. */ + get show_arrange_button(): boolean + set show_arrange_button(value: boolean) + + /** Emitted to the GraphEdit when the connection between the [param from_port] of the [param from_node] [GraphNode] and the [param to_port] of the [param to_node] [GraphNode] is attempted to be created. */ + readonly connection_request: Signal4 + + /** Emitted to the GraphEdit when the connection between [param from_port] of [param from_node] [GraphNode] and [param to_port] of [param to_node] [GraphNode] is attempted to be removed. */ + readonly disconnection_request: Signal4 + + /** Emitted when user drags a connection from an output port into the empty space of the graph. */ + readonly connection_to_empty: Signal3 + + /** Emitted when user drags a connection from an input port into the empty space of the graph. */ + readonly connection_from_empty: Signal3 + + /** Emitted at the beginning of a connection drag. */ + readonly connection_drag_started: Signal3 + + /** Emitted at the end of a connection drag. */ + readonly connection_drag_ended: Signal0 + + /** Emitted when this [GraphEdit] captures a `ui_copy` action ([kbd]Ctrl + C[/kbd] by default). In general, this signal indicates that the selected [GraphElement]s should be copied. */ + readonly copy_nodes_request: Signal0 + + /** Emitted when this [GraphEdit] captures a `ui_paste` action ([kbd]Ctrl + V[/kbd] by default). In general, this signal indicates that previously copied [GraphElement]s should be pasted. */ + readonly paste_nodes_request: Signal0 + + /** Emitted when this [GraphEdit] captures a `ui_graph_duplicate` action ([kbd]Ctrl + D[/kbd] by default). In general, this signal indicates that the selected [GraphElement]s should be duplicated. */ + readonly duplicate_nodes_request: Signal0 + + /** Emitted when this [GraphEdit] captures a `ui_graph_delete` action ([kbd]Delete[/kbd] by default). + * [param nodes] is an array of node names that should be removed. These usually include all selected nodes. + */ + readonly delete_nodes_request: Signal1 + + /** Emitted when the given [GraphElement] node is selected. */ + readonly node_selected: Signal1 + + /** Emitted when the given [GraphElement] node is deselected. */ + readonly node_deselected: Signal1 + + /** Emitted when the [GraphFrame] [param frame] is resized to [param new_rect]. */ + readonly frame_rect_changed: Signal2 + + /** Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [param at_position] is the position of the mouse pointer when the signal is sent. */ + readonly popup_request: Signal1 + + /** Emitted at the beginning of a [GraphElement]'s movement. */ + readonly begin_node_move: Signal0 + + /** Emitted at the end of a [GraphElement]'s movement. */ + readonly end_node_move: Signal0 + + /** Emitted when one or more [GraphElement]s are dropped onto the [GraphFrame] named [param frame], when they were not previously attached to any other one. + * [param elements] is an array of [GraphElement]s to be attached. + */ + readonly graph_elements_linked_to_frame_request: Signal2 + + /** Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. */ + readonly scroll_offset_changed: Signal1 + } + class GraphEditFilter extends Control { + constructor(identifier?: any) + } + class GraphEditMinimap extends Control { + constructor(identifier?: any) + } + /** A container that represents a basic element that can be placed inside a [GraphEdit] control. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_graphelement.html + */ + class GraphElement extends Container { + constructor(identifier?: any) + /** The offset of the GraphElement, relative to the scroll offset of the [GraphEdit]. */ + get position_offset(): Vector2 + set position_offset(value: Vector2) + + /** If `true`, the user can resize the GraphElement. + * + * **Note:** Dragging the handle will only emit the [signal resize_request] and [signal resize_end] signals, the GraphElement needs to be resized manually. + */ + get resizable(): boolean + set resizable(value: boolean) + + /** If `true`, the user can drag the GraphElement. */ + get draggable(): boolean + set draggable(value: boolean) + + /** If `true`, the user can select the GraphElement. */ + get selectable(): boolean + set selectable(value: boolean) + + /** If `true`, the GraphElement is selected. */ + get selected(): boolean + set selected(value: boolean) + + /** Emitted when the GraphElement is selected. */ + readonly node_selected: Signal0 + + /** Emitted when the GraphElement is deselected. */ + readonly node_deselected: Signal0 + + /** Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement. */ + readonly raise_request: Signal0 + + /** Emitted when removing the GraphElement is requested. */ + readonly delete_request: Signal0 + + /** Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see [member resizable]). */ + readonly resize_request: Signal1 + + /** Emitted when releasing the mouse button after dragging the resizer handle (see [member resizable]). */ + readonly resize_end: Signal1 + + /** Emitted when the GraphElement is dragged. */ + readonly dragged: Signal2 + + /** Emitted when the GraphElement is moved. */ + readonly position_offset_changed: Signal0 + } + /** GraphFrame is a special [GraphElement] that can be used to organize other [GraphElement]s inside a [GraphEdit]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_graphframe.html + */ + class GraphFrame extends GraphElement { + constructor(identifier?: any) + /** Returns the [HBoxContainer] used for the title bar, only containing a [Label] for displaying the title by default. + * This can be used to add custom controls to the title bar such as option or close buttons. + */ + get_titlebar_hbox(): HBoxContainer + + /** Title of the frame. */ + get title(): string + set title(value: string) + + /** If `true`, the frame's rect will be adjusted automatically to enclose all attached [GraphElement]s. */ + get autoshrink_enabled(): boolean + set autoshrink_enabled(value: boolean) + + /** The margin around the attached nodes that is used to calculate the size of the frame when [member autoshrink_enabled] is `true`. */ + get autoshrink_margin(): int64 + set autoshrink_margin(value: int64) + + /** The margin inside the frame that can be used to drag the frame. */ + get drag_margin(): int64 + set drag_margin(value: int64) + + /** If `true`, the tint color will be used to tint the frame. */ + get tint_color_enabled(): boolean + set tint_color_enabled(value: boolean) + + /** The color of the frame when [member tint_color_enabled] is `true`. */ + get tint_color(): Color + set tint_color(value: Color) + + /** Emitted when [member autoshrink_enabled] or [member autoshrink_margin] changes. */ + readonly autoshrink_changed: Signal0 + } + /** A container with connection ports, representing a node in a [GraphEdit]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_graphnode.html + */ + class GraphNode extends GraphElement { + constructor(identifier?: any) + /* gdvirtual */ _draw_port(slot_index: int64, position: Vector2i, left: boolean, color: Color): void + + /** Returns the [HBoxContainer] used for the title bar, only containing a [Label] for displaying the title by default. This can be used to add custom controls to the title bar such as option or close buttons. */ + get_titlebar_hbox(): HBoxContainer + + /** Sets properties of the slot with the given [param slot_index]. + * If [param enable_left_port]/[param enable_right_port] is `true`, a port will appear and the slot will be able to be connected from this side. + * With [param type_left]/[param type_right] an arbitrary type can be assigned to each port. Two ports can be connected if they share the same type, or if the connection between their types is allowed in the parent [GraphEdit] (see [method GraphEdit.add_valid_connection_type]). Keep in mind that the [GraphEdit] has the final say in accepting the connection. Type compatibility simply allows the [signal GraphEdit.connection_request] signal to be emitted. + * Ports can be further customized using [param color_left]/[param color_right] and [param custom_icon_left]/[param custom_icon_right]. The color parameter adds a tint to the icon. The custom icon can be used to override the default port dot. + * Additionally, [param draw_stylebox] can be used to enable or disable drawing of the background stylebox for each slot. See [theme_item slot]. + * Individual properties can also be set using one of the `set_slot_*` methods. + * + * **Note:** This method only sets properties of the slot. To create the slot itself, add a [Control]-derived child to the GraphNode. + */ + set_slot(slot_index: int64, enable_left_port: boolean, type_left: int64, color_left: Color, enable_right_port: boolean, type_right: int64, color_right: Color, custom_icon_left: Texture2D = undefined, custom_icon_right: Texture2D = undefined, draw_stylebox: boolean = true): void + + /** Disables the slot with the given [param slot_index]. This will remove the corresponding input and output port from the GraphNode. */ + clear_slot(slot_index: int64): void + + /** Disables all slots of the GraphNode. This will remove all input/output ports from the GraphNode. */ + clear_all_slots(): void + + /** Returns `true` if left (input) side of the slot with the given [param slot_index] is enabled. */ + is_slot_enabled_left(slot_index: int64): boolean + + /** Toggles the left (input) side of the slot with the given [param slot_index]. If [param enable] is `true`, a port will appear on the left side and the slot will be able to be connected from this side. */ + set_slot_enabled_left(slot_index: int64, enable: boolean): void + + /** Sets the left (input) type of the slot with the given [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs. */ + set_slot_type_left(slot_index: int64, type: int64): void + + /** Returns the left (input) type of the slot with the given [param slot_index]. */ + get_slot_type_left(slot_index: int64): int64 + + /** Sets the [Color] of the left (input) side of the slot with the given [param slot_index] to [param color]. */ + set_slot_color_left(slot_index: int64, color: Color): void + + /** Returns the left (input) [Color] of the slot with the given [param slot_index]. */ + get_slot_color_left(slot_index: int64): Color + + /** Sets the custom [Texture2D] of the left (input) side of the slot with the given [param slot_index] to [param custom_icon]. */ + set_slot_custom_icon_left(slot_index: int64, custom_icon: Texture2D): void + + /** Returns the left (input) custom [Texture2D] of the slot with the given [param slot_index]. */ + get_slot_custom_icon_left(slot_index: int64): Texture2D + + /** Returns `true` if right (output) side of the slot with the given [param slot_index] is enabled. */ + is_slot_enabled_right(slot_index: int64): boolean + + /** Toggles the right (output) side of the slot with the given [param slot_index]. If [param enable] is `true`, a port will appear on the right side and the slot will be able to be connected from this side. */ + set_slot_enabled_right(slot_index: int64, enable: boolean): void + + /** Sets the right (output) type of the slot with the given [param slot_index] to [param type]. If the value is negative, all connections will be disallowed to be created via user inputs. */ + set_slot_type_right(slot_index: int64, type: int64): void + + /** Returns the right (output) type of the slot with the given [param slot_index]. */ + get_slot_type_right(slot_index: int64): int64 + + /** Sets the [Color] of the right (output) side of the slot with the given [param slot_index] to [param color]. */ + set_slot_color_right(slot_index: int64, color: Color): void + + /** Returns the right (output) [Color] of the slot with the given [param slot_index]. */ + get_slot_color_right(slot_index: int64): Color + + /** Sets the custom [Texture2D] of the right (output) side of the slot with the given [param slot_index] to [param custom_icon]. */ + set_slot_custom_icon_right(slot_index: int64, custom_icon: Texture2D): void + + /** Returns the right (output) custom [Texture2D] of the slot with the given [param slot_index]. */ + get_slot_custom_icon_right(slot_index: int64): Texture2D + + /** Returns true if the background [StyleBox] of the slot with the given [param slot_index] is drawn. */ + is_slot_draw_stylebox(slot_index: int64): boolean + + /** Toggles the background [StyleBox] of the slot with the given [param slot_index]. */ + set_slot_draw_stylebox(slot_index: int64, enable: boolean): void + + /** Returns the number of slots with an enabled input port. */ + get_input_port_count(): int64 + + /** Returns the position of the input port with the given [param port_idx]. */ + get_input_port_position(port_idx: int64): Vector2 + + /** Returns the type of the input port with the given [param port_idx]. */ + get_input_port_type(port_idx: int64): int64 + + /** Returns the [Color] of the input port with the given [param port_idx]. */ + get_input_port_color(port_idx: int64): Color + + /** Returns the corresponding slot index of the input port with the given [param port_idx]. */ + get_input_port_slot(port_idx: int64): int64 + + /** Returns the number of slots with an enabled output port. */ + get_output_port_count(): int64 + + /** Returns the position of the output port with the given [param port_idx]. */ + get_output_port_position(port_idx: int64): Vector2 + + /** Returns the type of the output port with the given [param port_idx]. */ + get_output_port_type(port_idx: int64): int64 + + /** Returns the [Color] of the output port with the given [param port_idx]. */ + get_output_port_color(port_idx: int64): Color + + /** Returns the corresponding slot index of the output port with the given [param port_idx]. */ + get_output_port_slot(port_idx: int64): int64 + + /** The text displayed in the GraphNode's title bar. */ + get title(): string + set title(value: string) + + /** If `true`, you can connect ports with different types, even if the connection was not explicitly allowed in the parent [GraphEdit]. */ + get ignore_invalid_connection_type(): boolean + set ignore_invalid_connection_type(value: boolean) + + /** Emitted when any GraphNode's slot is updated. */ + readonly slot_updated: Signal1 + } + /** A container that arranges its child controls in a grid layout. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gridcontainer.html + */ + class GridContainer extends Container { + constructor(identifier?: any) + /** The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its Control-derived children to accommodate the new layout. */ + get columns(): int64 + set columns(value: int64) + } + /** Node for 3D tile-based maps. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_gridmap.html + */ + class GridMap extends Node3D { + /** Invalid cell item that can be used in [method set_cell_item] to clear cells (or represent an empty cell in [method get_cell_item]). */ + static readonly INVALID_CELL_ITEM = -1 + constructor(identifier?: any) + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32. */ + set_collision_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_layer_value(layer_number: int64): boolean + + /** Sets the [RID] of the navigation map this GridMap node should use for its cell baked navigation meshes. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the [RID] of the navigation map this GridMap node uses for its cell baked navigation meshes. + * This function returns always the map set on the GridMap node and not the map on the NavigationServer. If the map is changed directly with the NavigationServer API the GridMap node will not be aware of the map change. + */ + get_navigation_map(): RID + + /** Sets the mesh index for the cell referenced by its grid coordinates. + * A negative item index such as [constant INVALID_CELL_ITEM] will clear the cell. + * Optionally, the item's orientation can be passed. For valid orientation values, see [method get_orthogonal_index_from_basis]. + */ + set_cell_item(position: Vector3i, item: int64, orientation: int64 = 0): void + + /** The [MeshLibrary] item index located at the given grid coordinates. If the cell is empty, [constant INVALID_CELL_ITEM] will be returned. */ + get_cell_item(position: Vector3i): int64 + + /** The orientation of the cell at the given grid coordinates. `-1` is returned if the cell is empty. */ + get_cell_item_orientation(position: Vector3i): int64 + + /** Returns the basis that gives the specified cell its orientation. */ + get_cell_item_basis(position: Vector3i): Basis + + /** Returns one of 24 possible rotations that lie along the vectors (x,y,z) with each component being either -1, 0, or 1. For further details, refer to the Godot source code. */ + get_basis_with_orthogonal_index(index: int64): Basis + + /** This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index (in the range from 0 to 23) of the point best representing the orientation of the object. For further details, refer to the Godot source code. */ + get_orthogonal_index_from_basis(basis: Basis): int64 + + /** Returns the map coordinates of the cell containing the given [param local_position]. If [param local_position] is in global coordinates, consider using [method Node3D.to_local] before passing it to this method. See also [method map_to_local]. */ + local_to_map(local_position: Vector3): Vector3i + + /** Returns the position of a grid cell in the GridMap's local coordinate space. To convert the returned value into global coordinates, use [method Node3D.to_global]. See also [method local_to_map]. */ + map_to_local(map_position: Vector3i): Vector3 + + /** This method does nothing. */ + resource_changed(resource: Resource): void + + /** Clear all cells. */ + clear(): void + + /** Returns an array of [Vector3] with the non-empty cell coordinates in the grid map. */ + get_used_cells(): GArray + + /** Returns an array of all cells with the given item index specified in [param item]. */ + get_used_cells_by_item(item: int64): GArray + + /** Returns an array of [Transform3D] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in local space. */ + get_meshes(): GArray + + /** Returns an array of [ArrayMesh]es and [Transform3D] references of all bake meshes that exist within the current GridMap. */ + get_bake_meshes(): GArray + + /** Returns [RID] of a baked mesh with the given [param idx]. */ + get_bake_mesh_instance(idx: int64): RID + + /** Clears all baked meshes. See [method make_baked_meshes]. */ + clear_baked_meshes(): void + + /** Bakes lightmap data for all meshes in the assigned [MeshLibrary]. */ + make_baked_meshes(gen_lightmap_uv: boolean = false, lightmap_uv_texel_size: float64 = 0.1): void + + /** The assigned [MeshLibrary]. */ + get mesh_library(): MeshLibrary + set mesh_library(value: MeshLibrary) + + /** Overrides the default friction and bounce physics properties for the whole [GridMap]. */ + get physics_material(): PhysicsMaterial + set physics_material(value: PhysicsMaterial) + + /** The dimensions of the grid's cells. + * This does not affect the size of the meshes. See [member cell_scale]. + */ + get cell_size(): Vector3 + set cell_size(value: Vector3) + + /** The size of each octant measured in number of cells. This applies to all three axis. */ + get cell_octant_size(): int64 + set cell_octant_size(value: int64) + + /** If `true`, grid items are centered on the X axis. */ + get cell_center_x(): boolean + set cell_center_x(value: boolean) + + /** If `true`, grid items are centered on the Y axis. */ + get cell_center_y(): boolean + set cell_center_y(value: boolean) + + /** If `true`, grid items are centered on the Z axis. */ + get cell_center_z(): boolean + set cell_center_z(value: boolean) + + /** The scale of the cell items. + * This does not affect the size of the grid cells themselves, only the items in them. This can be used to make cell items overlap their neighbors. + */ + get cell_scale(): float64 + set cell_scale(value: float64) + + /** The physics layers this GridMap is in. + * GridMaps act as static bodies, meaning they aren't affected by gravity or other forces. They only affect other physics bodies that collide with them. + */ + get collision_layer(): int64 + set collision_layer(value: int64) + + /** The physics layers this GridMap detects collisions in. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The priority used to solve colliding when occurring penetration. The higher the priority is, the lower the penetration into the object will be. This can for example be used to prevent the player from breaking through the boundaries of a level. */ + get collision_priority(): float64 + set collision_priority(value: float64) + + /** If `true`, this GridMap creates a navigation region for each cell that uses a [member mesh_library] item with a navigation mesh. The created navigation region will use the navigation layers bitmask assigned to the [MeshLibrary]'s item. */ + get bake_navigation(): boolean + set bake_navigation(value: boolean) + + /** Emitted when [member cell_size] changes. */ + readonly cell_size_changed: Signal1 + + /** Emitted when the [MeshLibrary] of this GridMap changes. */ + readonly changed: Signal0 + } + class GridMapEditor extends VBoxContainer { + constructor(identifier?: any) + _configure(): void + _set_selection(_unnamed_arg0: boolean, _unnamed_arg1: Vector3, _unnamed_arg2: Vector3): void + } + class GridMapEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A physics joint that restricts the movement of two 2D physics bodies to a fixed axis. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_groovejoint2d.html + */ + class GrooveJoint2D extends Joint2D { + constructor(identifier?: any) + /** The groove's length. The groove is from the joint's origin towards [member length] along the joint's local Y axis. */ + get length(): float64 + set length(value: float64) + + /** The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's Y axis (along the groove). */ + get initial_offset(): float64 + set initial_offset(value: float64) + } + class GroupSettingsEditor extends VBoxContainer { + constructor(identifier?: any) + remove_references(_unnamed_arg0: StringName): void + rename_references(_unnamed_arg0: StringName, _unnamed_arg1: StringName): void + update_groups(): void + readonly group_changed: Signal0 + } + class GroupsEditor extends VBoxContainer { + constructor(identifier?: any) + _update_tree(): void + _update_groups(): void + _update_groups_and_tree(): void + _add_scene_group(_unnamed_arg0: string): void + _rename_scene_group(_unnamed_arg0: string, _unnamed_arg1: string): void + _remove_scene_group(_unnamed_arg0: string): void + _set_group_checked(_unnamed_arg0: string, _unnamed_arg1: boolean): void + } + /** A container that arranges its child controls horizontally. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hboxcontainer.html + */ + class HBoxContainer extends BoxContainer { + constructor(identifier?: any) + } + /** A container that arranges its child controls horizontally and wraps them around at the borders. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hflowcontainer.html + */ + class HFlowContainer extends FlowContainer { + constructor(identifier?: any) + } + /** Used to create an HMAC for a message using a key. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hmaccontext.html + */ + class HMACContext extends RefCounted { + constructor(identifier?: any) + /** Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called. */ + start(hash_type: HashingContext.HashType, key: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [param data] to the message, but cannot be called until [method start] has been called. */ + update(data: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Returns the resulting HMAC. If the HMAC failed, an empty [PackedByteArray] is returned. */ + finish(): PackedByteArray + } + /** A horizontal scrollbar that goes from left (min) to right (max). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hscrollbar.html + */ + class HScrollBar extends ScrollBar { + constructor(identifier?: any) + } + /** A horizontal line used for separating other controls. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hseparator.html + */ + class HSeparator extends Separator { + constructor(identifier?: any) + } + /** A horizontal slider that goes from left (min) to right (max). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hslider.html + */ + class HSlider extends Slider { + constructor(identifier?: any) + } + /** A container that splits two child controls horizontally and provides a grabber for adjusting the split ratio. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hsplitcontainer.html + */ + class HSplitContainer extends SplitContainer { + constructor(identifier?: any) + } + namespace HTTPClient { + enum Method { + /** HTTP GET method. The GET method requests a representation of the specified resource. Requests using GET should only retrieve data. */ + METHOD_GET = 0, + + /** HTTP HEAD method. The HEAD method asks for a response identical to that of a GET request, but without the response body. This is useful to request metadata like HTTP headers or to check if a resource exists. */ + METHOD_HEAD = 1, + + /** HTTP POST method. The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server. This is often used for forms and submitting data or uploading files. */ + METHOD_POST = 2, + + /** HTTP PUT method. The PUT method asks to replace all current representations of the target resource with the request payload. (You can think of POST as "create or update" and PUT as "update", although many services tend to not make a clear distinction or change their meaning). */ + METHOD_PUT = 3, + + /** HTTP DELETE method. The DELETE method requests to delete the specified resource. */ + METHOD_DELETE = 4, + + /** HTTP OPTIONS method. The OPTIONS method asks for a description of the communication options for the target resource. Rarely used. */ + METHOD_OPTIONS = 5, + + /** HTTP TRACE method. The TRACE method performs a message loop-back test along the path to the target resource. Returns the entire HTTP request received in the response body. Rarely used. */ + METHOD_TRACE = 6, + + /** HTTP CONNECT method. The CONNECT method establishes a tunnel to the server identified by the target resource. Rarely used. */ + METHOD_CONNECT = 7, + + /** HTTP PATCH method. The PATCH method is used to apply partial modifications to a resource. */ + METHOD_PATCH = 8, + + /** Represents the size of the [enum Method] enum. */ + METHOD_MAX = 9, + } + enum Status { + /** Status: Disconnected from the server. */ + STATUS_DISCONNECTED = 0, + + /** Status: Currently resolving the hostname for the given URL into an IP. */ + STATUS_RESOLVING = 1, + + /** Status: DNS failure: Can't resolve the hostname for the given URL. */ + STATUS_CANT_RESOLVE = 2, + + /** Status: Currently connecting to server. */ + STATUS_CONNECTING = 3, + + /** Status: Can't connect to the server. */ + STATUS_CANT_CONNECT = 4, + + /** Status: Connection established. */ + STATUS_CONNECTED = 5, + + /** Status: Currently sending request. */ + STATUS_REQUESTING = 6, + + /** Status: HTTP body received. */ + STATUS_BODY = 7, + + /** Status: Error in HTTP connection. */ + STATUS_CONNECTION_ERROR = 8, + + /** Status: Error in TLS handshake. */ + STATUS_TLS_HANDSHAKE_ERROR = 9, + } + enum ResponseCode { + /** HTTP status code `100 Continue`. Interim response that indicates everything so far is OK and that the client should continue with the request (or ignore this status if already finished). */ + RESPONSE_CONTINUE = 100, + + /** HTTP status code `101 Switching Protocol`. Sent in response to an `Upgrade` request header by the client. Indicates the protocol the server is switching to. */ + RESPONSE_SWITCHING_PROTOCOLS = 101, + + /** HTTP status code `102 Processing` (WebDAV). Indicates that the server has received and is processing the request, but no response is available yet. */ + RESPONSE_PROCESSING = 102, + + /** HTTP status code `200 OK`. The request has succeeded. Default response for successful requests. Meaning varies depending on the request. GET: The resource has been fetched and is transmitted in the message body. HEAD: The entity headers are in the message body. POST: The resource describing the result of the action is transmitted in the message body. TRACE: The message body contains the request message as received by the server. */ + RESPONSE_OK = 200, + + /** HTTP status code `201 Created`. The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request. */ + RESPONSE_CREATED = 201, + + /** HTTP status code `202 Accepted`. The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing. */ + RESPONSE_ACCEPTED = 202, + + /** HTTP status code `203 Non-Authoritative Information`. This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response. */ + RESPONSE_NON_AUTHORITATIVE_INFORMATION = 203, + + /** HTTP status code `204 No Content`. There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones. */ + RESPONSE_NO_CONTENT = 204, + + /** HTTP status code `205 Reset Content`. The server has fulfilled the request and desires that the client resets the "document view" that caused the request to be sent to its original state as received from the origin server. */ + RESPONSE_RESET_CONTENT = 205, + + /** HTTP status code `206 Partial Content`. This response code is used because of a range header sent by the client to separate download into multiple streams. */ + RESPONSE_PARTIAL_CONTENT = 206, + + /** HTTP status code `207 Multi-Status` (WebDAV). A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate. */ + RESPONSE_MULTI_STATUS = 207, + + /** HTTP status code `208 Already Reported` (WebDAV). Used inside a DAV: propstat response element to avoid enumerating the internal members of multiple bindings to the same collection repeatedly. */ + RESPONSE_ALREADY_REPORTED = 208, + + /** HTTP status code `226 IM Used` (WebDAV). The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. */ + RESPONSE_IM_USED = 226, + + /** HTTP status code `300 Multiple Choice`. The request has more than one possible responses and there is no standardized way to choose one of the responses. User-agent or user should choose one of them. */ + RESPONSE_MULTIPLE_CHOICES = 300, + + /** HTTP status code `301 Moved Permanently`. Redirection. This response code means the URI of requested resource has been changed. The new URI is usually included in the response. */ + RESPONSE_MOVED_PERMANENTLY = 301, + + /** HTTP status code `302 Found`. Temporary redirection. This response code means the URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests. */ + RESPONSE_FOUND = 302, + + /** HTTP status code `303 See Other`. The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request. */ + RESPONSE_SEE_OTHER = 303, + + /** HTTP status code `304 Not Modified`. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to `false`. */ + RESPONSE_NOT_MODIFIED = 304, + + /** HTTP status code `305 Use Proxy`. */ + RESPONSE_USE_PROXY = 305, + + /** HTTP status code `306 Switch Proxy`. */ + RESPONSE_SWITCH_PROXY = 306, + + /** HTTP status code `307 Temporary Redirect`. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. */ + RESPONSE_TEMPORARY_REDIRECT = 307, + + /** HTTP status code `308 Permanent Redirect`. The target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs. */ + RESPONSE_PERMANENT_REDIRECT = 308, + + /** HTTP status code `400 Bad Request`. The request was invalid. The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, invalid request contents, or deceptive request routing). */ + RESPONSE_BAD_REQUEST = 400, + + /** HTTP status code `401 Unauthorized`. Credentials required. The request has not been applied because it lacks valid authentication credentials for the target resource. */ + RESPONSE_UNAUTHORIZED = 401, + + /** HTTP status code `402 Payment Required`. This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems, however this is not currently used. */ + RESPONSE_PAYMENT_REQUIRED = 402, + + /** HTTP status code `403 Forbidden`. The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike `401`, the client's identity is known to the server. */ + RESPONSE_FORBIDDEN = 403, + + /** HTTP status code `404 Not Found`. The server can not find requested resource. Either the URL is not recognized or the endpoint is valid but the resource itself does not exist. May also be sent instead of 403 to hide existence of a resource if the client is not authorized. */ + RESPONSE_NOT_FOUND = 404, + + /** HTTP status code `405 Method Not Allowed`. The request's HTTP method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code. */ + RESPONSE_METHOD_NOT_ALLOWED = 405, + + /** HTTP status code `406 Not Acceptable`. The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request. Used when negotiation content. */ + RESPONSE_NOT_ACCEPTABLE = 406, + + /** HTTP status code `407 Proxy Authentication Required`. Similar to 401 Unauthorized, but it indicates that the client needs to authenticate itself in order to use a proxy. */ + RESPONSE_PROXY_AUTHENTICATION_REQUIRED = 407, + + /** HTTP status code `408 Request Timeout`. The server did not receive a complete request message within the time that it was prepared to wait. */ + RESPONSE_REQUEST_TIMEOUT = 408, + + /** HTTP status code `409 Conflict`. The request could not be completed due to a conflict with the current state of the target resource. This code is used in situations where the user might be able to resolve the conflict and resubmit the request. */ + RESPONSE_CONFLICT = 409, + + /** HTTP status code `410 Gone`. The target resource is no longer available at the origin server and this condition is likely permanent. */ + RESPONSE_GONE = 410, + + /** HTTP status code `411 Length Required`. The server refuses to accept the request without a defined Content-Length header. */ + RESPONSE_LENGTH_REQUIRED = 411, + + /** HTTP status code `412 Precondition Failed`. One or more conditions given in the request header fields evaluated to `false` when tested on the server. */ + RESPONSE_PRECONDITION_FAILED = 412, + + /** HTTP status code `413 Entity Too Large`. The server is refusing to process a request because the request payload is larger than the server is willing or able to process. */ + RESPONSE_REQUEST_ENTITY_TOO_LARGE = 413, + + /** HTTP status code `414 Request-URI Too Long`. The server is refusing to service the request because the request-target is longer than the server is willing to interpret. */ + RESPONSE_REQUEST_URI_TOO_LONG = 414, + + /** HTTP status code `415 Unsupported Media Type`. The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. */ + RESPONSE_UNSUPPORTED_MEDIA_TYPE = 415, + + /** HTTP status code `416 Requested Range Not Satisfiable`. None of the ranges in the request's Range header field overlap the current extent of the selected resource or the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges. */ + RESPONSE_REQUESTED_RANGE_NOT_SATISFIABLE = 416, + + /** HTTP status code `417 Expectation Failed`. The expectation given in the request's Expect header field could not be met by at least one of the inbound servers. */ + RESPONSE_EXPECTATION_FAILED = 417, + + /** HTTP status code `418 I'm A Teapot`. Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout. */ + RESPONSE_IM_A_TEAPOT = 418, + + /** HTTP status code `421 Misdirected Request`. The request was directed at a server that is not able to produce a response. This can be sent by a server that is not configured to produce responses for the combination of scheme and authority that are included in the request URI. */ + RESPONSE_MISDIRECTED_REQUEST = 421, + + /** HTTP status code `422 Unprocessable Entity` (WebDAV). The server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions. */ + RESPONSE_UNPROCESSABLE_ENTITY = 422, + + /** HTTP status code `423 Locked` (WebDAV). The source or destination resource of a method is locked. */ + RESPONSE_LOCKED = 423, + + /** HTTP status code `424 Failed Dependency` (WebDAV). The method could not be performed on the resource because the requested action depended on another action and that action failed. */ + RESPONSE_FAILED_DEPENDENCY = 424, + + /** HTTP status code `426 Upgrade Required`. The server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. */ + RESPONSE_UPGRADE_REQUIRED = 426, + + /** HTTP status code `428 Precondition Required`. The origin server requires the request to be conditional. */ + RESPONSE_PRECONDITION_REQUIRED = 428, + + /** HTTP status code `429 Too Many Requests`. The user has sent too many requests in a given amount of time (see "rate limiting"). Back off and increase time between requests or try again later. */ + RESPONSE_TOO_MANY_REQUESTS = 429, + + /** HTTP status code `431 Request Header Fields Too Large`. The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields. */ + RESPONSE_REQUEST_HEADER_FIELDS_TOO_LARGE = 431, + + /** HTTP status code `451 Response Unavailable For Legal Reasons`. The server is denying access to the resource as a consequence of a legal demand. */ + RESPONSE_UNAVAILABLE_FOR_LEGAL_REASONS = 451, + + /** HTTP status code `500 Internal Server Error`. The server encountered an unexpected condition that prevented it from fulfilling the request. */ + RESPONSE_INTERNAL_SERVER_ERROR = 500, + + /** HTTP status code `501 Not Implemented`. The server does not support the functionality required to fulfill the request. */ + RESPONSE_NOT_IMPLEMENTED = 501, + + /** HTTP status code `502 Bad Gateway`. The server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request. Usually returned by load balancers or proxies. */ + RESPONSE_BAD_GATEWAY = 502, + + /** HTTP status code `503 Service Unavailable`. The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. Try again later. */ + RESPONSE_SERVICE_UNAVAILABLE = 503, + + /** HTTP status code `504 Gateway Timeout`. The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request. Usually returned by load balancers or proxies. */ + RESPONSE_GATEWAY_TIMEOUT = 504, + + /** HTTP status code `505 HTTP Version Not Supported`. The server does not support, or refuses to support, the major version of HTTP that was used in the request message. */ + RESPONSE_HTTP_VERSION_NOT_SUPPORTED = 505, + + /** HTTP status code `506 Variant Also Negotiates`. The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process. */ + RESPONSE_VARIANT_ALSO_NEGOTIATES = 506, + + /** HTTP status code `507 Insufficient Storage`. The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. */ + RESPONSE_INSUFFICIENT_STORAGE = 507, + + /** HTTP status code `508 Loop Detected`. The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity". This status indicates that the entire operation failed. */ + RESPONSE_LOOP_DETECTED = 508, + + /** HTTP status code `510 Not Extended`. The policy for accessing the resource has not been met in the request. The server should send back all the information necessary for the client to issue an extended request. */ + RESPONSE_NOT_EXTENDED = 510, + + /** HTTP status code `511 Network Authentication Required`. The client needs to authenticate to gain network access. */ + RESPONSE_NETWORK_AUTH_REQUIRED = 511, + } + } + /** Low-level hyper-text transfer protocol client. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_httpclient.html + */ + class HTTPClient extends RefCounted { + constructor(identifier?: any) + /** Connects to a host. This needs to be done before any requests are sent. + * If no [param port] is specified (or `-1` is used), it is automatically set to 80 for HTTP and 443 for HTTPS. You can pass the optional [param tls_options] parameter to customize the trusted certification authorities, or the common name verification when using HTTPS. See [method TLSOptions.client] and [method TLSOptions.client_unsafe]. + */ + connect_to_host(host: string, port: int64 = -1, tls_options: TLSOptions = undefined): GError + + /** Sends a raw request to the connected host. + * The URL parameter is usually just the part after the host, so for `https://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, `*` is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component (`host:port`). + * Headers are HTTP request headers. For available HTTP methods, see [enum Method]. + * Sends the body data raw, as a byte array and does not encode it in any way. + */ + request_raw(method: HTTPClient.Method, url: string, headers: PackedStringArray | string[], body: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Sends a request to the connected host. + * The URL parameter is usually just the part after the host, so for `https://somehost.com/index.php`, it is `/index.php`. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, `*` is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component (`host:port`). + * Headers are HTTP request headers. For available HTTP methods, see [enum Method]. + * To create a POST request with query strings to push to the server, do: + * + * + * **Note:** The [param body] parameter is ignored if [param method] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. + */ + request(method: HTTPClient.Method, url: string, headers: PackedStringArray | string[], body: string = ''): GError + + /** Closes the current connection, allowing reuse of this [HTTPClient]. */ + close(): void + + /** If `true`, this [HTTPClient] has a response available. */ + has_response(): boolean + + /** If `true`, this [HTTPClient] has a response that is chunked. */ + is_response_chunked(): boolean + + /** Returns the response's HTTP status code. */ + get_response_code(): int64 + + /** Returns the response headers. */ + get_response_headers(): PackedStringArray + + /** Returns all response headers as a Dictionary of structure `{ "key": "value1; value2" }` where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. + * **Example:** + * + */ + get_response_headers_as_dictionary(): GDictionary + + /** Returns the response's body length. + * + * **Note:** Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`. + * + * **Note:** This function always returns `-1` on the Web platform due to browsers limitations. + */ + get_response_body_length(): int64 + + /** Reads one chunk from the response. */ + read_response_body_chunk(): PackedByteArray + + /** Returns a [enum Status] constant. Need to call [method poll] in order to get status updates. */ + get_status(): HTTPClient.Status + + /** This needs to be called in order to have any request processed. Check results with [method get_status]. */ + poll(): GError + + /** Sets the proxy server for HTTP requests. + * The proxy server is unset if [param host] is empty or [param port] is -1. + */ + set_http_proxy(host: string, port: int64): void + + /** Sets the proxy server for HTTPS requests. + * The proxy server is unset if [param host] is empty or [param port] is -1. + */ + set_https_proxy(host: string, port: int64): void + + /** Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: + * + * Furthermore, if a key has a `null` value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. + * + */ + query_string_from_dict(fields: GDictionary): string + + /** If `true`, execution will block until all data is read from the response. */ + get blocking_mode_enabled(): boolean + set blocking_mode_enabled(value: boolean) + + /** The connection to use for this client. */ + get connection(): StreamPeer + set connection(value: StreamPeer) + + /** The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. */ + get read_chunk_size(): int64 + set read_chunk_size(value: int64) + } + namespace HTTPRequest { + enum Result { + /** Request successful. */ + RESULT_SUCCESS = 0, + RESULT_CHUNKED_BODY_SIZE_MISMATCH = 1, + + /** Request failed while connecting. */ + RESULT_CANT_CONNECT = 2, + + /** Request failed while resolving. */ + RESULT_CANT_RESOLVE = 3, + + /** Request failed due to connection (read/write) error. */ + RESULT_CONNECTION_ERROR = 4, + + /** Request failed on TLS handshake. */ + RESULT_TLS_HANDSHAKE_ERROR = 5, + + /** Request does not have a response (yet). */ + RESULT_NO_RESPONSE = 6, + + /** Request exceeded its maximum size limit, see [member body_size_limit]. */ + RESULT_BODY_SIZE_LIMIT_EXCEEDED = 7, + RESULT_BODY_DECOMPRESS_FAILED = 8, + + /** Request failed (currently unused). */ + RESULT_REQUEST_FAILED = 9, + + /** HTTPRequest couldn't open the download file. */ + RESULT_DOWNLOAD_FILE_CANT_OPEN = 10, + + /** HTTPRequest couldn't write to the download file. */ + RESULT_DOWNLOAD_FILE_WRITE_ERROR = 11, + + /** Request reached its maximum redirect limit, see [member max_redirects]. */ + RESULT_REDIRECT_LIMIT_REACHED = 12, + + /** Request failed due to a timeout. If you expect requests to take a long time, try increasing the value of [member timeout] or setting it to `0.0` to remove the timeout completely. */ + RESULT_TIMEOUT = 13, + } + } + /** A node with the ability to send HTTP(S) requests. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_httprequest.html + */ + class HTTPRequest extends Node { + constructor(identifier?: any) + /** Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. + * Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. + * + * **Note:** When [param method] is [constant HTTPClient.METHOD_GET], the payload sent via [param request_data] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). + * + * **Note:** It's recommended to use transport encryption (TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. + */ + request(url: string, custom_headers: PackedStringArray | string[] = [], method: HTTPClient.Method = 0, request_data: string = ''): GError + + /** Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. + * Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. + */ + request_raw(url: string, custom_headers: PackedStringArray | string[] = [], method: HTTPClient.Method = 0, request_data_raw: PackedByteArray | byte[] | ArrayBuffer = []): GError + + /** Cancels the current request. */ + cancel_request(): void + + /** Sets the [TLSOptions] to be used when connecting to an HTTPS server. See [method TLSOptions.client]. */ + set_tls_options(client_options: TLSOptions): void + + /** Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status]. */ + get_http_client_status(): HTTPClient.Status + + /** Returns the number of bytes this HTTPRequest downloaded. */ + get_downloaded_bytes(): int64 + + /** Returns the response body length. + * + * **Note:** Some Web servers may not send a body length. In this case, the value returned will be `-1`. If using chunked transfer encoding, the body length will also be `-1`. + */ + get_body_size(): int64 + + /** Sets the proxy server for HTTP requests. + * The proxy server is unset if [param host] is empty or [param port] is -1. + */ + set_http_proxy(host: string, port: int64): void + + /** Sets the proxy server for HTTPS requests. + * The proxy server is unset if [param host] is empty or [param port] is -1. + */ + set_https_proxy(host: string, port: int64): void + + /** The file to download into. Will output any received file into it. */ + get download_file(): string + set download_file(value: string) + + /** The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size]. + * Set this to a lower value (e.g. 4096 for 4 KiB) when downloading small files to decrease memory usage at the cost of download speeds. + */ + get download_chunk_size(): int64 + set download_chunk_size(value: int64) + + /** If `true`, multithreading is used to improve performance. */ + get use_threads(): boolean + set use_threads(value: boolean) + + /** If `true`, this header will be added to each request: `Accept-Encoding: gzip, deflate` telling servers that it's okay to compress response bodies. + * Any Response body declaring a `Content-Encoding` of either `gzip` or `deflate` will then be automatically decompressed, and the uncompressed bytes will be delivered via [signal request_completed]. + * If the user has specified their own `Accept-Encoding` header, then no header will be added regardless of [member accept_gzip]. + * If `false` no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [signal request_completed]. + */ + get accept_gzip(): boolean + set accept_gzip(value: boolean) + + /** Maximum allowed size for response bodies. If the response body is compressed, this will be used as the maximum allowed size for the decompressed body. */ + get body_size_limit(): int64 + set body_size_limit(value: int64) + + /** Maximum number of allowed redirects. */ + get max_redirects(): int64 + set max_redirects(value: int64) + + /** The duration to wait in seconds before a request times out. If [member timeout] is set to `0.0` then the request will never time out. For simple requests, such as communication with a REST API, it is recommended that [member timeout] is set to a value suitable for the server response time (e.g. between `1.0` and `10.0`). This will help prevent unwanted timeouts caused by variation in server response times while still allowing the application to detect when a request has timed out. For larger requests such as file downloads it is suggested the [member timeout] be set to `0.0`, disabling the timeout functionality. This will help to prevent large transfers from failing due to exceeding the timeout value. */ + get timeout(): float64 + set timeout(value: float64) + + /** Emitted when a request is completed. */ + readonly request_completed: Signal4 + } + namespace HashingContext { + enum HashType { + /** Hashing algorithm: MD5. */ + HASH_MD5 = 0, + + /** Hashing algorithm: SHA-1. */ + HASH_SHA1 = 1, + + /** Hashing algorithm: SHA-256. */ + HASH_SHA256 = 2, + } + } + /** Provides functionality for computing cryptographic hashes chunk by chunk. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hashingcontext.html + */ + class HashingContext extends RefCounted { + constructor(identifier?: any) + /** Starts a new hash computation of the given [param type] (e.g. [constant HASH_SHA256] to start computation of an SHA-256). */ + start(type: HashingContext.HashType): GError + + /** Updates the computation with the given [param chunk] of data. */ + update(chunk: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Closes the current context, and return the computed hash. */ + finish(): PackedByteArray + } + /** A 3D height map shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_heightmapshape3d.html + */ + class HeightMapShape3D extends Shape3D { + constructor(identifier?: any) + /** Returns the smallest height value found in [member map_data]. Recalculates only when [member map_data] changes. */ + get_min_height(): float64 + + /** Returns the largest height value found in [member map_data]. Recalculates only when [member map_data] changes. */ + get_max_height(): float64 + + /** Updates [member map_data] with data read from an [Image] reference. Automatically resizes heightmap [member map_width] and [member map_depth] to fit the full image width and height. + * The image needs to be in either [constant Image.FORMAT_RF] (32 bit), [constant Image.FORMAT_RH] (16 bit), or [constant Image.FORMAT_R8] (8 bit). + * Each image pixel is read in as a float on the range from `0.0` (black pixel) to `1.0` (white pixel). This range value gets remapped to [param height_min] and [param height_max] to form the final height value. + */ + update_map_data_from_image(image: Image, height_min: float64, height_max: float64): void + + /** Number of vertices in the width of the height map. Changing this will resize the [member map_data]. */ + get map_width(): int64 + set map_width(value: int64) + + /** Number of vertices in the depth of the height map. Changing this will resize the [member map_data]. */ + get map_depth(): int64 + set map_depth(value: int64) + + /** Height map data. The array's size must be equal to [member map_width] multiplied by [member map_depth]. */ + get map_data(): PackedFloat32Array + set map_data(value: PackedFloat32Array | float32[]) + } + namespace HingeJoint3D { + enum Param { + /** The speed with which the two bodies get pulled together when they move in different directions. */ + PARAM_BIAS = 0, + + /** The maximum rotation. Only active if [member angular_limit/enable] is `true`. */ + PARAM_LIMIT_UPPER = 1, + + /** The minimum rotation. Only active if [member angular_limit/enable] is `true`. */ + PARAM_LIMIT_LOWER = 2, + + /** The speed with which the rotation across the axis perpendicular to the hinge gets corrected. */ + PARAM_LIMIT_BIAS = 3, + PARAM_LIMIT_SOFTNESS = 4, + + /** The lower this value, the more the rotation gets slowed down. */ + PARAM_LIMIT_RELAXATION = 5, + + /** Target speed for the motor. */ + PARAM_MOTOR_TARGET_VELOCITY = 6, + + /** Maximum acceleration for the motor. */ + PARAM_MOTOR_MAX_IMPULSE = 7, + + /** Represents the size of the [enum Param] enum. */ + PARAM_MAX = 8, + } + enum Flag { + /** If `true`, the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. */ + FLAG_USE_LIMIT = 0, + + /** When activated, a motor turns the hinge. */ + FLAG_ENABLE_MOTOR = 1, + + /** Represents the size of the [enum Flag] enum. */ + FLAG_MAX = 2, + } + } + /** A physics joint that restricts the rotation of a 3D physics body around an axis relative to another physics body. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_hingejoint3d.html + */ + class HingeJoint3D extends Joint3D { + constructor(identifier?: any) + /** Sets the value of the specified parameter. */ + set_param(param: HingeJoint3D.Param, value: float64): void + + /** Returns the value of the specified parameter. */ + get_param(param: HingeJoint3D.Param): float64 + + /** If `true`, enables the specified flag. */ + set_flag(flag: HingeJoint3D.Flag, enabled: boolean): void + + /** Returns the value of the specified flag. */ + get_flag(flag: HingeJoint3D.Flag): boolean + } + class HistoryDock extends VBoxContainer { + constructor(identifier?: any) + } + namespace Image { + enum Format { + /** Texture format with a single 8-bit depth representing luminance. */ + FORMAT_L8 = 0, + + /** OpenGL texture format with two values, luminance and alpha each stored with 8 bits. */ + FORMAT_LA8 = 1, + + /** OpenGL texture format `RED` with a single component and a bitdepth of 8. */ + FORMAT_R8 = 2, + + /** OpenGL texture format `RG` with two components and a bitdepth of 8 for each. */ + FORMAT_RG8 = 3, + + /** OpenGL texture format `RGB` with three components, each with a bitdepth of 8. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_RGB8 = 4, + + /** OpenGL texture format `RGBA` with four components, each with a bitdepth of 8. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_RGBA8 = 5, + + /** OpenGL texture format `RGBA` with four components, each with a bitdepth of 4. */ + FORMAT_RGBA4444 = 6, + + /** OpenGL texture format `RGB` with three components. Red and blue have a bitdepth of 5, and green has a bitdepth of 6. */ + FORMAT_RGB565 = 7, + + /** OpenGL texture format `GL_R32F` where there's one component, a 32-bit floating-point value. */ + FORMAT_RF = 8, + + /** OpenGL texture format `GL_RG32F` where there are two components, each a 32-bit floating-point values. */ + FORMAT_RGF = 9, + + /** OpenGL texture format `GL_RGB32F` where there are three components, each a 32-bit floating-point values. */ + FORMAT_RGBF = 10, + + /** OpenGL texture format `GL_RGBA32F` where there are four components, each a 32-bit floating-point values. */ + FORMAT_RGBAF = 11, + + /** OpenGL texture format `GL_R16F` where there's one component, a 16-bit "half-precision" floating-point value. */ + FORMAT_RH = 12, + + /** OpenGL texture format `GL_RG16F` where there are two components, each a 16-bit "half-precision" floating-point value. */ + FORMAT_RGH = 13, + + /** OpenGL texture format `GL_RGB16F` where there are three components, each a 16-bit "half-precision" floating-point value. */ + FORMAT_RGBH = 14, + + /** OpenGL texture format `GL_RGBA16F` where there are four components, each a 16-bit "half-precision" floating-point value. */ + FORMAT_RGBAH = 15, + + /** A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. */ + FORMAT_RGBE9995 = 16, + + /** The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_DXT1 = 17, + + /** The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_DXT3 = 18, + + /** The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_DXT5 = 19, + + /** Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. */ + FORMAT_RGTC_R = 20, + + /** Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. */ + FORMAT_RGTC_RG = 21, + + /** Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned normalized RGBA components. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_BPTC_RGBA = 22, + + /** Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point RGB components. */ + FORMAT_BPTC_RGBF = 23, + + /** Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components. */ + FORMAT_BPTC_RGBFU = 24, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. */ + FORMAT_ETC = 25, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`R11_EAC` variant), which provides one channel of unsigned data. */ + FORMAT_ETC2_R11 = 26, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`SIGNED_R11_EAC` variant), which provides one channel of signed data. */ + FORMAT_ETC2_R11S = 27, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RG11_EAC` variant), which provides two channels of unsigned data. */ + FORMAT_ETC2_RG11 = 28, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`SIGNED_RG11_EAC` variant), which provides two channels of signed data. */ + FORMAT_ETC2_RG11S = 29, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGB8` variant), which is a follow-up of ETC1 and compresses RGB888 data. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_ETC2_RGB8 = 30, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGBA8`variant), which compresses RGBA8888 data with full alpha support. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_ETC2_RGBA8 = 31, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGB8_PUNCHTHROUGH_ALPHA1` variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. + * + * **Note:** When creating an [ImageTexture], an sRGB to linear color space conversion is performed. + */ + FORMAT_ETC2_RGB8A1 = 32, + + /** [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] (`RGBA8` variant), which compresses RA data and interprets it as two channels (red and green). See also [constant FORMAT_ETC2_RGBA8]. */ + FORMAT_ETC2_RA_AS_RG = 33, + + /** The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3, which compresses RA data and interprets it as two channels (red and green). See also [constant FORMAT_DXT5]. */ + FORMAT_DXT5_RA_AS_RG = 34, + + /** [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texture Compression[/url]. This implements the 4×4 (high quality) mode. */ + FORMAT_ASTC_4x4 = 35, + + /** Same format as [constant FORMAT_ASTC_4x4], but with the hint to let the GPU know it is used for HDR. */ + FORMAT_ASTC_4x4_HDR = 36, + + /** [url=https://en.wikipedia.org/wiki/Adaptive_scalable_texture_compression]Adaptive Scalable Texture Compression[/url]. This implements the 8×8 (low quality) mode. */ + FORMAT_ASTC_8x8 = 37, + + /** Same format as [constant FORMAT_ASTC_8x8], but with the hint to let the GPU know it is used for HDR. */ + FORMAT_ASTC_8x8_HDR = 38, + + /** Represents the size of the [enum Format] enum. */ + FORMAT_MAX = 39, + } + enum Interpolation { + /** Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. */ + INTERPOLATE_NEAREST = 0, + + /** Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than [constant INTERPOLATE_CUBIC], but it results in lower quality. */ + INTERPOLATE_BILINEAR = 1, + + /** Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to [constant INTERPOLATE_BILINEAR], at the cost of being slower. */ + INTERPOLATE_CUBIC = 2, + + /** Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. + * It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with far fewer aliasing artifacts. + * If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. + * + * **Note:** If you intend to scale multiple copies of the original image, it's better to call [method generate_mipmaps]] on it in advance, to avoid wasting processing power in generating them again and again. + * On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. + */ + INTERPOLATE_TRILINEAR = 3, + + /** Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscaling images. */ + INTERPOLATE_LANCZOS = 4, + } + enum AlphaMode { + /** Image does not have alpha. */ + ALPHA_NONE = 0, + + /** Image stores alpha in a single bit. */ + ALPHA_BIT = 1, + + /** Image uses alpha. */ + ALPHA_BLEND = 2, + } + enum CompressMode { + /** Use S3TC compression. */ + COMPRESS_S3TC = 0, + + /** Use ETC compression. */ + COMPRESS_ETC = 1, + + /** Use ETC2 compression. */ + COMPRESS_ETC2 = 2, + + /** Use BPTC compression. */ + COMPRESS_BPTC = 3, + + /** Use ASTC compression. */ + COMPRESS_ASTC = 4, + + /** Represents the size of the [enum CompressMode] enum. */ + COMPRESS_MAX = 5, + } + enum UsedChannels { + /** The image only uses one channel for luminance (grayscale). */ + USED_CHANNELS_L = 0, + + /** The image uses two channels for luminance and alpha, respectively. */ + USED_CHANNELS_LA = 1, + + /** The image only uses the red channel. */ + USED_CHANNELS_R = 2, + + /** The image uses two channels for red and green. */ + USED_CHANNELS_RG = 3, + + /** The image uses three channels for red, green, and blue. */ + USED_CHANNELS_RGB = 4, + + /** The image uses four channels for red, green, blue, and alpha. */ + USED_CHANNELS_RGBA = 5, + } + enum CompressSource { + /** Source texture (before compression) is a regular texture. Default for all textures. */ + COMPRESS_SOURCE_GENERIC = 0, + + /** Source texture (before compression) is in sRGB space. */ + COMPRESS_SOURCE_SRGB = 1, + + /** Source texture (before compression) is a normal texture (e.g. it can be compressed into two channels). */ + COMPRESS_SOURCE_NORMAL = 2, + } + enum ASTCFormat { + /** Hint to indicate that the high quality 4×4 ASTC compression format should be used. */ + ASTC_FORMAT_4x4 = 0, + + /** Hint to indicate that the low quality 8×8 ASTC compression format should be used. */ + ASTC_FORMAT_8x8 = 1, + } + } + /** Image datatype. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_image.html + */ + class Image extends Resource { + /** The maximal width allowed for [Image] resources. */ + static readonly MAX_WIDTH = 16777216 + + /** The maximal height allowed for [Image] resources. */ + static readonly MAX_HEIGHT = 16777216 + constructor(identifier?: any) + + /** Returns the image's width. */ + get_width(): int64 + + /** Returns the image's height. */ + get_height(): int64 + + /** Returns the image's size (width and height). */ + get_size(): Vector2i + + /** Returns `true` if the image has generated mipmaps. */ + has_mipmaps(): boolean + + /** Returns the image's format. See [enum Format] constants. */ + get_format(): Image.Format + + /** Returns a copy of the image's raw data. */ + get_data(): PackedByteArray + + /** Returns size (in bytes) of the image's raw data. */ + get_data_size(): int64 + + /** Converts the image's format. See [enum Format] constants. */ + convert(format: Image.Format): void + + /** Returns the number of mipmap levels or 0 if the image has no mipmaps. The largest main level image is not counted as a mipmap level by this method, so if you want to include it you can add 1 to this count. */ + get_mipmap_count(): int64 + + /** Returns the offset where the image's mipmap with index [param mipmap] is stored in the [member data] dictionary. */ + get_mipmap_offset(mipmap: int64): int64 + + /** Resizes the image to the nearest power of 2 for the width and height. If [param square] is `true` then set width and height to be the same. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants. */ + resize_to_po2(square: boolean = false, interpolation: Image.Interpolation = 1): void + + /** Resizes the image to the given [param width] and [param height]. New pixels are calculated using the [param interpolation] mode defined via [enum Interpolation] constants. */ + resize(width: int64, height: int64, interpolation: Image.Interpolation = 1): void + + /** Shrinks the image by a factor of 2 on each axis (this divides the pixel count by 4). */ + shrink_x2(): void + + /** Crops the image to the given [param width] and [param height]. If the specified size is larger than the current size, the extra area is filled with black pixels. */ + crop(width: int64, height: int64): void + + /** Flips the image horizontally. */ + flip_x(): void + + /** Flips the image vertically. */ + flip_y(): void + + /** Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is `0`. Enabling [param renormalize] when generating mipmaps for normal map textures will make sure all resulting vector values are normalized. + * It is possible to check if the image has mipmaps by calling [method has_mipmaps] or [method get_mipmap_count]. Calling [method generate_mipmaps] on an image that already has mipmaps will replace existing mipmaps in the image. + */ + generate_mipmaps(renormalize: boolean = false): GError + + /** Removes the image's mipmaps. */ + clear_mipmaps(): void + + /** Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is `true`, then generate mipmaps for this image. See the [method generate_mipmaps]. */ + static create(width: int64, height: int64, use_mipmaps: boolean, format: Image.Format): Image + + /** Creates an empty image of given size and format. See [enum Format] constants. If [param use_mipmaps] is `true`, then generate mipmaps for this image. See the [method generate_mipmaps]. */ + static create_empty(width: int64, height: int64, use_mipmaps: boolean, format: Image.Format): Image + + /** Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [param use_mipmaps] is `true` then loads mipmaps for this image from [param data]. See [method generate_mipmaps]. */ + static create_from_data(width: int64, height: int64, use_mipmaps: boolean, format: Image.Format, data: PackedByteArray | byte[] | ArrayBuffer): Image + + /** Overwrites data of an existing [Image]. Non-static equivalent of [method create_from_data]. */ + set_data(width: int64, height: int64, use_mipmaps: boolean, format: Image.Format, data: PackedByteArray | byte[] | ArrayBuffer): void + + /** Returns `true` if the image has no data. */ + is_empty(): boolean + + /** Loads an image from file [param path]. See [url=https://docs.godotengine.org/en/4.3/tutorials/assets_pipeline/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. + * **Warning:** This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the `user://` directory, and may not work in exported projects. + * See also [ImageTexture] description for usage examples. + */ + load(path: string): GError + + /** Creates a new [Image] and loads data from the specified file. */ + static load_from_file(path: string): Image + + /** Saves the image as a PNG file to the file at [param path]. */ + save_png(path: string): GError + + /** Saves the image as a PNG file to a byte array. */ + save_png_to_buffer(): PackedByteArray + + /** Saves the image as a JPEG file to [param path] with the specified [param quality] between `0.01` and `1.0` (inclusive). Higher [param quality] values result in better-looking output at the cost of larger file sizes. Recommended [param quality] values are between `0.75` and `0.90`. Even at quality `1.00`, JPEG compression remains lossy. + * + * **Note:** JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting JPEG file won't contain the alpha channel. + */ + save_jpg(path: string, quality: float64 = 0.75): GError + + /** Saves the image as a JPEG file to a byte array with the specified [param quality] between `0.01` and `1.0` (inclusive). Higher [param quality] values result in better-looking output at the cost of larger byte array sizes (and therefore memory usage). Recommended [param quality] values are between `0.75` and `0.90`. Even at quality `1.00`, JPEG compression remains lossy. + * + * **Note:** JPEG does not save an alpha channel. If the [Image] contains an alpha channel, the image will still be saved, but the resulting byte array won't contain the alpha channel. + */ + save_jpg_to_buffer(quality: float64 = 0.75): PackedByteArray + + /** Saves the image as an EXR file to [param path]. If [param grayscale] is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. + * + * **Note:** The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project. + */ + save_exr(path: string, grayscale: boolean = false): GError + + /** Saves the image as an EXR file to a byte array. If [param grayscale] is `true` and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return an empty byte array if Godot was compiled without the TinyEXR module. + * + * **Note:** The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return an empty byte array when it is called from an exported project. + */ + save_exr_to_buffer(grayscale: boolean = false): PackedByteArray + + /** Saves the image as a WebP (Web Picture) file to the file at [param path]. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + * + * **Note:** The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. + */ + save_webp(path: string, lossy: boolean = false, quality: float64 = 0.75): GError + + /** Saves the image as a WebP (Web Picture) file to a byte array. By default it will save lossless. If [param lossy] is true, the image will be saved lossy, using the [param quality] setting between 0.0 and 1.0 (inclusive). Lossless WebP offers more efficient compression than PNG. + * + * **Note:** The WebP format is limited to a size of 16383×16383 pixels, while PNG can save larger images. + */ + save_webp_to_buffer(lossy: boolean = false, quality: float64 = 0.75): PackedByteArray + + /** Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. */ + detect_alpha(): Image.AlphaMode + + /** Returns `true` if all the image's pixels have an alpha value of 0. Returns `false` if any pixel has an alpha value higher than 0. */ + is_invisible(): boolean + + /** Returns the color channels used by this image, as one of the [enum UsedChannels] constants. If the image is compressed, the original [param source] must be specified. */ + detect_used_channels(source: Image.CompressSource = 0): Image.UsedChannels + + /** Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + * The [param source] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression. + * For ASTC compression, the [param astc_format] parameter must be supplied. + */ + compress(mode: Image.CompressMode, source: Image.CompressSource = 0, astc_format: Image.ASTCFormat = 0): GError + + /** Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. + * This is an alternative to [method compress] that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored. + * For ASTC compression, the [param astc_format] parameter must be supplied. + */ + compress_from_channels(mode: Image.CompressMode, channels: Image.UsedChannels, astc_format: Image.ASTCFormat = 0): GError + + /** Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE]. + * + * **Note:** The following formats can be decompressed: DXT, RGTC, BPTC. The formats ETC1 and ETC2 are not supported. + */ + decompress(): GError + + /** Returns `true` if the image is compressed. */ + is_compressed(): boolean + + /** Rotates the image in the specified [param direction] by `90` degrees. The width and height of the image must be greater than `1`. If the width and height are not equal, the image will be resized. */ + rotate_90(direction: ClockDirection): void + + /** Rotates the image by `180` degrees. The width and height of the image must be greater than `1`. */ + rotate_180(): void + + /** Blends low-alpha pixels with nearby pixels. */ + fix_alpha_edges(): void + + /** Multiplies color values with alpha values. Resulting color values for a pixel are `(color * alpha)/256`. See also [member CanvasItemMaterial.blend_mode]. */ + premultiply_alpha(): void + + /** Converts the raw data from the sRGB colorspace to a linear scale. */ + srgb_to_linear(): void + + /** Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count. */ + normal_map_to_xy(): void + + /** Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. */ + rgbe_to_srgb(): Image + + /** Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel. */ + bump_map_to_normal_map(bump_scale: float64 = 1): void + + /** Compute image metrics on the current image and the compared image. + * The dictionary contains `max`, `mean`, `mean_squared`, `root_mean_squared` and `peak_snr`. + */ + compute_image_metrics(compared_image: Image, use_luma: boolean): GDictionary + + /** Copies [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image **must** have the same format. [param src_rect] with non-positive size is treated as empty. */ + blit_rect(src: Image, src_rect: Rect2i, dst: Vector2i): void + + /** Blits [param src_rect] area from [param src] image to this image at the coordinates given by [param dst], clipped accordingly to both image bounds. [param src] pixel is copied onto [param dst] if the corresponding [param mask] pixel's alpha value is not 0. This image and [param src] image **must** have the same format. [param src] image and [param mask] image **must** have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty. */ + blit_rect_mask(src: Image, mask: Image, src_rect: Rect2i, dst: Vector2i): void + + /** Alpha-blends [param src_rect] from [param src] image to this image at coordinates [param dst], clipped accordingly to both image bounds. This image and [param src] image **must** have the same format. [param src_rect] with non-positive size is treated as empty. */ + blend_rect(src: Image, src_rect: Rect2i, dst: Vector2i): void + + /** Alpha-blends [param src_rect] from [param src] image to this image using [param mask] image at coordinates [param dst], clipped accordingly to both image bounds. Alpha channels are required for both [param src] and [param mask]. [param dst] pixels and [param src] pixels will blend if the corresponding mask pixel's alpha value is not 0. This image and [param src] image **must** have the same format. [param src] image and [param mask] image **must** have the same size (width and height) but they can have different formats. [param src_rect] with non-positive size is treated as empty. */ + blend_rect_mask(src: Image, mask: Image, src_rect: Rect2i, dst: Vector2i): void + + /** Fills the image with [param color]. */ + fill(color: Color): void + + /** Fills [param rect] with [param color]. */ + fill_rect(rect: Rect2i, color: Color): void + + /** Returns a [Rect2i] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. */ + get_used_rect(): Rect2i + + /** Returns a new [Image] that is a copy of this [Image]'s area specified with [param region]. */ + get_region(region: Rect2i): Image + + /** Copies [param src] image to this image. */ + copy_from(src: Image): void + + /** Returns the color of the pixel at [param point]. + * This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments. + */ + get_pixelv(point: Vector2i): Color + + /** Returns the color of the pixel at `(x, y)`. + * This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument. + */ + get_pixel(x: int64, y: int64): Color + + /** Sets the [Color] of the pixel at [param point] to [param color]. + * **Example:** + * + * This is the same as [method set_pixel], but with a [Vector2i] argument instead of two integer arguments. + */ + set_pixelv(point: Vector2i, color: Color): void + + /** Sets the [Color] of the pixel at `(x, y)` to [param color]. + * **Example:** + * + * This is the same as [method set_pixelv], but with a two integer arguments instead of a [Vector2i] argument. + */ + set_pixel(x: int64, y: int64, color: Color): void + + /** Adjusts this image's [param brightness], [param contrast], and [param saturation] by the given values. Does not work if the image is compressed (see [method is_compressed]). */ + adjust_bcs(brightness: float64, contrast: float64, saturation: float64): void + + /** Loads an image from the binary contents of a PNG file. */ + load_png_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the binary contents of a JPEG file. */ + load_jpg_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the binary contents of a WebP file. */ + load_webp_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the binary contents of a TGA file. + * + * **Note:** This method is only available in engine builds with the TGA module enabled. By default, the TGA module is enabled, but it can be disabled at build-time using the `module_tga_enabled=no` SCons option. + */ + load_tga_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the binary contents of a BMP file. + * + * **Note:** Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. + * + * **Note:** This method is only available in engine builds with the BMP module enabled. By default, the BMP module is enabled, but it can be disabled at build-time using the `module_bmp_enabled=no` SCons option. + */ + load_bmp_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the binary contents of a [url=https://github.com/KhronosGroup/KTX-Software]KTX[/url] file. Unlike most image formats, KTX can store VRAM-compressed data and embed mipmaps. + * + * **Note:** Godot's libktx implementation only supports 2D images. Cubemaps, texture arrays, and de-padding are not supported. + * + * **Note:** This method is only available in engine builds with the KTX module enabled. By default, the KTX module is enabled, but it can be disabled at build-time using the `module_ktx_enabled=no` SCons option. + */ + load_ktx_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Loads an image from the UTF-8 binary contents of an **uncompressed** SVG file (**.svg**). + * + * **Note:** Beware when using compressed SVG files (like **.svgz**), they need to be `decompressed` before loading. + * + * **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the `module_svg_enabled=no` SCons option. + */ + load_svg_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer, scale: float64 = 1): GError + + /** Loads an image from the string contents of an SVG file (**.svg**). + * + * **Note:** This method is only available in engine builds with the SVG module enabled. By default, the SVG module is enabled, but it can be disabled at build-time using the `module_svg_enabled=no` SCons option. + */ + load_svg_from_string(svg_str: string, scale: float64 = 1): GError + + /** Holds all the image's color data in a given format. See [enum Format] constants. */ + get data(): GDictionary + set data(value: GDictionary) + } + namespace ImageFormatLoader { + enum LoaderFlags { + FLAG_NONE = 0, + FLAG_FORCE_LINEAR = 1, + FLAG_CONVERT_COLORS = 2, + } + } + /** Base class to add support for specific image formats. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_imageformatloader.html + */ + class ImageFormatLoader extends RefCounted { + constructor(identifier?: any) + } + /** Base class for creating [ImageFormatLoader] extensions (adding support for extra image formats). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_imageformatloaderextension.html + */ + class ImageFormatLoaderExtension extends ImageFormatLoader { + constructor(identifier?: any) + /** Returns the list of file extensions for this image format. Files with the given extensions will be treated as image file and loaded using this class. */ + /* gdvirtual */ _get_recognized_extensions(): PackedStringArray + + /** Loads the content of [param fileaccess] into the provided [param image]. */ + /* gdvirtual */ _load_image(image: Image, fileaccess: FileAccess, flags: ImageFormatLoader.LoaderFlags, scale: float64): GError + + /** Add this format loader to the engine, allowing it to recognize the file extensions returned by [method _get_recognized_extensions]. */ + add_format_loader(): void + + /** Remove this format loader from the engine. */ + remove_format_loader(): void + } + /** A [Texture2D] based on an [Image]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_imagetexture.html + */ + class ImageTexture extends Texture2D { + constructor(identifier?: any) + /** Creates a new [ImageTexture] and initializes it by allocating and setting the data from an [Image]. */ + static create_from_image(image: Image): ImageTexture + + /** Returns the format of the texture, one of [enum Image.Format]. */ + get_format(): Image.Format + + /** Replaces the texture's data with a new [Image]. This will re-allocate new memory for the texture. + * If you want to update the image, but don't need to change its parameters (format, size), use [method update] instead for better performance. + */ + set_image(image: Image): void + + /** Replaces the texture's data with a new [Image]. + * + * **Note:** The texture has to be created using [method create_from_image] or initialized first with the [method set_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration. + * Use this method over [method set_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. + */ + update(image: Image): void + + /** Resizes the texture to the specified dimensions. */ + set_size_override(size: Vector2i): void + } + /** Texture with 3 dimensions. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_imagetexture3d.html + */ + class ImageTexture3D extends Texture3D { + constructor(identifier?: any) + /** Creates the [ImageTexture3D] with specified [param width], [param height], and [param depth]. See [enum Image.Format] for [param format] options. If [param use_mipmaps] is `true`, then generate mipmaps for the [ImageTexture3D]. */ + create(format: Image.Format, width: int64, height: int64, depth: int64, use_mipmaps: boolean, data: GArray): GError + + /** Replaces the texture's existing data with the layers specified in [param data]. The size of [param data] must match the parameters that were used for [method create]. In other words, the texture cannot be resized or have its format changed by calling [method update]. */ + update(data: GArray): void + get _images(): GArray + set _images(value: GArray) + } + /** Base class for texture types which contain the data of multiple [ImageTexture]s. Each image is of the same size and format. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_imagetexturelayered.html + */ + class ImageTextureLayered extends TextureLayered { + constructor(identifier?: any) + /** Creates an [ImageTextureLayered] from an array of [Image]s. See [method Image.create] for the expected data format. The first image decides the width, height, image format and mipmapping setting. The other images *must* have the same width, height, image format and mipmapping setting. + * Each [Image] represents one `layer`. + */ + create_from_images(images: GArray): GError + + /** Replaces the existing [Image] data at the given [param layer] with this new image. + * The given [Image] must have the same width, height, image format, and mipmapping flag as the rest of the referenced images. + * If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format]. + * The update is immediate: it's synchronized with drawing. + */ + update_layer(image: Image, layer: int64): void + get _images(): GArray + set _images(value: GArray) + } + /** Mesh optimized for creating geometry manually. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_immediatemesh.html + */ + class ImmediateMesh extends Mesh { + constructor(identifier?: any) + /** Begin a new surface. */ + surface_begin(primitive: Mesh.PrimitiveType, material: Material = undefined): void + + /** Set the color attribute that will be pushed with the next vertex. */ + surface_set_color(color: Color): void + + /** Set the normal attribute that will be pushed with the next vertex. */ + surface_set_normal(normal: Vector3): void + + /** Set the tangent attribute that will be pushed with the next vertex. */ + surface_set_tangent(tangent: Plane): void + + /** Set the UV attribute that will be pushed with the next vertex. */ + surface_set_uv(uv: Vector2): void + + /** Set the UV2 attribute that will be pushed with the next vertex. */ + surface_set_uv2(uv2: Vector2): void + + /** Add a 3D vertex using the current attributes previously set. */ + surface_add_vertex(vertex: Vector3): void + + /** Add a 2D vertex using the current attributes previously set. */ + surface_add_vertex_2d(vertex: Vector2): void + + /** End and commit current surface. Note that surface being created will not be visible until this function is called. */ + surface_end(): void + + /** Clear all surfaces. */ + clear_surfaces(): void + } + class ImportDefaultsEditor extends VBoxContainer { + constructor(identifier?: any) + } + class ImportDefaultsEditorSettings extends Object { + constructor(identifier?: any) + } + class ImportDock extends VBoxContainer { + constructor(identifier?: any) + _reimport(): void + } + class ImportDockParameters extends Object { + constructor(identifier?: any) + } + /** A [Resource] that contains vertex array-based geometry during the import process. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_importermesh.html + */ + class ImporterMesh extends Resource { + constructor(identifier?: any) + /** Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added. */ + add_blend_shape(name: string): void + + /** Returns the number of blend shapes that the mesh holds. */ + get_blend_shape_count(): int64 + + /** Returns the name of the blend shape at this index. */ + get_blend_shape_name(blend_shape_idx: int64): string + + /** Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. */ + set_blend_shape_mode(mode: Mesh.BlendShapeMode): void + + /** Returns the blend shape mode for this Mesh. */ + get_blend_shape_mode(): Mesh.BlendShapeMode + + /** Creates a new surface. [method Mesh.get_surface_count] will become the `surf_idx` for this new surface. + * Surfaces are created to be rendered using a [param primitive], which may be any of the values defined in [enum Mesh.PrimitiveType]. + * The [param arrays] argument is an array of arrays. Each of the [constant Mesh.ARRAY_MAX] elements contains an array with some of the mesh data for this surface as described by the corresponding member of [enum Mesh.ArrayType] or `null` if it is not used by the surface. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. + * The [param blend_shapes] argument is an array of vertex data for each blend shape. Each element is an array of the same structure as [param arrays], but [constant Mesh.ARRAY_VERTEX], [constant Mesh.ARRAY_NORMAL], and [constant Mesh.ARRAY_TANGENT] are set if and only if they are set in [param arrays] and all other entries are `null`. + * The [param lods] argument is a dictionary with [float] keys and [PackedInt32Array] values. Each entry in the dictionary represents an LOD level of the surface, where the value is the [constant Mesh.ARRAY_INDEX] array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. + * The [param flags] argument is the bitwise or of, as required: One value of [enum Mesh.ArrayCustomFormat] left shifted by `ARRAY_FORMAT_CUSTOMn_SHIFT` for each custom channel in use, [constant Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE], [constant Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS], or [constant Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY]. + * + * **Note:** When using indices, it is recommended to only use points, lines, or triangles. + */ + add_surface(primitive: Mesh.PrimitiveType, arrays: GArray, blend_shapes: GArray = [], lods: GDictionary = new GDictionary(), material: Material = undefined, name: string = '', flags: int64 = 0): void + + /** Returns the number of surfaces that the mesh holds. */ + get_surface_count(): int64 + + /** Returns the primitive type of the requested surface (see [method add_surface]). */ + get_surface_primitive_type(surface_idx: int64): Mesh.PrimitiveType + + /** Gets the name assigned to this surface. */ + get_surface_name(surface_idx: int64): string + + /** Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface. See [method add_surface]. */ + get_surface_arrays(surface_idx: int64): GArray + + /** Returns a single set of blend shape arrays for the requested blend shape index for a surface. */ + get_surface_blend_shape_arrays(surface_idx: int64, blend_shape_idx: int64): GArray + + /** Returns the number of lods that the mesh holds on a given surface. */ + get_surface_lod_count(surface_idx: int64): int64 + + /** Returns the screen ratio which activates a lod for a surface. */ + get_surface_lod_size(surface_idx: int64, lod_idx: int64): float64 + + /** Returns the index buffer of a lod for a surface. */ + get_surface_lod_indices(surface_idx: int64, lod_idx: int64): PackedInt32Array + + /** Returns a [Material] in a given surface. Surface is rendered using this material. */ + get_surface_material(surface_idx: int64): Material + + /** Returns the format of the surface that the mesh holds. */ + get_surface_format(surface_idx: int64): int64 + + /** Sets a name for a given surface. */ + set_surface_name(surface_idx: int64, name: string): void + + /** Sets a [Material] for a given surface. Surface will be rendered using this material. */ + set_surface_material(surface_idx: int64, material: Material): void + + /** Generates all lods for this ImporterMesh. + * [param normal_merge_angle] and [param normal_split_angle] are in degrees and used in the same way as the importer settings in `lods`. As a good default, use 25 and 60 respectively. + * The number of generated lods can be accessed using [method get_surface_lod_count], and each LOD is available in [method get_surface_lod_size] and [method get_surface_lod_indices]. + * [param bone_transform_array] is an [Array] which can be either empty or contain [Transform3D]s which, for each of the mesh's bone IDs, will apply mesh skinning when generating the LOD mesh variations. This is usually used to account for discrepancies in scale between the mesh itself and its skinning data. + */ + generate_lods(normal_merge_angle: float64, normal_split_angle: float64, bone_transform_array: GArray): void + + /** Returns the mesh data represented by this [ImporterMesh] as a usable [ArrayMesh]. + * This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called. + * If not yet cached and [param base_mesh] is provided, [param base_mesh] will be used and mutated. + */ + get_mesh(base_mesh: ArrayMesh = undefined): ArrayMesh + + /** Removes all surfaces and blend shapes from this [ImporterMesh]. */ + clear(): void + + /** Sets the size hint of this mesh for lightmap-unwrapping in UV-space. */ + set_lightmap_size_hint(size: Vector2i): void + + /** Returns the size hint of this mesh for lightmap-unwrapping in UV-space. */ + get_lightmap_size_hint(): Vector2i + get _data(): GDictionary + set _data(value: GDictionary) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_importermeshinstance3d.html */ + class ImporterMeshInstance3D extends Node3D { + constructor(identifier?: any) + get mesh(): ImporterMesh + set mesh(value: ImporterMesh) + get skin(): Skin + set skin(value: Skin) + get skeleton_path(): NodePath + set skeleton_path(value: NodePath | string) + get layer_mask(): int64 + set layer_mask(value: int64) + get cast_shadow(): int64 + set cast_shadow(value: int64) + get visibility_range_begin(): float64 + set visibility_range_begin(value: float64) + get visibility_range_begin_margin(): float64 + set visibility_range_begin_margin(value: float64) + get visibility_range_end(): float64 + set visibility_range_end(value: float64) + get visibility_range_end_margin(): float64 + set visibility_range_end_margin(value: float64) + get visibility_range_fade_mode(): int64 + set visibility_range_fade_mode(value: int64) + } + /** Abstract base class for input events. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputevent.html + */ + class InputEvent extends Resource { + /** Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input. */ + static readonly DEVICE_ID_EMULATION = -1 + constructor(identifier?: any) + + /** Returns `true` if this input event matches a pre-defined action of any type. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + is_action(action: StringName, exact_match: boolean = false): boolean + + /** Returns `true` if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [param allow_echo] is `true`). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + * + * **Note:** Due to keyboard ghosting, [method is_action_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + */ + is_action_pressed(action: StringName, allow_echo: boolean = false, exact_match: boolean = false): boolean + + /** Returns `true` if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + is_action_released(action: StringName, exact_match: boolean = false): boolean + + /** Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + get_action_strength(action: StringName, exact_match: boolean = false): float64 + + /** Returns `true` if this input event has been canceled. */ + is_canceled(): boolean + + /** Returns `true` if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + * + * **Note:** Due to keyboard ghosting, [method is_pressed] may return `false` even if one of the action's keys is pressed. See [url=https://docs.godotengine.org/en/4.3/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information. + */ + is_pressed(): boolean + + /** Returns `true` if this input event is released. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. */ + is_released(): boolean + + /** Returns `true` if this input event is an echo event (only for events of type [InputEventKey]). An echo event is a repeated key event sent when the user is holding down the key. Any other event type returns `false`. + * + * **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. + */ + is_echo(): boolean + + /** Returns a [String] representation of the event. */ + as_text(): string + + /** Returns `true` if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events. + * If [param exact_match] is `false`, it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. + */ + is_match(event: InputEvent, exact_match: boolean = true): boolean + + /** Returns `true` if this input event's type is one that can be assigned to an input action. */ + is_action_type(): boolean + + /** Returns `true` if the given input event and this input event can be added together (only for events of type [InputEventMouseMotion]). + * The given input event's position, global position and speed will be copied. The resulting `relative` is a sum of both events. Both events' modifiers have to be identical. + */ + accumulate(with_event: InputEvent): boolean + + /** Returns a copy of the given input event which has been offset by [param local_ofs] and transformed by [param xform]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. */ + xformed_by(xform: Transform2D, local_ofs: Vector2 = Vector2.ZERO): InputEvent + + /** The event's device ID. + * + * **Note:** [member device] can be negative for special use cases that don't refer to devices physically present on the system. See [constant DEVICE_ID_EMULATION]. + */ + get device(): int64 + set device(value: int64) + } + /** An input event type for actions. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventaction.html + */ + class InputEventAction extends InputEvent { + constructor(identifier?: any) + /** The action's name. Actions are accessed via this [String]. */ + get action(): StringName + set action(value: StringName) + + /** If `true`, the action's state is pressed. If `false`, the action's state is released. */ + get pressed(): boolean + set pressed(value: boolean) + + /** The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is `false`. The event strength allows faking analog joypad motion events, by specifying how strongly the joypad axis is bent or pressed. */ + get strength(): float64 + set strength(value: float64) + + /** The real event index in action this event corresponds to (from events defined for this action in the [InputMap]). If `-1`, a unique ID will be used and actions pressed with this ID will need to be released with another [InputEventAction]. */ + get event_index(): int64 + set event_index(value: int64) + } + class InputEventConfigurationDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + class InputEventEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Abstract base class for [Viewport]-based input events. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventfromwindow.html + */ + class InputEventFromWindow extends InputEvent { + constructor(identifier?: any) + /** The ID of a [Window] that received this event. */ + get window_id(): int64 + set window_id(value: int64) + } + /** Abstract base class for touch gestures. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventgesture.html + */ + class InputEventGesture extends InputEventWithModifiers { + constructor(identifier?: any) + /** The local gesture position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] that received this gesture. */ + get position(): Vector2 + set position(value: Vector2) + } + /** Represents a gamepad button being pressed or released. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventjoypadbutton.html + */ + class InputEventJoypadButton extends InputEvent { + constructor(identifier?: any) + /** Button identifier. One of the [enum JoyButton] button constants. */ + get button_index(): int64 + set button_index(value: int64) + get pressure(): float64 + set pressure(value: float64) + + /** If `true`, the button's state is pressed. If `false`, the button's state is released. */ + get pressed(): boolean + set pressed(value: boolean) + } + /** Represents axis motions (such as joystick or analog triggers) from a gamepad. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventjoypadmotion.html + */ + class InputEventJoypadMotion extends InputEvent { + constructor(identifier?: any) + /** Axis identifier. Use one of the [enum JoyAxis] axis constants. */ + get axis(): int64 + set axis(value: int64) + + /** 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. */ + get axis_value(): float64 + set axis_value(value: float64) + } + /** Represents a key on a keyboard being pressed or released. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventkey.html + */ + class InputEventKey extends InputEventWithModifiers { + constructor(identifier?: any) + /** Returns the Latin keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. + * To get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_keycode_string(event.get_keycode_with_modifiers())` where `event` is the [InputEventKey]. + */ + get_keycode_with_modifiers(): Key + + /** Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. + * To get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_keycode_string(event.get_physical_keycode_with_modifiers())` where `event` is the [InputEventKey]. + */ + get_physical_keycode_with_modifiers(): Key + + /** Returns the localized key label combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. + * To get a human-readable representation of the [InputEventKey] with modifiers, use `OS.get_keycode_string(event.get_key_label_with_modifiers())` where `event` is the [InputEventKey]. + */ + get_key_label_with_modifiers(): Key + + /** Returns a [String] representation of the event's [member keycode] and modifiers. */ + as_text_keycode(): string + + /** Returns a [String] representation of the event's [member physical_keycode] and modifiers. */ + as_text_physical_keycode(): string + + /** Returns a [String] representation of the event's [member key_label] and modifiers. */ + as_text_key_label(): string + + /** Returns a [String] representation of the event's [member location]. This will be a blank string if the event is not specific to a location. */ + as_text_location(): string + + /** If `true`, the key's state is pressed. If `false`, the key's state is released. */ + get pressed(): boolean + set pressed(value: boolean) + + /** Latin label printed on the key in the current keyboard layout, which corresponds to one of the [enum Key] constants. + * To get a human-readable representation of the [InputEventKey], use `OS.get_keycode_string(event.keycode)` where `event` is the [InputEventKey]. + * [codeblock lang=text] + * +-----+ +-----+ + * | Q | | Q | - "Q" - keycode + * | Й | | ض | - "Й" and "ض" - key_label + * +-----+ +-----+ + * [/codeblock] + */ + get keycode(): int64 + set keycode(value: int64) + + /** Represents the physical location of a key on the 101/102-key US QWERTY keyboard, which corresponds to one of the [enum Key] constants. + * To get a human-readable representation of the [InputEventKey], use [method OS.get_keycode_string] in combination with [method DisplayServer.keyboard_get_keycode_from_physical]: + * + */ + get physical_keycode(): int64 + set physical_keycode(value: int64) + + /** Represents the localized label printed on the key in the current keyboard layout, which corresponds to one of the [enum Key] constants or any valid Unicode character. + * For keyboard layouts with a single label on the key, it is equivalent to [member keycode]. + * To get a human-readable representation of the [InputEventKey], use `OS.get_keycode_string(event.key_label)` where `event` is the [InputEventKey]. + * [codeblock lang=text] + * +-----+ +-----+ + * | Q | | Q | - "Q" - keycode + * | Й | | ض | - "Й" and "ض" - key_label + * +-----+ +-----+ + * [/codeblock] + */ + get key_label(): int64 + set key_label(value: int64) + + /** The key Unicode character code (when relevant), shifted by modifier keys. Unicode character codes for composite characters and complex scripts may not be available unless IME input mode is active. See [method Window.set_ime_active] for more information. */ + get unicode(): int64 + set unicode(value: int64) + + /** Represents the location of a key which has both left and right versions, such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. */ + get location(): int64 + set location(value: int64) + + /** If `true`, the key was already pressed before this event. An echo event is a repeated key event sent when the user is holding down the key. + * + * **Note:** The rate at which echo events are sent is typically around 20 events per second (after holding down the key for roughly half a second). However, the key repeat delay/speed can be changed by the user or disabled entirely in the operating system settings. To ensure your project works correctly on all configurations, do not assume the user has a specific key repeat configuration in your project's behavior. + */ + get echo(): boolean + set echo(value: boolean) + } + /** Represents a MIDI message from a MIDI device, such as a musical keyboard. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventmidi.html + */ + class InputEventMIDI extends InputEvent { + constructor(identifier?: any) + /** The MIDI channel of this message, ranging from `0` to `15`. MIDI channel `9` is reserved for percussion instruments. */ + get channel(): int64 + set channel(value: int64) + + /** Represents the type of MIDI message (see the [enum MIDIMessage] enum). + * For more information, see the [url=https://www.midi.org/specifications-old/item/table-2-expanded-messages-list-status-bytes]MIDI message status byte list chart[/url]. + */ + get message(): int64 + set message(value: int64) + + /** The pitch index number of this MIDI message. This value ranges from `0` to `127`. + * On a piano, the **middle C** is `60`, followed by a **C-sharp** (`61`), then a **D** (`62`), and so on. Each octave is split in offsets of 12. See the "MIDI note number" column of the [url=https://en.wikipedia.org/wiki/Piano_key_frequencies]piano key frequency chart[/url] a full list. + */ + get pitch(): int64 + set pitch(value: int64) + + /** The velocity of the MIDI message. This value ranges from `0` to `127`. For a musical keyboard, this corresponds to how quickly the key was pressed, and is rarely above `110` in practice. + * + * **Note:** Some MIDI devices may send a [constant MIDI_MESSAGE_NOTE_ON] message with `0` velocity and expect it to be treated the same as a [constant MIDI_MESSAGE_NOTE_OFF] message. If necessary, this can be handled with a few lines of code: + * + */ + get velocity(): int64 + set velocity(value: int64) + + /** The instrument (also called *program* or *preset* ) used on this MIDI message. This value ranges from `0` to `127`. + * To see what each value means, refer to the [url=https://en.wikipedia.org/wiki/General_MIDI#Program_change_events]General MIDI's instrument list[/url]. Keep in mind that the list is off by 1 because it does not begin from 0. A value of `0` corresponds to the acoustic grand piano. + */ + get instrument(): int64 + set instrument(value: int64) + + /** The strength of the key being pressed. This value ranges from `0` to `127`. + * + * **Note:** For many devices, this value is always `0`. Other devices such as musical keyboards may simulate pressure by changing the [member velocity], instead. + */ + get pressure(): int64 + set pressure(value: int64) + + /** The unique number of the controller, if [member message] is [constant MIDI_MESSAGE_CONTROL_CHANGE], otherwise this is `0`. This value can be used to identify sliders for volume, balance, and panning, as well as switches and pedals on the MIDI device. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list. */ + get controller_number(): int64 + set controller_number(value: int64) + + /** The value applied to the controller. If [member message] is [constant MIDI_MESSAGE_CONTROL_CHANGE], this value ranges from `0` to `127`, otherwise it is `0`. See also [member controller_value]. */ + get controller_value(): int64 + set controller_value(value: int64) + } + /** Represents a magnifying touch gesture. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventmagnifygesture.html + */ + class InputEventMagnifyGesture extends InputEventGesture { + constructor(identifier?: any) + /** The amount (or delta) of the event. This value is closer to `1.0` the slower the gesture is performed. */ + get factor(): float64 + set factor(value: float64) + } + /** Base input event type for mouse events. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventmouse.html + */ + class InputEventMouse extends InputEventWithModifiers { + constructor(identifier?: any) + /** The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. */ + get button_mask(): int64 + set button_mask(value: int64) + + /** When received in [method Node._input] or [method Node._unhandled_input], returns the mouse's position in the [Viewport] this [Node] is in using the coordinate system of this [Viewport]. + * When received in [method Control._gui_input], returns the mouse's position in the [Control] using the local coordinate system of the [Control]. + */ + get position(): Vector2 + set position(value: Vector2) + + /** When received in [method Node._input] or [method Node._unhandled_input], returns the mouse's position in the root [Viewport] using the coordinate system of the root [Viewport]. + * When received in [method Control._gui_input], returns the mouse's position in the [CanvasLayer] that the [Control] is in using the coordinate system of the [CanvasLayer]. + */ + get global_position(): Vector2 + set global_position(value: Vector2) + } + /** Represents a mouse button being pressed or released. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventmousebutton.html + */ + class InputEventMouseButton extends InputEventMouse { + constructor(identifier?: any) + /** The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be `0` if not supported. */ + get factor(): float64 + set factor(value: float64) + + /** The mouse button identifier, one of the [enum MouseButton] button or button wheel constants. */ + get button_index(): int64 + set button_index(value: int64) + + /** If `true`, the mouse button event has been canceled. */ + get canceled(): boolean + set canceled(value: boolean) + + /** If `true`, the mouse button's state is pressed. If `false`, the mouse button's state is released. */ + get pressed(): boolean + set pressed(value: boolean) + + /** If `true`, the mouse button's state is a double-click. */ + get double_click(): boolean + set double_click(value: boolean) + } + /** Represents a mouse or a pen movement. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventmousemotion.html + */ + class InputEventMouseMotion extends InputEventMouse { + constructor(identifier?: any) + /** Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes. */ + get tilt(): Vector2 + set tilt(value: Vector2) + + /** Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`. */ + get pressure(): float64 + set pressure(value: float64) + + /** Returns `true` when using the eraser end of a stylus pen. + * + * **Note:** This property is implemented on Linux, macOS and Windows. + */ + get pen_inverted(): boolean + set pen_inverted(value: boolean) + + /** The mouse position relative to the previous position (position at the last frame). + * + * **Note:** Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse. + * + * **Note:** [member relative] is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using [member relative] in a script that handles mouse aiming with the [constant Input.MOUSE_MODE_CAPTURED] mouse mode. To avoid this, use [member screen_relative] instead. + */ + get relative(): Vector2 + set relative(value: Vector2) + + /** The unscaled mouse position relative to the previous position in the coordinate system of the screen (position at the last frame). + * + * **Note:** Since [InputEventMouseMotion] is only emitted when the mouse moves, the last event won't have a relative position of `Vector2(0, 0)` when the user stops moving the mouse. This coordinate is *not* scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member relative] for mouse aiming when using the [constant Input.MOUSE_MODE_CAPTURED] mouse mode, regardless of the project's stretch mode. + */ + get screen_relative(): Vector2 + set screen_relative(value: Vector2) + + /** The mouse velocity in pixels per second. + * + * **Note:** [member velocity] is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means mouse sensitivity will appear different depending on resolution when using [member velocity] in a script that handles mouse aiming with the [constant Input.MOUSE_MODE_CAPTURED] mouse mode. To avoid this, use [member screen_velocity] instead. + */ + get velocity(): Vector2 + set velocity(value: Vector2) + + /** The unscaled mouse velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member velocity] for mouse aiming when using the [constant Input.MOUSE_MODE_CAPTURED] mouse mode, regardless of the project's stretch mode. */ + get screen_velocity(): Vector2 + set screen_velocity(value: Vector2) + } + /** Represents a panning touch gesture. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventpangesture.html + */ + class InputEventPanGesture extends InputEventGesture { + constructor(identifier?: any) + /** Panning amount since last pan event. */ + get delta(): Vector2 + set delta(value: Vector2) + } + /** Represents a screen drag event. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventscreendrag.html + */ + class InputEventScreenDrag extends InputEventFromWindow { + constructor(identifier?: any) + /** The drag event index in the case of a multi-drag event. */ + get index(): int64 + set index(value: int64) + + /** Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from `-1.0` to `1.0` for both axes. */ + get tilt(): Vector2 + set tilt(value: Vector2) + + /** Represents the pressure the user puts on the pen. Ranges from `0.0` to `1.0`. */ + get pressure(): float64 + set pressure(value: float64) + + /** Returns `true` when using the eraser end of a stylus pen. */ + get pen_inverted(): boolean + set pen_inverted(value: boolean) + + /** The drag position in the viewport the node is in, using the coordinate system of this viewport. */ + get position(): Vector2 + set position(value: Vector2) + + /** The drag position relative to the previous position (position at the last frame). + * + * **Note:** [member relative] is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using [member relative] in a script that handles touch aiming. To avoid this, use [member screen_relative] instead. + */ + get relative(): Vector2 + set relative(value: Vector2) + + /** The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is *not* scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member relative] for touch aiming regardless of the project's stretch mode. */ + get screen_relative(): Vector2 + set screen_relative(value: Vector2) + + /** The drag velocity. + * + * **Note:** [member velocity] is automatically scaled according to the content scale factor, which is defined by the project's stretch mode settings. This means touch sensitivity will appear different depending on resolution when using [member velocity] in a script that handles touch aiming. To avoid this, use [member screen_velocity] instead. + */ + get velocity(): Vector2 + set velocity(value: Vector2) + + /** The unscaled drag velocity in pixels per second in screen coordinates. This velocity is *not* scaled according to the content scale factor or calls to [method InputEvent.xformed_by]. This should be preferred over [member velocity] for touch aiming regardless of the project's stretch mode. */ + get screen_velocity(): Vector2 + set screen_velocity(value: Vector2) + } + /** Represents a screen touch event. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventscreentouch.html + */ + class InputEventScreenTouch extends InputEventFromWindow { + constructor(identifier?: any) + /** The touch index in the case of a multi-touch event. One index = one finger. */ + get index(): int64 + set index(value: int64) + + /** The touch position in the viewport the node is in, using the coordinate system of this viewport. */ + get position(): Vector2 + set position(value: Vector2) + + /** If `true`, the touch event has been canceled. */ + get canceled(): boolean + set canceled(value: boolean) + + /** If `true`, the touch's state is pressed. If `false`, the touch's state is released. */ + get pressed(): boolean + set pressed(value: boolean) + + /** If `true`, the touch's state is a double tap. */ + get double_tap(): boolean + set double_tap(value: boolean) + } + /** Represents a triggered keyboard [Shortcut]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventshortcut.html + */ + class InputEventShortcut extends InputEvent { + constructor(identifier?: any) + /** The [Shortcut] represented by this event. Its [method Shortcut.matches_event] method will always return `true` for this event. */ + get shortcut(): Shortcut + set shortcut(value: Shortcut) + } + /** Abstract base class for input events affected by modifier keys like [kbd]Shift[/kbd] and [kbd]Alt[/kbd]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_inputeventwithmodifiers.html + */ + class InputEventWithModifiers extends InputEventFromWindow { + constructor(identifier?: any) + /** On macOS, returns `true` if [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) is pressed. + * On other platforms, returns `true` if [kbd]Ctrl[/kbd] is pressed. + */ + is_command_or_control_pressed(): boolean + + /** Returns the keycode combination of modifier keys. */ + get_modifiers_mask(): KeyModifierMask + + /** Automatically use [kbd]Meta[/kbd] ([kbd]Cmd[/kbd]) on macOS and [kbd]Ctrl[/kbd] on other platforms. If `true`, [member ctrl_pressed] and [member meta_pressed] cannot be set. */ + get command_or_control_autoremap(): boolean + set command_or_control_autoremap(value: boolean) + + /** State of the [kbd]Alt[/kbd] modifier. */ + get alt_pressed(): boolean + set alt_pressed(value: boolean) + + /** State of the [kbd]Shift[/kbd] modifier. */ + get shift_pressed(): boolean + set shift_pressed(value: boolean) + + /** State of the [kbd]Ctrl[/kbd] modifier. */ + get ctrl_pressed(): boolean + set ctrl_pressed(value: boolean) + + /** State of the [kbd]Meta[/kbd] modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key. */ + get meta_pressed(): boolean + set meta_pressed(value: boolean) + } + class InspectorDock extends VBoxContainer { + constructor(identifier?: any) + store_script_properties(_unnamed_arg0: Object): void + apply_script_properties(_unnamed_arg0: Object): void + readonly request_help: Signal0 + } + class InstallGodotJSPresetConfirmationDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + /** Placeholder for the root [Node] of a [PackedScene]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_instanceplaceholder.html + */ + class InstancePlaceholder extends Node { + constructor(identifier?: any) + /** Returns the list of properties that will be applied to the node when [method create_instance] is called. + * If [param with_order] is `true`, a key named `.order` (note the leading period) is added to the dictionary. This `.order` key is an [Array] of [String] property names specifying the order in which properties will be applied (with index 0 being the first). + */ + get_stored_values(with_order: boolean = false): GDictionary + + /** Call this method to actually load in the node. The created node will be placed as a sibling *above* the [InstancePlaceholder] in the scene tree. The [Node]'s reference is also returned for convenience. + * + * **Note:** [method create_instance] is not thread-safe. Use [method Object.call_deferred] if calling from a thread. + */ + create_instance(replace: boolean = false, custom_scene: PackedScene = undefined): Node + + /** Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. Not thread-safe. Use [method Object.call_deferred] if calling from a thread. */ + get_instance_path(): string + } + /** Creates an idle interval in a [Tween] animation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_intervaltweener.html + */ + class IntervalTweener extends Tweener { + constructor(identifier?: any) + } + namespace ItemList { + enum IconMode { + /** Icon is drawn above the text. */ + ICON_MODE_TOP = 0, + + /** Icon is drawn to the left of the text. */ + ICON_MODE_LEFT = 1, + } + enum SelectMode { + /** Only allow selecting a single item. */ + SELECT_SINGLE = 0, + + /** Allows selecting multiple items by holding [kbd]Ctrl[/kbd] or [kbd]Shift[/kbd]. */ + SELECT_MULTI = 1, + } + } + /** A vertical list of selectable items with one or multiple columns. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_itemlist.html + */ + class ItemList extends Control { + constructor(identifier?: any) + /** Adds an item to the item list with specified text. Returns the index of an added item. + * Specify an [param icon], or use `null` as the [param icon] for a list item with no icon. + * If selectable is `true`, the list item will be selectable. + */ + add_item(text: string, icon: Texture2D = undefined, selectable: boolean = true): int64 + + /** Adds an item to the item list with no text, only an icon. Returns the index of an added item. */ + add_icon_item(icon: Texture2D, selectable: boolean = true): int64 + + /** Sets text of the item associated with the specified index. */ + set_item_text(idx: int64, text: string): void + + /** Returns the text associated with the specified index. */ + get_item_text(idx: int64): string + + /** Sets (or replaces) the icon's [Texture2D] associated with the specified index. */ + set_item_icon(idx: int64, icon: Texture2D): void + + /** Returns the icon associated with the specified index. */ + get_item_icon(idx: int64): Texture2D + + /** Sets item's text base writing direction. */ + set_item_text_direction(idx: int64, direction: Control.TextDirection): void + + /** Returns item's text base writing direction. */ + get_item_text_direction(idx: int64): Control.TextDirection + + /** Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + set_item_language(idx: int64, language: string): void + + /** Returns item's text language code. */ + get_item_language(idx: int64): string + + /** Sets whether the item icon will be drawn transposed. */ + set_item_icon_transposed(idx: int64, transposed: boolean): void + + /** Returns `true` if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. */ + is_item_icon_transposed(idx: int64): boolean + + /** Sets the region of item's icon used. The whole icon will be used if the region has no area. */ + set_item_icon_region(idx: int64, rect: Rect2): void + + /** Returns the region of item's icon used. The whole icon will be used if the region has no area. */ + get_item_icon_region(idx: int64): Rect2 + + /** Sets a modulating [Color] of the item associated with the specified index. */ + set_item_icon_modulate(idx: int64, modulate: Color): void + + /** Returns a [Color] modulating item's icon at the specified index. */ + get_item_icon_modulate(idx: int64): Color + + /** Allows or disallows selection of the item associated with the specified index. */ + set_item_selectable(idx: int64, selectable: boolean): void + + /** Returns `true` if the item at the specified index is selectable. */ + is_item_selectable(idx: int64): boolean + + /** Disables (or enables) the item at the specified index. + * Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]). + */ + set_item_disabled(idx: int64, disabled: boolean): void + + /** Returns `true` if the item at the specified index is disabled. */ + is_item_disabled(idx: int64): boolean + + /** Sets a value (of any type) to be stored with the item associated with the specified index. */ + set_item_metadata(idx: int64, metadata: any): void + + /** Returns the metadata value of the specified index. */ + get_item_metadata(idx: int64): any + + /** Sets the background color of the item specified by [param idx] index to the specified [Color]. */ + set_item_custom_bg_color(idx: int64, custom_bg_color: Color): void + + /** Returns the custom background color of the item specified by [param idx] index. */ + get_item_custom_bg_color(idx: int64): Color + + /** Sets the foreground color of the item specified by [param idx] index to the specified [Color]. */ + set_item_custom_fg_color(idx: int64, custom_fg_color: Color): void + + /** Returns the custom foreground color of the item specified by [param idx] index. */ + get_item_custom_fg_color(idx: int64): Color + + /** Returns the position and size of the item with the specified index, in the coordinate system of the [ItemList] node. If [param expand] is `true` the last column expands to fill the rest of the row. + * + * **Note:** The returned value is unreliable if called right after modifying the [ItemList], before it redraws in the next frame. + */ + get_item_rect(idx: int64, expand: boolean = true): Rect2 + + /** Sets whether the tooltip hint is enabled for specified item index. */ + set_item_tooltip_enabled(idx: int64, enable: boolean): void + + /** Returns `true` if the tooltip is enabled for specified item index. */ + is_item_tooltip_enabled(idx: int64): boolean + + /** Sets the tooltip hint for the item associated with the specified index. */ + set_item_tooltip(idx: int64, tooltip: string): void + + /** Returns the tooltip hint associated with the specified index. */ + get_item_tooltip(idx: int64): string + + /** Select the item at the specified index. + * + * **Note:** This method does not trigger the item selection signal. + */ + select(idx: int64, single: boolean = true): void + + /** Ensures the item associated with the specified index is not selected. */ + deselect(idx: int64): void + + /** Ensures there are no items selected. */ + deselect_all(): void + + /** Returns `true` if the item at the specified index is currently selected. */ + is_selected(idx: int64): boolean + + /** Returns an array with the indexes of the selected items. */ + get_selected_items(): PackedInt32Array + + /** Moves item from index [param from_idx] to [param to_idx]. */ + move_item(from_idx: int64, to_idx: int64): void + + /** Removes the item specified by [param idx] index from the list. */ + remove_item(idx: int64): void + + /** Removes all items from the list. */ + clear(): void + + /** Sorts items in the list by their text. */ + sort_items_by_text(): void + + /** Returns `true` if one or more items are selected. */ + is_anything_selected(): boolean + + /** Returns the item index at the given [param position]. + * When there is no item at that point, -1 will be returned if [param exact] is `true`, and the closest item index will be returned otherwise. + * + * **Note:** The returned value is unreliable if called right after modifying the [ItemList], before it redraws in the next frame. + */ + get_item_at_position(position: Vector2, exact: boolean = false): int64 + + /** Ensure current selection is visible, adjusting the scroll position as necessary. */ + ensure_current_is_visible(): void + + /** Returns the vertical scrollbar. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_v_scroll_bar(): VScrollBar + + /** Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like [member auto_height], change. The method can be used to trigger the update ahead of next drawing pass. */ + force_update_list_size(): void + + /** Allows single or multiple item selection. See the [enum SelectMode] constants. */ + get select_mode(): int64 + set select_mode(value: int64) + + /** If `true`, the currently selected item can be selected again. */ + get allow_reselect(): boolean + set allow_reselect(value: boolean) + + /** If `true`, right mouse button click can select items. */ + get allow_rmb_select(): boolean + set allow_rmb_select(value: boolean) + + /** If `true`, allows navigating the [ItemList] with letter keys through incremental search. */ + get allow_search(): boolean + set allow_search(value: boolean) + + /** Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. + * + * **Note:** This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero. + */ + get max_text_lines(): int64 + set max_text_lines(value: int64) + + /** If `true`, the control will automatically resize the height to fit its content. */ + get auto_height(): boolean + set auto_height(value: boolean) + + /** Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes. */ + get text_overrun_behavior(): int64 + set text_overrun_behavior(value: int64) + + /** The number of items currently in the list. */ + get item_count(): any /*Items,item_*/ + set item_count(value: any /*Items,item_*/) + + /** Maximum columns the list will have. + * If greater than zero, the content will be split among the specified columns. + * A value of zero means unlimited columns, i.e. all items will be put in the same row. + */ + get max_columns(): int64 + set max_columns(value: int64) + + /** Whether all columns will have the same width. + * If `true`, the width is equal to the largest column width of all columns. + */ + get same_column_width(): boolean + set same_column_width(value: boolean) + + /** The width all columns will be adjusted to. + * A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. + */ + get fixed_column_width(): int64 + set fixed_column_width(value: int64) + + /** The icon position, whether above or to the left of the text. See the [enum IconMode] constants. */ + get icon_mode(): int64 + set icon_mode(value: int64) + + /** The scale of icon applied after [member fixed_icon_size] and transposing takes effect. */ + get icon_scale(): float64 + set icon_scale(value: float64) + + /** The size all icons will be adjusted to. + * If either X or Y component is not greater than zero, icon size won't be affected. + */ + get fixed_icon_size(): Vector2i + set fixed_icon_size(value: Vector2i) + + /** Triggered when specified item has been selected. + * [member allow_reselect] must be enabled to reselect an item. + */ + readonly item_selected: Signal1 + + /** Triggered when any mouse click is issued within the rect of the list but on empty space. */ + readonly empty_clicked: Signal2 + + /** Triggered when specified list item has been clicked with any mouse button. + * The click position is also provided to allow appropriate popup of context menus at the correct location. + */ + readonly item_clicked: Signal3 + + /** Triggered when a multiple selection is altered on a list allowing multiple selection. */ + readonly multi_selected: Signal2 + + /** Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd]. */ + readonly item_activated: Signal1 + } + /** Singleton that connects the engine with Android plugins to interface with native Android code. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_jnisingleton.html + */ + class JNISingleton extends Object { + constructor(identifier?: any) + } + /** Helper class for creating and parsing JSON data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_json.html + */ + class JSON extends Resource { + constructor(identifier?: any) + /** Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. + * + * **Note:** The JSON specification does not define integer or float types, but only a *number* type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. + * + * **Note:** If [param full_precision] is `true`, when stringifying floats, the unreliable digits are stringified in addition to the reliable digits to guarantee exact decoding. + * The [param indent] parameter controls if and how something is indented; its contents will be used where there should be an indent in the output. Even spaces like `" "` will work. `\t` and `\n` can also be used for a tab indent, or to make a newline for each indent respectively. + * **Example output:** + * + */ + static stringify(data: any, indent: string = '', sort_keys: boolean = true, full_precision: boolean = false): string + + /** Attempts to parse the [param json_string] provided and returns the parsed data. Returns `null` if parse failed. */ + static parse_string(json_string: string): any + + /** Attempts to parse the [param json_text] provided. + * Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] to identify the source of the failure. + * Non-static variant of [method parse_string], if you want custom error handling. + * The optional [param keep_text] argument instructs the parser to keep a copy of the original text. This text can be obtained later by using the [method get_parsed_text] function and is used when saving the resource (instead of generating new text from [member data]). + */ + parse(json_text: string, keep_text: boolean = false): GError + + /** Return the text parsed by [method parse] (requires passing `keep_text` to [method parse]). */ + get_parsed_text(): string + + /** Returns `0` if the last call to [method parse] was successful, or the line number where the parse failed. */ + get_error_line(): int64 + + /** Returns an empty string if the last call to [method parse] was successful, or the error message if it failed. */ + get_error_message(): string + + /** Contains the parsed JSON data in [Variant] form. */ + get data(): any + set data(value: any) + } + namespace JSONRPC { + enum ErrorCode { + /** The request could not be parsed as it was not valid by JSON standard ([method JSON.parse] failed). */ + PARSE_ERROR = -32700, + + /** A method call was requested but the request's format is not valid. */ + INVALID_REQUEST = -32600, + + /** A method call was requested but no function of that name existed in the JSONRPC subclass. */ + METHOD_NOT_FOUND = -32601, + + /** A method call was requested but the given method parameters are not valid. Not used by the built-in JSONRPC. */ + INVALID_PARAMS = -32602, + + /** An internal error occurred while processing the request. Not used by the built-in JSONRPC. */ + INTERNAL_ERROR = -32603, + } + } + /** A helper to handle dictionaries which look like JSONRPC documents. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_jsonrpc.html + */ + class JSONRPC extends Object { + constructor(identifier?: any) + set_scope(scope: string, target: Object): void + + /** Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. + * To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass. + * [param action]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. + */ + process_action(action: any, recurse: boolean = false): any + process_string(action: string): string + + /** Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. + * - [param method]: Name of the method being called. + * - [param params]: An array or dictionary of parameters being passed to the method. + * - [param id]: Uniquely identifies this request. The server is expected to send a response with the same ID. + */ + make_request(method: string, params: any, id: any): GDictionary + + /** When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. + * - [param result]: The return value of the function which was called. + * - [param id]: The ID of the request this response is targeted to. + */ + make_response(result: any, id: any): GDictionary + + /** Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. + * - [param method]: Name of the method being called. + * - [param params]: An array or dictionary of parameters being passed to the method. + */ + make_notification(method: string, params: any): GDictionary + + /** Creates a response which indicates a previous reply has failed in some way. + * - [param code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants. + * - [param message]: A custom message about this error. + * - [param id]: The request this error is a response to. + */ + make_response_error(code: int64, message: string, id: any = {}): GDictionary + } + /** Represents an object from the Java Native Interface. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_javaclass.html + */ + class JavaClass extends RefCounted { + constructor(identifier?: any) + } + /** A wrapper class for web native JavaScript objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_javascriptobject.html + */ + class JavaScriptObject extends RefCounted { + constructor(identifier?: any) + } + /** Abstract base class for all 2D physics joints. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_joint2d.html + */ + class Joint2D extends Node2D { + constructor(identifier?: any) + /** Returns the joint's internal [RID] from the [PhysicsServer2D]. */ + get_rid(): RID + + /** Path to the first body (A) attached to the joint. The node must inherit [PhysicsBody2D]. */ + get node_a(): NodePath + set node_a(value: NodePath | string) + + /** Path to the second body (B) attached to the joint. The node must inherit [PhysicsBody2D]. */ + get node_b(): NodePath + set node_b(value: NodePath | string) + + /** When [member node_a] and [member node_b] move in different directions the [member bias] controls how fast the joint pulls them back to their original position. The lower the [member bias] the more the two bodies can pull on the joint. + * When set to `0`, the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used. + */ + get bias(): float64 + set bias(value: float64) + + /** If `true`, the two bodies bound together do not collide with each other. */ + get disable_collision(): boolean + set disable_collision(value: boolean) + } + /** Abstract base class for all 3D physics joints. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_joint3d.html + */ + class Joint3D extends Node3D { + constructor(identifier?: any) + /** Returns the joint's internal [RID] from the [PhysicsServer3D]. */ + get_rid(): RID + + /** Path to the first node (A) attached to the joint. The node must inherit [PhysicsBody3D]. + * If left empty and [member node_b] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. + */ + get node_a(): NodePath + set node_a(value: NodePath | string) + + /** Path to the second node (B) attached to the joint. The node must inherit [PhysicsBody3D]. + * If left empty and [member node_a] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. + */ + get node_b(): NodePath + set node_b(value: NodePath | string) + + /** The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. */ + get solver_priority(): int64 + set solver_priority(value: int64) + + /** If `true`, the two bodies bound together do not collide with each other. */ + get exclude_nodes_from_collision(): boolean + set exclude_nodes_from_collision(value: boolean) + } + class Joint3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Holds collision data from the movement of a [PhysicsBody2D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_kinematiccollision2d.html + */ + class KinematicCollision2D extends RefCounted { + constructor(identifier?: any) + /** Returns the point of collision in global coordinates. */ + get_position(): Vector2 + + /** Returns the colliding body's shape's normal at the point of collision. */ + get_normal(): Vector2 + + /** Returns the moving object's travel before collision. */ + get_travel(): Vector2 + + /** Returns the moving object's remaining movement vector. */ + get_remainder(): Vector2 + + /** Returns the collision angle according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive. */ + get_angle(up_direction: Vector2 = new Vector2(0, -1)): float64 + + /** Returns the colliding body's length of overlap along the collision normal. */ + get_depth(): float64 + + /** Returns the moving object's colliding shape. */ + get_local_shape(): Object + + /** Returns the colliding body's attached [Object]. */ + get_collider(): Object + + /** Returns the unique instance ID of the colliding body's attached [Object]. See [method Object.get_instance_id]. */ + get_collider_id(): int64 + + /** Returns the colliding body's [RID] used by the [PhysicsServer2D]. */ + get_collider_rid(): RID + + /** Returns the colliding body's shape. */ + get_collider_shape(): Object + + /** Returns the colliding body's shape index. See [CollisionObject2D]. */ + get_collider_shape_index(): int64 + + /** Returns the colliding body's velocity. */ + get_collider_velocity(): Vector2 + } + /** Holds collision data from the movement of a [PhysicsBody3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_kinematiccollision3d.html + */ + class KinematicCollision3D extends RefCounted { + constructor(identifier?: any) + /** Returns the moving object's travel before collision. */ + get_travel(): Vector3 + + /** Returns the moving object's remaining movement vector. */ + get_remainder(): Vector3 + + /** Returns the colliding body's length of overlap along the collision normal. */ + get_depth(): float64 + + /** Returns the number of detected collisions. */ + get_collision_count(): int64 + + /** Returns the point of collision in global coordinates given a collision index (the deepest collision by default). */ + get_position(collision_index: int64 = 0): Vector3 + + /** Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default). */ + get_normal(collision_index: int64 = 0): Vector3 + + /** Returns the collision angle according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive. */ + get_angle(collision_index: int64 = 0, up_direction: Vector3 = Vector3.ZERO): float64 + + /** Returns the moving object's colliding shape given a collision index (the deepest collision by default). */ + get_local_shape(collision_index: int64 = 0): Object + + /** Returns the colliding body's attached [Object] given a collision index (the deepest collision by default). */ + get_collider(collision_index: int64 = 0): Object + + /** Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default). See [method Object.get_instance_id]. */ + get_collider_id(collision_index: int64 = 0): int64 + + /** Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default). */ + get_collider_rid(collision_index: int64 = 0): RID + + /** Returns the colliding body's shape given a collision index (the deepest collision by default). */ + get_collider_shape(collision_index: int64 = 0): Object + + /** Returns the colliding body's shape index given a collision index (the deepest collision by default). See [CollisionObject3D]. */ + get_collider_shape_index(collision_index: int64 = 0): int64 + + /** Returns the colliding body's velocity given a collision index (the deepest collision by default). */ + get_collider_velocity(collision_index: int64 = 0): Vector3 + } + /** A control for displaying plain text. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_label.html + */ + class Label extends Control { + constructor(identifier?: any) + /** Returns the height of the line [param line]. + * If [param line] is set to `-1`, returns the biggest line height. + * If there are no lines, returns font size in pixels. + */ + get_line_height(line: int64 = -1): int64 + + /** Returns the number of lines of text the Label has. */ + get_line_count(): int64 + + /** Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines. */ + get_visible_line_count(): int64 + + /** Returns the total number of printable characters in the text (excluding spaces and newlines). */ + get_total_character_count(): int64 + + /** Returns the bounding rectangle of the character at position [param pos]. If the character is a non-visual character or [param pos] is outside the valid range, an empty [Rect2] is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned. */ + get_character_bounds(pos: int64): Rect2 + + /** The text to display on screen. */ + get text(): string + set text(value: string) + + /** A [LabelSettings] resource that can be shared between multiple [Label] nodes. Takes priority over theme properties. */ + get label_settings(): LabelSettings + set label_settings(value: LabelSettings) + + /** Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. */ + get horizontal_alignment(): int64 + set horizontal_alignment(value: int64) + + /** Controls the text's vertical alignment. Supports top, center, bottom, and fill. Set it to one of the [enum VerticalAlignment] constants. */ + get vertical_alignment(): int64 + set vertical_alignment(value: int64) + + /** If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode]. */ + get autowrap_mode(): int64 + set autowrap_mode(value: int64) + + /** Line fill alignment rules. For more info see [enum TextServer.JustificationFlag]. */ + get justification_flags(): int64 + set justification_flags(value: int64) + + /** If `true`, the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. */ + get clip_text(): boolean + set clip_text(value: boolean) + + /** Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes. */ + get text_overrun_behavior(): int64 + set text_overrun_behavior(value: int64) + + /** Ellipsis character used for text clipping. */ + get ellipsis_char(): string + set ellipsis_char(value: string) + + /** If `true`, all the text displays as UPPERCASE. */ + get uppercase(): boolean + set uppercase(value: boolean) + + /** Aligns text to the given tab-stops. */ + get tab_stops(): PackedFloat32Array + set tab_stops(value: PackedFloat32Array | float32[]) + + /** The number of the lines ignored and not displayed from the start of the [member text] value. */ + get lines_skipped(): int64 + set lines_skipped(value: int64) + + /** Limits the lines of text the node shows on screen. */ + get max_lines_visible(): int64 + set max_lines_visible(value: int64) + + /** The number of characters to display. If set to `-1`, all characters are displayed. This can be useful when animating the text appearing in a dialog box. + * + * **Note:** Setting this property updates [member visible_ratio] accordingly. + */ + get visible_characters(): int64 + set visible_characters(value: int64) + + /** Sets the clipping behavior when [member visible_characters] or [member visible_ratio] is set. See [enum TextServer.VisibleCharactersBehavior] for more info. */ + get visible_characters_behavior(): int64 + set visible_characters_behavior(value: int64) + + /** The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to `1.0`, all characters are displayed. If set to `0.5`, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + * + * **Note:** Setting this property updates [member visible_characters] accordingly. + */ + get visible_ratio(): float64 + set visible_ratio(value: float64) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + + /** Set BiDi algorithm override for the structured text. */ + get structured_text_bidi_override(): int64 + set structured_text_bidi_override(value: int64) + + /** Set additional options for BiDi override. */ + get structured_text_bidi_override_options(): GArray + set structured_text_bidi_override_options(value: GArray) + } + namespace Label3D { + enum DrawFlags { + /** If set, lights in the environment affect the label. */ + FLAG_SHADED = 0, + + /** If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind. */ + FLAG_DOUBLE_SIDED = 1, + + /** Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it. */ + FLAG_DISABLE_DEPTH_TEST = 2, + + /** Label is scaled by depth so that it always appears the same size on screen. */ + FLAG_FIXED_SIZE = 3, + + /** Represents the size of the [enum DrawFlags] enum. */ + FLAG_MAX = 4, + } + enum AlphaCutMode { + /** This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. [member GeometryInstance3D.cast_shadow] has no effect when this transparency mode is used; the [Label3D] will never cast shadows. */ + ALPHA_CUT_DISABLED = 0, + + /** This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). This mode is also known as *alpha testing* or *1-bit transparency* . + * + * **Note:** This mode might have issues with anti-aliased fonts and outlines, try adjusting [member alpha_scissor_threshold] or using MSDF font. + * + * **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + */ + ALPHA_CUT_DISCARD = 1, + + /** This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting. + * + * **Note:** When using text with overlapping glyphs (e.g., cursive scripts), this mode might have transparency sorting issues between the main text and the outline. + */ + ALPHA_CUT_OPAQUE_PREPASS = 2, + + /** This mode draws cuts off all values below a spatially-deterministic threshold, the rest will remain opaque. */ + ALPHA_CUT_HASH = 3, + } + } + /** A node for displaying plain text in 3D space. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_label3d.html + */ + class Label3D extends GeometryInstance3D { + constructor(identifier?: any) + /** If `true`, the specified flag will be enabled. See [enum Label3D.DrawFlags] for a list of flags. */ + set_draw_flag(flag: Label3D.DrawFlags, enabled: boolean): void + + /** Returns the value of the specified flag. */ + get_draw_flag(flag: Label3D.DrawFlags): boolean + + /** Returns a [TriangleMesh] with the label's vertices following its current configuration (such as its [member pixel_size]). */ + generate_triangle_mesh(): TriangleMesh + + /** The size of one pixel's width on the label to scale it in 3D. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time. */ + get pixel_size(): float64 + set pixel_size(value: float64) + + /** The text drawing offset (in pixels). */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The billboard mode to use for the label. See [enum BaseMaterial3D.BillboardMode] for possible values. */ + get billboard(): int64 + set billboard(value: int64) + + /** If `true`, the [Light3D] in the [Environment] has effects on the label. */ + get shaded(): boolean + set shaded(value: boolean) + + /** If `true`, text can be seen from the back as well, if `false`, it is invisible when looking at it from behind. */ + get double_sided(): boolean + set double_sided(value: boolean) + + /** If `true`, depth testing is disabled and the object will be drawn in render order. */ + get no_depth_test(): boolean + set no_depth_test(value: boolean) + + /** If `true`, the label is rendered at the same size regardless of distance. */ + get fixed_size(): boolean + set fixed_size(value: boolean) + + /** The alpha cutting mode to use for the sprite. See [enum AlphaCutMode] for possible values. */ + get alpha_cut(): int64 + set alpha_cut(value: int64) + + /** Threshold at which the alpha scissor will discard values. */ + get alpha_scissor_threshold(): float64 + set alpha_scissor_threshold(value: float64) + + /** The hashing scale for Alpha Hash. Recommended values between `0` and `2`. */ + get alpha_hash_scale(): float64 + set alpha_hash_scale(value: float64) + + /** The type of alpha antialiasing to apply. See [enum BaseMaterial3D.AlphaAntiAliasing]. */ + get alpha_antialiasing_mode(): int64 + set alpha_antialiasing_mode(value: int64) + + /** Threshold at which antialiasing will be applied on the alpha channel. */ + get alpha_antialiasing_edge(): float64 + set alpha_antialiasing_edge(value: float64) + + /** Filter flags for the texture. See [enum BaseMaterial3D.TextureFilter] for options. */ + get texture_filter(): int64 + set texture_filter(value: int64) + + /** Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects. + * + * **Note:** This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + * + * **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + */ + get render_priority(): int64 + set render_priority(value: int64) + + /** Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects. + * + * **Note:** This only applies if [member alpha_cut] is set to [constant ALPHA_CUT_DISABLED] (default value). + * + * **Note:** This only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). + */ + get outline_render_priority(): int64 + set outline_render_priority(value: int64) + + /** Text [Color] of the [Label3D]. */ + get modulate(): Color + set modulate(value: Color) + + /** The tint of text outline. */ + get outline_modulate(): Color + set outline_modulate(value: Color) + + /** The text to display on screen. */ + get text(): string + set text(value: string) + + /** Font configuration used to display text. */ + get font(): Font + set font(value: Font) + + /** Font size of the [Label3D]'s text. To make the font look more detailed when up close, increase [member font_size] while decreasing [member pixel_size] at the same time. + * Higher font sizes require more time to render new characters, which can cause stuttering during gameplay. + */ + get font_size(): int64 + set font_size(value: int64) + + /** Text outline size. */ + get outline_size(): int64 + set outline_size(value: int64) + + /** Controls the text's horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the [enum HorizontalAlignment] constants. */ + get horizontal_alignment(): int64 + set horizontal_alignment(value: int64) + + /** Controls the text's vertical alignment. Supports top, center, bottom. Set it to one of the [enum VerticalAlignment] constants. */ + get vertical_alignment(): int64 + set vertical_alignment(value: int64) + + /** If `true`, all the text displays as UPPERCASE. */ + get uppercase(): boolean + set uppercase(value: boolean) + + /** Vertical space between lines in multiline [Label3D]. */ + get line_spacing(): float64 + set line_spacing(value: float64) + + /** If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum TextServer.AutowrapMode]. */ + get autowrap_mode(): int64 + set autowrap_mode(value: int64) + + /** Line fill alignment rules. For more info see [enum TextServer.JustificationFlag]. */ + get justification_flags(): int64 + set justification_flags(value: int64) + + /** Text width (in pixels), used for autowrap and fill alignment. */ + get width(): float64 + set width(value: float64) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + + /** Set BiDi algorithm override for the structured text. */ + get structured_text_bidi_override(): int64 + set structured_text_bidi_override(value: int64) + + /** Set additional options for BiDi override. */ + get structured_text_bidi_override_options(): GArray + set structured_text_bidi_override_options(value: GArray) + } + class Label3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Provides common settings to customize the text in a [Label]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_labelsettings.html + */ + class LabelSettings extends Resource { + constructor(identifier?: any) + /** Vertical space between lines when the text is multiline. */ + get line_spacing(): float64 + set line_spacing(value: float64) + + /** [Font] used for the text. */ + get font(): Font + set font(value: Font) + + /** Size of the text. */ + get font_size(): int64 + set font_size(value: int64) + + /** Color of the text. */ + get font_color(): Color + set font_color(value: Color) + + /** Text outline size. */ + get outline_size(): int64 + set outline_size(value: int64) + + /** The color of the outline. */ + get outline_color(): Color + set outline_color(value: Color) + + /** Size of the shadow effect. */ + get shadow_size(): int64 + set shadow_size(value: int64) + + /** Color of the shadow effect. If alpha is `0`, no shadow will be drawn. */ + get shadow_color(): Color + set shadow_color(value: Color) + + /** Offset of the shadow effect, in pixels. */ + get shadow_offset(): Vector2 + set shadow_offset(value: Vector2) + } + namespace Light2D { + enum ShadowFilter { + /** No filter applies to the shadow map. This provides hard shadow edges and is the fastest to render. See [member shadow_filter]. */ + SHADOW_FILTER_NONE = 0, + + /** Percentage closer filtering (5 samples) applies to the shadow map. This is slower compared to hard shadow rendering. See [member shadow_filter]. */ + SHADOW_FILTER_PCF5 = 1, + + /** Percentage closer filtering (13 samples) applies to the shadow map. This is the slowest shadow filtering mode, and should be used sparingly. See [member shadow_filter]. */ + SHADOW_FILTER_PCF13 = 2, + } + enum BlendMode { + /** Adds the value of pixels corresponding to the Light2D to the values of pixels under it. This is the common behavior of a light. */ + BLEND_MODE_ADD = 0, + + /** Subtracts the value of pixels corresponding to the Light2D to the values of pixels under it, resulting in inversed light effect. */ + BLEND_MODE_SUB = 1, + + /** Mix the value of pixels corresponding to the Light2D to the values of pixels under it by linear interpolation. */ + BLEND_MODE_MIX = 2, + } + } + /** Casts light in a 2D environment. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_light2d.html + */ + class Light2D extends Node2D { + constructor(identifier?: any) + /** Sets the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height]. */ + set_height(height: float64): void + + /** Returns the light's height, which is used in 2D normal mapping. See [member PointLight2D.height] and [member DirectionalLight2D.height]. */ + get_height(): float64 + + /** If `true`, Light2D will emit light. */ + get enabled(): boolean + set enabled(value: boolean) + + /** If `true`, Light2D will only appear when editing the scene. */ + get editor_only(): boolean + set editor_only(value: boolean) + + /** The Light2D's [Color]. */ + get color(): Color + set color(value: Color) + + /** The Light2D's energy value. The larger the value, the stronger the light. */ + get energy(): float64 + set energy(value: float64) + + /** The Light2D's blend mode. See [enum BlendMode] constants for values. */ + get blend_mode(): int64 + set blend_mode(value: int64) + + /** Minimum `z` value of objects that are affected by the Light2D. */ + get range_z_min(): int64 + set range_z_min(value: int64) + + /** Maximum `z` value of objects that are affected by the Light2D. */ + get range_z_max(): int64 + set range_z_max(value: int64) + + /** Minimum layer value of objects that are affected by the Light2D. */ + get range_layer_min(): int64 + set range_layer_min(value: int64) + + /** Maximum layer value of objects that are affected by the Light2D. */ + get range_layer_max(): int64 + set range_layer_max(value: int64) + + /** The layer mask. Only objects with a matching [member CanvasItem.light_mask] will be affected by the Light2D. See also [member shadow_item_cull_mask], which affects which objects can cast shadows. + * + * **Note:** [member range_item_cull_mask] is ignored by [DirectionalLight2D], which will always light a 2D node regardless of the 2D node's [member CanvasItem.light_mask]. + */ + get range_item_cull_mask(): int64 + set range_item_cull_mask(value: int64) + + /** If `true`, the Light2D will cast shadows. */ + get shadow_enabled(): boolean + set shadow_enabled(value: boolean) + + /** [Color] of shadows cast by the Light2D. */ + get shadow_color(): Color + set shadow_color(value: Color) + + /** Shadow filter type. See [enum ShadowFilter] for possible values. */ + get shadow_filter(): int64 + set shadow_filter(value: int64) + + /** Smoothing value for shadows. Higher values will result in softer shadows, at the cost of visible streaks that can appear in shadow rendering. [member shadow_filter_smooth] only has an effect if [member shadow_filter] is [constant SHADOW_FILTER_PCF5] or [constant SHADOW_FILTER_PCF13]. */ + get shadow_filter_smooth(): float64 + set shadow_filter_smooth(value: float64) + + /** The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching [member CanvasItem.light_mask] will cast shadows. See also [member range_item_cull_mask], which affects which objects can *receive* the light. */ + get shadow_item_cull_mask(): int64 + set shadow_item_cull_mask(value: int64) + } + namespace Light3D { + enum Param { + /** Constant for accessing [member light_energy]. */ + PARAM_ENERGY = 0, + + /** Constant for accessing [member light_indirect_energy]. */ + PARAM_INDIRECT_ENERGY = 1, + + /** Constant for accessing [member light_volumetric_fog_energy]. */ + PARAM_VOLUMETRIC_FOG_ENERGY = 2, + + /** Constant for accessing [member light_specular]. */ + PARAM_SPECULAR = 3, + + /** Constant for accessing [member OmniLight3D.omni_range] or [member SpotLight3D.spot_range]. */ + PARAM_RANGE = 4, + + /** Constant for accessing [member light_size]. */ + PARAM_SIZE = 5, + + /** Constant for accessing [member OmniLight3D.omni_attenuation] or [member SpotLight3D.spot_attenuation]. */ + PARAM_ATTENUATION = 6, + + /** Constant for accessing [member SpotLight3D.spot_angle]. */ + PARAM_SPOT_ANGLE = 7, + + /** Constant for accessing [member SpotLight3D.spot_angle_attenuation]. */ + PARAM_SPOT_ATTENUATION = 8, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_max_distance]. */ + PARAM_SHADOW_MAX_DISTANCE = 9, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_split_1]. */ + PARAM_SHADOW_SPLIT_1_OFFSET = 10, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_split_2]. */ + PARAM_SHADOW_SPLIT_2_OFFSET = 11, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_split_3]. */ + PARAM_SHADOW_SPLIT_3_OFFSET = 12, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_fade_start]. */ + PARAM_SHADOW_FADE_START = 13, + + /** Constant for accessing [member shadow_normal_bias]. */ + PARAM_SHADOW_NORMAL_BIAS = 14, + + /** Constant for accessing [member shadow_bias]. */ + PARAM_SHADOW_BIAS = 15, + + /** Constant for accessing [member DirectionalLight3D.directional_shadow_pancake_size]. */ + PARAM_SHADOW_PANCAKE_SIZE = 16, + + /** Constant for accessing [member shadow_opacity]. */ + PARAM_SHADOW_OPACITY = 17, + + /** Constant for accessing [member shadow_blur]. */ + PARAM_SHADOW_BLUR = 18, + + /** Constant for accessing [member shadow_transmittance_bias]. */ + PARAM_TRANSMITTANCE_BIAS = 19, + + /** Constant for accessing [member light_intensity_lumens] and [member light_intensity_lux]. Only used when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`. */ + PARAM_INTENSITY = 20, + + /** Represents the size of the [enum Param] enum. */ + PARAM_MAX = 21, + } + enum BakeMode { + /** Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. + * + * **Note:** Hiding a light does *not* affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). + */ + BAKE_DISABLED = 0, + + /** Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. + * + * **Note:** The light is not baked in [LightmapGI] if [member editor_only] is `true`. + */ + BAKE_STATIC = 1, + + /** Light is taken into account in dynamic baking ([VoxelGI] and SDFGI ([member Environment.sdfgi_enabled]) only). The light can be moved around or modified with global illumination updating in real-time. The light's global illumination appearance will be slightly different compared to [constant BAKE_STATIC]. This has a greater performance cost compared to [constant BAKE_STATIC]. When using SDFGI, the update speed of dynamic lights is affected by [member ProjectSettings.rendering/global_illumination/sdfgi/frames_to_update_lights]. */ + BAKE_DYNAMIC = 2, + } + } + /** Provides a base class for different kinds of light nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_light3d.html + */ + class Light3D extends VisualInstance3D { + constructor(identifier?: any) + /** Sets the value of the specified [enum Light3D.Param] parameter. */ + set_param(param: Light3D.Param, value: float64): void + + /** Returns the value of the specified [enum Light3D.Param] parameter. */ + get_param(param: Light3D.Param): float64 + + /** Returns the [Color] of an idealized blackbody at the given [member light_temperature]. This value is calculated internally based on the [member light_temperature]. This [Color] is multiplied by [member light_color] before being sent to the [RenderingServer]. */ + get_correlated_color(): Color + + /** Used by positional lights ([OmniLight3D] and [SpotLight3D]) when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`. Sets the intensity of the light source measured in Lumens. Lumens are a measure of luminous flux, which is the total amount of visible light emitted by a light source per unit of time. + * For [SpotLight3D]s, we assume that the area outside the visible cone is surrounded by a perfect light absorbing material. Accordingly, the apparent brightness of the cone area does not change as the cone increases and decreases in size. + * A typical household lightbulb can range from around 600 lumens to 1,200 lumens, a candle is about 13 lumens, while a streetlight can be approximately 60,000 lumens. + */ + get light_intensity_lumens(): float64 + set light_intensity_lumens(value: float64) + + /** Used by [DirectionalLight3D]s when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is `true`. Sets the intensity of the light source measured in Lux. Lux is a measure of luminous flux per unit area, it is equal to one lumen per square meter. Lux is the measure of how much light hits a surface at a given time. + * On a clear sunny day a surface in direct sunlight may be approximately 100,000 lux, a typical room in a home may be approximately 50 lux, while the moonlit ground may be approximately 0.1 lux. + */ + get light_intensity_lux(): float64 + set light_intensity_lux(value: float64) + + /** Sets the color temperature of the light source, measured in Kelvin. This is used to calculate a correlated color temperature which tints the [member light_color]. + * The sun on a cloudy day is approximately 6500 Kelvin, on a clear day it is between 5500 to 6000 Kelvin, and on a clear day at sunrise or sunset it ranges to around 1850 Kelvin. + */ + get light_temperature(): float64 + set light_temperature(value: float64) + + /** The light's color. An *overbright* color can be used to achieve a result equivalent to increasing the light's [member light_energy]. */ + get light_color(): Color + set light_color(value: Color) + + /** The light's strength multiplier (this is not a physical unit). For [OmniLight3D] and [SpotLight3D], changing this value will only change the light color's intensity, not the light's radius. */ + get light_energy(): float64 + set light_energy(value: float64) + + /** Secondary multiplier used with indirect light (light bounces). Used with [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). + * + * **Note:** This property is ignored if [member light_energy] is equal to `0.0`, as the light won't be present at all in the GI shader. + */ + get light_indirect_energy(): float64 + set light_indirect_energy(value: float64) + + /** Secondary multiplier multiplied with [member light_energy] then used with the [Environment]'s volumetric fog (if enabled). If set to `0.0`, computing volumetric fog will be skipped for this light, which can improve performance for large amounts of lights when volumetric fog is enabled. + * + * **Note:** To prevent short-lived dynamic light effects from poorly interacting with volumetric fog, lights used in those effects should have [member light_volumetric_fog_energy] set to `0.0` unless [member Environment.volumetric_fog_temporal_reprojection_enabled] is disabled (or unless the reprojection amount is significantly lowered). + */ + get light_volumetric_fog_energy(): float64 + set light_volumetric_fog_energy(value: float64) + + /** [Texture2D] projected by light. [member shadow_enabled] must be on for the projector to work. Light projectors make the light appear as if it is shining through a colored but transparent object, almost like light shining through stained-glass. + * + * **Note:** Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for light projector textures is set globally with [member ProjectSettings.rendering/textures/light_projectors/filter]. + * + * **Note:** Light projector textures are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + */ + get light_projector(): Texture2D + set light_projector(value: Texture2D) + + /** The size of the light in Godot units. Only available for [OmniLight3D]s and [SpotLight3D]s. Increasing this value will make the light fade out slower and shadows appear blurrier (also called percentage-closer soft shadows, or PCSS). This can be used to simulate area lights to an extent. Increasing this value above `0.0` for lights with shadows enabled will have a noticeable performance cost due to PCSS. + * + * **Note:** [member light_size] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). + * + * **Note:** PCSS for positional lights is only supported in the Forward+ and Mobile rendering methods, not Compatibility. + */ + get light_size(): float64 + set light_size(value: float64) + + /** The light's angular size in degrees. Increasing this will make shadows softer at greater distances (also called percentage-closer soft shadows, or PCSS). Only available for [DirectionalLight3D]s. For reference, the Sun from the Earth is approximately `0.5`. Increasing this value above `0.0` for lights with shadows enabled will have a noticeable performance cost due to PCSS. + * + * **Note:** [member light_angular_distance] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). + * + * **Note:** PCSS for directional lights is only supported in the Forward+ rendering method, not Mobile or Compatibility. + */ + get light_angular_distance(): float64 + set light_angular_distance(value: float64) + + /** If `true`, the light's effect is reversed, darkening areas and casting bright shadows. */ + get light_negative(): boolean + set light_negative(value: boolean) + + /** The intensity of the specular blob in objects affected by the light. At `0`, the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. */ + get light_specular(): float64 + set light_specular(value: float64) + + /** The light's bake mode. This will affect the global illumination techniques that have an effect on the light's rendering. See [enum BakeMode]. + * + * **Note:** Meshes' global illumination mode will also affect the global illumination rendering. See [member GeometryInstance3D.gi_mode]. + */ + get light_bake_mode(): int64 + set light_bake_mode(value: int64) + + /** The light will affect objects in the selected layers. */ + get light_cull_mask(): int64 + set light_cull_mask(value: int64) + + /** If `true`, the light will cast real-time shadows. This has a significant performance cost. Only enable shadow rendering when it makes a noticeable difference in the scene's appearance, and consider using [member distance_fade_enabled] to hide the light when far away from the [Camera3D]. */ + get shadow_enabled(): boolean + set shadow_enabled(value: boolean) + + /** Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. */ + get shadow_bias(): float64 + set shadow_bias(value: float64) + + /** Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. */ + get shadow_normal_bias(): float64 + set shadow_normal_bias(value: float64) + + /** If `true`, reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [constant GeometryInstance3D.SHADOW_CASTING_SETTING_DOUBLE_SIDED]. */ + get shadow_reverse_cull_face(): boolean + set shadow_reverse_cull_face(value: boolean) + get shadow_transmittance_bias(): float64 + set shadow_transmittance_bias(value: float64) + + /** The opacity to use when rendering the light's shadow map. Values lower than `1.0` make the light appear through shadows. This can be used to fake global illumination at a low performance cost. */ + get shadow_opacity(): float64 + set shadow_opacity(value: float64) + + /** Blurs the edges of the shadow. Can be used to hide pixel artifacts in low-resolution shadow maps. A high value can impact performance, make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. */ + get shadow_blur(): float64 + set shadow_blur(value: float64) + + /** If `true`, the light will smoothly fade away when far from the active [Camera3D] starting at [member distance_fade_begin]. This acts as a form of level of detail (LOD). The light will fade out over [member distance_fade_begin] + [member distance_fade_length], after which it will be culled and not sent to the shader at all. Use this to reduce the number of active lights in a scene and thus improve performance. + * + * **Note:** Only effective for [OmniLight3D] and [SpotLight3D]. + */ + get distance_fade_enabled(): boolean + set distance_fade_enabled(value: boolean) + + /** The distance from the camera at which the light begins to fade away (in 3D units). + * + * **Note:** Only effective for [OmniLight3D] and [SpotLight3D]. + */ + get distance_fade_begin(): float64 + set distance_fade_begin(value: float64) + + /** The distance from the camera at which the light's shadow cuts off (in 3D units). Set this to a value lower than [member distance_fade_begin] + [member distance_fade_length] to further improve performance, as shadow rendering is often more expensive than light rendering itself. + * + * **Note:** Only effective for [OmniLight3D] and [SpotLight3D], and only when [member shadow_enabled] is `true`. + */ + get distance_fade_shadow(): float64 + set distance_fade_shadow(value: float64) + + /** Distance over which the light and its shadow fades. The light's energy and shadow's opacity is progressively reduced over this distance and is completely invisible at the end. + * + * **Note:** Only effective for [OmniLight3D] and [SpotLight3D]. + */ + get distance_fade_length(): float64 + set distance_fade_length(value: float64) + + /** If `true`, the light only appears in the editor and will not be visible at runtime. If `true`, the light will never be baked in [LightmapGI] regardless of its [member light_bake_mode]. */ + get editor_only(): boolean + set editor_only(value: boolean) + } + class Light3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Occludes light cast by a Light2D, casting shadows. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightoccluder2d.html + */ + class LightOccluder2D extends Node2D { + constructor(identifier?: any) + /** The [OccluderPolygon2D] used to compute the shadow. */ + get occluder(): OccluderPolygon2D + set occluder(value: OccluderPolygon2D) + + /** If enabled, the occluder will be part of a real-time generated signed distance field that can be used in custom shaders. */ + get sdf_collision(): boolean + set sdf_collision(value: boolean) + + /** The LightOccluder2D's occluder light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). */ + get occluder_light_mask(): int64 + set occluder_light_mask(value: int64) + } + class LightOccluder2DEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + } + class LightOccluder2DEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + namespace LightmapGI { + enum BakeQuality { + /** Low bake quality (fastest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/low_quality_probe_ray_count]. */ + BAKE_QUALITY_LOW = 0, + + /** Medium bake quality (fast bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/medium_quality_probe_ray_count]. */ + BAKE_QUALITY_MEDIUM = 1, + + /** High bake quality (slow bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/high_quality_probe_ray_count]. */ + BAKE_QUALITY_HIGH = 2, + + /** Highest bake quality (slowest bake times). The quality of this preset can be adjusted by changing [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_ray_count] and [member ProjectSettings.rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count]. */ + BAKE_QUALITY_ULTRA = 3, + } + enum GenerateProbes { + /** Don't generate lightmap probes for lighting dynamic objects. */ + GENERATE_PROBES_DISABLED = 0, + + /** Lowest level of subdivision (fastest bake times, smallest file sizes). */ + GENERATE_PROBES_SUBDIV_4 = 1, + + /** Low level of subdivision (fast bake times, small file sizes). */ + GENERATE_PROBES_SUBDIV_8 = 2, + + /** High level of subdivision (slow bake times, large file sizes). */ + GENERATE_PROBES_SUBDIV_16 = 3, + + /** Highest level of subdivision (slowest bake times, largest file sizes). */ + GENERATE_PROBES_SUBDIV_32 = 4, + } + enum BakeError { + /** Lightmap baking was successful. */ + BAKE_ERROR_OK = 0, + + /** Lightmap baking failed because the root node for the edited scene could not be accessed. */ + BAKE_ERROR_NO_SCENE_ROOT = 1, + + /** Lightmap baking failed as the lightmap data resource is embedded in a foreign resource. */ + BAKE_ERROR_FOREIGN_DATA = 2, + + /** Lightmap baking failed as there is no lightmapper available in this Godot build. */ + BAKE_ERROR_NO_LIGHTMAPPER = 3, + + /** Lightmap baking failed as the [LightmapGIData] save path isn't configured in the resource. */ + BAKE_ERROR_NO_SAVE_PATH = 4, + + /** Lightmap baking failed as there are no meshes whose [member GeometryInstance3D.gi_mode] is [constant GeometryInstance3D.GI_MODE_STATIC] and with valid UV2 mapping in the current scene. You may need to select 3D scenes in the Import dock and change their global illumination mode accordingly. */ + BAKE_ERROR_NO_MESHES = 5, + + /** Lightmap baking failed as the lightmapper failed to analyze some of the meshes marked as static for baking. */ + BAKE_ERROR_MESHES_INVALID = 6, + + /** Lightmap baking failed as the resulting image couldn't be saved or imported by Godot after it was saved. */ + BAKE_ERROR_CANT_CREATE_IMAGE = 7, + + /** The user aborted the lightmap baking operation (typically by clicking the **Cancel** button in the progress dialog). */ + BAKE_ERROR_USER_ABORTED = 8, + + /** Lightmap baking failed as the maximum texture size is too small to fit some of the meshes marked for baking. */ + BAKE_ERROR_TEXTURE_SIZE_TOO_SMALL = 9, + + /** Lightmap baking failed as the lightmap is too small. */ + BAKE_ERROR_LIGHTMAP_TOO_SMALL = 10, + + /** Lightmap baking failed as the lightmap was unable to fit into an atlas. */ + BAKE_ERROR_ATLAS_TOO_SMALL = 11, + } + enum EnvironmentMode { + /** Ignore environment lighting when baking lightmaps. */ + ENVIRONMENT_MODE_DISABLED = 0, + + /** Use the scene's environment lighting when baking lightmaps. + * + * **Note:** If baking lightmaps in a scene with no [WorldEnvironment] node, this will act like [constant ENVIRONMENT_MODE_DISABLED]. The editor's preview sky and sun is *not* taken into account by [LightmapGI] when baking lightmaps. + */ + ENVIRONMENT_MODE_SCENE = 1, + + /** Use [member environment_custom_sky] as a source of environment lighting when baking lightmaps. */ + ENVIRONMENT_MODE_CUSTOM_SKY = 2, + + /** Use [member environment_custom_color] multiplied by [member environment_custom_energy] as a constant source of environment lighting when baking lightmaps. */ + ENVIRONMENT_MODE_CUSTOM_COLOR = 3, + } + } + /** Computes and stores baked lightmaps for fast global illumination. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightmapgi.html + */ + class LightmapGI extends VisualInstance3D { + constructor(identifier?: any) + /** The quality preset to use when baking lightmaps. This affects bake times, but output file sizes remain mostly identical across quality levels. + * To further speed up bake times, decrease [member bounces], disable [member use_denoiser] and increase the lightmap texel size on 3D scenes in the Import doc. + */ + get quality(): int64 + set quality(value: int64) + + /** Number of light bounces that are taken into account during baking. Higher values result in brighter, more realistic lighting, at the cost of longer bake times. If set to `0`, only environment lighting, direct light and emissive lighting is baked. */ + get bounces(): int64 + set bounces(value: int64) + + /** The energy multiplier for each bounce. Higher values will make indirect lighting brighter. A value of `1.0` represents physically accurate behavior, but higher values can be used to make indirect lighting propagate more visibly when using a low number of bounces. This can be used to speed up bake times by lowering the number of [member bounces] then increasing [member bounce_indirect_energy]. + * + * **Note:** [member bounce_indirect_energy] only has an effect if [member bounces] is set to a value greater than or equal to `1`. + */ + get bounce_indirect_energy(): float64 + set bounce_indirect_energy(value: float64) + + /** If `true`, bakes lightmaps to contain directional information as spherical harmonics. This results in more realistic lighting appearance, especially with normal mapped materials and for lights that have their direct light baked ([member Light3D.light_bake_mode] set to [constant Light3D.BAKE_STATIC] and with [member Light3D.editor_only] set to `false`). The directional information is also used to provide rough reflections for static and dynamic objects. This has a small run-time performance cost as the shader has to perform more work to interpret the direction information from the lightmap. Directional lightmaps also take longer to bake and result in larger file sizes. + * + * **Note:** The property's name has no relationship with [DirectionalLight3D]. [member directional] works with all light types. + */ + get directional(): boolean + set directional(value: boolean) + + /** If `true`, a texture with the lighting information will be generated to speed up the generation of indirect lighting at the cost of some accuracy. The geometry might exhibit extra light leak artifacts when using low resolution lightmaps or UVs that stretch the lightmap significantly across surfaces. Leave [member use_texture_for_bounces] at its default value of `true` if unsure. + * + * **Note:** [member use_texture_for_bounces] only has an effect if [member bounces] is set to a value greater than or equal to `1`. + */ + get use_texture_for_bounces(): boolean + set use_texture_for_bounces(value: boolean) + + /** If `true`, ignore environment lighting when baking lightmaps. */ + get interior(): boolean + set interior(value: boolean) + + /** If `true`, uses a GPU-based denoising algorithm on the generated lightmap. This eliminates most noise within the generated lightmap at the cost of longer bake times. File sizes are generally not impacted significantly by the use of a denoiser, although lossless compression may do a better job at compressing a denoised image. */ + get use_denoiser(): boolean + set use_denoiser(value: boolean) + + /** The strength of denoising step applied to the generated lightmaps. Only effective if [member use_denoiser] is `true` and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM. */ + get denoiser_strength(): float64 + set denoiser_strength(value: float64) + + /** The distance in pixels from which the denoiser samples. Lower values preserve more details, but may give blotchy results if the lightmap quality is not high enough. Only effective if [member use_denoiser] is `true` and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM. */ + get denoiser_range(): int64 + set denoiser_range(value: int64) + + /** The bias to use when computing shadows. Increasing [member bias] can fix shadow acne on the resulting baked lightmap, but can introduce peter-panning (shadows not connecting to their casters). Real-time [Light3D] shadows are not affected by this [member bias] property. */ + get bias(): float64 + set bias(value: float64) + + /** Scales the lightmap texel density of all meshes for the current bake. This is a multiplier that builds upon the existing lightmap texel size defined in each imported 3D scene, along with the per-mesh density multiplier (which is designed to be used when the same mesh is used at different scales). Lower values will result in faster bake times. */ + get texel_scale(): float64 + set texel_scale(value: float64) + + /** The maximum texture size for the generated texture atlas. Higher values will result in fewer slices being generated, but may not work on all hardware as a result of hardware limitations on texture sizes. Leave [member max_texture_size] at its default value of `16384` if unsure. */ + get max_texture_size(): int64 + set max_texture_size(value: int64) + + /** The environment mode to use when baking lightmaps. */ + get environment_mode(): int64 + set environment_mode(value: int64) + + /** The sky to use as a source of environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_SKY]. */ + get environment_custom_sky(): Sky + set environment_custom_sky(value: Sky) + + /** The color to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR]. */ + get environment_custom_color(): Color + set environment_custom_color(value: Color) + + /** The color multiplier to use for environment lighting. Only effective if [member environment_mode] is [constant ENVIRONMENT_MODE_CUSTOM_COLOR]. */ + get environment_custom_energy(): float64 + set environment_custom_energy(value: float64) + + /** The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [LightmapGI] will have banding artifacts or may have over-exposure artifacts. */ + get camera_attributes(): CameraAttributesPractical | CameraAttributesPhysical + set camera_attributes(value: CameraAttributesPractical | CameraAttributesPhysical) + + /** The level of subdivision to use when automatically generating [LightmapProbe]s for dynamic object lighting. Higher values result in more accurate indirect lighting on dynamic objects, at the cost of longer bake times and larger file sizes. + * + * **Note:** Automatically generated [LightmapProbe]s are not visible as nodes in the Scene tree dock, and cannot be modified this way after they are generated. + * + * **Note:** Regardless of [member generate_probes_subdiv], direct lighting on dynamic objects is always applied using [Light3D] nodes in real-time. + */ + get generate_probes_subdiv(): int64 + set generate_probes_subdiv(value: int64) + + /** The [LightmapGIData] associated to this [LightmapGI] node. This resource is automatically created after baking, and is not meant to be created manually. */ + get light_data(): LightmapGIData + set light_data(value: LightmapGIData) + } + /** Contains baked lightmap and dynamic object probe data for [LightmapGI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightmapgidata.html + */ + class LightmapGIData extends Resource { + constructor(identifier?: any) + /** Adds an object that is considered baked within this [LightmapGIData]. */ + add_user(path: NodePath | string, uv_scale: Rect2, slice_index: int64, sub_instance: int64): void + + /** Returns the number of objects that are considered baked within this [LightmapGIData]. */ + get_user_count(): int64 + + /** Returns the [NodePath] of the baked object at index [param user_idx]. */ + get_user_path(user_idx: int64): NodePath + + /** Clear all objects that are considered baked within this [LightmapGIData]. */ + clear_users(): void + + /** The lightmap atlas textures generated by the lightmapper. */ + get lightmap_textures(): GArray + set lightmap_textures(value: GArray) + get uses_spherical_harmonics(): boolean + set uses_spherical_harmonics(value: boolean) + get user_data(): GArray + set user_data(value: GArray) + get probe_data(): GDictionary + set probe_data(value: GDictionary) + + /** The lightmap atlas texture generated by the lightmapper. */ + get light_texture(): TextureLayered + set light_texture(value: TextureLayered) + get light_textures(): GArray + set light_textures(value: GArray) + } + class LightmapGIEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + _bake(): void + } + class LightmapGIGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Represents a single manually placed probe for dynamic object lighting with [LightmapGI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightmapprobe.html + */ + class LightmapProbe extends Node3D { + constructor(identifier?: any) + } + class LightmapProbeGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Abstract class extended by lightmappers, for use in [LightmapGI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightmapper.html + */ + class Lightmapper extends RefCounted { + constructor(identifier?: any) + } + /** The built-in GPU-based lightmapper for use with [LightmapGI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lightmapperrd.html + */ + class LightmapperRD extends Lightmapper { + constructor(identifier?: any) + } + namespace Line2D { + enum LineJointMode { + /** Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on [member sharp_limit]), the joint falls back to [constant LINE_JOINT_BEVEL] to prevent very long miters. */ + LINE_JOINT_SHARP = 0, + + /** Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line. */ + LINE_JOINT_BEVEL = 1, + + /** Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on [member round_precision]. */ + LINE_JOINT_ROUND = 2, + } + enum LineCapMode { + /** Draws no line cap. */ + LINE_CAP_NONE = 0, + + /** Draws the line cap as a box, slightly extending the first/last segment. */ + LINE_CAP_BOX = 1, + + /** Draws the line cap as a semicircle attached to the first/last segment. */ + LINE_CAP_ROUND = 2, + } + enum LineTextureMode { + /** Takes the left pixels of the texture and renders them over the whole polyline. */ + LINE_TEXTURE_NONE = 0, + + /** Tiles the texture over the polyline. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_ENABLED] or [constant CanvasItem.TEXTURE_REPEAT_MIRROR] for it to work properly. */ + LINE_TEXTURE_TILE = 1, + + /** Stretches the texture across the polyline. [member CanvasItem.texture_repeat] of the [Line2D] node must be [constant CanvasItem.TEXTURE_REPEAT_DISABLED] for best results. */ + LINE_TEXTURE_STRETCH = 2, + } + } + /** A 2D polyline that can optionally be textured. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_line2d.html + */ + class Line2D extends Node2D { + constructor(identifier?: any) + /** Overwrites the position of the point at the given [param index] with the supplied [param position]. */ + set_point_position(index: int64, position: Vector2): void + + /** Returns the position of the point at index [param index]. */ + get_point_position(index: int64): Vector2 + + /** Returns the number of points in the polyline. */ + get_point_count(): int64 + + /** Adds a point with the specified [param position] relative to the polyline's own position. If no [param index] is provided, the new point will be added to the end of the points array. + * If [param index] is given, the new point is inserted before the existing point identified by index [param index]. The indices of the points after the new point get increased by 1. The provided [param index] must not exceed the number of existing points in the polyline. See [method get_point_count]. + */ + add_point(position: Vector2, index: int64 = -1): void + + /** Removes the point at index [param index] from the polyline. */ + remove_point(index: int64): void + + /** Removes all points from the polyline, making it empty. */ + clear_points(): void + + /** The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array. */ + get points(): PackedVector2Array + set points(value: PackedVector2Array | Vector2[]) + + /** If `true` and the polyline has more than 2 points, the last point and the first one will be connected by a segment. + * + * **Note:** The shape of the closing segment is not guaranteed to be seamless if a [member width_curve] is provided. + * + * **Note:** The joint between the closing segment and the first segment is drawn first and it samples the [member gradient] and the [member width_curve] at the beginning. This is an implementation detail that might change in a future version. + */ + get closed(): boolean + set closed(value: boolean) + + /** The polyline's width. */ + get width(): float64 + set width(value: float64) + + /** The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain. */ + get width_curve(): Curve + set width_curve(value: Curve) + + /** The color of the polyline. Will not be used if a gradient is set. */ + get default_color(): Color + set default_color(value: Color) + + /** The gradient is drawn through the whole line from start to finish. The [member default_color] will not be used if this property is set. */ + get gradient(): Gradient + set gradient(value: Gradient) + + /** The texture used for the polyline. Uses [member texture_mode] for drawing style. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** The style to render the [member texture] of the polyline. Use [enum LineTextureMode] constants. */ + get texture_mode(): int64 + set texture_mode(value: int64) + + /** The style of the connections between segments of the polyline. Use [enum LineJointMode] constants. */ + get joint_mode(): int64 + set joint_mode(value: int64) + + /** The style of the beginning of the polyline, if [member closed] is `false`. Use [enum LineCapMode] constants. */ + get begin_cap_mode(): int64 + set begin_cap_mode(value: int64) + + /** The style of the end of the polyline, if [member closed] is `false`. Use [enum LineCapMode] constants. */ + get end_cap_mode(): int64 + set end_cap_mode(value: int64) + + /** Determines the miter limit of the polyline. Normally, when [member joint_mode] is set to [constant LINE_JOINT_SHARP], sharp angles fall back to using the logic of [constant LINE_JOINT_BEVEL] joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles. */ + get sharp_limit(): float64 + set sharp_limit(value: float64) + + /** The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update. */ + get round_precision(): int64 + set round_precision(value: int64) + + /** If `true`, the polyline's border will be anti-aliased. + * + * **Note:** [Line2D] is not accelerated by batching when being anti-aliased. + */ + get antialiased(): boolean + set antialiased(value: boolean) + } + class Line2DEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + } + class Line2DEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + namespace LineEdit { + enum MenuItems { + /** Cuts (copies and clears) the selected text. */ + MENU_CUT = 0, + + /** Copies the selected text. */ + MENU_COPY = 1, + + /** Pastes the clipboard text over the selected text (or at the caret's position). + * Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes]. + */ + MENU_PASTE = 2, + + /** Erases the whole [LineEdit] text. */ + MENU_CLEAR = 3, + + /** Selects the whole [LineEdit] text. */ + MENU_SELECT_ALL = 4, + + /** Undoes the previous action. */ + MENU_UNDO = 5, + + /** Reverse the last undo action. */ + MENU_REDO = 6, + + /** ID of "Text Writing Direction" submenu. */ + MENU_SUBMENU_TEXT_DIR = 7, + + /** Sets text direction to inherited. */ + MENU_DIR_INHERITED = 8, + + /** Sets text direction to automatic. */ + MENU_DIR_AUTO = 9, + + /** Sets text direction to left-to-right. */ + MENU_DIR_LTR = 10, + + /** Sets text direction to right-to-left. */ + MENU_DIR_RTL = 11, + + /** Toggles control character display. */ + MENU_DISPLAY_UCC = 12, + + /** ID of "Insert Control Character" submenu. */ + MENU_SUBMENU_INSERT_UCC = 13, + + /** Inserts left-to-right mark (LRM) character. */ + MENU_INSERT_LRM = 14, + + /** Inserts right-to-left mark (RLM) character. */ + MENU_INSERT_RLM = 15, + + /** Inserts start of left-to-right embedding (LRE) character. */ + MENU_INSERT_LRE = 16, + + /** Inserts start of right-to-left embedding (RLE) character. */ + MENU_INSERT_RLE = 17, + + /** Inserts start of left-to-right override (LRO) character. */ + MENU_INSERT_LRO = 18, + + /** Inserts start of right-to-left override (RLO) character. */ + MENU_INSERT_RLO = 19, + + /** Inserts pop direction formatting (PDF) character. */ + MENU_INSERT_PDF = 20, + + /** Inserts Arabic letter mark (ALM) character. */ + MENU_INSERT_ALM = 21, + + /** Inserts left-to-right isolate (LRI) character. */ + MENU_INSERT_LRI = 22, + + /** Inserts right-to-left isolate (RLI) character. */ + MENU_INSERT_RLI = 23, + + /** Inserts first strong isolate (FSI) character. */ + MENU_INSERT_FSI = 24, + + /** Inserts pop direction isolate (PDI) character. */ + MENU_INSERT_PDI = 25, + + /** Inserts zero width joiner (ZWJ) character. */ + MENU_INSERT_ZWJ = 26, + + /** Inserts zero width non-joiner (ZWNJ) character. */ + MENU_INSERT_ZWNJ = 27, + + /** Inserts word joiner (WJ) character. */ + MENU_INSERT_WJ = 28, + + /** Inserts soft hyphen (SHY) character. */ + MENU_INSERT_SHY = 29, + + /** Represents the size of the [enum MenuItems] enum. */ + MENU_MAX = 30, + } + enum VirtualKeyboardType { + /** Default text virtual keyboard. */ + KEYBOARD_TYPE_DEFAULT = 0, + + /** Multiline virtual keyboard. */ + KEYBOARD_TYPE_MULTILINE = 1, + + /** Virtual number keypad, useful for PIN entry. */ + KEYBOARD_TYPE_NUMBER = 2, + + /** Virtual number keypad, useful for entering fractional numbers. */ + KEYBOARD_TYPE_NUMBER_DECIMAL = 3, + + /** Virtual phone number keypad. */ + KEYBOARD_TYPE_PHONE = 4, + + /** Virtual keyboard with additional keys to assist with typing email addresses. */ + KEYBOARD_TYPE_EMAIL_ADDRESS = 5, + + /** Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + * + * **Note:** This is not supported on Web. Instead, this behaves identically to [constant KEYBOARD_TYPE_DEFAULT]. + */ + KEYBOARD_TYPE_PASSWORD = 6, + + /** Virtual keyboard with additional keys to assist with typing URLs. */ + KEYBOARD_TYPE_URL = 7, + } + } + /** An input field for single-line text. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_lineedit.html + */ + class LineEdit extends Control { + constructor(identifier?: any) + /** Erases the [LineEdit]'s [member text]. */ + clear(): void + + /** Selects characters inside [LineEdit] between [param from] and [param to]. By default, [param from] is at the beginning and [param to] at the end. + * + */ + select(from: int64 = 0, to: int64 = -1): void + + /** Selects the whole [String]. */ + select_all(): void + + /** Clears the current selection. */ + deselect(): void + + /** Returns `true` if the user has selected text. */ + has_selection(): boolean + + /** Returns the text inside the selection. */ + get_selected_text(): string + + /** Returns the selection begin column. */ + get_selection_from_column(): int64 + + /** Returns the selection end column. */ + get_selection_to_column(): int64 + + /** Returns the scroll offset due to [member caret_column], as a number of characters. */ + get_scroll_offset(): float64 + + /** Inserts [param text] at the caret. If the resulting value is longer than [member max_length], nothing happens. */ + insert_text_at_caret(text: string): void + + /** Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]). */ + delete_char_at_caret(): void + + /** Deletes a section of the [member text] going from position [param from_column] to [param to_column]. Both parameters should be within the text's length. */ + delete_text(from_column: int64, to_column: int64): void + + /** Executes a given action as defined in the [enum MenuItems] enum. */ + menu_option(option: int64): void + + /** Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]. + * You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: + * + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. + */ + get_menu(): PopupMenu + + /** Returns whether the menu is visible. Use this instead of `get_menu().visible` to improve performance (so the creation of the menu is avoided). */ + is_menu_visible(): boolean + + /** String value of the [LineEdit]. + * + * **Note:** Changing text using this property won't emit the [signal text_changed] signal. + */ + get text(): string + set text(value: string) + + /** Text shown when the [LineEdit] is empty. It is **not** the [LineEdit]'s default value (see [member text]). */ + get placeholder_text(): string + set placeholder_text(value: string) + + /** Text alignment as defined in the [enum HorizontalAlignment] enum. */ + get alignment(): int64 + set alignment(value: int64) + + /** Maximum number of characters that can be entered inside the [LineEdit]. If `0`, there is no limit. + * When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. + * **Example:** + * + */ + get max_length(): int64 + set max_length(value: int64) + + /** If `false`, existing text cannot be modified and new text cannot be added. */ + get editable(): boolean + set editable(value: boolean) + + /** If `true`, the [LineEdit] width will increase to stay longer than the [member text]. It will **not** compress if the [member text] is shortened. */ + get expand_to_text_length(): boolean + set expand_to_text_length(value: boolean) + + /** If `true`, the context menu will appear when right-clicked. */ + get context_menu_enabled(): boolean + set context_menu_enabled(value: boolean) + + /** If `true`, the native virtual keyboard is shown when focused on platforms that support it. */ + get virtual_keyboard_enabled(): boolean + set virtual_keyboard_enabled(value: boolean) + + /** Specifies the type of virtual keyboard to show. */ + get virtual_keyboard_type(): int64 + set virtual_keyboard_type(value: int64) + + /** If `true`, the [LineEdit] will show a clear button if [member text] is not empty, which can be used to clear the text quickly. */ + get clear_button_enabled(): boolean + set clear_button_enabled(value: boolean) + + /** If `false`, using shortcuts will be disabled. */ + get shortcut_keys_enabled(): boolean + set shortcut_keys_enabled(value: boolean) + + /** If `false`, using middle mouse button to paste clipboard will be disabled. + * + * **Note:** This method is only implemented on Linux. + */ + get middle_mouse_paste_enabled(): boolean + set middle_mouse_paste_enabled(value: boolean) + + /** If `false`, it's impossible to select the text using mouse nor keyboard. */ + get selecting_enabled(): boolean + set selecting_enabled(value: boolean) + + /** If `true`, the selected text will be deselected when focus is lost. */ + get deselect_on_focus_loss_enabled(): boolean + set deselect_on_focus_loss_enabled(value: boolean) + + /** If `true`, allow drag and drop of selected text. */ + get drag_and_drop_selection_enabled(): boolean + set drag_and_drop_selection_enabled(value: boolean) + + /** Sets the icon that will appear in the right end of the [LineEdit] if there's no [member text], or always, if [member clear_button_enabled] is set to `false`. */ + get right_icon(): Texture2D + set right_icon(value: Texture2D) + + /** If `true`, the [LineEdit] doesn't display decoration. */ + get flat(): boolean + set flat(value: boolean) + + /** If `true`, control characters are displayed. */ + get draw_control_chars(): boolean + set draw_control_chars(value: boolean) + + /** If `true`, the [LineEdit] will select the whole text when it gains focus. */ + get select_all_on_focus(): boolean + set select_all_on_focus(value: boolean) + + /** If `true`, makes the caret blink. */ + get caret_blink(): boolean + set caret_blink(value: boolean) + + /** The interval at which the caret blinks (in seconds). */ + get caret_blink_interval(): float64 + set caret_blink_interval(value: float64) + + /** The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it. */ + get caret_column(): int64 + set caret_column(value: int64) + + /** If `true`, the [LineEdit] will always show the caret, even if focus is lost. */ + get caret_force_displayed(): boolean + set caret_force_displayed(value: boolean) + + /** Allow moving caret, selecting and removing the individual composite character components. + * + * **Note:** [kbd]Backspace[/kbd] is always removing individual composite character components. + */ + get caret_mid_grapheme(): boolean + set caret_mid_grapheme(value: boolean) + + /** If `true`, every character is replaced with the secret character (see [member secret_character]). */ + get secret(): boolean + set secret(value: boolean) + + /** The character to use to mask secret input. Only a single character can be used as the secret character. If it is longer than one character, only the first one will be used. If it is empty, a space will be used instead. */ + get secret_character(): string + set secret_character(value: string) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms. If left empty, current locale is used instead. */ + get language(): string + set language(value: string) + + /** Set BiDi algorithm override for the structured text. */ + get structured_text_bidi_override(): int64 + set structured_text_bidi_override(value: int64) + + /** Set additional options for BiDi override. */ + get structured_text_bidi_override_options(): GArray + set structured_text_bidi_override_options(value: GArray) + + /** Emitted when the text changes. */ + readonly text_changed: Signal1 + + /** Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [param rejected_substring] argument. */ + readonly text_change_rejected: Signal1 + + /** Emitted when the user presses [constant KEY_ENTER] on the [LineEdit]. */ + readonly text_submitted: Signal1 + } + namespace LinkButton { + enum UnderlineMode { + /** The LinkButton will always show an underline at the bottom of its text. */ + UNDERLINE_MODE_ALWAYS = 0, + + /** The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. */ + UNDERLINE_MODE_ON_HOVER = 1, + + /** The LinkButton will never show an underline at the bottom of its text. */ + UNDERLINE_MODE_NEVER = 2, + } + } + /** A button that represents a link. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_linkbutton.html + */ + class LinkButton extends BaseButton { + constructor(identifier?: any) + /** The button's text that will be displayed inside the button's area. */ + get text(): string + set text(value: string) + + /** The underline mode to use for the text. See [enum LinkButton.UnderlineMode] for the available modes. */ + get underline(): int64 + set underline(value: int64) + + /** The [url=https://en.wikipedia.org/wiki/Uniform_Resource_Identifier]URI[/url] for this [LinkButton]. If set to a valid URI, pressing the button opens the URI using the operating system's default program for the protocol (via [method OS.shell_open]). HTTP and HTTPS URLs open the default web browser. + * **Examples:** + * + */ + get uri(): string + set uri(value: string) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + + /** Set BiDi algorithm override for the structured text. */ + get structured_text_bidi_override(): int64 + set structured_text_bidi_override(value: int64) + + /** Set additional options for BiDi override. */ + get structured_text_bidi_override_options(): GArray + set structured_text_bidi_override_options(value: GArray) + } + class LocalizationEditor extends VBoxContainer { + constructor(identifier?: any) + update_translations(): void + readonly localization_changed: Signal0 + } + /** Abstract base class for the game's main loop. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_mainloop.html + */ + class MainLoop extends Object { + /** Notification received from the OS when the application is exceeding its allocated memory. + * Specific to the iOS platform. + */ + static readonly NOTIFICATION_OS_MEMORY_WARNING = 2009 + + /** Notification received when translations may have changed. Can be triggered by the user changing the locale. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr]. */ + static readonly NOTIFICATION_TRANSLATION_CHANGED = 2010 + + /** Notification received from the OS when a request for "About" information is sent. + * Specific to the macOS platform. + */ + static readonly NOTIFICATION_WM_ABOUT = 2011 + + /** Notification received from Godot's crash handler when the engine is about to crash. + * Implemented on desktop platforms if the crash handler is enabled. + */ + static readonly NOTIFICATION_CRASH = 2012 + + /** Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + * Specific to the macOS platform. + */ + static readonly NOTIFICATION_OS_IME_UPDATE = 2013 + + /** Notification received from the OS when the application is resumed. + * Specific to the Android and iOS platforms. + */ + static readonly NOTIFICATION_APPLICATION_RESUMED = 2014 + + /** Notification received from the OS when the application is paused. + * Specific to the Android and iOS platforms. + * + * **Note:** On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. + */ + static readonly NOTIFICATION_APPLICATION_PAUSED = 2015 + + /** Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + * Implemented on desktop and mobile platforms. + */ + static readonly NOTIFICATION_APPLICATION_FOCUS_IN = 2016 + + /** Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + * Implemented on desktop and mobile platforms. + */ + static readonly NOTIFICATION_APPLICATION_FOCUS_OUT = 2017 + + /** Notification received when text server is changed. */ + static readonly NOTIFICATION_TEXT_SERVER_CHANGED = 2018 + constructor(identifier?: any) + + /** Called once during initialization. */ + /* gdvirtual */ _initialize(): void + + /** Called each physics frame with the time since the last physics frame as argument ([param delta], in seconds). Equivalent to [method Node._physics_process]. + * If implemented, the method must return a boolean value. `true` ends the main loop, while `false` lets it proceed to the next frame. + */ + /* gdvirtual */ _physics_process(delta: float64): boolean + + /** Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process]. + * If implemented, the method must return a boolean value. `true` ends the main loop, while `false` lets it proceed to the next frame. + */ + /* gdvirtual */ _process(delta: float64): boolean + + /** Called before the program exits. */ + /* gdvirtual */ _finalize(): void + + /** Emitted when a user responds to a permission request. */ + readonly on_request_permissions_result: Signal2 + } + /** A container that keeps a margin around its child controls. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_margincontainer.html + */ + class MarginContainer extends Container { + constructor(identifier?: any) + } + /** Generic 2D position hint for editing. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_marker2d.html + */ + class Marker2D extends Node2D { + constructor(identifier?: any) + /** Size of the gizmo cross that appears in the editor. */ + get gizmo_extents(): float64 + set gizmo_extents(value: float64) + } + /** Generic 3D position hint for editing. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_marker3d.html + */ + class Marker3D extends Node3D { + constructor(identifier?: any) + /** Size of the gizmo cross that appears in the editor. */ + get gizmo_extents(): float64 + set gizmo_extents(value: float64) + } + class Marker3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Virtual base class for applying visual properties to an object, such as color and roughness. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_material.html + */ + class Material extends Resource { + /** Maximum value for the [member render_priority] parameter. */ + static readonly RENDER_PRIORITY_MAX = 127 + + /** Minimum value for the [member render_priority] parameter. */ + static readonly RENDER_PRIORITY_MIN = -128 + constructor(identifier?: any) + + /** Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. Used to access the RID of the [Material]'s [Shader]. */ + /* gdvirtual */ _get_shader_rid(): RID + + /** Only exposed for the purpose of overriding. You cannot call this function directly. Used internally by various editor tools. */ + /* gdvirtual */ _get_shader_mode(): Shader.Mode + + /** Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member next_pass] should be shown in the editor or not. */ + /* gdvirtual */ _can_do_next_pass(): boolean + + /** Only exposed for the purpose of overriding. You cannot call this function directly. Used internally to determine if [member render_priority] should be shown in the editor or not. */ + /* gdvirtual */ _can_use_render_priority(): boolean + + /** Only available when running in the editor. Opens a popup that visualizes the generated shader code, including all variants and internal shader code. */ + inspect_native_shader_code(): void + + /** Creates a placeholder version of this resource ([PlaceholderMaterial]). */ + create_placeholder(): Resource + + /** Sets the render priority for objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. In other words, all objects with [member render_priority] `1` will render before all objects with [member render_priority] `0`. + * + * **Note:** This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial". + * + * **Note:** This will not impact how transparent objects are sorted relative to opaque objects or how dynamic meshes will be sorted relative to other opaque meshes. This is because all transparent objects are drawn after all opaque objects and all dynamic opaque meshes are drawn before other opaque meshes. + */ + get render_priority(): int64 + set render_priority(value: int64) + + /** Sets the [Material] to be used for the next pass. This renders the object again using a different material. + * + * **Note:** [member next_pass] materials are not necessarily drawn immediately after the source [Material]. Draw order is determined by material properties, [member render_priority], and distance to camera. + * + * **Note:** This only applies to [StandardMaterial3D]s and [ShaderMaterial]s with type "Spatial". + */ + get next_pass(): Material + set next_pass(value: Material) + } + class MaterialEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A horizontal menu bar that creates a [MenuButton] for each [PopupMenu] child. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_menubar.html + */ + class MenuBar extends Control { + constructor(identifier?: any) + /** If `true`, shortcuts are disabled and cannot be used to trigger the button. */ + set_disable_shortcuts(disabled: boolean): void + + /** Returns `true`, if system global menu is supported and used by this [MenuBar]. */ + is_native_menu(): boolean + + /** Returns number of menu items. */ + get_menu_count(): int64 + + /** Sets menu item title. */ + set_menu_title(menu: int64, title: string): void + + /** Returns menu item title. */ + get_menu_title(menu: int64): string + + /** Sets menu item tooltip. */ + set_menu_tooltip(menu: int64, tooltip: string): void + + /** Returns menu item tooltip. */ + get_menu_tooltip(menu: int64): string + + /** If `true`, menu item is disabled. */ + set_menu_disabled(menu: int64, disabled: boolean): void + + /** Returns `true`, if menu item is disabled. */ + is_menu_disabled(menu: int64): boolean + + /** If `true`, menu item is hidden. */ + set_menu_hidden(menu: int64, hidden: boolean): void + + /** Returns `true`, if menu item is hidden. */ + is_menu_hidden(menu: int64): boolean + + /** Returns [PopupMenu] associated with menu item. */ + get_menu_popup(menu: int64): PopupMenu + + /** Flat [MenuBar] don't display item decoration. */ + get flat(): boolean + set flat(value: boolean) + + /** Position in the global menu to insert first [MenuBar] item at. */ + get start_index(): int64 + set start_index(value: int64) + + /** If `true`, when the cursor hovers above menu item, it will close the current [PopupMenu] and open the other one. */ + get switch_on_hover(): boolean + set switch_on_hover(value: boolean) + + /** If `true`, [MenuBar] will use system global menu when supported. */ + get prefer_global_menu(): boolean + set prefer_global_menu(value: boolean) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + } + /** A button that brings up a [PopupMenu] when clicked. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_menubutton.html + */ + class MenuButton extends Button { + constructor(identifier?: any) + /** Returns the [PopupMenu] contained in this button. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. + */ + get_popup(): PopupMenu + + /** Adjusts popup position and sizing for the [MenuButton], then shows the [PopupMenu]. Prefer this over using `get_popup().popup()`. */ + show_popup(): void + + /** If `true`, shortcuts are disabled and cannot be used to trigger the button. */ + set_disable_shortcuts(disabled: boolean): void + + /** If `true`, when the cursor hovers above another [MenuButton] within the same parent which also has [member switch_on_hover] enabled, it will close the current [MenuButton] and open the other one. */ + get switch_on_hover(): boolean + set switch_on_hover(value: boolean) + + /** The number of items currently in the list. */ + get item_count(): any /*Items,popup/item_*/ + set item_count(value: any /*Items,popup/item_*/) + + /** Emitted when the [PopupMenu] of this MenuButton is about to show. */ + readonly about_to_popup: Signal0 + } + namespace Mesh { + enum PrimitiveType { + /** Render array as points (one vertex equals one point). */ + PRIMITIVE_POINTS = 0, + + /** Render array as lines (every two vertices a line is created). */ + PRIMITIVE_LINES = 1, + + /** Render array as line strip. */ + PRIMITIVE_LINE_STRIP = 2, + + /** Render array as triangles (every three vertices a triangle is created). */ + PRIMITIVE_TRIANGLES = 3, + + /** Render array as triangle strips. */ + PRIMITIVE_TRIANGLE_STRIP = 4, + } + enum ArrayType { + /** [PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions. */ + ARRAY_VERTEX = 0, + + /** [PackedVector3Array] of vertex normals. + * + * **Note:** The array has to consist of normal vectors, otherwise they will be normalized by the engine, potentially causing visual discrepancies. + */ + ARRAY_NORMAL = 1, + + /** [PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. */ + ARRAY_TANGENT = 2, + + /** [PackedColorArray] of vertex colors. */ + ARRAY_COLOR = 3, + + /** [PackedVector2Array] for UV coordinates. */ + ARRAY_TEX_UV = 4, + + /** [PackedVector2Array] for second UV coordinates. */ + ARRAY_TEX_UV2 = 5, + + /** Contains custom color channel 0. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM0_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. */ + ARRAY_CUSTOM0 = 6, + + /** Contains custom color channel 1. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM1_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. */ + ARRAY_CUSTOM1 = 7, + + /** Contains custom color channel 2. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM2_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. */ + ARRAY_CUSTOM2 = 8, + + /** Contains custom color channel 3. [PackedByteArray] if `(format >> Mesh.ARRAY_FORMAT_CUSTOM3_SHIFT) & Mesh.ARRAY_FORMAT_CUSTOM_MASK` is [constant ARRAY_CUSTOM_RGBA8_UNORM], [constant ARRAY_CUSTOM_RGBA8_SNORM], [constant ARRAY_CUSTOM_RG_HALF], or [constant ARRAY_CUSTOM_RGBA_HALF]. [PackedFloat32Array] otherwise. */ + ARRAY_CUSTOM3 = 9, + + /** [PackedFloat32Array] or [PackedInt32Array] of bone indices. Contains either 4 or 8 numbers per vertex depending on the presence of the [constant ARRAY_FLAG_USE_8_BONE_WEIGHTS] flag. */ + ARRAY_BONES = 10, + + /** [PackedFloat32Array] or [PackedFloat64Array] of bone weights in the range `0.0` to `1.0` (inclusive). Contains either 4 or 8 numbers per vertex depending on the presence of the [constant ARRAY_FLAG_USE_8_BONE_WEIGHTS] flag. */ + ARRAY_WEIGHTS = 11, + + /** [PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i* 'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices. + * For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line. + */ + ARRAY_INDEX = 12, + + /** Represents the size of the [enum ArrayType] enum. */ + ARRAY_MAX = 13, + } + enum ArrayCustomFormat { + /** Indicates this custom channel contains unsigned normalized byte colors from 0 to 1, encoded as [PackedByteArray]. */ + ARRAY_CUSTOM_RGBA8_UNORM = 0, + + /** Indicates this custom channel contains signed normalized byte colors from -1 to 1, encoded as [PackedByteArray]. */ + ARRAY_CUSTOM_RGBA8_SNORM = 1, + + /** Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. Only red and green channels are used. */ + ARRAY_CUSTOM_RG_HALF = 2, + + /** Indicates this custom channel contains half precision float colors, encoded as [PackedByteArray]. */ + ARRAY_CUSTOM_RGBA_HALF = 3, + + /** Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only the red channel is used. */ + ARRAY_CUSTOM_R_FLOAT = 4, + + /** Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red and green channels are used. */ + ARRAY_CUSTOM_RG_FLOAT = 5, + + /** Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. Only red, green and blue channels are used. */ + ARRAY_CUSTOM_RGB_FLOAT = 6, + + /** Indicates this custom channel contains full float colors, in a [PackedFloat32Array]. */ + ARRAY_CUSTOM_RGBA_FLOAT = 7, + + /** Represents the size of the [enum ArrayCustomFormat] enum. */ + ARRAY_CUSTOM_MAX = 8, + } + enum ArrayFormat { + /** Mesh array contains vertices. All meshes require a vertex array so this should always be present. */ + ARRAY_FORMAT_VERTEX = 1, + + /** Mesh array contains normals. */ + ARRAY_FORMAT_NORMAL = 2, + + /** Mesh array contains tangents. */ + ARRAY_FORMAT_TANGENT = 4, + + /** Mesh array contains colors. */ + ARRAY_FORMAT_COLOR = 8, + + /** Mesh array contains UVs. */ + ARRAY_FORMAT_TEX_UV = 16, + + /** Mesh array contains second UV. */ + ARRAY_FORMAT_TEX_UV2 = 32, + + /** Mesh array contains custom channel index 0. */ + ARRAY_FORMAT_CUSTOM0 = 64, + + /** Mesh array contains custom channel index 1. */ + ARRAY_FORMAT_CUSTOM1 = 128, + + /** Mesh array contains custom channel index 2. */ + ARRAY_FORMAT_CUSTOM2 = 256, + + /** Mesh array contains custom channel index 3. */ + ARRAY_FORMAT_CUSTOM3 = 512, + + /** Mesh array contains bones. */ + ARRAY_FORMAT_BONES = 1024, + + /** Mesh array contains bone weights. */ + ARRAY_FORMAT_WEIGHTS = 2048, + + /** Mesh array uses indices. */ + ARRAY_FORMAT_INDEX = 4096, + + /** Mask of mesh channels permitted in blend shapes. */ + ARRAY_FORMAT_BLEND_SHAPE_MASK = 7, + + /** Shift of first custom channel. */ + ARRAY_FORMAT_CUSTOM_BASE = 13, + + /** Number of format bits per custom channel. See [enum ArrayCustomFormat]. */ + ARRAY_FORMAT_CUSTOM_BITS = 3, + + /** Amount to shift [enum ArrayCustomFormat] for custom channel index 0. */ + ARRAY_FORMAT_CUSTOM0_SHIFT = 13, + + /** Amount to shift [enum ArrayCustomFormat] for custom channel index 1. */ + ARRAY_FORMAT_CUSTOM1_SHIFT = 16, + + /** Amount to shift [enum ArrayCustomFormat] for custom channel index 2. */ + ARRAY_FORMAT_CUSTOM2_SHIFT = 19, + + /** Amount to shift [enum ArrayCustomFormat] for custom channel index 3. */ + ARRAY_FORMAT_CUSTOM3_SHIFT = 22, + + /** Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat]. */ + ARRAY_FORMAT_CUSTOM_MASK = 7, + + /** Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit]. */ + ARRAY_COMPRESS_FLAGS_BASE = 25, + + /** Flag used to mark that the array contains 2D vertices. */ + ARRAY_FLAG_USE_2D_VERTICES = 33554432, + + /** Flag indices that the mesh data will use `GL_DYNAMIC_DRAW` on GLES. Unused on Vulkan. */ + ARRAY_FLAG_USE_DYNAMIC_UPDATE = 67108864, + + /** Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length. */ + ARRAY_FLAG_USE_8_BONE_WEIGHTS = 134217728, + + /** Flag used to mark that the mesh intentionally contains no vertex array. */ + ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY = 268435456, + + /** Flag used to mark that a mesh is using compressed attributes (vertices, normals, tangents, UVs). When this form of compression is enabled, vertex positions will be packed into an RGBA16UNORM attribute and scaled in the vertex shader. The normal and tangent will be packed into an RG16UNORM representing an axis, and a 16-bit float stored in the A-channel of the vertex. UVs will use 16-bit normalized floats instead of full 32-bit signed floats. When using this compression mode you must use either vertices, normals, and tangents or only vertices. You cannot use normals without tangents. Importers will automatically enable this compression if they can. */ + ARRAY_FLAG_COMPRESS_ATTRIBUTES = 536870912, + } + enum BlendShapeMode { + /** Blend shapes are normalized. */ + BLEND_SHAPE_MODE_NORMALIZED = 0, + + /** Blend shapes are relative to base weight. */ + BLEND_SHAPE_MODE_RELATIVE = 1, + } + } + /** A [Resource] that contains vertex array-based geometry. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_mesh.html + */ + class Mesh extends Resource { + constructor(identifier?: any) + /** Virtual method to override the surface count for a custom class extending [Mesh]. */ + /* gdvirtual */ _get_surface_count(): int64 + + /** Virtual method to override the surface array length for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_array_len(index: int64): int64 + + /** Virtual method to override the surface array index length for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_array_index_len(index: int64): int64 + + /** Virtual method to override the surface arrays for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_arrays(index: int64): GArray + + /** Virtual method to override the blend shape arrays for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_blend_shape_arrays(index: int64): GArray + + /** Virtual method to override the surface LODs for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_lods(index: int64): GDictionary + + /** Virtual method to override the surface format for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_format(index: int64): int64 + + /** Virtual method to override the surface primitive type for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_primitive_type(index: int64): int64 + + /** Virtual method to override the setting of a [param material] at the given [param index] for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_set_material(index: int64, material: Material): void + + /** Virtual method to override the surface material for a custom class extending [Mesh]. */ + /* gdvirtual */ _surface_get_material(index: int64): Material + + /** Virtual method to override the number of blend shapes for a custom class extending [Mesh]. */ + /* gdvirtual */ _get_blend_shape_count(): int64 + + /** Virtual method to override the retrieval of blend shape names for a custom class extending [Mesh]. */ + /* gdvirtual */ _get_blend_shape_name(index: int64): StringName + + /** Virtual method to override the names of blend shapes for a custom class extending [Mesh]. */ + /* gdvirtual */ _set_blend_shape_name(index: int64, name: StringName): void + + /** Virtual method to override the [AABB] for a custom class extending [Mesh]. */ + /* gdvirtual */ _get_aabb(): AABB + + /** Returns the smallest [AABB] enclosing this mesh in local space. Not affected by `custom_aabb`. + * + * **Note:** This is only implemented for [ArrayMesh] and [PrimitiveMesh]. + */ + get_aabb(): AABB + + /** Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. */ + get_faces(): PackedVector3Array + + /** Returns the number of surfaces that the [Mesh] holds. This is equivalent to [method MeshInstance3D.get_surface_override_material_count]. */ + get_surface_count(): int64 + + /** Returns the arrays for the vertices, normals, UVs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]). */ + surface_get_arrays(surf_idx: int64): GArray + + /** Returns the blend shape arrays for the requested surface. */ + surface_get_blend_shape_arrays(surf_idx: int64): GArray + + /** Sets a [Material] for a given surface. Surface will be rendered using this material. + * + * **Note:** This assigns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To set the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.set_surface_override_material] instead. + */ + surface_set_material(surf_idx: int64, material: Material): void + + /** Returns a [Material] in a given surface. Surface is rendered using this material. + * + * **Note:** This returns the material within the [Mesh] resource, not the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties. To get the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, use [method MeshInstance3D.get_surface_override_material] instead. + */ + surface_get_material(surf_idx: int64): Material + + /** Creates a placeholder version of this resource ([PlaceholderMesh]). */ + create_placeholder(): Resource + + /** Calculate a [ConcavePolygonShape3D] from the mesh. */ + create_trimesh_shape(): ConcavePolygonShape3D + + /** Calculate a [ConvexPolygonShape3D] from the mesh. + * If [param clean] is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed. + * If [param simplify] is `true`, the geometry can be further simplified to reduce the number of vertices. Disabled by default. + */ + create_convex_shape(clean: boolean = true, simplify: boolean = false): ConvexPolygonShape3D + + /** Calculate an outline mesh at a defined offset (margin) from the original mesh. + * + * **Note:** This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). + */ + create_outline(margin: float64): Mesh + + /** Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP]. */ + generate_triangle_mesh(): TriangleMesh + + /** Sets a hint to be used for lightmap resolution. */ + get lightmap_size_hint(): Vector2i + set lightmap_size_hint(value: Vector2i) + } + namespace MeshConvexDecompositionSettings { + enum Mode { + /** Constant for voxel-based approximate convex decomposition. */ + CONVEX_DECOMPOSITION_MODE_VOXEL = 0, + + /** Constant for tetrahedron-based approximate convex decomposition. */ + CONVEX_DECOMPOSITION_MODE_TETRAHEDRON = 1, + } + } + /** Parameters to be used with a [Mesh] convex decomposition operation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshconvexdecompositionsettings.html + */ + class MeshConvexDecompositionSettings extends RefCounted { + constructor(identifier?: any) + /** Maximum concavity. Ranges from `0.0` to `1.0`. */ + get max_concavity(): float64 + set max_concavity(value: float64) + + /** Controls the bias toward clipping along symmetry planes. Ranges from `0.0` to `1.0`. */ + get symmetry_planes_clipping_bias(): float64 + set symmetry_planes_clipping_bias(value: float64) + + /** Controls the bias toward clipping along revolution axes. Ranges from `0.0` to `1.0`. */ + get revolution_axes_clipping_bias(): float64 + set revolution_axes_clipping_bias(value: float64) + + /** Controls the adaptive sampling of the generated convex-hulls. Ranges from `0.0` to `0.01`. */ + get min_volume_per_convex_hull(): float64 + set min_volume_per_convex_hull(value: float64) + + /** Maximum number of voxels generated during the voxelization stage. */ + get resolution(): int64 + set resolution(value: int64) + + /** Controls the maximum number of triangles per convex-hull. Ranges from `4` to `1024`. */ + get max_num_vertices_per_convex_hull(): int64 + set max_num_vertices_per_convex_hull(value: int64) + + /** Controls the granularity of the search for the "best" clipping plane. Ranges from `1` to `16`. */ + get plane_downsampling(): int64 + set plane_downsampling(value: int64) + + /** Controls the precision of the convex-hull generation process during the clipping plane selection stage. Ranges from `1` to `16`. */ + get convex_hull_downsampling(): int64 + set convex_hull_downsampling(value: int64) + + /** If `true`, normalizes the mesh before applying the convex decomposition. */ + get normalize_mesh(): boolean + set normalize_mesh(value: boolean) + + /** Mode for the approximate convex decomposition. */ + get mode(): int64 + set mode(value: int64) + + /** If `true`, uses approximation for computing convex hulls. */ + get convex_hull_approximation(): boolean + set convex_hull_approximation(value: boolean) + + /** The maximum number of convex hulls to produce from the merge operation. */ + get max_convex_hulls(): int64 + set max_convex_hulls(value: int64) + + /** If `true`, projects output convex hull vertices onto the original source mesh to increase floating-point accuracy of the results. */ + get project_hull_vertices(): boolean + set project_hull_vertices(value: boolean) + } + /** Helper tool to access and edit [Mesh] data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshdatatool.html + */ + class MeshDataTool extends RefCounted { + constructor(identifier?: any) + /** Clears all data currently in MeshDataTool. */ + clear(): void + + /** Uses specified surface of given [Mesh] to populate data for MeshDataTool. + * Requires [Mesh] with primitive type [constant Mesh.PRIMITIVE_TRIANGLES]. + */ + create_from_surface(mesh: ArrayMesh, surface: int64): GError + + /** Adds a new surface to specified [Mesh] with edited data. */ + commit_to_surface(mesh: ArrayMesh, compression_flags: int64 = 0): GError + + /** Returns the [Mesh]'s format as a combination of the [enum Mesh.ArrayFormat] flags. For example, a mesh containing both vertices and normals would return a format of `3` because [constant Mesh.ARRAY_FORMAT_VERTEX] is `1` and [constant Mesh.ARRAY_FORMAT_NORMAL] is `2`. */ + get_format(): int64 + + /** Returns the total number of vertices in [Mesh]. */ + get_vertex_count(): int64 + + /** Returns the number of edges in this [Mesh]. */ + get_edge_count(): int64 + + /** Returns the number of faces in this [Mesh]. */ + get_face_count(): int64 + + /** Sets the position of the given vertex. */ + set_vertex(idx: int64, vertex: Vector3): void + + /** Returns the position of the given vertex. */ + get_vertex(idx: int64): Vector3 + + /** Sets the normal of the given vertex. */ + set_vertex_normal(idx: int64, normal: Vector3): void + + /** Returns the normal of the given vertex. */ + get_vertex_normal(idx: int64): Vector3 + + /** Sets the tangent of the given vertex. */ + set_vertex_tangent(idx: int64, tangent: Plane): void + + /** Returns the tangent of the given vertex. */ + get_vertex_tangent(idx: int64): Plane + + /** Sets the UV of the given vertex. */ + set_vertex_uv(idx: int64, uv: Vector2): void + + /** Returns the UV of the given vertex. */ + get_vertex_uv(idx: int64): Vector2 + + /** Sets the UV2 of the given vertex. */ + set_vertex_uv2(idx: int64, uv2: Vector2): void + + /** Returns the UV2 of the given vertex. */ + get_vertex_uv2(idx: int64): Vector2 + + /** Sets the color of the given vertex. */ + set_vertex_color(idx: int64, color: Color): void + + /** Returns the color of the given vertex. */ + get_vertex_color(idx: int64): Color + + /** Sets the bones of the given vertex. */ + set_vertex_bones(idx: int64, bones: PackedInt32Array | int32[]): void + + /** Returns the bones of the given vertex. */ + get_vertex_bones(idx: int64): PackedInt32Array + + /** Sets the bone weights of the given vertex. */ + set_vertex_weights(idx: int64, weights: PackedFloat32Array | float32[]): void + + /** Returns bone weights of the given vertex. */ + get_vertex_weights(idx: int64): PackedFloat32Array + + /** Sets the metadata associated with the given vertex. */ + set_vertex_meta(idx: int64, meta: any): void + + /** Returns the metadata associated with the given vertex. */ + get_vertex_meta(idx: int64): any + + /** Returns an array of edges that share the given vertex. */ + get_vertex_edges(idx: int64): PackedInt32Array + + /** Returns an array of faces that share the given vertex. */ + get_vertex_faces(idx: int64): PackedInt32Array + + /** Returns index of specified vertex connected to given edge. + * Vertex argument can only be 0 or 1 because edges are comprised of two vertices. + */ + get_edge_vertex(idx: int64, vertex: int64): int64 + + /** Returns array of faces that touch given edge. */ + get_edge_faces(idx: int64): PackedInt32Array + + /** Sets the metadata of the given edge. */ + set_edge_meta(idx: int64, meta: any): void + + /** Returns meta information assigned to given edge. */ + get_edge_meta(idx: int64): any + + /** Returns the specified vertex index of the given face. + * Vertex argument must be either 0, 1, or 2 because faces contain three vertices. + * **Example:** + * + */ + get_face_vertex(idx: int64, vertex: int64): int64 + + /** Returns specified edge associated with given face. + * Edge argument must be either 0, 1, or 2 because a face only has three edges. + */ + get_face_edge(idx: int64, edge: int64): int64 + + /** Sets the metadata of the given face. */ + set_face_meta(idx: int64, meta: any): void + + /** Returns the metadata associated with the given face. */ + get_face_meta(idx: int64): any + + /** Calculates and returns the face normal of the given face. */ + get_face_normal(idx: int64): Vector3 + + /** Sets the material to be used by newly-constructed [Mesh]. */ + set_material(material: Material): void + + /** Returns the material assigned to the [Mesh]. */ + get_material(): Material + } + class MeshEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Node used for displaying a [Mesh] in 2D. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshinstance2d.html + */ + class MeshInstance2D extends Node2D { + constructor(identifier?: any) + /** The [Mesh] that will be drawn by the [MeshInstance2D]. */ + get mesh(): Mesh + set mesh(value: Mesh) + + /** The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** Emitted when the [member texture] is changed. */ + readonly texture_changed: Signal0 + } + /** Node that instances meshes into a scenario. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshinstance3d.html + */ + class MeshInstance3D extends GeometryInstance3D { + constructor(identifier?: any) + /** Returns the internal [SkinReference] containing the skeleton's [RID] attached to this RID. See also [method Resource.get_rid], [method SkinReference.get_skeleton], and [method RenderingServer.instance_attach_skeleton]. */ + get_skin_reference(): SkinReference + + /** Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count]. See also [method get_surface_override_material]. */ + get_surface_override_material_count(): int64 + + /** Sets the override [param material] for the specified [param surface] of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with [member mesh]. + * + * **Note:** This assigns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To set the material within the [Mesh] resource, use [method Mesh.surface_get_material] instead. + */ + set_surface_override_material(surface: int64, material: Material): void + + /** Returns the override [Material] for the specified [param surface] of the [Mesh] resource. See also [method get_surface_override_material_count]. + * + * **Note:** This returns the [Material] associated to the [MeshInstance3D]'s Surface Material Override properties, not the material within the [Mesh] resource. To get the material within the [Mesh] resource, use [method Mesh.surface_get_material] instead. + */ + get_surface_override_material(surface: int64): Material + + /** Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [member mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material. + * Returns `null` if no material is active, including when [member mesh] is `null`. + */ + get_active_material(surface: int64): Material + + /** This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. */ + create_trimesh_collision(): void + + /** This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. + * If [param clean] is `true` (default), duplicate and interior vertices are removed automatically. You can set it to `false` to make the process faster if not needed. + * If [param simplify] is `true`, the geometry can be further simplified to reduce the number of vertices. Disabled by default. + */ + create_convex_collision(clean: boolean = true, simplify: boolean = false): void + + /** This helper creates a [StaticBody3D] child node with multiple [ConvexPolygonShape3D] collision shapes calculated from the mesh geometry via convex decomposition. The convex decomposition operation can be controlled with parameters from the optional [param settings]. */ + create_multiple_convex_collisions(settings: MeshConvexDecompositionSettings = undefined): void + + /** Returns the number of blend shapes available. Produces an error if [member mesh] is `null`. */ + get_blend_shape_count(): int64 + + /** Returns the index of the blend shape with the given [param name]. Returns `-1` if no blend shape with this name exists, including when [member mesh] is `null`. */ + find_blend_shape_by_name(name: StringName): int64 + + /** Returns the value of the blend shape at the given [param blend_shape_idx]. Returns `0.0` and produces an error if [member mesh] is `null` or doesn't have a blend shape at that index. */ + get_blend_shape_value(blend_shape_idx: int64): float64 + + /** Sets the value of the blend shape at [param blend_shape_idx] to [param value]. Produces an error if [member mesh] is `null` or doesn't have a blend shape at that index. */ + set_blend_shape_value(blend_shape_idx: int64, value: float64): void + + /** This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. */ + create_debug_tangents(): void + + /** Takes a snapshot from the current [ArrayMesh] with all blend shapes applied according to their current weights and bakes it to the provided [param existing] mesh. If no [param existing] mesh is provided a new [ArrayMesh] is created, baked and returned. Mesh surface materials are not copied. + * **Performance:** [Mesh] data needs to be received from the GPU, stalling the [RenderingServer] in the process. + */ + bake_mesh_from_current_blend_shape_mix(existing: ArrayMesh = undefined): ArrayMesh + + /** The [Mesh] resource for the instance. */ + get mesh(): Mesh + set mesh(value: Mesh) + + /** The [Skin] to be used by this instance. */ + get skin(): Skin + set skin(value: Skin) + + /** [NodePath] to the [Skeleton3D] associated with the instance. */ + get skeleton(): NodePath + set skeleton(value: NodePath | string) + } + class MeshInstance3DEditor extends Control { + constructor(identifier?: any) + } + class MeshInstance3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class MeshInstance3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Library of meshes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshlibrary.html + */ + class MeshLibrary extends Resource { + constructor(identifier?: any) + /** Creates a new item in the library with the given ID. + * You can get an unused ID from [method get_last_unused_item_id]. + */ + create_item(id: int64): void + + /** Sets the item's name. + * This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]. + */ + set_item_name(id: int64, name: string): void + + /** Sets the item's mesh. */ + set_item_mesh(id: int64, mesh: Mesh): void + + /** Sets the transform to apply to the item's mesh. */ + set_item_mesh_transform(id: int64, mesh_transform: Transform3D): void + + /** Sets the item's navigation mesh. */ + set_item_navigation_mesh(id: int64, navigation_mesh: NavigationMesh): void + + /** Sets the transform to apply to the item's navigation mesh. */ + set_item_navigation_mesh_transform(id: int64, navigation_mesh: Transform3D): void + + /** Sets the item's navigation layers bitmask. */ + set_item_navigation_layers(id: int64, navigation_layers: int64): void + + /** Sets an item's collision shapes. + * The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY]. + */ + set_item_shapes(id: int64, shapes: GArray): void + + /** Sets a texture to use as the item's preview icon in the editor. */ + set_item_preview(id: int64, texture: Texture2D): void + + /** Returns the item's name. */ + get_item_name(id: int64): string + + /** Returns the item's mesh. */ + get_item_mesh(id: int64): Mesh + + /** Returns the transform applied to the item's mesh. */ + get_item_mesh_transform(id: int64): Transform3D + + /** Returns the item's navigation mesh. */ + get_item_navigation_mesh(id: int64): NavigationMesh + + /** Returns the transform applied to the item's navigation mesh. */ + get_item_navigation_mesh_transform(id: int64): Transform3D + + /** Returns the item's navigation layers bitmask. */ + get_item_navigation_layers(id: int64): int64 + + /** Returns an item's collision shapes. + * The array consists of each [Shape3D] followed by its [Transform3D]. + */ + get_item_shapes(id: int64): GArray + + /** When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project. */ + get_item_preview(id: int64): Texture2D + + /** Removes the item. */ + remove_item(id: int64): void + + /** Returns the first item with the given name, or `-1` if no item is found. */ + find_item_by_name(name: string): int64 + + /** Clears the library. */ + clear(): void + + /** Returns the list of item IDs in use. */ + get_item_list(): PackedInt32Array + + /** Gets an unused ID for a new item. */ + get_last_unused_item_id(): int64 + } + class MeshLibraryEditor extends Control { + constructor(identifier?: any) + } + class MeshLibraryEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Simple texture that uses a mesh to draw itself. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_meshtexture.html + */ + class MeshTexture extends Texture2D { + constructor(identifier?: any) + /** Sets the mesh used to draw. It must be a mesh using 2D vertices. */ + get mesh(): Mesh + set mesh(value: Mesh) + + /** Sets the base texture that the Mesh will use to draw. */ + get base_texture(): Texture2D + set base_texture(value: Texture2D) + + /** Sets the size of the image, needed for reference. */ + get image_size(): Vector2 + set image_size(value: Vector2) + } + /** Interpolates an abstract value and supplies it to a method called over time. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_methodtweener.html + */ + class MethodTweener extends Tweener { + constructor(identifier?: any) + /** Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay. */ + set_delay(delay: float64): MethodTweener + + /** Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. */ + set_trans(trans: Tween.TransitionType): MethodTweener + + /** Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. */ + set_ease(ease: Tween.EaseType): MethodTweener + } + /** An internal editor class intended for keeping the data of unrecognized nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_missingnode.html + */ + class MissingNode extends Node { + constructor(identifier?: any) + /** The name of the class this node was supposed to be (see [method Object.get_class]). */ + get original_class(): string + set original_class(value: string) + + /** Returns the path of the scene this node was instance of originally. */ + get original_scene(): string + set original_scene(value: string) + + /** If `true`, allows new properties to be set along with existing ones. If `false`, only existing properties' values can be set, and new properties cannot be added. */ + get recording_properties(): boolean + set recording_properties(value: boolean) + } + /** An internal editor class intended for keeping the data of unrecognized resources. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_missingresource.html + */ + class MissingResource extends Resource { + constructor(identifier?: any) + /** The name of the class this resource was supposed to be (see [method Object.get_class]). */ + get original_class(): string + set original_class(value: string) + + /** If set to `true`, allows new properties to be added on top of the existing ones with [method Object.set]. */ + get recording_properties(): boolean + set recording_properties(value: boolean) + } + /** Generic mobile VR implementation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_mobilevrinterface.html + */ + class MobileVRInterface extends XRInterface { + constructor(identifier?: any) + /** The height at which the camera is placed in relation to the ground (i.e. [XROrigin3D] node). */ + get eye_height(): float64 + set eye_height(value: float64) + + /** The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye. */ + get iod(): float64 + set iod(value: float64) + + /** The width of the display in centimeters. */ + get display_width(): float64 + set display_width(value: float64) + + /** The distance between the display and the lenses inside of the device in centimeters. */ + get display_to_lens(): float64 + set display_to_lens(value: float64) + + /** Set the offset rect relative to the area being rendered. A length of 1 represents the whole rendering area on that axis. */ + get offset_rect(): Rect2 + set offset_rect(value: Rect2) + + /** The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance. */ + get oversample(): float64 + set oversample(value: float64) + + /** The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect. */ + get k1(): float64 + set k1(value: float64) + + /** The k2 lens factor, see k1. */ + get k2(): float64 + set k2(value: float64) + + /** The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + * + * **Note:** Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR]. + */ + get vrs_min_radius(): float64 + set vrs_min_radius(value: float64) + + /** The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + * + * **Note:** Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR]. + */ + get vrs_strength(): float64 + set vrs_strength(value: float64) + } + /** Abstract class for non-real-time video recording encoders. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_moviewriter.html + */ + class MovieWriter extends Object { + constructor(identifier?: any) + /** Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if [method _get_audio_mix_rate] is not overridden. */ + /* gdvirtual */ _get_audio_mix_rate(): int64 + + /** Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to [constant AudioServer.SPEAKER_MODE_STEREO] if [method _get_audio_speaker_mode] is not overridden. */ + /* gdvirtual */ _get_audio_speaker_mode(): AudioServer.SpeakerMode + + /** Called when the engine determines whether this [MovieWriter] is able to handle the file at [param path]. Must return `true` if this [MovieWriter] is able to handle the given file path, `false` otherwise. Typically, [method _handles_file] is overridden as follows to allow the user to record a file at any path with a given file extension: + * + */ + /* gdvirtual */ _handles_file(path: string): boolean + + /** Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the `--fixed-fps ` [url=https://docs.godotengine.org/en/4.3/tutorials/editor/command_line_tutorial.html]command line argument[/url]. */ + /* gdvirtual */ _write_begin(movie_size: Vector2i, fps: int64, base_path: string): GError + + /** Called at the end of every rendered frame. The [param frame_image] and [param audio_frame_block] function arguments should be written to. */ + /* gdvirtual */ _write_frame(frame_image: Image, audio_frame_block: int64): GError + + /** Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager's close button, or when [method SceneTree.quit] is called. + * + * **Note:** Pressing [kbd]Ctrl + C[/kbd] on the terminal running the editor/project does *not* result in [method _write_end] being called. + */ + /* gdvirtual */ _write_end(): void + + /** Adds a writer to be usable by the engine. The supported file extensions can be set by overriding [method _handles_file]. + * + * **Note:** [method add_writer] must be called early enough in the engine initialization to work, as movie writing is designed to start at the same time as the rest of the engine. + */ + static add_writer(writer: MovieWriter): void + } + class MovieWriterMJPEG extends MovieWriter { + constructor(identifier?: any) + } + class MovieWriterPNGWAV extends MovieWriter { + constructor(identifier?: any) + } + namespace MultiMesh { + enum TransformFormat { + /** Use this when using 2D transforms. */ + TRANSFORM_2D = 0, + + /** Use this when using 3D transforms. */ + TRANSFORM_3D = 1, + } + } + /** Provides high-performance drawing of a mesh multiple times using GPU instancing. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multimesh.html + */ + class MultiMesh extends Resource { + constructor(identifier?: any) + /** Sets the [Transform3D] for a specific instance. */ + set_instance_transform(instance: int64, transform: Transform3D): void + + /** Sets the [Transform2D] for a specific instance. */ + set_instance_transform_2d(instance: int64, transform: Transform2D): void + + /** Returns the [Transform3D] of a specific instance. */ + get_instance_transform(instance: int64): Transform3D + + /** Returns the [Transform2D] of a specific instance. */ + get_instance_transform_2d(instance: int64): Transform2D + + /** Sets the color of a specific instance by *multiplying* the mesh's existing vertex colors. This allows for different color tinting per instance. + * + * **Note:** Each component is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. + * For the color to take effect, ensure that [member use_colors] is `true` on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is `true` on the material. If you intend to set an absolute color instead of tinting, make sure the material's albedo color is set to pure white (`Color(1, 1, 1)`). + */ + set_instance_color(instance: int64, color: Color): void + + /** Gets a specific instance's color multiplier. */ + get_instance_color(instance: int64): Color + + /** Sets custom data for a specific instance. [param custom_data] is a [Color] type only to contain 4 floating-point numbers. + * + * **Note:** Each number is stored in 32 bits in the Forward+ and Mobile rendering methods, but is packed into 16 bits in the Compatibility rendering method. + * For the custom data to be used, ensure that [member use_custom_data] is `true`. + * This custom instance data has to be manually accessed in your custom shader using `INSTANCE_CUSTOM`. + */ + set_instance_custom_data(instance: int64, custom_data: Color): void + + /** Returns the custom data that has been set for a specific instance. */ + get_instance_custom_data(instance: int64): Color + + /** Returns the visibility axis-aligned bounding box in local space. */ + get_aabb(): AABB + + /** Format of transform used to transform mesh, either 2D or 3D. */ + get transform_format(): int64 + set transform_format(value: int64) + + /** If `true`, the [MultiMesh] will use color data (see [method set_instance_color]). Can only be set when [member instance_count] is `0` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to `0`. */ + get use_colors(): boolean + set use_colors(value: boolean) + + /** If `true`, the [MultiMesh] will use custom data (see [method set_instance_custom_data]). Can only be set when [member instance_count] is `0` or less. This means that you need to call this method before setting the instance count, or temporarily reset it to `0`. */ + get use_custom_data(): boolean + set use_custom_data(value: boolean) + + /** Custom AABB for this MultiMesh resource. Setting this manually prevents costly runtime AABB recalculations. */ + get custom_aabb(): AABB + set custom_aabb(value: AABB) + + /** Number of instances that will get drawn. This clears and (re)sizes the buffers. Setting data format or flags afterwards will have no effect. + * By default, all instances are drawn but you can limit this with [member visible_instance_count]. + */ + get instance_count(): int64 + set instance_count(value: int64) + + /** Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. */ + get visible_instance_count(): int64 + set visible_instance_count(value: int64) + + /** [Mesh] resource to be instanced. + * The looks of the individual instances can be modified using [method set_instance_color] and [method set_instance_custom_data]. + */ + get mesh(): Mesh + set mesh(value: Mesh) + get buffer(): PackedFloat32Array + set buffer(value: PackedFloat32Array | float32[]) + + /** Array containing each [Transform3D] value used by all instances of this mesh, as a [PackedVector3Array]. Each transform is divided into 4 [Vector3] values corresponding to the transforms' `x`, `y`, `z`, and `origin`. */ + get transform_array(): PackedVector3Array + set transform_array(value: PackedVector3Array | Vector3[]) + + /** Array containing each [Transform2D] value used by all instances of this mesh, as a [PackedVector2Array]. Each transform is divided into 3 [Vector2] values corresponding to the transforms' `x`, `y`, and `origin`. */ + get transform_2d_array(): PackedVector2Array + set transform_2d_array(value: PackedVector2Array | Vector2[]) + + /** Array containing each [Color] used by all instances of this mesh. */ + get color_array(): PackedColorArray + set color_array(value: PackedColorArray | Color[]) + + /** Array containing each custom data value used by all instances of this mesh, as a [PackedColorArray]. */ + get custom_data_array(): PackedColorArray + set custom_data_array(value: PackedColorArray | Color[]) + } + class MultiMeshEditor extends Control { + constructor(identifier?: any) + } + class MultiMeshEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Node that instances a [MultiMesh] in 2D. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multimeshinstance2d.html + */ + class MultiMeshInstance2D extends Node2D { + constructor(identifier?: any) + /** The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. */ + get multimesh(): MultiMesh + set multimesh(value: MultiMesh) + + /** The [Texture2D] that will be used if using the default [CanvasItemMaterial]. Can be accessed as `TEXTURE` in CanvasItem shader. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** Emitted when the [member texture] is changed. */ + readonly texture_changed: Signal0 + } + /** Node that instances a [MultiMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multimeshinstance3d.html + */ + class MultiMeshInstance3D extends GeometryInstance3D { + constructor(identifier?: any) + /** The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance3D]. */ + get multimesh(): MultiMesh + set multimesh(value: MultiMesh) + } + namespace MultiplayerAPI { + enum RPCMode { + /** Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. */ + RPC_MODE_DISABLED = 0, + + /** Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the `@rpc("any_peer")` annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. */ + RPC_MODE_ANY_PEER = 1, + + /** Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the `@rpc("authority")` annotation. See [method Node.set_multiplayer_authority]. */ + RPC_MODE_AUTHORITY = 2, + } + } + /** High-level multiplayer API interface. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayerapi.html + */ + class MultiplayerAPI extends RefCounted { + constructor(identifier?: any) + /** Returns `true` if there is a [member multiplayer_peer] set. */ + has_multiplayer_peer(): boolean + + /** Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer]. */ + get_unique_id(): int64 + + /** Returns `true` if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections). */ + is_server(): boolean + + /** Returns the sender's peer ID for the RPC currently being executed. + * + * **Note:** This method returns `0` when called outside of an RPC. As such, the original peer ID may be lost when code execution is delayed (such as with GDScript's `await` keyword). + */ + get_remote_sender_id(): int64 + + /** Method used for polling the MultiplayerAPI. You only need to worry about this if you set [member SceneTree.multiplayer_poll] to `false`. By default, [SceneTree] will poll its MultiplayerAPI(s) for you. + * + * **Note:** This method results in RPCs being called, so they will be executed in the same context of this function (e.g. `_process`, `physics`, [Thread]). + */ + poll(): GError + + /** Sends an RPC to the target [param peer]. The given [param method] will be called on the remote [param object] with the provided [param arguments]. The RPC may also be called locally depending on the implementation and RPC configuration. See [method Node.rpc] and [method Node.rpc_config]. + * + * **Note:** Prefer using [method Node.rpc], [method Node.rpc_id], or `my_method.rpc(peer, arg1, arg2, ...)` (in GDScript), since they are faster. This method is mostly useful in conjunction with [MultiplayerAPIExtension] when augmenting or replacing the multiplayer capabilities. + */ + rpc(peer: int64, object: Object, method: StringName, arguments_: GArray = []): GError + + /** Notifies the MultiplayerAPI of a new [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing `null` and a valid [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. + * + * **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension]. + */ + object_configuration_add(object: Object, configuration: any): GError + + /** Notifies the MultiplayerAPI to remove a [param configuration] for the given [param object]. This method is used internally by [SceneTree] to configure the root path for this MultiplayerAPI (passing `null` and an empty [NodePath] as [param configuration]). This method can be further used by MultiplayerAPI implementations to provide additional features, refer to specific implementation (e.g. [SceneMultiplayer]) for details on how they use it. + * + * **Note:** This method is mostly relevant when extending or overriding the MultiplayerAPI behavior via [MultiplayerAPIExtension]. + */ + object_configuration_remove(object: Object, configuration: any): GError + + /** Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer]. */ + get_peers(): PackedInt32Array + + /** Sets the default MultiplayerAPI implementation class. This method can be used by modules and extensions to configure which implementation will be used by [SceneTree] when the engine starts. */ + static set_default_interface(interface_name: StringName): void + + /** Returns the default MultiplayerAPI implementation class name. This is usually `"SceneMultiplayer"` when [SceneMultiplayer] is available. See [method set_default_interface]. */ + static get_default_interface(): StringName + + /** Returns a new instance of the default MultiplayerAPI. */ + static create_default_interface(): MultiplayerAPI + + /** The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. */ + get multiplayer_peer(): MultiplayerPeer + set multiplayer_peer(value: MultiplayerPeer) + + /** Emitted when this MultiplayerAPI's [member multiplayer_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). */ + readonly peer_connected: Signal1 + + /** Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. */ + readonly peer_disconnected: Signal1 + + /** Emitted when this MultiplayerAPI's [member multiplayer_peer] successfully connected to a server. Only emitted on clients. */ + readonly connected_to_server: Signal0 + + /** Emitted when this MultiplayerAPI's [member multiplayer_peer] fails to establish a connection to a server. Only emitted on clients. */ + readonly connection_failed: Signal0 + + /** Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients. */ + readonly server_disconnected: Signal0 + } + /** Base class used for extending the [MultiplayerAPI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayerapiextension.html + */ + class MultiplayerAPIExtension extends MultiplayerAPI { + constructor(identifier?: any) + /** Callback for [method MultiplayerAPI.poll]. */ + /* gdvirtual */ _poll(): GError + + /** Called when the [member MultiplayerAPI.multiplayer_peer] is set. */ + /* gdvirtual */ _set_multiplayer_peer(multiplayer_peer: MultiplayerPeer): void + + /** Called when the [member MultiplayerAPI.multiplayer_peer] is retrieved. */ + /* gdvirtual */ _get_multiplayer_peer(): MultiplayerPeer + + /** Callback for [method MultiplayerAPI.get_unique_id]. */ + /* gdvirtual */ _get_unique_id(): int64 + + /** Callback for [method MultiplayerAPI.get_peers]. */ + /* gdvirtual */ _get_peer_ids(): PackedInt32Array + + /** Callback for [method MultiplayerAPI.rpc]. */ + /* gdvirtual */ _rpc(peer: int64, object: Object, method: StringName, args: GArray): GError + + /** Callback for [method MultiplayerAPI.get_remote_sender_id]. */ + /* gdvirtual */ _get_remote_sender_id(): int64 + + /** Callback for [method MultiplayerAPI.object_configuration_add]. */ + /* gdvirtual */ _object_configuration_add(object: Object, configuration: any): GError + + /** Callback for [method MultiplayerAPI.object_configuration_remove]. */ + /* gdvirtual */ _object_configuration_remove(object: Object, configuration: any): GError + } + class MultiplayerEditorDebugger extends EditorDebuggerPlugin { + constructor(identifier?: any) + readonly open_request: Signal1 + } + class MultiplayerEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace MultiplayerPeer { + enum ConnectionStatus { + /** The MultiplayerPeer is disconnected. */ + CONNECTION_DISCONNECTED = 0, + + /** The MultiplayerPeer is currently connecting to a server. */ + CONNECTION_CONNECTING = 1, + + /** This MultiplayerPeer is connected. */ + CONNECTION_CONNECTED = 2, + } + enum TransferMode { + /** Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters. */ + TRANSFER_MODE_UNRELIABLE = 0, + + /** Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. */ + TRANSFER_MODE_UNRELIABLE_ORDERED = 1, + + /** Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. */ + TRANSFER_MODE_RELIABLE = 2, + } + } + /** Abstract class for specialized [PacketPeer]s used by the [MultiplayerAPI]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayerpeer.html + */ + class MultiplayerPeer extends PacketPeer { + /** Packets are sent to all connected peers. */ + static readonly TARGET_PEER_BROADCAST = 0 + + /** Packets are sent to the remote peer acting as server. */ + static readonly TARGET_PEER_SERVER = 1 + constructor(identifier?: any) + + /** Sets the peer to which packets will be sent. + * The [param id] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]. + */ + set_target_peer(id: int64): void + + /** Returns the ID of the [MultiplayerPeer] who sent the next available packet. See [method PacketPeer.get_available_packet_count]. */ + get_packet_peer(): int64 + + /** Returns the channel over which the next available packet was received. See [method PacketPeer.get_available_packet_count]. */ + get_packet_channel(): int64 + + /** Returns the transfer mode the remote peer used to send the next available packet. See [method PacketPeer.get_available_packet_count]. */ + get_packet_mode(): MultiplayerPeer.TransferMode + + /** Waits up to 1 second to receive a new network event. */ + poll(): void + + /** Immediately close the multiplayer peer returning to the state [constant CONNECTION_DISCONNECTED]. Connected peers will be dropped without emitting [signal peer_disconnected]. */ + close(): void + + /** Disconnects the given [param peer] from this host. If [param force] is `true` the [signal peer_disconnected] signal will not be emitted for this peer. */ + disconnect_peer(peer: int64, force: boolean = false): void + + /** Returns the current state of the connection. See [enum ConnectionStatus]. */ + get_connection_status(): MultiplayerPeer.ConnectionStatus + + /** Returns the ID of this [MultiplayerPeer]. */ + get_unique_id(): int64 + + /** Returns a randomly generated integer that can be used as a network unique ID. */ + generate_unique_id(): int64 + + /** Returns true if the server can act as a relay in the current configuration (i.e. if the higher level [MultiplayerAPI] should notify connected clients of other peers, and implement a relay protocol to allow communication between them). */ + is_server_relay_supported(): boolean + + /** If `true`, this [MultiplayerPeer] refuses new connections. */ + get refuse_new_connections(): boolean + set refuse_new_connections(value: boolean) + + /** The manner in which to send packets to the target peer. See [enum TransferMode], and the [method set_target_peer] method. */ + get transfer_mode(): int64 + set transfer_mode(value: int64) + + /** The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send **different and independent** state updates is a common way to optimize network usage and decrease latency in fast-paced games. + * + * **Note:** The default channel (`0`) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. + */ + get transfer_channel(): int64 + set transfer_channel(value: int64) + + /** Emitted when a remote peer connects. */ + readonly peer_connected: Signal1 + + /** Emitted when a remote peer has disconnected. */ + readonly peer_disconnected: Signal1 + } + /** Class that can be inherited to implement custom multiplayer API networking layers via GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayerpeerextension.html + */ + class MultiplayerPeerExtension extends MultiplayerPeer { + constructor(identifier?: any) + /** Called when a packet needs to be received by the [MultiplayerAPI], with [param r_buffer_size] being the size of the binary [param r_buffer] in bytes. */ + /* gdvirtual */ _get_packet(r_buffer: int64, r_buffer_size: int64): GError + + /** Called when a packet needs to be sent by the [MultiplayerAPI], with [param p_buffer_size] being the size of the binary [param p_buffer] in bytes. */ + /* gdvirtual */ _put_packet(p_buffer: int64, p_buffer_size: int64): GError + + /** Called when the available packet count is internally requested by the [MultiplayerAPI]. */ + /* gdvirtual */ _get_available_packet_count(): int64 + + /** Called when the maximum allowed packet size (in bytes) is requested by the [MultiplayerAPI]. */ + /* gdvirtual */ _get_max_packet_size(): int64 + + /** Called when a packet needs to be received by the [MultiplayerAPI], if [method _get_packet] isn't implemented. Use this when extending this class via GDScript. */ + /* gdvirtual */ _get_packet_script(): PackedByteArray + + /** Called when a packet needs to be sent by the [MultiplayerAPI], if [method _put_packet] isn't implemented. Use this when extending this class via GDScript. */ + /* gdvirtual */ _put_packet_script(p_buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Called to get the channel over which the next available packet was received. See [method MultiplayerPeer.get_packet_channel]. */ + /* gdvirtual */ _get_packet_channel(): int64 + + /** Called to get the transfer mode the remote peer used to send the next available packet. See [method MultiplayerPeer.get_packet_mode]. */ + /* gdvirtual */ _get_packet_mode(): MultiplayerPeer.TransferMode + + /** Called when the channel to use is set for this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]). */ + /* gdvirtual */ _set_transfer_channel(p_channel: int64): void + + /** Called when the transfer channel to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_channel]). */ + /* gdvirtual */ _get_transfer_channel(): int64 + + /** Called when the transfer mode is set on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]). */ + /* gdvirtual */ _set_transfer_mode(p_mode: MultiplayerPeer.TransferMode): void + + /** Called when the transfer mode to use is read on this [MultiplayerPeer] (see [member MultiplayerPeer.transfer_mode]). */ + /* gdvirtual */ _get_transfer_mode(): MultiplayerPeer.TransferMode + + /** Called when the target peer to use is set for this [MultiplayerPeer] (see [method MultiplayerPeer.set_target_peer]). */ + /* gdvirtual */ _set_target_peer(p_peer: int64): void + + /** Called when the ID of the [MultiplayerPeer] who sent the most recent packet is requested (see [method MultiplayerPeer.get_packet_peer]). */ + /* gdvirtual */ _get_packet_peer(): int64 + + /** Called when the "is server" status is requested on the [MultiplayerAPI]. See [method MultiplayerAPI.is_server]. */ + /* gdvirtual */ _is_server(): boolean + + /** Called when the [MultiplayerAPI] is polled. See [method MultiplayerAPI.poll]. */ + /* gdvirtual */ _poll(): void + + /** Called when the multiplayer peer should be immediately closed (see [method MultiplayerPeer.close]). */ + /* gdvirtual */ _close(): void + + /** Called when the connected [param p_peer] should be forcibly disconnected (see [method MultiplayerPeer.disconnect_peer]). */ + /* gdvirtual */ _disconnect_peer(p_peer: int64, p_force: boolean): void + + /** Called when the unique ID of this [MultiplayerPeer] is requested (see [method MultiplayerPeer.get_unique_id]). The value must be between `1` and `2147483647`. */ + /* gdvirtual */ _get_unique_id(): int64 + + /** Called when the "refuse new connections" status is set on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]). */ + /* gdvirtual */ _set_refuse_new_connections(p_enable: boolean): void + + /** Called when the "refuse new connections" status is requested on this [MultiplayerPeer] (see [member MultiplayerPeer.refuse_new_connections]). */ + /* gdvirtual */ _is_refusing_new_connections(): boolean + + /** Called to check if the server can act as a relay in the current configuration. See [method MultiplayerPeer.is_server_relay_supported]. */ + /* gdvirtual */ _is_server_relay_supported(): boolean + + /** Called when the connection status is requested on the [MultiplayerPeer] (see [method MultiplayerPeer.get_connection_status]). */ + /* gdvirtual */ _get_connection_status(): MultiplayerPeer.ConnectionStatus + } + /** Automatically replicates spawnable nodes from the authority to other multiplayer peers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayerspawner.html + */ + class MultiplayerSpawner extends Node { + constructor(identifier?: any) + /** Adds a scene path to spawnable scenes, making it automatically replicated from the multiplayer authority to other peers when added as children of the node pointed by [member spawn_path]. */ + add_spawnable_scene(path: string): void + + /** Returns the count of spawnable scene paths. */ + get_spawnable_scene_count(): int64 + + /** Returns the spawnable scene path by index. */ + get_spawnable_scene(index: int64): string + + /** Clears all spawnable scenes. Does not despawn existing instances on remote peers. */ + clear_spawnable_scenes(): void + + /** Requests a custom spawn, with [param data] passed to [member spawn_function] on all peers. Returns the locally spawned node instance already inside the scene tree, and added as a child of the node pointed by [member spawn_path]. + * + * **Note:** Spawnable scenes are spawned automatically. [method spawn] is only needed for custom spawns. + */ + spawn(data: any = {}): Node + get _spawnable_scenes(): PackedStringArray + set _spawnable_scenes(value: PackedStringArray | string[]) + + /** Path to the spawn root. Spawnable scenes that are added as direct children are replicated to other peers. */ + get spawn_path(): NodePath + set spawn_path(value: NodePath | string) + + /** Maximum number of nodes allowed to be spawned by this spawner. Includes both spawnable scenes and custom spawns. + * When set to `0` (the default), there is no limit. + */ + get spawn_limit(): int64 + set spawn_limit(value: int64) + + /** Method called on all peers when a custom [method spawn] is requested by the authority. Will receive the `data` parameter, and should return a [Node] that is not in the scene tree. + * + * **Note:** The returned node should **not** be added to the scene with [method Node.add_child]. This is done automatically. + */ + get spawn_function(): Callable + set spawn_function(value: Callable) + + /** Emitted when a spawnable scene or custom spawn was despawned by the multiplayer authority. Only called on puppets. */ + readonly despawned: Signal1 + + /** Emitted when a spawnable scene or custom spawn was spawned by the multiplayer authority. Only called on puppets. */ + readonly spawned: Signal1 + } + namespace MultiplayerSynchronizer { + enum VisibilityUpdateMode { + /** Visibility filters are updated during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS]). */ + VISIBILITY_PROCESS_IDLE = 0, + + /** Visibility filters are updated during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). */ + VISIBILITY_PROCESS_PHYSICS = 1, + + /** Visibility filters are not updated automatically, and must be updated manually by calling [method update_visibility]. */ + VISIBILITY_PROCESS_NONE = 2, + } + } + /** Synchronizes properties from the multiplayer authority to the remote peers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_multiplayersynchronizer.html + */ + class MultiplayerSynchronizer extends Node { + constructor(identifier?: any) + /** Updates the visibility of [param for_peer] according to visibility filters. If [param for_peer] is `0` (the default), all peers' visibilties are updated. */ + update_visibility(for_peer: int64 = 0): void + + /** Adds a peer visibility filter for this synchronizer. + * [param filter] should take a peer ID [int] and return a [bool]. + */ + add_visibility_filter(filter: Callable): void + + /** Removes a peer visibility filter from this synchronizer. */ + remove_visibility_filter(filter: Callable): void + + /** Sets the visibility of [param peer] to [param visible]. If [param peer] is `0`, the value of [member public_visibility] will be updated instead. */ + set_visibility_for(peer: int64, visible: boolean): void + + /** Queries the current visibility for peer [param peer]. */ + get_visibility_for(peer: int64): boolean + + /** Node path that replicated properties are relative to. + * If [member root_path] was spawned by a [MultiplayerSpawner], the node will be also be spawned and despawned based on this synchronizer visibility options. + */ + get root_path(): NodePath + set root_path(value: NodePath | string) + + /** Time interval between synchronizations. When set to `0.0` (the default), synchronizations happen every network process frame. */ + get replication_interval(): float64 + set replication_interval(value: float64) + + /** Time interval between delta synchronizations. When set to `0.0` (the default), delta synchronizations happen every network process frame. */ + get delta_interval(): float64 + set delta_interval(value: float64) + + /** Resource containing which properties to synchronize. */ + get replication_config(): SceneReplicationConfig + set replication_config(value: SceneReplicationConfig) + + /** Specifies when visibility filters are updated (see [enum VisibilityUpdateMode] for options). */ + get visibility_update_mode(): int64 + set visibility_update_mode(value: int64) + + /** Whether synchronization should be visible to all peers by default. See [method set_visibility_for] and [method add_visibility_filter] for ways of configuring fine-grained visibility options. */ + get public_visibility(): boolean + set public_visibility(value: boolean) + + /** Emitted when a new synchronization state is received by this synchronizer after the properties have been updated. */ + readonly synchronized: Signal0 + + /** Emitted when a new delta synchronization state is received by this synchronizer after the properties have been updated. */ + readonly delta_synchronized: Signal0 + + /** Emitted when visibility of [param for_peer] is updated. See [method update_visibility]. */ + readonly visibility_changed: Signal1 + } + /** A binary [Semaphore] for synchronization of multiple [Thread]s. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_mutex.html + */ + class Mutex extends RefCounted { + constructor(identifier?: any) + /** Locks this [Mutex], blocks until it is unlocked by the current owner. + * + * **Note:** This function returns without blocking if the thread already has ownership of the mutex. + */ + lock(): void + + /** Tries locking this [Mutex], but does not block. Returns `true` on success, `false` otherwise. + * + * **Note:** This function returns `true` if the thread already has ownership of the mutex. + */ + try_lock(): boolean + + /** Unlocks this [Mutex], leaving it to other threads. + * + * **Note:** If a thread called [method lock] or [method try_lock] multiple times while already having ownership of the mutex, it must also call [method unlock] the same number of times in order to unlock it correctly. + * **Warning:** Calling [method unlock] more times that [method lock] on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks. + */ + unlock(): void + } + /** A 2D agent used to pathfind to a position while avoiding obstacles. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationagent2d.html + */ + class NavigationAgent2D extends Node { + constructor(identifier?: any) + /** Returns the [RID] of this agent on the [NavigationServer2D]. */ + get_rid(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. */ + get_navigation_map(): RID + + /** Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. */ + get_next_path_position(): Vector2 + + /** Replaces the internal velocity in the collision avoidance simulation with [param velocity]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. */ + set_velocity_forced(velocity: Vector2): void + + /** Returns the distance to the target position, using the agent's global position. The user must set [member target_position] in order for this to be accurate. */ + distance_to_target(): float64 + + /** Returns the path query result for the path the agent is currently following. */ + get_current_navigation_result(): NavigationPathQueryResult2D + + /** Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_path_position] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. */ + get_current_navigation_path(): PackedVector2Array + + /** Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. */ + get_current_navigation_path_index(): int64 + + /** Returns `true` if the agent reached the target, i.e. the agent moved within [member target_desired_distance] of the [member target_position]. It may not always be possible to reach the target but it should always be possible to reach the final position. See [method get_final_position]. */ + is_target_reached(): boolean + + /** Returns `true` if [method get_final_position] is within [member target_desired_distance] of the [member target_position]. */ + is_target_reachable(): boolean + + /** Returns `true` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. + * + * **Note:** While `true` prefer to stop calling update functions like [method get_next_path_position]. This avoids jittering the standing agent due to calling repeated path updates. + */ + is_navigation_finished(): boolean + + /** Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal. */ + get_final_position(): Vector2 + _avoidance_done(new_velocity: Vector3): void + + /** Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_avoidance_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_avoidance_layer_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified mask in the [member avoidance_mask] bitmask, given a [param mask_number] between 1 and 32. */ + set_avoidance_mask_value(mask_number: int64, value: boolean): void + + /** Returns whether or not the specified mask of the [member avoidance_mask] bitmask is enabled, given a [param mask_number] between 1 and 32. */ + get_avoidance_mask_value(mask_number: int64): boolean + + /** If set, a new navigation path from the current agent position to the [member target_position] is requested from the NavigationServer. */ + get target_position(): Vector2 + set target_position(value: Vector2) + + /** The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. */ + get path_desired_distance(): float64 + set path_desired_distance(value: float64) + + /** The distance threshold before the target is considered to be reached. On reaching the target, [signal target_reached] is emitted and navigation ends (see [method is_navigation_finished] and [signal navigation_finished]). + * You can make navigation end early by setting this property to a value greater than [member path_desired_distance] (navigation will end before reaching the last waypoint). + * You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than [member path_desired_distance] (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. + */ + get target_desired_distance(): float64 + set target_desired_distance(value: float64) + + /** The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. */ + get path_max_distance(): float64 + set path_max_distance(value: float64) + + /** A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** The pathfinding algorithm used in the path query. */ + get pathfinding_algorithm(): int64 + set pathfinding_algorithm(value: int64) + + /** The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm]. */ + get path_postprocessing(): int64 + set path_postprocessing(value: int64) + + /** Additional information to return with the navigation path. */ + get path_metadata_flags(): int64 + set path_metadata_flags(value: int64) + + /** If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by [member simplify_epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + get simplify_path(): boolean + set simplify_path(value: boolean) + + /** The path simplification amount in worlds units. */ + get simplify_epsilon(): float64 + set simplify_epsilon(value: float64) + + /** If `true` the agent is registered for an RVO avoidance callback on the [NavigationServer2D]. When [member velocity] is used and the processing is completed a `safe_velocity` Vector2 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. */ + get avoidance_enabled(): boolean + set avoidance_enabled(value: boolean) + + /** Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use [method set_velocity_forced] as well to reset the internal simulation velocity. */ + get velocity(): Vector2 + set velocity(value: Vector2) + + /** The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). + * Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. + */ + get radius(): float64 + set radius(value: float64) + + /** The distance to search for other agents. */ + get neighbor_distance(): float64 + set neighbor_distance(value: float64) + + /** The maximum number of neighbors for the agent to consider. */ + get max_neighbors(): int64 + set max_neighbors(value: int64) + + /** The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + get time_horizon_agents(): float64 + set time_horizon_agents(value: float64) + + /** The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + get time_horizon_obstacles(): float64 + set time_horizon_obstacles(value: float64) + + /** The maximum speed that an agent can move. */ + get max_speed(): float64 + set max_speed(value: float64) + + /** A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the [member avoidance_mask] will avoid this agent. */ + get avoidance_layers(): int64 + set avoidance_layers(value: int64) + + /** A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their [member avoidance_layers]. */ + get avoidance_mask(): int64 + set avoidance_mask(value: int64) + + /** The agent does not adjust the velocity for other agents that would match the [member avoidance_mask] but have a lower [member avoidance_priority]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. */ + get avoidance_priority(): float64 + set avoidance_priority(value: float64) + + /** If `true` shows debug visuals for this agent. */ + get debug_enabled(): boolean + set debug_enabled(value: boolean) + + /** If `true` uses the defined [member debug_path_custom_color] for this agent instead of global color. */ + get debug_use_custom(): boolean + set debug_use_custom(value: boolean) + + /** If [member debug_use_custom] is `true` uses this color for this agent instead of global color. */ + get debug_path_custom_color(): Color + set debug_path_custom_color(value: Color) + + /** If [member debug_use_custom] is `true` uses this rasterized point size for rendering path points for this agent instead of global point size. */ + get debug_path_custom_point_size(): float64 + set debug_path_custom_point_size(value: float64) + + /** If [member debug_use_custom] is `true` uses this line width for rendering paths for this agent instead of global line width. */ + get debug_path_custom_line_width(): float64 + set debug_path_custom_line_width(value: float64) + + /** Emitted when the agent had to update the loaded path: + * - because path was previously empty. + * - because navigation map has changed. + * - because agent pushed further away from the current path segment than the [member path_max_distance]. + */ + readonly path_changed: Signal0 + + /** Signals that the agent reached the target, i.e. the agent moved within [member target_desired_distance] of the [member target_position]. This signal is emitted only once per loaded path. + * This signal will be emitted just before [signal navigation_finished] when the target is reachable. + * It may not always be possible to reach the target but it should always be possible to reach the final position. See [method get_final_position]. + */ + readonly target_reached: Signal0 + + /** Signals that the agent reached a waypoint. Emitted when the agent moves within [member path_desired_distance] of the next position of the path. + * The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + * - `position`: The position of the waypoint that was reached. + * - `type`: The type of navigation primitive (region or link) that contains this waypoint. + * - `rid`: The [RID] of the containing navigation primitive (region or link). + * - `owner`: The object which manages the containing navigation primitive (region or link). + */ + readonly waypoint_reached: Signal1 + + /** Signals that the agent reached a navigation link. Emitted when the agent moves within [member path_desired_distance] of the next position of the path when that position is a navigation link. + * The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + * - `position`: The start position of the link that was reached. + * - `type`: Always [constant NavigationPathQueryResult2D.PATH_SEGMENT_TYPE_LINK]. + * - `rid`: The [RID] of the link. + * - `owner`: The object which manages the link (usually [NavigationLink2D]). + * - `link_entry_position`: If `owner` is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point the agent is entering. + * - `link_exit_position`: If `owner` is available and the owner is a [NavigationLink2D], it will contain the global position of the link's point which the agent is exiting. + */ + readonly link_reached: Signal1 + + /** Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + * This signal will be emitted just after [signal target_reached] when the target is reachable. + */ + readonly navigation_finished: Signal0 + + /** Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is `true` and the agent has a navigation map. */ + readonly velocity_computed: Signal1 + } + /** A 3D agent used to pathfind to a position while avoiding obstacles. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationagent3d.html + */ + class NavigationAgent3D extends Node { + constructor(identifier?: any) + /** Returns the [RID] of this agent on the [NavigationServer3D]. */ + get_rid(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the `agent` on the NavigationServer. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the [RID] of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer. */ + get_navigation_map(): RID + + /** Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. */ + get_next_path_position(): Vector3 + + /** Replaces the internal velocity in the collision avoidance simulation with [param velocity]. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck. */ + set_velocity_forced(velocity: Vector3): void + + /** Returns the distance to the target position, using the agent's global position. The user must set [member target_position] in order for this to be accurate. */ + distance_to_target(): float64 + + /** Returns the path query result for the path the agent is currently following. */ + get_current_navigation_result(): NavigationPathQueryResult3D + + /** Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_path_position] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. */ + get_current_navigation_path(): PackedVector3Array + + /** Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. */ + get_current_navigation_path_index(): int64 + + /** Returns `true` if the agent reached the target, i.e. the agent moved within [member target_desired_distance] of the [member target_position]. It may not always be possible to reach the target but it should always be possible to reach the final position. See [method get_final_position]. */ + is_target_reached(): boolean + + /** Returns `true` if [method get_final_position] is within [member target_desired_distance] of the [member target_position]. */ + is_target_reachable(): boolean + + /** Returns `true` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. + * + * **Note:** While `true` prefer to stop calling update functions like [method get_next_path_position]. This avoids jittering the standing agent due to calling repeated path updates. + */ + is_navigation_finished(): boolean + + /** Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal. */ + get_final_position(): Vector3 + _avoidance_done(new_velocity: Vector3): void + + /** Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_avoidance_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_avoidance_layer_value(layer_number: int64): boolean + + /** Based on [param value], enables or disables the specified mask in the [member avoidance_mask] bitmask, given a [param mask_number] between 1 and 32. */ + set_avoidance_mask_value(mask_number: int64, value: boolean): void + + /** Returns whether or not the specified mask of the [member avoidance_mask] bitmask is enabled, given a [param mask_number] between 1 and 32. */ + get_avoidance_mask_value(mask_number: int64): boolean + + /** If set, a new navigation path from the current agent position to the [member target_position] is requested from the NavigationServer. */ + get target_position(): Vector3 + set target_position(value: Vector3) + + /** The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update. */ + get path_desired_distance(): float64 + set path_desired_distance(value: float64) + + /** The distance threshold before the target is considered to be reached. On reaching the target, [signal target_reached] is emitted and navigation ends (see [method is_navigation_finished] and [signal navigation_finished]). + * You can make navigation end early by setting this property to a value greater than [member path_desired_distance] (navigation will end before reaching the last waypoint). + * You can also make navigation end closer to the target than each individual path position by setting this property to a value lower than [member path_desired_distance] (navigation won't immediately end when reaching the last waypoint). However, if the value set is too low, the agent will be stuck in a repath loop because it will constantly overshoot the distance to the target on each physics frame update. + */ + get target_desired_distance(): float64 + set target_desired_distance(value: float64) + + /** The height offset is subtracted from the y-axis value of any vector path position for this NavigationAgent. The NavigationAgent height offset does not change or influence the navigation mesh or pathfinding query result. Additional navigation maps that use regions with navigation meshes that the developer baked with appropriate agent radius or height values are required to support different-sized agents. */ + get path_height_offset(): float64 + set path_height_offset(value: float64) + + /** The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. */ + get path_max_distance(): float64 + set path_max_distance(value: float64) + + /** A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** The pathfinding algorithm used in the path query. */ + get pathfinding_algorithm(): int64 + set pathfinding_algorithm(value: int64) + + /** The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm]. */ + get path_postprocessing(): int64 + set path_postprocessing(value: int64) + + /** Additional information to return with the navigation path. */ + get path_metadata_flags(): int64 + set path_metadata_flags(value: int64) + + /** If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by [member simplify_epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + get simplify_path(): boolean + set simplify_path(value: boolean) + + /** The path simplification amount in worlds units. */ + get simplify_epsilon(): float64 + set simplify_epsilon(value: float64) + + /** If `true` the agent is registered for an RVO avoidance callback on the [NavigationServer3D]. When [member velocity] is set and the processing is completed a `safe_velocity` Vector3 is received with a signal connection to [signal velocity_computed]. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it. */ + get avoidance_enabled(): boolean + set avoidance_enabled(value: boolean) + + /** Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use [method set_velocity_forced] as well to reset the internal simulation velocity. */ + get velocity(): Vector3 + set velocity(value: Vector3) + + /** The height of the avoidance agent. Agents will ignore other agents or obstacles that are above or below their current position + height in 2D avoidance. Does nothing in 3D avoidance which uses radius spheres alone. */ + get height(): float64 + set height(value: float64) + + /** The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). + * Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. + */ + get radius(): float64 + set radius(value: float64) + + /** The distance to search for other agents. */ + get neighbor_distance(): float64 + set neighbor_distance(value: float64) + + /** The maximum number of neighbors for the agent to consider. */ + get max_neighbors(): int64 + set max_neighbors(value: int64) + + /** The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + get time_horizon_agents(): float64 + set time_horizon_agents(value: float64) + + /** The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive. */ + get time_horizon_obstacles(): float64 + set time_horizon_obstacles(value: float64) + + /** The maximum speed that an agent can move. */ + get max_speed(): float64 + set max_speed(value: float64) + + /** If `true`, the agent calculates avoidance velocities in 3D omnidirectionally, e.g. for games that take place in air, underwater or space. Agents using 3D avoidance only avoid other agents using 3D avoidance, and react to radius-based avoidance obstacles. They ignore any vertex-based obstacles. + * If `false`, the agent calculates avoidance velocities in 2D along the x and z-axes, ignoring the y-axis. Agents using 2D avoidance only avoid other agents using 2D avoidance, and react to radius-based avoidance obstacles or vertex-based avoidance obstacles. Other agents using 2D avoidance that are below or above their current position including [member height] are ignored. + */ + get use_3d_avoidance(): boolean + set use_3d_avoidance(value: boolean) + + /** If `true`, and the agent uses 2D avoidance, it will remember the set y-axis velocity and reapply it after the avoidance step. While 2D avoidance has no y-axis and simulates on a flat plane this setting can help to soften the most obvious clipping on uneven 3D geometry. */ + get keep_y_velocity(): boolean + set keep_y_velocity(value: boolean) + + /** A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the [member avoidance_mask] will avoid this agent. */ + get avoidance_layers(): int64 + set avoidance_layers(value: int64) + + /** A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their [member avoidance_layers]. */ + get avoidance_mask(): int64 + set avoidance_mask(value: int64) + + /** The agent does not adjust the velocity for other agents that would match the [member avoidance_mask] but have a lower [member avoidance_priority]. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent. */ + get avoidance_priority(): float64 + set avoidance_priority(value: float64) + + /** If `true` shows debug visuals for this agent. */ + get debug_enabled(): boolean + set debug_enabled(value: boolean) + + /** If `true` uses the defined [member debug_path_custom_color] for this agent instead of global color. */ + get debug_use_custom(): boolean + set debug_use_custom(value: boolean) + + /** If [member debug_use_custom] is `true` uses this color for this agent instead of global color. */ + get debug_path_custom_color(): Color + set debug_path_custom_color(value: Color) + + /** If [member debug_use_custom] is `true` uses this rasterized point size for rendering path points for this agent instead of global point size. */ + get debug_path_custom_point_size(): float64 + set debug_path_custom_point_size(value: float64) + + /** Emitted when the agent had to update the loaded path: + * - because path was previously empty. + * - because navigation map has changed. + * - because agent pushed further away from the current path segment than the [member path_max_distance]. + */ + readonly path_changed: Signal0 + + /** Signals that the agent reached the target, i.e. the agent moved within [member target_desired_distance] of the [member target_position]. This signal is emitted only once per loaded path. + * This signal will be emitted just before [signal navigation_finished] when the target is reachable. + * It may not always be possible to reach the target but it should always be possible to reach the final position. See [method get_final_position]. + */ + readonly target_reached: Signal0 + + /** Signals that the agent reached a waypoint. Emitted when the agent moves within [member path_desired_distance] of the next position of the path. + * The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + * - `position`: The position of the waypoint that was reached. + * - `type`: The type of navigation primitive (region or link) that contains this waypoint. + * - `rid`: The [RID] of the containing navigation primitive (region or link). + * - `owner`: The object which manages the containing navigation primitive (region or link). + */ + readonly waypoint_reached: Signal1 + + /** Signals that the agent reached a navigation link. Emitted when the agent moves within [member path_desired_distance] of the next position of the path when that position is a navigation link. + * The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + * - `position`: The start position of the link that was reached. + * - `type`: Always [constant NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK]. + * - `rid`: The [RID] of the link. + * - `owner`: The object which manages the link (usually [NavigationLink3D]). + * - `link_entry_position`: If `owner` is available and the owner is a [NavigationLink3D], it will contain the global position of the link's point the agent is entering. + * - `link_exit_position`: If `owner` is available and the owner is a [NavigationLink3D], it will contain the global position of the link's point which the agent is exiting. + */ + readonly link_reached: Signal1 + + /** Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path. + * This signal will be emitted just after [signal target_reached] when the target is reachable. + */ + readonly navigation_finished: Signal0 + + /** Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is `true` and the agent has a navigation map. */ + readonly velocity_computed: Signal1 + } + /** A link between two positions on [NavigationRegion2D]s that agents can be routed through. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationlink2d.html + */ + class NavigationLink2D extends Node2D { + constructor(identifier?: any) + /** Returns the [RID] of this link on the [NavigationServer2D]. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this link should use. By default the link will automatically join the [World2D] default navigation map so this function is only required to override the default map. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the current navigation map [RID] used by this link. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Sets the [member start_position] that is relative to the link from a global [param position]. */ + set_global_start_position(position: Vector2): void + + /** Returns the [member start_position] that is relative to the link as a global position. */ + get_global_start_position(): Vector2 + + /** Sets the [member end_position] that is relative to the link from a global [param position]. */ + set_global_end_position(position: Vector2): void + + /** Returns the [member end_position] that is relative to the link as a global position. */ + get_global_end_position(): Vector2 + + /** Whether this link is currently active. If `false`, [method NavigationServer2D.map_get_path] will ignore this link. */ + get enabled(): boolean + set enabled(value: boolean) + + /** Whether this link can be traveled in both directions or only from [member start_position] to [member end_position]. */ + get bidirectional(): boolean + set bidirectional(value: boolean) + + /** A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer2D.map_get_path]. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** Starting position of the link. + * This position will search out the nearest polygon in the navigation mesh to attach to. + * The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius]. + */ + get start_position(): Vector2 + set start_position(value: Vector2) + + /** Ending position of the link. + * This position will search out the nearest polygon in the navigation mesh to attach to. + * The distance the link will search is controlled by [method NavigationServer2D.map_set_link_connection_radius]. + */ + get end_position(): Vector2 + set end_position(value: Vector2) + + /** When pathfinding enters this link from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path. */ + get enter_cost(): float64 + set enter_cost(value: float64) + + /** When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path. */ + get travel_cost(): float64 + set travel_cost(value: float64) + } + class NavigationLink2DEditor extends Control { + constructor(identifier?: any) + } + class NavigationLink2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A link between two positions on [NavigationRegion3D]s that agents can be routed through. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationlink3d.html + */ + class NavigationLink3D extends Node3D { + constructor(identifier?: any) + /** Returns the [RID] of this link on the [NavigationServer3D]. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this link should use. By default the link will automatically join the [World3D] default navigation map so this function is only required to override the default map. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the current navigation map [RID] used by this link. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Sets the [member start_position] that is relative to the link from a global [param position]. */ + set_global_start_position(position: Vector3): void + + /** Returns the [member start_position] that is relative to the link as a global position. */ + get_global_start_position(): Vector3 + + /** Sets the [member end_position] that is relative to the link from a global [param position]. */ + set_global_end_position(position: Vector3): void + + /** Returns the [member end_position] that is relative to the link as a global position. */ + get_global_end_position(): Vector3 + + /** Whether this link is currently active. If `false`, [method NavigationServer3D.map_get_path] will ignore this link. */ + get enabled(): boolean + set enabled(value: boolean) + + /** Whether this link can be traveled in both directions or only from [member start_position] to [member end_position]. */ + get bidirectional(): boolean + set bidirectional(value: boolean) + + /** A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer3D.map_get_path]. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** Starting position of the link. + * This position will search out the nearest polygon in the navigation mesh to attach to. + * The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius]. + */ + get start_position(): Vector3 + set start_position(value: Vector3) + + /** Ending position of the link. + * This position will search out the nearest polygon in the navigation mesh to attach to. + * The distance the link will search is controlled by [method NavigationServer3D.map_set_link_connection_radius]. + */ + get end_position(): Vector3 + set end_position(value: Vector3) + + /** When pathfinding enters this link from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path. */ + get enter_cost(): float64 + set enter_cost(value: float64) + + /** When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path. */ + get travel_cost(): float64 + set travel_cost(value: float64) + } + class NavigationLink3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + namespace NavigationMesh { + enum SamplePartitionType { + /** Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. */ + SAMPLE_PARTITION_WATERSHED = 0, + + /** Monotone partitioning. Use this if you want fast navigation mesh generation. */ + SAMPLE_PARTITION_MONOTONE = 1, + + /** Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. */ + SAMPLE_PARTITION_LAYERS = 2, + + /** Represents the size of the [enum SamplePartitionType] enum. */ + SAMPLE_PARTITION_MAX = 3, + } + enum ParsedGeometryType { + /** Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes. */ + PARSED_GEOMETRY_MESH_INSTANCES = 0, + + /** Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask]. */ + PARSED_GEOMETRY_STATIC_COLLIDERS = 1, + + /** Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS]. */ + PARSED_GEOMETRY_BOTH = 2, + + /** Represents the size of the [enum ParsedGeometryType] enum. */ + PARSED_GEOMETRY_MAX = 3, + } + enum SourceGeometryMode { + /** Scans the child nodes of the root node recursively for geometry. */ + SOURCE_GEOMETRY_ROOT_NODE_CHILDREN = 0, + + /** Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name]. */ + SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN = 1, + + /** Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name]. */ + SOURCE_GEOMETRY_GROUPS_EXPLICIT = 2, + + /** Represents the size of the [enum SourceGeometryMode] enum. */ + SOURCE_GEOMETRY_MAX = 3, + } + } + /** A navigation mesh that defines traversable areas and obstacles. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationmesh.html + */ + class NavigationMesh extends Resource { + constructor(identifier?: any) + /** Based on [param value], enables or disables the specified layer in the [member geometry_collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. */ + add_polygon(polygon: PackedInt32Array | int32[]): void + + /** Returns the number of polygons in the navigation mesh. */ + get_polygon_count(): int64 + + /** Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. */ + get_polygon(idx: int64): PackedInt32Array + + /** Clears the array of polygons, but it doesn't clear the array of vertices. */ + clear_polygons(): void + + /** Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. + * + * **Note:** The given [param mesh] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array. + */ + create_from_mesh(mesh: Mesh): void + + /** Clears the internal arrays for vertices and polygon indices. */ + clear(): void + get vertices(): PackedVector3Array + set vertices(value: PackedVector3Array | Vector3[]) + get polygons(): GArray + set polygons(value: GArray) + + /** Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values. */ + get sample_partition_type(): int64 + set sample_partition_type(value: int64) + + /** Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values. */ + get geometry_parsed_geometry_type(): int64 + set geometry_parsed_geometry_type(value: int64) + + /** The physics layers to scan for static colliders. + * Only used when [member geometry_parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. + */ + get geometry_collision_mask(): int64 + set geometry_collision_mask(value: int64) + + /** The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. */ + get geometry_source_geometry_mode(): int64 + set geometry_source_geometry_mode(value: int64) + + /** The name of the group to scan for geometry. + * Only used when [member geometry_source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. + */ + get geometry_source_group_name(): string + set geometry_source_group_name(value: string) + + /** The cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size on the navigation map. */ + get cell_size(): float64 + set cell_size(value: float64) + + /** The cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height on the navigation map. */ + get cell_height(): float64 + set cell_height(value: float64) + + /** The size of the non-navigable border around the bake bounding area. + * In conjunction with the [member filter_baking_aabb] and a [member edge_max_error] value at `1.0` or below the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by [member agent_radius]. + * + * **Note:** While baking and not zero, this value will be rounded up to the nearest multiple of [member cell_size]. + */ + get border_size(): float64 + set border_size(value: float64) + + /** The minimum floor to ceiling height that will still allow the floor area to be considered walkable. + * + * **Note:** While baking, this value will be rounded up to the nearest multiple of [member cell_height]. + */ + get agent_height(): float64 + set agent_height(value: float64) + + /** The distance to erode/shrink the walkable area of the heightfield away from obstructions. + * + * **Note:** While baking, this value will be rounded up to the nearest multiple of [member cell_size]. + */ + get agent_radius(): float64 + set agent_radius(value: float64) + + /** The minimum ledge height that is considered to still be traversable. + * + * **Note:** While baking, this value will be rounded down to the nearest multiple of [member cell_height]. + */ + get agent_max_climb(): float64 + set agent_max_climb(value: float64) + + /** The maximum slope that is considered walkable, in degrees. */ + get agent_max_slope(): float64 + set agent_max_slope(value: float64) + + /** The minimum size of a region for it to be created. + * + * **Note:** This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. + */ + get region_min_size(): float64 + set region_min_size(value: float64) + + /** Any regions with a size smaller than this will be merged with larger regions if possible. + * + * **Note:** This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. + */ + get region_merge_size(): float64 + set region_merge_size(value: float64) + + /** The maximum allowed length for contour edges along the border of the mesh. A value of `0.0` disables this feature. + * + * **Note:** While baking, this value will be rounded up to the nearest multiple of [member cell_size]. + */ + get edge_max_length(): float64 + set edge_max_length(value: float64) + + /** The maximum distance a simplified contour's border edges should deviate the original raw contour. */ + get edge_max_error(): float64 + set edge_max_error(value: float64) + + /** The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. */ + get vertices_per_polygon(): float64 + set vertices_per_polygon(value: float64) + + /** The sampling distance to use when generating the detail mesh, in cell unit. */ + get detail_sample_distance(): float64 + set detail_sample_distance(value: float64) + + /** The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. */ + get detail_sample_max_error(): float64 + set detail_sample_max_error(value: float64) + + /** If `true`, marks non-walkable spans as walkable if their maximum is within [member agent_max_climb] of a walkable neighbor. */ + get filter_low_hanging_obstacles(): boolean + set filter_low_hanging_obstacles(value: boolean) + + /** If `true`, marks spans that are ledges as non-walkable. */ + get filter_ledge_spans(): boolean + set filter_ledge_spans(value: boolean) + + /** If `true`, marks walkable spans as not walkable if the clearance above the span is less than [member agent_height]. */ + get filter_walkable_low_height_spans(): boolean + set filter_walkable_low_height_spans(value: boolean) + + /** If the baking [AABB] has a volume the navigation mesh baking will be restricted to its enclosing area. */ + get filter_baking_aabb(): AABB + set filter_baking_aabb(value: AABB) + + /** The position offset applied to the [member filter_baking_aabb] [AABB]. */ + get filter_baking_aabb_offset(): Vector3 + set filter_baking_aabb_offset(value: Vector3) + } + class NavigationMeshEditor extends Control { + constructor(identifier?: any) + } + class NavigationMeshEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Container for parsed source geometry data used in navigation mesh baking. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationmeshsourcegeometrydata2d.html + */ + class NavigationMeshSourceGeometryData2D extends Resource { + constructor(identifier?: any) + /** Clears the internal data. */ + clear(): void + + /** Returns `true` when parsed source geometry data exists. */ + has_data(): boolean + + /** Appends another array of [param traversable_outlines] at the end of the existing traversable outlines array. */ + append_traversable_outlines(traversable_outlines: GArray): void + + /** Appends another array of [param obstruction_outlines] at the end of the existing obstruction outlines array. */ + append_obstruction_outlines(obstruction_outlines: GArray): void + + /** Adds the outline points of a shape as traversable area. */ + add_traversable_outline(shape_outline: PackedVector2Array | Vector2[]): void + + /** Adds the outline points of a shape as obstructed area. */ + add_obstruction_outline(shape_outline: PackedVector2Array | Vector2[]): void + + /** Adds the geometry data of another [NavigationMeshSourceGeometryData2D] to the navigation mesh baking data. */ + merge(other_geometry: NavigationMeshSourceGeometryData2D): void + + /** Adds a projected obstruction shape to the source geometry. If [param carve] is `true` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. */ + add_projected_obstruction(vertices: PackedVector2Array | Vector2[], carve: boolean): void + + /** Clears all projected obstructions. */ + clear_projected_obstructions(): void + get traversable_outlines(): GArray + set traversable_outlines(value: GArray) + get obstruction_outlines(): GArray + set obstruction_outlines(value: GArray) + get projected_obstructions(): GArray + set projected_obstructions(value: GArray) + } + /** Container for parsed source geometry data used in navigation mesh baking. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationmeshsourcegeometrydata3d.html + */ + class NavigationMeshSourceGeometryData3D extends Resource { + constructor(identifier?: any) + /** Appends arrays of [param vertices] and [param indices] at the end of the existing arrays. Adds the existing index as an offset to the appended indices. */ + append_arrays(vertices: PackedFloat32Array | float32[], indices: PackedInt32Array | int32[]): void + + /** Clears the internal data. */ + clear(): void + + /** Returns `true` when parsed source geometry data exists. */ + has_data(): boolean + + /** Adds the geometry data of a [Mesh] resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform]. */ + add_mesh(mesh: Mesh, xform: Transform3D): void + + /** Adds an [Array] the size of [constant Mesh.ARRAY_MAX] and with vertices at index [constant Mesh.ARRAY_VERTEX] and indices at index [constant Mesh.ARRAY_INDEX] to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform]. */ + add_mesh_array(mesh_array: GArray, xform: Transform3D): void + + /** Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform]. */ + add_faces(faces: PackedVector3Array | Vector3[], xform: Transform3D): void + + /** Adds the geometry data of another [NavigationMeshSourceGeometryData3D] to the navigation mesh baking data. */ + merge(other_geometry: NavigationMeshSourceGeometryData3D): void + + /** Adds a projected obstruction shape to the source geometry. The [param vertices] are considered projected on a xz-axes plane, placed at the global y-axis [param elevation] and extruded by [param height]. If [param carve] is `true` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. */ + add_projected_obstruction(vertices: PackedVector3Array | Vector3[], elevation: float64, height: float64, carve: boolean): void + + /** Clears all projected obstructions. */ + clear_projected_obstructions(): void + get vertices(): PackedVector3Array + set vertices(value: PackedVector3Array | Vector3[]) + get indices(): PackedInt32Array + set indices(value: PackedInt32Array | int32[]) + get projected_obstructions(): GArray + set projected_obstructions(value: GArray) + } + /** 2D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationobstacle2d.html + */ + class NavigationObstacle2D extends Node2D { + constructor(identifier?: any) + /** Returns the [RID] of this obstacle on the [NavigationServer2D]. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the `obstacle` on the NavigationServer. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_avoidance_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_avoidance_layer_value(layer_number: int64): boolean + + /** Sets the avoidance radius for the obstacle. */ + get radius(): float64 + set radius(value: float64) + + /** The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. */ + get vertices(): PackedVector2Array + set vertices(value: PackedVector2Array | Vector2[]) + + /** If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its [member vertices] defined shape. */ + get affect_navigation_mesh(): boolean + set affect_navigation_mesh(value: boolean) + + /** If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + * It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + * Requires [member affect_navigation_mesh] to be enabled. + */ + get carve_navigation_mesh(): boolean + set carve_navigation_mesh(value: boolean) + + /** If `true` the obstacle affects avoidance using agents. */ + get avoidance_enabled(): boolean + set avoidance_enabled(value: boolean) + + /** Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles [member radius]. Does nothing for the obstacles static vertices. */ + get velocity(): Vector2 + set velocity(value: Vector2) + + /** A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. */ + get avoidance_layers(): int64 + set avoidance_layers(value: int64) + } + class NavigationObstacle2DEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + } + class NavigationObstacle2DEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + /** 3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationobstacle3d.html + */ + class NavigationObstacle3D extends Node3D { + constructor(identifier?: any) + /** Returns the [RID] of this obstacle on the [NavigationServer3D]. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this NavigationObstacle node should use and also updates the `obstacle` on the NavigationServer. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the [RID] of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract obstacle on the NavigationServer. If the obstacle map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use [method set_navigation_map] to change the navigation map for the NavigationObstacle and also update the obstacle on the NavigationServer. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member avoidance_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_avoidance_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member avoidance_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_avoidance_layer_value(layer_number: int64): boolean + + /** Sets the avoidance radius for the obstacle. */ + get radius(): float64 + set radius(value: float64) + + /** Sets the obstacle height used in 2D avoidance. 2D avoidance using agent's ignore obstacles that are below or above them. */ + get height(): float64 + set height(value: float64) + + /** The outline vertices of the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out. Outlines can not be crossed or overlap. Should the vertices using obstacle be warped to a new position agent's can not predict this movement and may get trapped inside the obstacle. */ + get vertices(): PackedVector3Array + set vertices(value: PackedVector3Array | Vector3[]) + + /** If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its [member vertices] and [member height] defined shape. */ + get affect_navigation_mesh(): boolean + set affect_navigation_mesh(value: boolean) + + /** If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius). + * It will still be affected by further postprocessing of the baking process, like edge and polygon simplification. + * Requires [member affect_navigation_mesh] to be enabled. + */ + get carve_navigation_mesh(): boolean + set carve_navigation_mesh(value: boolean) + + /** If `true` the obstacle affects avoidance using agents. */ + get avoidance_enabled(): boolean + set avoidance_enabled(value: boolean) + + /** Sets the wanted velocity for the obstacle so other agent's can better predict the obstacle if it is moved with a velocity regularly (every frame) instead of warped to a new position. Does only affect avoidance for the obstacles [member radius]. Does nothing for the obstacles static vertices. */ + get velocity(): Vector3 + set velocity(value: Vector3) + + /** A bitfield determining the avoidance layers for this obstacle. Agents with a matching bit on the their avoidance mask will avoid this obstacle. */ + get avoidance_layers(): int64 + set avoidance_layers(value: int64) + + /** If `true` the obstacle affects 3D avoidance using agent's with obstacle [member radius]. + * If `false` the obstacle affects 2D avoidance using agent's with both obstacle [member vertices] as well as obstacle [member radius]. + */ + get use_3d_avoidance(): boolean + set use_3d_avoidance(value: boolean) + } + class NavigationObstacle3DEditor extends HBoxContainer { + constructor(identifier?: any) + _polygon_draw(): void + } + class NavigationObstacle3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace NavigationPathQueryParameters2D { + enum PathfindingAlgorithm { + /** The path query uses the default A* pathfinding algorithm. */ + PATHFINDING_ALGORITHM_ASTAR = 0, + } + enum PathPostProcessing { + /** Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. */ + PATH_POSTPROCESSING_CORRIDORFUNNEL = 0, + + /** Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. */ + PATH_POSTPROCESSING_EDGECENTERED = 1, + } + enum PathMetadataFlags { + /** Don't include any additional metadata about the returned path. */ + PATH_METADATA_INCLUDE_NONE = 0, + + /** Include the type of navigation primitive (region or link) that each point of the path goes through. */ + PATH_METADATA_INCLUDE_TYPES = 1, + + /** Include the [RID]s of the regions and links that each point of the path goes through. */ + PATH_METADATA_INCLUDE_RIDS = 2, + + /** Include the `ObjectID`s of the [Object]s which manage the regions and links each point of the path goes through. */ + PATH_METADATA_INCLUDE_OWNERS = 4, + + /** Include all available metadata about the returned path. */ + PATH_METADATA_INCLUDE_ALL = 7, + } + } + /** Provides parameters for 2D navigation path queries. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationpathqueryparameters2d.html + */ + class NavigationPathQueryParameters2D extends RefCounted { + constructor(identifier?: any) + /** The navigation map [RID] used in the path query. */ + get map(): RID + set map(value: RID) + + /** The pathfinding start position in global coordinates. */ + get start_position(): Vector2 + set start_position(value: Vector2) + + /** The pathfinding target position in global coordinates. */ + get target_position(): Vector2 + set target_position(value: Vector2) + + /** The navigation layers the query will use (as a bitmask). */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** The pathfinding algorithm used in the path query. */ + get pathfinding_algorithm(): int64 + set pathfinding_algorithm(value: int64) + + /** The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm]. */ + get path_postprocessing(): int64 + set path_postprocessing(value: int64) + + /** Additional information to include with the navigation path. */ + get metadata_flags(): int64 + set metadata_flags(value: int64) + + /** If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by [member simplify_epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + get simplify_path(): boolean + set simplify_path(value: boolean) + + /** The path simplification amount in worlds units. */ + get simplify_epsilon(): float64 + set simplify_epsilon(value: float64) + } + namespace NavigationPathQueryParameters3D { + enum PathfindingAlgorithm { + /** The path query uses the default A* pathfinding algorithm. */ + PATHFINDING_ALGORITHM_ASTAR = 0, + } + enum PathPostProcessing { + /** Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes. */ + PATH_POSTPROCESSING_CORRIDORFUNNEL = 0, + + /** Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. */ + PATH_POSTPROCESSING_EDGECENTERED = 1, + } + enum PathMetadataFlags { + /** Don't include any additional metadata about the returned path. */ + PATH_METADATA_INCLUDE_NONE = 0, + + /** Include the type of navigation primitive (region or link) that each point of the path goes through. */ + PATH_METADATA_INCLUDE_TYPES = 1, + + /** Include the [RID]s of the regions and links that each point of the path goes through. */ + PATH_METADATA_INCLUDE_RIDS = 2, + + /** Include the `ObjectID`s of the [Object]s which manage the regions and links each point of the path goes through. */ + PATH_METADATA_INCLUDE_OWNERS = 4, + + /** Include all available metadata about the returned path. */ + PATH_METADATA_INCLUDE_ALL = 7, + } + } + /** Provides parameters for 3D navigation path queries. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationpathqueryparameters3d.html + */ + class NavigationPathQueryParameters3D extends RefCounted { + constructor(identifier?: any) + /** The navigation map [RID] used in the path query. */ + get map(): RID + set map(value: RID) + + /** The pathfinding start position in global coordinates. */ + get start_position(): Vector3 + set start_position(value: Vector3) + + /** The pathfinding target position in global coordinates. */ + get target_position(): Vector3 + set target_position(value: Vector3) + + /** The navigation layers the query will use (as a bitmask). */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** The pathfinding algorithm used in the path query. */ + get pathfinding_algorithm(): int64 + set pathfinding_algorithm(value: int64) + + /** The path postprocessing applied to the raw path corridor found by the [member pathfinding_algorithm]. */ + get path_postprocessing(): int64 + set path_postprocessing(value: int64) + + /** Additional information to include with the navigation path. */ + get metadata_flags(): int64 + set metadata_flags(value: int64) + + /** If `true` a simplified version of the path will be returned with less critical path points removed. The simplification amount is controlled by [member simplify_epsilon]. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation. + * Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields". + */ + get simplify_path(): boolean + set simplify_path(value: boolean) + + /** The path simplification amount in worlds units. */ + get simplify_epsilon(): float64 + set simplify_epsilon(value: float64) + } + namespace NavigationPathQueryResult2D { + enum PathSegmentType { + /** This segment of the path goes through a region. */ + PATH_SEGMENT_TYPE_REGION = 0, + + /** This segment of the path goes through a link. */ + PATH_SEGMENT_TYPE_LINK = 1, + } + } + /** Represents the result of a 2D pathfinding query. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationpathqueryresult2d.html + */ + class NavigationPathQueryResult2D extends RefCounted { + constructor(identifier?: any) + /** Reset the result object to its initial state. This is useful to reuse the object across multiple queries. */ + reset(): void + + /** The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer2D.map_get_path]. */ + get path(): PackedVector2Array + set path(value: PackedVector2Array | Vector2[]) + + /** The type of navigation primitive (region or link) that each point of the path goes through. */ + get path_types(): PackedInt32Array + set path_types(value: PackedInt32Array | int32[]) + + /** The [RID]s of the regions and links that each point of the path goes through. */ + get path_rids(): GArray + set path_rids(value: GArray) + + /** The `ObjectID`s of the [Object]s which manage the regions and links each point of the path goes through. */ + get path_owner_ids(): PackedInt64Array + set path_owner_ids(value: PackedInt64Array | int64[]) + } + namespace NavigationPathQueryResult3D { + enum PathSegmentType { + /** This segment of the path goes through a region. */ + PATH_SEGMENT_TYPE_REGION = 0, + + /** This segment of the path goes through a link. */ + PATH_SEGMENT_TYPE_LINK = 1, + } + } + /** Represents the result of a 3D pathfinding query. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationpathqueryresult3d.html + */ + class NavigationPathQueryResult3D extends RefCounted { + constructor(identifier?: any) + /** Reset the result object to its initial state. This is useful to reuse the object across multiple queries. */ + reset(): void + + /** The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer3D.map_get_path]. */ + get path(): PackedVector3Array + set path(value: PackedVector3Array | Vector3[]) + + /** The type of navigation primitive (region or link) that each point of the path goes through. */ + get path_types(): PackedInt32Array + set path_types(value: PackedInt32Array | int32[]) + + /** The [RID]s of the regions and links that each point of the path goes through. */ + get path_rids(): GArray + set path_rids(value: GArray) + + /** The `ObjectID`s of the [Object]s which manage the regions and links each point of the path goes through. */ + get path_owner_ids(): PackedInt64Array + set path_owner_ids(value: PackedInt64Array | int64[]) + } + namespace NavigationPolygon { + enum ParsedGeometryType { + /** Parses mesh instances as obstruction geometry. This includes [Polygon2D], [MeshInstance2D], [MultiMeshInstance2D], and [TileMap] nodes. + * Meshes are only parsed when they use a 2D vertices surface format. + */ + PARSED_GEOMETRY_MESH_INSTANCES = 0, + + /** Parses [StaticBody2D] and [TileMap] colliders as obstruction geometry. The collider should be in any of the layers specified by [member parsed_collision_mask]. */ + PARSED_GEOMETRY_STATIC_COLLIDERS = 1, + + /** Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS]. */ + PARSED_GEOMETRY_BOTH = 2, + + /** Represents the size of the [enum ParsedGeometryType] enum. */ + PARSED_GEOMETRY_MAX = 3, + } + enum SourceGeometryMode { + /** Scans the child nodes of the root node recursively for geometry. */ + SOURCE_GEOMETRY_ROOT_NODE_CHILDREN = 0, + + /** Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member source_geometry_group_name]. */ + SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN = 1, + + /** Uses nodes in a group for geometry. The group is specified by [member source_geometry_group_name]. */ + SOURCE_GEOMETRY_GROUPS_EXPLICIT = 2, + + /** Represents the size of the [enum SourceGeometryMode] enum. */ + SOURCE_GEOMETRY_MAX = 3, + } + } + /** A 2D navigation mesh that describes a traversable surface for pathfinding. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationpolygon.html + */ + class NavigationPolygon extends Resource { + constructor(identifier?: any) + /** Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. */ + add_polygon(polygon: PackedInt32Array | int32[]): void + + /** Returns the count of all polygons. */ + get_polygon_count(): int64 + + /** Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. */ + get_polygon(idx: int64): PackedInt32Array + + /** Clears the array of polygons, but it doesn't clear the array of outlines and vertices. */ + clear_polygons(): void + + /** Returns the [NavigationMesh] resulting from this navigation polygon. This navigation mesh can be used to update the navigation mesh of a region with the [method NavigationServer3D.region_set_navigation_mesh] API directly (as 2D uses the 3D server behind the scene). */ + get_navigation_mesh(): NavigationMesh + + /** Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. */ + add_outline(outline: PackedVector2Array | Vector2[]): void + + /** Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. */ + add_outline_at_index(outline: PackedVector2Array | Vector2[], index: int64): void + + /** Returns the number of outlines that were created in the editor or by script. */ + get_outline_count(): int64 + + /** Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. */ + set_outline(idx: int64, outline: PackedVector2Array | Vector2[]): void + + /** Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script. */ + get_outline(idx: int64): PackedVector2Array + + /** Removes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. */ + remove_outline(idx: int64): void + + /** Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. */ + clear_outlines(): void + + /** Creates polygons from the outlines added in the editor or by script. */ + make_polygons_from_outlines(): void + + /** Based on [param value], enables or disables the specified layer in the [member parsed_collision_mask], given a [param layer_number] between 1 and 32. */ + set_parsed_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member parsed_collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_parsed_collision_mask_value(layer_number: int64): boolean + + /** Clears the internal arrays for vertices and polygon indices. */ + clear(): void + get vertices(): PackedVector2Array + set vertices(value: PackedVector2Array | Vector2[]) + get polygons(): GArray + set polygons(value: GArray) + get outlines(): GArray + set outlines(value: GArray) + + /** Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values. */ + get parsed_geometry_type(): int64 + set parsed_geometry_type(value: int64) + + /** The physics layers to scan for static colliders. + * Only used when [member parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. + */ + get parsed_collision_mask(): int64 + set parsed_collision_mask(value: int64) + + /** The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. */ + get source_geometry_mode(): int64 + set source_geometry_mode(value: int64) + + /** The group name of nodes that should be parsed for baking source geometry. + * Only used when [member source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. + */ + get source_geometry_group_name(): string + set source_geometry_group_name(value: string) + + /** The cell size used to rasterize the navigation mesh vertices. Must match with the cell size on the navigation map. */ + get cell_size(): float64 + set cell_size(value: float64) + + /** The size of the non-navigable border around the bake bounding area defined by the [member baking_rect] [Rect2]. + * In conjunction with the [member baking_rect] the border size can be used to bake tile aligned navigation meshes without the tile edges being shrunk by [member agent_radius]. + */ + get border_size(): float64 + set border_size(value: float64) + + /** The distance to erode/shrink the walkable surface when baking the navigation mesh. */ + get agent_radius(): float64 + set agent_radius(value: float64) + + /** If the baking [Rect2] has an area the navigation mesh baking will be restricted to its enclosing area. */ + get baking_rect(): Rect2 + set baking_rect(value: Rect2) + + /** The position offset applied to the [member baking_rect] [Rect2]. */ + get baking_rect_offset(): Vector2 + set baking_rect_offset(value: Vector2) + } + class NavigationPolygonEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + } + class NavigationPolygonEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + /** A traversable 2D region that [NavigationAgent2D]s can use for pathfinding. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationregion2d.html + */ + class NavigationRegion2D extends Node2D { + constructor(identifier?: any) + /** Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this region should use. By default the region will automatically join the [World2D] default navigation map so this function is only required to override the default map. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the current navigation map [RID] used by this region. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Returns the [RID] of this region on the [NavigationServer2D]. */ + get_region_rid(): RID + + /** Bakes the [NavigationPolygon]. If [param on_thread] is set to `true` (default), the baking is done on a separate thread. */ + bake_navigation_polygon(on_thread: boolean = true): void + + /** Returns `true` when the [NavigationPolygon] is being baked on a background thread. */ + is_baking(): boolean + _navigation_polygon_changed(): void + + /** The [NavigationPolygon] resource to use. */ + get navigation_polygon(): NavigationPolygon + set navigation_polygon(value: NavigationPolygon) + + /** Determines if the [NavigationRegion2D] is enabled or disabled. */ + get enabled(): boolean + set enabled(value: boolean) + + /** If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + get use_edge_connections(): boolean + set use_edge_connections(value: boolean) + + /** A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** When pathfinding enters this region's navigation mesh from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path. */ + get enter_cost(): float64 + set enter_cost(value: float64) + + /** When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [member travel_cost] for determining the shortest path. */ + get travel_cost(): float64 + set travel_cost(value: float64) + + /** Emitted when the used navigation polygon is replaced or changes to the internals of the current navigation polygon are committed. */ + readonly navigation_polygon_changed: Signal0 + + /** Emitted when a navigation polygon bake operation is completed. */ + readonly bake_finished: Signal0 + } + /** A traversable 3D region that [NavigationAgent3D]s can use for pathfinding. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_navigationregion3d.html + */ + class NavigationRegion3D extends Node3D { + constructor(identifier?: any) + /** Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map. */ + get_rid(): RID + + /** Sets the [RID] of the navigation map this region should use. By default the region will automatically join the [World3D] default navigation map so this function is only required to override the default map. */ + set_navigation_map(navigation_map: RID): void + + /** Returns the current navigation map [RID] used by this region. */ + get_navigation_map(): RID + + /** Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32. */ + set_navigation_layer_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32. */ + get_navigation_layer_value(layer_number: int64): boolean + + /** Returns the [RID] of this region on the [NavigationServer3D]. */ + get_region_rid(): RID + + /** Bakes the [NavigationMesh]. If [param on_thread] is set to `true` (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled). */ + bake_navigation_mesh(on_thread: boolean = true): void + + /** Returns `true` when the [NavigationMesh] is being baked on a background thread. */ + is_baking(): boolean + + /** The [NavigationMesh] resource to use. */ + get navigation_mesh(): NavigationMesh + set navigation_mesh(value: NavigationMesh) + + /** Determines if the [NavigationRegion3D] is enabled or disabled. */ + get enabled(): boolean + set enabled(value: boolean) + + /** If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin. */ + get use_edge_connections(): boolean + set use_edge_connections(value: boolean) + + /** A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. */ + get navigation_layers(): int64 + set navigation_layers(value: int64) + + /** When pathfinding enters this region's navigation mesh from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path. */ + get enter_cost(): float64 + set enter_cost(value: float64) + + /** When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [member travel_cost] for determining the shortest path. */ + get travel_cost(): float64 + set travel_cost(value: float64) + + /** Notifies when the [NavigationMesh] has changed. */ + readonly navigation_mesh_changed: Signal0 + + /** Notifies when the navigation mesh bake operation is completed. */ + readonly bake_finished: Signal0 + } + class NavigationRegion3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + namespace NinePatchRect { + enum AxisStretchMode { + /** Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted. */ + AXIS_STRETCH_MODE_STRETCH = 0, + + /** Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges. */ + AXIS_STRETCH_MODE_TILE = 1, + + /** Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than [constant AXIS_STRETCH_MODE_STRETCH]. The texture must be seamless for this to work without displaying artifacts between edges. */ + AXIS_STRETCH_MODE_TILE_FIT = 2, + } + } + /** A control that displays a texture by keeping its corners intact, but tiling its edges and center. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_ninepatchrect.html + */ + class NinePatchRect extends Control { + constructor(identifier?: any) + /** Sets the size of the margin on the specified [enum Side] to [param value] pixels. */ + set_patch_margin(margin: Side, value: int64): void + + /** Returns the size of the margin on the specified [enum Side]. */ + get_patch_margin(margin: Side): int64 + + /** The node's texture resource. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** If `true`, draw the panel's center. Else, only draw the 9-slice's borders. */ + get draw_center(): boolean + set draw_center(value: boolean) + + /** Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. If the rect is empty, NinePatchRect will use the whole texture. */ + get region_rect(): Rect2 + set region_rect(value: Rect2) + + /** The width of the 9-slice's left column. A margin of 16 means the 9-slice's left corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. */ + get patch_margin_left(): int64 + set patch_margin_left(value: int64) + + /** The height of the 9-slice's top row. A margin of 16 means the 9-slice's top 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. */ + get patch_margin_top(): int64 + set patch_margin_top(value: int64) + + /** The width of the 9-slice's right column. A margin of 16 means the 9-slice's right corners and side will have a width of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. */ + get patch_margin_right(): int64 + set patch_margin_right(value: int64) + + /** 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. */ + get patch_margin_bottom(): int64 + set patch_margin_bottom(value: int64) + + /** The stretch mode to use for horizontal stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values. */ + get axis_stretch_horizontal(): int64 + set axis_stretch_horizontal(value: int64) + + /** The stretch mode to use for vertical stretching/tiling. See [enum NinePatchRect.AxisStretchMode] for possible values. */ + get axis_stretch_vertical(): int64 + set axis_stretch_vertical(value: int64) + + /** Emitted when the node's texture changes. */ + readonly texture_changed: Signal0 + } + namespace Node { + enum ProcessMode { + /** Inherits [member process_mode] from the node's parent. This is the default for any newly created node. */ + PROCESS_MODE_INHERIT = 0, + + /** Stops processing when [member SceneTree.paused] is `true`. This is the inverse of [constant PROCESS_MODE_WHEN_PAUSED], and the default for the root node. */ + PROCESS_MODE_PAUSABLE = 1, + + /** Process **only** when [member SceneTree.paused] is `true`. This is the inverse of [constant PROCESS_MODE_PAUSABLE]. */ + PROCESS_MODE_WHEN_PAUSED = 2, + + /** Always process. Keeps processing, ignoring [member SceneTree.paused]. This is the inverse of [constant PROCESS_MODE_DISABLED]. */ + PROCESS_MODE_ALWAYS = 3, + + /** Never process. Completely disables processing, ignoring [member SceneTree.paused]. This is the inverse of [constant PROCESS_MODE_ALWAYS]. */ + PROCESS_MODE_DISABLED = 4, + } + enum ProcessThreadGroup { + /** Process this node based on the thread group mode of the first parent (or grandparent) node that has a thread group mode that is not inherit. See [member process_thread_group] for more information. */ + PROCESS_THREAD_GROUP_INHERIT = 0, + + /** Process this node (and child nodes set to inherit) on the main thread. See [member process_thread_group] for more information. */ + PROCESS_THREAD_GROUP_MAIN_THREAD = 1, + + /** Process this node (and child nodes set to inherit) on a sub-thread. See [member process_thread_group] for more information. */ + PROCESS_THREAD_GROUP_SUB_THREAD = 2, + } + enum ProcessThreadMessages { + /** Allows this node to process threaded messages created with [method call_deferred_thread_group] right before [method _process] is called. */ + FLAG_PROCESS_THREAD_MESSAGES = 1, + + /** Allows this node to process threaded messages created with [method call_deferred_thread_group] right before [method _physics_process] is called. */ + FLAG_PROCESS_THREAD_MESSAGES_PHYSICS = 2, + + /** Allows this node to process threaded messages created with [method call_deferred_thread_group] right before either [method _process] or [method _physics_process] are called. */ + FLAG_PROCESS_THREAD_MESSAGES_ALL = 3, + } + enum PhysicsInterpolationMode { + /** Inherits [member physics_interpolation_mode] from the node's parent. This is the default for any newly created node. */ + PHYSICS_INTERPOLATION_MODE_INHERIT = 0, + + /** Enables physics interpolation for this node and for children set to [constant PHYSICS_INTERPOLATION_MODE_INHERIT]. This is the default for the root node. */ + PHYSICS_INTERPOLATION_MODE_ON = 1, + + /** Disables physics interpolation for this node and for children set to [constant PHYSICS_INTERPOLATION_MODE_INHERIT]. */ + PHYSICS_INTERPOLATION_MODE_OFF = 2, + } + enum DuplicateFlags { + /** Duplicate the node's signal connections. */ + DUPLICATE_SIGNALS = 1, + + /** Duplicate the node's groups. */ + DUPLICATE_GROUPS = 2, + + /** Duplicate the node's script (also overriding the duplicated children's scripts, if combined with [constant DUPLICATE_USE_INSTANTIATION]). */ + DUPLICATE_SCRIPTS = 4, + + /** Duplicate using [method PackedScene.instantiate]. If the node comes from a scene saved on disk, re-uses [method PackedScene.instantiate] as the base for the duplicated node and its children. */ + DUPLICATE_USE_INSTANTIATION = 8, + } + enum InternalMode { + /** The node will not be internal. */ + INTERNAL_MODE_DISABLED = 0, + + /** The node will be placed at the beginning of the parent's children, before any non-internal sibling. */ + INTERNAL_MODE_FRONT = 1, + + /** The node will be placed at the end of the parent's children, after any non-internal sibling. */ + INTERNAL_MODE_BACK = 2, + } + enum AutoTranslateMode { + /** Inherits [member auto_translate_mode] from the node's parent. This is the default for any newly created node. */ + AUTO_TRANSLATE_MODE_INHERIT = 0, + + /** Always automatically translate. This is the inverse of [constant AUTO_TRANSLATE_MODE_DISABLED], and the default for the root node. */ + AUTO_TRANSLATE_MODE_ALWAYS = 1, + + /** Never automatically translate. This is the inverse of [constant AUTO_TRANSLATE_MODE_ALWAYS]. + * String parsing for POT generation will be skipped for this node and children that are set to [constant AUTO_TRANSLATE_MODE_INHERIT]. + */ + AUTO_TRANSLATE_MODE_DISABLED = 2, + } + } + /** Base class for all scene objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_node.html + */ + class Node extends Object { + /** Notification received when the node enters a [SceneTree]. See [method _enter_tree]. + * This notification is received *before* the related [signal tree_entered] signal. + */ + static readonly NOTIFICATION_ENTER_TREE = 10 + + /** Notification received when the node is about to exit a [SceneTree]. See [method _exit_tree]. + * This notification is received *after* the related [signal tree_exiting] signal. + */ + static readonly NOTIFICATION_EXIT_TREE = 11 + static readonly NOTIFICATION_MOVED_IN_PARENT = 12 + + /** Notification received when the node is ready. See [method _ready]. */ + static readonly NOTIFICATION_READY = 13 + + /** Notification received when the node is paused. See [member process_mode]. */ + static readonly NOTIFICATION_PAUSED = 14 + + /** Notification received when the node is unpaused. See [member process_mode]. */ + static readonly NOTIFICATION_UNPAUSED = 15 + + /** Notification received from the tree every physics frame when [method is_physics_processing] returns `true`. See [method _physics_process]. */ + static readonly NOTIFICATION_PHYSICS_PROCESS = 16 + + /** Notification received from the tree every rendered frame when [method is_processing] returns `true`. See [method _process]. */ + static readonly NOTIFICATION_PROCESS = 17 + + /** Notification received when the node is set as a child of another node (see [method add_child] and [method add_sibling]). + * + * **Note:** This does *not* mean that the node entered the [SceneTree]. + */ + static readonly NOTIFICATION_PARENTED = 18 + + /** Notification received when the parent node calls [method remove_child] on this node. + * + * **Note:** This does *not* mean that the node exited the [SceneTree]. + */ + static readonly NOTIFICATION_UNPARENTED = 19 + + /** Notification received *only* by the newly instantiated scene root node, when [method PackedScene.instantiate] is completed. */ + static readonly NOTIFICATION_SCENE_INSTANTIATED = 20 + + /** Notification received when a drag operation begins. All nodes receive this notification, not only the dragged one. + * Can be triggered either by dragging a [Control] that provides drag data (see [method Control._get_drag_data]) or using [method Control.force_drag]. + * Use [method Viewport.gui_get_drag_data] to get the dragged data. + */ + static readonly NOTIFICATION_DRAG_BEGIN = 21 + + /** Notification received when a drag operation ends. + * Use [method Viewport.gui_is_drag_successful] to check if the drag succeeded. + */ + static readonly NOTIFICATION_DRAG_END = 22 + + /** Notification received when the node's [member name] or one of its ancestors' [member name] is changed. This notification is *not* received when the node is removed from the [SceneTree]. */ + static readonly NOTIFICATION_PATH_RENAMED = 23 + + /** Notification received when the list of children is changed. This happens when child nodes are added, moved or removed. */ + static readonly NOTIFICATION_CHILD_ORDER_CHANGED = 24 + + /** Notification received from the tree every rendered frame when [method is_processing_internal] returns `true`. */ + static readonly NOTIFICATION_INTERNAL_PROCESS = 25 + + /** Notification received from the tree every physics frame when [method is_physics_processing_internal] returns `true`. */ + static readonly NOTIFICATION_INTERNAL_PHYSICS_PROCESS = 26 + + /** Notification received when the node enters the tree, just before [constant NOTIFICATION_READY] may be received. Unlike the latter, it is sent every time the node enters tree, not just once. */ + static readonly NOTIFICATION_POST_ENTER_TREE = 27 + + /** Notification received when the node is disabled. See [constant PROCESS_MODE_DISABLED]. */ + static readonly NOTIFICATION_DISABLED = 28 + + /** Notification received when the node is enabled again after being disabled. See [constant PROCESS_MODE_DISABLED]. */ + static readonly NOTIFICATION_ENABLED = 29 + + /** Notification received when [method reset_physics_interpolation] is called on the node or its ancestors. */ + static readonly NOTIFICATION_RESET_PHYSICS_INTERPOLATION = 2001 + + /** Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. */ + static readonly NOTIFICATION_EDITOR_PRE_SAVE = 9001 + + /** Notification received right after the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. */ + static readonly NOTIFICATION_EDITOR_POST_SAVE = 9002 + + /** Notification received when the mouse enters the window. + * Implemented for embedded windows and on desktop and web platforms. + */ + static readonly NOTIFICATION_WM_MOUSE_ENTER = 1002 + + /** Notification received when the mouse leaves the window. + * Implemented for embedded windows and on desktop and web platforms. + */ + static readonly NOTIFICATION_WM_MOUSE_EXIT = 1003 + + /** Notification received from the OS when the node's [Window] ancestor is focused. This may be a change of focus between two windows of the same engine instance, or from the OS desktop or a third-party application to a window of the game (in which case [constant NOTIFICATION_APPLICATION_FOCUS_IN] is also received). + * A [Window] node receives this notification when it is focused. + */ + static readonly NOTIFICATION_WM_WINDOW_FOCUS_IN = 1004 + + /** Notification received from the OS when the node's [Window] ancestor is defocused. This may be a change of focus between two windows of the same engine instance, or from a window of the game to the OS desktop or a third-party application (in which case [constant NOTIFICATION_APPLICATION_FOCUS_OUT] is also received). + * A [Window] node receives this notification when it is defocused. + */ + static readonly NOTIFICATION_WM_WINDOW_FOCUS_OUT = 1005 + + /** Notification received from the OS when a close request is sent (e.g. closing the window with a "Close" button or [kbd]Alt + F4[/kbd]). + * Implemented on desktop platforms. + */ + static readonly NOTIFICATION_WM_CLOSE_REQUEST = 1006 + + /** Notification received from the OS when a go back request is sent (e.g. pressing the "Back" button on Android). + * Implemented only on Android. + */ + static readonly NOTIFICATION_WM_GO_BACK_REQUEST = 1007 + + /** Notification received when the window is resized. + * + * **Note:** Only the resized [Window] node receives this notification, and it's not propagated to the child nodes. + */ + static readonly NOTIFICATION_WM_SIZE_CHANGED = 1008 + + /** Notification received from the OS when the screen's dots per inch (DPI) scale is changed. Only implemented on macOS. */ + static readonly NOTIFICATION_WM_DPI_CHANGE = 1009 + + /** Notification received when the mouse cursor enters the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is `false` and regardless if it's currently focused or not. */ + static readonly NOTIFICATION_VP_MOUSE_ENTER = 1010 + + /** Notification received when the mouse cursor leaves the [Viewport]'s visible area, that is not occluded behind other [Control]s or [Window]s, provided its [member Viewport.gui_disable_input] is `false` and regardless if it's currently focused or not. */ + static readonly NOTIFICATION_VP_MOUSE_EXIT = 1011 + + /** Notification received from the OS when the application is exceeding its allocated memory. + * Implemented only on iOS. + */ + static readonly NOTIFICATION_OS_MEMORY_WARNING = 2009 + + /** Notification received when translations may have changed. Can be triggered by the user changing the locale, changing [member auto_translate_mode] or when the node enters the scene tree. Can be used to respond to language changes, for example to change the UI strings on the fly. Useful when working with the built-in translation support, like [method Object.tr]. + * + * **Note:** This notification is received alongside [constant NOTIFICATION_ENTER_TREE], so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup translations for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using [method is_node_ready]. + * + */ + static readonly NOTIFICATION_TRANSLATION_CHANGED = 2010 + + /** Notification received from the OS when a request for "About" information is sent. + * Implemented only on macOS. + */ + static readonly NOTIFICATION_WM_ABOUT = 2011 + + /** Notification received from Godot's crash handler when the engine is about to crash. + * Implemented on desktop platforms, if the crash handler is enabled. + */ + static readonly NOTIFICATION_CRASH = 2012 + + /** Notification received from the OS when an update of the Input Method Engine occurs (e.g. change of IME cursor position or composition string). + * Implemented only on macOS. + */ + static readonly NOTIFICATION_OS_IME_UPDATE = 2013 + + /** Notification received from the OS when the application is resumed. + * Specific to the Android and iOS platforms. + */ + static readonly NOTIFICATION_APPLICATION_RESUMED = 2014 + + /** Notification received from the OS when the application is paused. + * Specific to the Android and iOS platforms. + * + * **Note:** On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. + */ + static readonly NOTIFICATION_APPLICATION_PAUSED = 2015 + + /** Notification received from the OS when the application is focused, i.e. when changing the focus from the OS desktop or a thirdparty application to any open window of the Godot instance. + * Implemented on desktop and mobile platforms. + */ + static readonly NOTIFICATION_APPLICATION_FOCUS_IN = 2016 + + /** Notification received from the OS when the application is defocused, i.e. when changing the focus from any open window of the Godot instance to the OS desktop or a thirdparty application. + * Implemented on desktop and mobile platforms. + */ + static readonly NOTIFICATION_APPLICATION_FOCUS_OUT = 2017 + + /** Notification received when the [TextServer] is changed. */ + static readonly NOTIFICATION_TEXT_SERVER_CHANGED = 2018 + constructor(identifier?: any) + + /** Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds. + * It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process]. + * Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification]. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + */ + /* gdvirtual */ _process(delta: float64): void + + /** Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [param delta] variable should be constant. [param delta] is in seconds. + * It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process]. + * Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification]. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + */ + /* gdvirtual */ _physics_process(delta: float64): void + + /** Called when the node enters the [SceneTree] (e.g. upon instantiating, scene changing, or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children. + * Corresponds to the [constant NOTIFICATION_ENTER_TREE] notification in [method Object._notification]. + */ + /* gdvirtual */ _enter_tree(): void + + /** Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. + * Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. + */ + /* gdvirtual */ _exit_tree(): void + + /** Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards. + * Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the `@onready` annotation for variables. + * Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree]. + * + * **Note:** This method may be called only once for each node. After removing a node from the scene tree and adding it again, [method _ready] will **not** be called a second time. This can be bypassed by requesting another call with [method request_ready], which may be called anywhere before adding the node again. + */ + /* gdvirtual */ _ready(): void + + /** The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a `tool` script. + * Returning an empty array produces no warnings. + * Call [method update_configuration_warnings] when the warnings need to be updated for this node. + * + */ + /* gdvirtual */ _get_configuration_warnings(): PackedStringArray + + /** Called when there is an input event. The input event propagates up through the node tree until a node consumes it. + * It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input]. + * To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. + * For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + */ + /* gdvirtual */ _input(event: InputEvent): void + + /** Called when an [InputEventKey], [InputEventShortcut], or [InputEventJoypadButton] hasn't been consumed by [method _input] or any GUI [Control] item. It is called before [method _unhandled_key_input] and [method _unhandled_input]. The input event propagates up through the node tree until a node consumes it. + * It is only called if shortcut processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_shortcut_input]. + * To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. + * This method can be used to handle shortcuts. For generic GUI events, use [method _input] instead. Gameplay events should usually be handled with either [method _unhandled_input] or [method _unhandled_key_input]. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not orphan). + */ + /* gdvirtual */ _shortcut_input(event: InputEvent): void + + /** Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI [Control] item. It is called after [method _shortcut_input] and after [method _unhandled_key_input]. The input event propagates up through the node tree until a node consumes it. + * It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input]. + * To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. + * For gameplay input, this method is usually a better fit than [method _input], as GUI events need a higher priority. For keyboard shortcuts, consider using [method _shortcut_input] instead, as it is called before this method. Finally, to handle keyboard events, consider using [method _unhandled_key_input] for performance reasons. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + */ + /* gdvirtual */ _unhandled_input(event: InputEvent): void + + /** Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI [Control] item. It is called after [method _shortcut_input] but before [method _unhandled_input]. The input event propagates up through the node tree until a node consumes it. + * It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input]. + * To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. + * This method can be used to handle Unicode character input with [kbd]Alt[/kbd], [kbd]Alt + Ctrl[/kbd], and [kbd]Alt + Shift[/kbd] modifiers, after shortcuts were handled. + * For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input], as GUI events should be handled first. This method also performs better than [method _unhandled_input], since unrelated events such as [InputEventMouseMotion] are automatically filtered. For shortcuts, consider using [method _shortcut_input] instead. + * + * **Note:** This method is only called if the node is present in the scene tree (i.e. if it's not an orphan). + */ + /* gdvirtual */ _unhandled_key_input(event: InputEvent): void + + /** Prints all orphan nodes (nodes outside the [SceneTree]). Useful for debugging. + * + * **Note:** This method only works in debug builds. Does nothing in a project exported in release mode. + */ + static print_orphan_nodes(): void + + /** Adds a [param sibling] node to this node's parent, and moves the added sibling right below this node. + * If [param force_readable_name] is `true`, improves the readability of the added [param sibling]. If not named, the [param sibling] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to `false`, which assigns a dummy name featuring `@` in both situations. + * Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. + * + * **Note:** If this node is internal, the added sibling will be internal too (see [method add_child]'s `internal` parameter). + */ + add_sibling(sibling: Node, force_readable_name: boolean = false): void + set_name(name: string): void + get_name(): StringName + + /** Adds a child [param node]. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. + * If [param force_readable_name] is `true`, improves the readability of the added [param node]. If not named, the [param node] is renamed to its type, and if it shares [member name] with a sibling, a number is suffixed more appropriately. This operation is very slow. As such, it is recommended leaving this to `false`, which assigns a dummy name featuring `@` in both situations. + * If [param internal] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. These nodes are ignored by methods like [method get_children], unless their parameter `include_internal` is `true`. The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes. + * + * **Note:** If [param node] already has a parent, this method will fail. Use [method remove_child] first to remove [param node] from its current parent. For example: + * + * If you need the child node to be added below a specific node in the list of children, use [method add_sibling] instead of this method. + * + * **Note:** If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://docs.godotengine.org/en/4.3/tutorials/plugins/running_code_in_the_editor.html]tool scripts[/url] and [url=https://docs.godotengine.org/en/4.3/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. + */ + add_child(node: Node, force_readable_name: boolean = false, internal: Node.InternalMode = 0): void + + /** Removes a child [param node]. The [param node], along with its children, are **not** deleted. To delete a node, see [method queue_free]. + * + * **Note:** When this node is inside the tree, this method sets the [member owner] of the removed [param node] (or its descendants) to `null`, if their [member owner] is no longer an ancestor (see [method is_ancestor_of]). + */ + remove_child(node: Node): void + + /** Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent. The node's [member owner] is preserved if its owner is still reachable from the new location (i.e., the node is still a descendant of the new parent after the operation). + * If [param keep_global_transform] is `true`, the node's global transform will be preserved if supported. [Node2D], [Node3D] and [Control] support this argument (but [Control] keeps only position). + */ + reparent(new_parent: Node, keep_global_transform: boolean = true): void + + /** Returns the number of children of this node. + * If [param include_internal] is `false`, internal children are not counted (see [method add_child]'s `internal` parameter). + */ + get_child_count(include_internal: boolean = false): int64 + + /** Returns all children of this node inside an [Array]. + * If [param include_internal] is `false`, excludes internal children from the returned array (see [method add_child]'s `internal` parameter). + */ + get_children(include_internal: boolean = false): GArray + + /** Fetches a child node by its index. Each child node has an index relative its siblings (see [method get_index]). The first child is at index 0. Negative values can also be used to start from the end of the list. This method can be used in combination with [method get_child_count] to iterate over this node's children. If no child exists at the given index, this method returns `null` and an error is generated. + * If [param include_internal] is `false`, internal children are ignored (see [method add_child]'s `internal` parameter). + * + * + * **Note:** To fetch a node by [NodePath], use [method get_node]. + */ + get_child(idx: int64, include_internal: boolean = false): Node + + /** Returns `true` if the [param path] points to a valid node. See also [method get_node]. */ + has_node(path: NodePath | string): boolean + + /** Fetches a node. The [NodePath] can either be a relative path (from this node), or an absolute path (from the [member SceneTree.root]) to a node. If [param path] does not point to a valid node, generates an error and returns `null`. Attempts to access methods on the return value will result in an *"Attempt to call on a null instance."* error. + * + * **Note:** Fetching by absolute path only works when the node is inside the scene tree (see [method is_inside_tree]). + * **Example:** Assume this method is called from the Character node, inside the following tree: + * [codeblock lang=text] + * ┖╴root + * ┠╴Character (you are here!) + * ┃ ┠╴Sword + * ┃ ┖╴Backpack + * ┃ ┖╴Dagger + * ┠╴MyGame + * ┖╴Swamp + * ┠╴Alligator + * ┠╴Mosquito + * ┖╴Goblin + * [/codeblock] + * The following calls will return a valid node: + * + */ + get_node(path: NodePath | string): Node + + /** Fetches a node by [NodePath]. Similar to [method get_node], but does not generate an error if [param path] does not point to a valid node. */ + get_node_or_null(path: NodePath | string): Node + + /** Returns this node's parent node, or `null` if the node doesn't have a parent. */ + get_parent(): Node + + /** Finds the first descendant of this node whose [member name] matches [param pattern], returning `null` if no match is found. The matching is done against node names, *not* their paths, through [method String.match]. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. + * If [param recursive] is `false`, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see `internal` parameter in [method add_child]). + * If [param owned] is `true`, only descendants with a valid [member owner] node are checked. + * + * **Note:** This method can be very slow. Consider storing a reference to the found node in a variable. Alternatively, use [method get_node] with unique names (see [member unique_name_in_owner]). + * + * **Note:** To find all descendant nodes matching a pattern or a class type, see [method find_children]. + */ + find_child(pattern: string, recursive: boolean = true, owned: boolean = true): Node + + /** Finds all descendants of this node whose names match [param pattern], returning an empty [Array] if no match is found. The matching is done against node names, *not* their paths, through [method String.match]. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. + * If [param type] is not empty, only ancestors inheriting from [param type] are included (see [method Object.is_class]). + * If [param recursive] is `false`, only this node's direct children are checked. Nodes are checked in tree order, so this node's first direct child is checked first, then its own direct children, etc., before moving to the second direct child, and so on. Internal children are also included in the search (see `internal` parameter in [method add_child]). + * If [param owned] is `true`, only descendants with a valid [member owner] node are checked. + * + * **Note:** This method can be very slow. Consider storing references to the found nodes in a variable. + * + * **Note:** To find a single descendant node matching a pattern, see [method find_child]. + */ + find_children(pattern: string, type: string = '', recursive: boolean = true, owned: boolean = true): GArray + + /** Finds the first ancestor of this node whose [member name] matches [param pattern], returning `null` if no match is found. The matching is done through [method String.match]. As such, it is case-sensitive, `"*"` matches zero or more characters, and `"?"` matches any single character. See also [method find_child] and [method find_children]. + * + * **Note:** As this method walks upwards in the scene tree, it can be slow in large, deeply nested nodes. Consider storing a reference to the found node in a variable. Alternatively, use [method get_node] with unique names (see [member unique_name_in_owner]). + */ + find_parent(pattern: string): Node + + /** Returns `true` if [param path] points to a valid node and its subnames point to a valid [Resource], e.g. `Area2D/CollisionShape2D:shape`. Properties that are not [Resource] types (such as nodes or other [Variant] types) are not considered. See also [method get_node_and_resource]. */ + has_node_and_resource(path: NodePath | string): boolean + + /** Fetches a node and its most nested resource as specified by the [NodePath]'s subname. Returns an [Array] of size `3` where: + * - Element `0` is the [Node], or `null` if not found; + * - Element `1` is the subname's last nested [Resource], or `null` if not found; + * - Element `2` is the remaining [NodePath], referring to an existing, non-[Resource] property (see [method Object.get_indexed]). + * **Example:** Assume that the child's [member Sprite2D.texture] has been assigned a [AtlasTexture]: + * + */ + get_node_and_resource(path: NodePath | string): GArray + + /** Returns `true` if this node is currently inside a [SceneTree]. See also [method get_tree]. */ + is_inside_tree(): boolean + + /** Returns `true` if the node is part of the scene currently opened in the editor. */ + is_part_of_edited_scene(): boolean + + /** Returns `true` if the given [param node] is a direct or indirect child of this node. */ + is_ancestor_of(node: Node): boolean + + /** Returns `true` if the given [param node] occurs later in the scene hierarchy than this node. A node occurring later is usually processed last. */ + is_greater_than(node: Node): boolean + + /** Returns the node's absolute path, relative to the [member SceneTree.root]. If the node is not inside the scene tree, this method fails and returns an empty [NodePath]. */ + get_path(): NodePath + + /** Returns the relative [NodePath] from this node to the specified [param node]. Both nodes must be in the same [SceneTree] or scene hierarchy, otherwise this method fails and returns an empty [NodePath]. + * If [param use_unique_path] is `true`, returns the shortest path accounting for this node's unique name (see [member unique_name_in_owner]). + * + * **Note:** If you get a relative path which starts from a unique node, the path may be longer than a normal relative path, due to the addition of the unique node's name. + */ + get_path_to(node: Node, use_unique_path: boolean = false): NodePath + + /** Adds the node to the [param group]. Groups can be helpful to organize a subset of nodes, for example `"enemies"` or `"collectables"`. See notes in the description, and the group methods in [SceneTree]. + * If [param persistent] is `true`, the group will be stored when saved inside a [PackedScene]. All groups created and displayed in the Node dock are persistent. + * + * **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order. + * + * **Note:** [SceneTree]'s group methods will *not* work on this node if not inside the tree (see [method is_inside_tree]). + */ + add_to_group(group: StringName, persistent: boolean = false): void + + /** Removes the node from the given [param group]. Does nothing if the node is not in the [param group]. See also notes in the description, and the [SceneTree]'s group methods. */ + remove_from_group(group: StringName): void + + /** Returns `true` if this node has been added to the given [param group]. See [method add_to_group] and [method remove_from_group]. See also notes in the description, and the [SceneTree]'s group methods. */ + is_in_group(group: StringName): boolean + + /** Moves [param child_node] to the given index. A node's index is the order among its siblings. If [param to_index] is negative, the index is counted from the end of the list. See also [method get_child] and [method get_index]. + * + * **Note:** The processing order of several engine callbacks ([method _ready], [method _process], etc.) and notifications sent through [method propagate_notification] is affected by tree order. [CanvasItem] nodes are also rendered in tree order. See also [member process_priority]. + */ + move_child(child_node: Node, to_index: int64): void + + /** Returns an [Array] of group names that the node has been added to. + * + * **Note:** To improve performance, the order of group names is *not* guaranteed and may vary between project runs. Therefore, do not rely on the group order. + * + * **Note:** This method may also return some group names starting with an underscore (`_`). These are internally used by the engine. To avoid conflicts, do not use custom groups starting with underscores. To exclude internal groups, see the following code snippet: + * + */ + get_groups(): GArray + + /** Returns this node's order among its siblings. The first node's index is `0`. See also [method get_child]. + * If [param include_internal] is `false`, returns the index ignoring internal children. The first, non-internal child will have an index of `0` (see [method add_child]'s `internal` parameter). + */ + get_index(include_internal: boolean = false): int64 + + /** Prints the node and its children to the console, recursively. The node does not have to be inside the tree. This method outputs [NodePath]s relative to this node, and is good for copy/pasting into [method get_node]. See also [method print_tree_pretty]. + * May print, for example: + * [codeblock lang=text] + * . + * Menu + * Menu/Label + * Menu/Camera2D + * SplashScreen + * SplashScreen/Camera2D + * [/codeblock] + */ + print_tree(): void + + /** Prints the node and its children to the console, recursively. The node does not have to be inside the tree. Similar to [method print_tree], but the graphical representation looks like what is displayed in the editor's Scene dock. It is useful for inspecting larger trees. + * May print, for example: + * [codeblock lang=text] + * ┖╴TheGame + * ┠╴Menu + * ┃ ┠╴Label + * ┃ ┖╴Camera2D + * ┖╴SplashScreen + * ┖╴Camera2D + * [/codeblock] + */ + print_tree_pretty(): void + + /** Returns the tree as a [String]. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [method get_node] function. It also can be used in game UI/UX. + * May print, for example: + * [codeblock lang=text] + * TheGame + * TheGame/Menu + * TheGame/Menu/Label + * TheGame/Menu/Camera2D + * TheGame/SplashScreen + * TheGame/SplashScreen/Camera2D + * [/codeblock] + */ + get_tree_string(): string + + /** Similar to [method get_tree_string], this returns the tree as a [String]. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. + * May print, for example: + * [codeblock lang=text] + * ┖╴TheGame + * ┠╴Menu + * ┃ ┠╴Label + * ┃ ┖╴Camera2D + * ┖╴SplashScreen + * ┖╴Camera2D + * [/codeblock] + */ + get_tree_string_pretty(): string + + /** Calls [method Object.notification] with [param what] on this node and all of its children, recursively. */ + propagate_notification(what: int64): void + + /** Calls the given [param method] name, passing [param args] as arguments, on this node and all of its children, recursively. + * If [param parent_first] is `true`, the method is called on this node first, then on all of its children. If `false`, the children's methods are called first. + */ + propagate_call(method: StringName, args: GArray = [], parent_first: boolean = false): void + + /** If set to `true`, enables physics (fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.physics_ticks_per_second] to change) interval (and the [method _physics_process] callback will be called if it exists). + * + * **Note:** If [method _physics_process] is overridden, this will be automatically enabled before [method _ready] is called. + */ + set_physics_process(enable: boolean): void + + /** Returns the time elapsed (in seconds) since the last physics callback. This value is identical to [method _physics_process]'s `delta` parameter, and is often consistent at run-time, unless [member Engine.physics_ticks_per_second] is changed. See also [constant NOTIFICATION_PHYSICS_PROCESS]. */ + get_physics_process_delta_time(): float64 + + /** Returns `true` if physics processing is enabled (see [method set_physics_process]). */ + is_physics_processing(): boolean + + /** Returns the time elapsed (in seconds) since the last process callback. This value is identical to [method _process]'s `delta` parameter, and may vary from frame to frame. See also [constant NOTIFICATION_PROCESS]. */ + get_process_delta_time(): float64 + + /** If set to `true`, enables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if it exists). + * + * **Note:** If [method _process] is overridden, this will be automatically enabled before [method _ready] is called. + * + * **Note:** This method only affects the [method _process] callback, i.e. it has no effect on other callbacks like [method _physics_process]. If you want to disable all processing for the node, set [member process_mode] to [constant PROCESS_MODE_DISABLED]. + */ + set_process(enable: boolean): void + + /** Returns `true` if processing is enabled (see [method set_process]). */ + is_processing(): boolean + + /** If set to `true`, enables input processing. + * + * **Note:** If [method _input] is overridden, this will be automatically enabled before [method _ready] is called. Input processing is also already enabled for GUI controls, such as [Button] and [TextEdit]. + */ + set_process_input(enable: boolean): void + + /** Returns `true` if the node is processing input (see [method set_process_input]). */ + is_processing_input(): boolean + + /** If set to `true`, enables shortcut processing for this node. + * + * **Note:** If [method _shortcut_input] is overridden, this will be automatically enabled before [method _ready] is called. + */ + set_process_shortcut_input(enable: boolean): void + + /** Returns `true` if the node is processing shortcuts (see [method set_process_shortcut_input]). */ + is_processing_shortcut_input(): boolean + + /** If set to `true`, enables unhandled input processing. It enables the node to receive all input that was not previously handled (usually by a [Control]). + * + * **Note:** If [method _unhandled_input] is overridden, this will be automatically enabled before [method _ready] is called. Unhandled input processing is also already enabled for GUI controls, such as [Button] and [TextEdit]. + */ + set_process_unhandled_input(enable: boolean): void + + /** Returns `true` if the node is processing unhandled input (see [method set_process_unhandled_input]). */ + is_processing_unhandled_input(): boolean + + /** If set to `true`, enables unhandled key input processing. + * + * **Note:** If [method _unhandled_key_input] is overridden, this will be automatically enabled before [method _ready] is called. + */ + set_process_unhandled_key_input(enable: boolean): void + + /** Returns `true` if the node is processing unhandled key input (see [method set_process_unhandled_key_input]). */ + is_processing_unhandled_key_input(): boolean + + /** Returns `true` if the node can receive processing notifications and input callbacks ([constant NOTIFICATION_PROCESS], [method _input], etc.) from the [SceneTree] and [Viewport]. The returned value depends on [member process_mode]: + * - If set to [constant PROCESS_MODE_PAUSABLE], returns `true` when the game is processing, i.e. [member SceneTree.paused] is `false`; + * - If set to [constant PROCESS_MODE_WHEN_PAUSED], returns `true` when the game is paused, i.e. [member SceneTree.paused] is `true`; + * - If set to [constant PROCESS_MODE_ALWAYS], always returns `true`; + * - If set to [constant PROCESS_MODE_DISABLED], always returns `false`; + * - If set to [constant PROCESS_MODE_INHERIT], use the parent node's [member process_mode] to determine the result. + * If the node is not inside the tree, returns `false` no matter the value of [member process_mode]. + */ + can_process(): boolean + + /** If set to `true`, the node appears folded in the Scene dock. As a result, all of its children are hidden. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also [method is_displayed_folded]. */ + set_display_folded(fold: boolean): void + + /** Returns `true` if the node is folded (collapsed) in the Scene dock. This method is intended to be used in editor plugins and tools. See also [method set_display_folded]. */ + is_displayed_folded(): boolean + + /** If set to `true`, enables internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). + * **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. + */ + set_process_internal(enable: boolean): void + + /** Returns `true` if internal processing is enabled (see [method set_process_internal]). */ + is_processing_internal(): boolean + + /** If set to `true`, enables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). + * **Warning:** Built-in nodes rely on internal processing for their internal logic. Disabling it is unsafe and may lead to unexpected behavior. Use this method if you know what you are doing. + */ + set_physics_process_internal(enable: boolean): void + + /** Returns `true` if internal physics processing is enabled (see [method set_physics_process_internal]). */ + is_physics_processing_internal(): boolean + + /** Returns `true` if physics interpolation is enabled for this node (see [member physics_interpolation_mode]). + * + * **Note:** Interpolation will only be active if both the flag is set **and** physics interpolation is enabled within the [SceneTree]. This can be tested using [method is_physics_interpolated_and_enabled]. + */ + is_physics_interpolated(): boolean + + /** Returns `true` if physics interpolation is enabled (see [member physics_interpolation_mode]) **and** enabled in the [SceneTree]. + * This is a convenience version of [method is_physics_interpolated] that also checks whether physics interpolation is enabled globally. + * See [member SceneTree.physics_interpolation] and [member ProjectSettings.physics/common/physics_interpolation]. + */ + is_physics_interpolated_and_enabled(): boolean + + /** When physics interpolation is active, moving a node to a radically different transform (such as placement within a level) can result in a visible glitch as the object is rendered moving from the old to new position over the physics tick. + * That glitch can be prevented by calling this method, which temporarily disables interpolation until the physics tick is complete. + * The notification [constant NOTIFICATION_RESET_PHYSICS_INTERPOLATION] will be received by the node and all children recursively. + * + * **Note:** This function should be called **after** moving the node, rather than before. + */ + reset_physics_interpolation(): void + + /** Returns the [Window] that contains this node. If the node is in the main window, this is equivalent to getting the root node (`get_tree().get_root()`). */ + get_window(): Window + + /** Returns the [Window] that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node. */ + get_last_exclusive_window(): Window + + /** Returns the [SceneTree] that contains this node. If this node is not inside the tree, generates an error and returns `null`. See also [method is_inside_tree]. */ + get_tree(): SceneTree + + /** Creates a new [Tween] and binds it to this node. + * This is the equivalent of doing: + * + * The Tween will start automatically on the next process frame or physics frame (depending on [enum Tween.TweenProcessMode]). See [method Tween.bind_node] for more info on Tweens bound to nodes. + * + * **Note:** The method can still be used when the node is not inside [SceneTree]. It can fail in an unlikely case of using a custom [MainLoop]. + */ + create_tween(): Tween + + /** Duplicates the node, returning a new node with all of its properties, signals and groups copied from the original. The behavior can be tweaked through the [param flags] (see [enum DuplicateFlags]). + * + * **Note:** For nodes with a [Script] attached, if [method Object._init] has been defined with required parameters, the duplicated node will not have a [Script]. + */ + duplicate(flags: int64 = 15): Node + + /** Replaces this node by the given [param node]. All children of this node are moved to [param node]. + * If [param keep_groups] is `true`, the [param node] is added to the same groups that the replaced node is in (see [method add_to_group]). + * **Warning:** The replaced node is removed from the tree, but it is **not** deleted. To prevent memory leaks, store a reference to the node in a variable, or use [method Object.free]. + */ + replace_by(node: Node, keep_groups: boolean = false): void + + /** If set to `true`, the node becomes a [InstancePlaceholder] when packed and instantiated from a [PackedScene]. See also [method get_scene_instance_load_placeholder]. */ + set_scene_instance_load_placeholder(load_placeholder: boolean): void + + /** Returns `true` if this node is an instance load placeholder. See [InstancePlaceholder] and [method set_scene_instance_load_placeholder]. */ + get_scene_instance_load_placeholder(): boolean + + /** Set to `true` to allow all nodes owned by [param node] to be available, and editable, in the Scene dock, even if their [member owner] is not the scene root. This method is intended to be used in editor plugins and tools, but it also works in release builds. See also [method is_editable_instance]. */ + set_editable_instance(node: Node, is_editable: boolean): void + + /** Returns `true` if [param node] has editable children enabled relative to this node. This method is intended to be used in editor plugins and tools. See also [method set_editable_instance]. */ + is_editable_instance(node: Node): boolean + + /** Returns the node's closest [Viewport] ancestor, if the node is inside the tree. Otherwise, returns `null`. */ + get_viewport(): Viewport + + /** Queues this node to be deleted at the end of the current frame. When deleted, all of its children are deleted as well, and all references to the node and its children become invalid. + * Unlike with [method Object.free], the node is not deleted instantly, and it can still be accessed before deletion. It is also safe to call [method queue_free] multiple times. Use [method Object.is_queued_for_deletion] to check if the node will be deleted at the end of the frame. + * + * **Note:** The node will only be freed after all other deferred calls are finished. Using this method is not always the same as calling [method Object.free] through [method Object.call_deferred]. + */ + queue_free(): void + + /** Requests [method _ready] to be called again the next time the node enters the tree. Does **not** immediately call [method _ready]. + * + * **Note:** This method only affects the current node. If the node's children also need to request ready, this method needs to be called for each one of them. When the node and its children enter the tree again, the order of [method _ready] callbacks will be the same as normal. + */ + request_ready(): void + + /** Returns `true` if the node is ready, i.e. it's inside scene tree and all its children are initialized. + * [method request_ready] resets it back to `false`. + */ + is_node_ready(): boolean + + /** Sets the node's multiplayer authority to the peer with the given peer [param id]. The multiplayer authority is the peer that has authority over the node on the network. Defaults to peer ID 1 (the server). Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. + * If [param recursive] is `true`, the given peer is recursively set as the authority for all children of this node. + * **Warning:** This does **not** automatically replicate the new authority to other peers. It is the developer's responsibility to do so. You may replicate the new authority's information using [member MultiplayerSpawner.spawn_function], an RPC, or a [MultiplayerSynchronizer]. Furthermore, the parent's authority does **not** propagate to newly added children. + */ + set_multiplayer_authority(id: int64, recursive: boolean = true): void + + /** Returns the peer ID of the multiplayer authority for this node. See [method set_multiplayer_authority]. */ + get_multiplayer_authority(): int64 + + /** Returns `true` if the local system is the multiplayer authority of this node. */ + is_multiplayer_authority(): boolean + + /** Changes the RPC configuration for the given [param method]. [param config] should either be `null` to disable the feature (as by default), or a [Dictionary] containing the following entries: + * - `rpc_mode`: see [enum MultiplayerAPI.RPCMode]; + * - `transfer_mode`: see [enum MultiplayerPeer.TransferMode]; + * - `call_local`: if `true`, the method will also be called locally; + * - `channel`: an [int] representing the channel to send the RPC on. + * + * **Note:** In GDScript, this method corresponds to the [annotation @GDScript.@rpc] annotation, with various parameters passed (`@rpc(any)`, `@rpc(authority)`...). See also the [url=https://docs.godotengine.org/en/4.3/tutorials/networking/high_level_multiplayer.html]high-level multiplayer[/url] tutorial. + */ + rpc_config(method: StringName, config: any): void + + /** Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. + * This method works the same as [method Object.tr], with the addition of respecting the [member auto_translate_mode] state. + * If [method Object.can_translate_messages] is `false`, or no translation is available, this method returns the [param message] without changes. See [method Object.set_message_translation]. + * For detailed examples, see [url=https://docs.godotengine.org/en/4.3/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url]. + */ + atr(message: string, context: StringName = ''): string + + /** Translates a [param message] or [param plural_message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. + * This method works the same as [method Object.tr_n], with the addition of respecting the [member auto_translate_mode] state. + * If [method Object.can_translate_messages] is `false`, or no translation is available, this method returns [param message] or [param plural_message], without changes. See [method Object.set_message_translation]. + * The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. + * For detailed examples, see [url=https://docs.godotengine.org/en/4.3/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url]. + * + * **Note:** Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method atr]. + */ + atr_n(message: string, plural_message: StringName, n: int64, context: StringName = ''): string + _set_property_pinned(property: string, pinned: boolean): void + + /** Sends a remote procedure call request for the given [param method] to peers on the network (and locally), sending additional arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same [member name]. Behavior depends on the RPC configuration for the given [param method] (see [method rpc_config] and [annotation @GDScript.@rpc]). By default, methods are not exposed to RPCs. + * May return [constant OK] if the call is successful, [constant ERR_INVALID_PARAMETER] if the arguments passed in the [param method] do not match, [constant ERR_UNCONFIGURED] if the node's [member multiplayer] cannot be fetched (such as when the node is not inside the tree), [constant ERR_CONNECTION_ERROR] if [member multiplayer]'s connection is not available. + * + * **Note:** You can only safely use RPCs on clients after you received the [signal MultiplayerAPI.connected_to_server] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [signal MultiplayerAPI.server_disconnected] or by checking (`get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED`). + */ + rpc(method: StringName, ...vargargs: any[]): GError + + /** Sends a [method rpc] to a specific peer identified by [param peer_id] (see [method MultiplayerPeer.set_target_peer]). + * May return [constant OK] if the call is successful, [constant ERR_INVALID_PARAMETER] if the arguments passed in the [param method] do not match, [constant ERR_UNCONFIGURED] if the node's [member multiplayer] cannot be fetched (such as when the node is not inside the tree), [constant ERR_CONNECTION_ERROR] if [member multiplayer]'s connection is not available. + */ + rpc_id(peer_id: int64, method: StringName, ...vargargs: any[]): GError + + /** Refreshes the warnings displayed for this node in the Scene dock. Use [method _get_configuration_warnings] to customize the warning messages to display. */ + update_configuration_warnings(): void + + /** This function is similar to [method Object.call_deferred] except that the call will take place when the node thread group is processed. If the node thread group processes in sub-threads, then the call will be done on that thread, right before [constant NOTIFICATION_PROCESS] or [constant NOTIFICATION_PHYSICS_PROCESS], the [method _process] or [method _physics_process] or their internal versions are called. */ + call_deferred_thread_group(method: StringName, ...vargargs: any[]): any + + /** Similar to [method call_deferred_thread_group], but for setting properties. */ + set_deferred_thread_group(property: StringName, value: any): void + + /** Similar to [method call_deferred_thread_group], but for notifications. */ + notify_deferred_thread_group(what: int64): void + + /** This function ensures that the calling of this function will succeed, no matter whether it's being done from a thread or not. If called from a thread that is not allowed to call the function, the call will become deferred. Otherwise, the call will go through directly. */ + call_thread_safe(method: StringName, ...vargargs: any[]): any + + /** Similar to [method call_thread_safe], but for setting properties. */ + set_thread_safe(property: StringName, value: any): void + + /** Similar to [method call_thread_safe], but for notifications. */ + notify_thread_safe(what: int64): void + get _import_path(): NodePath + set _import_path(value: NodePath | string) + + /** If `true`, the node can be accessed from any node sharing the same [member owner] or from the [member owner] itself, with special `%Name` syntax in [method get_node]. + * + * **Note:** If another node with the same [member owner] shares the same [member name] as this node, the other node will no longer be accessible as unique. + */ + get unique_name_in_owner(): boolean + set unique_name_in_owner(value: boolean) + + /** The original scene's file path, if the node has been instantiated from a [PackedScene] file. Only scene root nodes contains this. */ + get scene_file_path(): string + set scene_file_path(value: string) + + /** The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it. + * + * **Note:** In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will **not** be saved. To prevent this, remember to set the owner after calling [method add_child]. See also (see [member unique_name_in_owner]) + */ + get owner(): Node + set owner(value: Node) + + /** The [MultiplayerAPI] instance associated with this node. See [method SceneTree.get_multiplayer]. + * + * **Note:** Renaming the node, or moving it in the tree, will not move the [MultiplayerAPI] to the new path, you will have to update this manually. + */ + get multiplayer(): MultiplayerAPI + + /** The node's processing behavior (see [enum ProcessMode]). To check if the node can process in its current mode, use [method can_process]. */ + get process_mode(): int64 + set process_mode(value: int64) + + /** The node's execution order of the process callbacks ([method _process], [method _physics_process], and internal processing). Nodes whose priority value is *lower* call their process callbacks first, regardless of tree order. */ + get process_priority(): int64 + set process_priority(value: int64) + + /** Similar to [member process_priority] but for [constant NOTIFICATION_PHYSICS_PROCESS], [method _physics_process] or the internal version. */ + get process_physics_priority(): int64 + set process_physics_priority(value: int64) + + /** Set the process thread group for this node (basically, whether it receives [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS], [method _process] or [method _physics_process] (and the internal versions) on the main thread or in a sub-thread. + * By default, the thread group is [constant PROCESS_THREAD_GROUP_INHERIT], which means that this node belongs to the same thread group as the parent node. The thread groups means that nodes in a specific thread group will process together, separate to other thread groups (depending on [member process_thread_group_order]). If the value is set is [constant PROCESS_THREAD_GROUP_SUB_THREAD], this thread group will occur on a sub thread (not the main thread), otherwise if set to [constant PROCESS_THREAD_GROUP_MAIN_THREAD] it will process on the main thread. If there is not a parent or grandparent node set to something other than inherit, the node will belong to the *default thread group* . This default group will process on the main thread and its group order is 0. + * During processing in a sub-thread, accessing most functions in nodes outside the thread group is forbidden (and it will result in an error in debug mode). Use [method Object.call_deferred], [method call_thread_safe], [method call_deferred_thread_group] and the likes in order to communicate from the thread groups to the main thread (or to other thread groups). + * To better understand process thread groups, the idea is that any node set to any other value than [constant PROCESS_THREAD_GROUP_INHERIT] will include any child (and grandchild) nodes set to inherit into its process thread group. This means that the processing of all the nodes in the group will happen together, at the same time as the node including them. + */ + get process_thread_group(): int64 + set process_thread_group(value: int64) + + /** Change the process thread group order. Groups with a lesser order will process before groups with a greater order. This is useful when a large amount of nodes process in sub thread and, afterwards, another group wants to collect their result in the main thread, as an example. */ + get process_thread_group_order(): int64 + set process_thread_group_order(value: int64) + + /** Set whether the current thread group will process messages (calls to [method call_deferred_thread_group] on threads), and whether it wants to receive them during regular process or physics process callbacks. */ + get process_thread_messages(): int64 + set process_thread_messages(value: int64) + + /** Allows enabling or disabling physics interpolation per node, offering a finer grain of control than turning physics interpolation on and off globally. See [member ProjectSettings.physics/common/physics_interpolation] and [member SceneTree.physics_interpolation] for the global setting. + * + * **Note:** When teleporting a node to a distant position you should temporarily disable interpolation with [method Node.reset_physics_interpolation]. + */ + get physics_interpolation_mode(): int64 + set physics_interpolation_mode(value: int64) + + /** Defines if any text should automatically change to its translated version depending on the current locale (for nodes such as [Label], [RichTextLabel], [Window], etc.). Also decides if the node's strings should be parsed for POT generation. + * + * **Note:** For the root node, auto translate mode can also be set via [member ProjectSettings.internationalization/rendering/root_node_auto_translate]. + */ + get auto_translate_mode(): int64 + set auto_translate_mode(value: int64) + + /** An optional description to the node. It will be displayed as a tooltip when hovering over the node in the editor's Scene dock. */ + get editor_description(): string + set editor_description(value: string) + + /** Emitted when the node is considered ready, after [method _ready] is called. */ + readonly ready: Signal0 + + /** Emitted when the node's [member name] is changed, if the node is inside the tree. */ + readonly renamed: Signal0 + + /** Emitted when the node enters the tree. + * This signal is emitted *after* the related [constant NOTIFICATION_ENTER_TREE] notification. + */ + readonly tree_entered: Signal0 + + /** Emitted when the node is just about to exit the tree. The node is still valid. As such, this is the right place for de-initialization (or a "destructor", if you will). + * This signal is emitted *after* the node's [method _exit_tree], and *before* the related [constant NOTIFICATION_EXIT_TREE]. + */ + readonly tree_exiting: Signal0 + + /** Emitted after the node exits the tree and is no longer active. + * This signal is emitted *after* the related [constant NOTIFICATION_EXIT_TREE] notification. + */ + readonly tree_exited: Signal0 + + /** Emitted when the child [param node] enters the [SceneTree], usually because this node entered the tree (see [signal tree_entered]), or [method add_child] has been called. + * This signal is emitted *after* the child node's own [constant NOTIFICATION_ENTER_TREE] and [signal tree_entered]. + */ + readonly child_entered_tree: Signal1 + + /** Emitted when the child [param node] is about to exit the [SceneTree], usually because this node is exiting the tree (see [signal tree_exiting]), or because the child [param node] is being removed or freed. + * When this signal is received, the child [param node] is still accessible inside the tree. This signal is emitted *after* the child node's own [signal tree_exiting] and [constant NOTIFICATION_EXIT_TREE]. + */ + readonly child_exiting_tree: Signal1 + + /** Emitted when the list of children is changed. This happens when child nodes are added, moved or removed. */ + readonly child_order_changed: Signal0 + + /** Emitted when this node is being replaced by the [param node], see [method replace_by]. + * This signal is emitted *after* [param node] has been added as a child of the original parent node, but *before* all original child nodes have been reparented to [param node]. + */ + readonly replacing_by: Signal1 + + /** Emitted when the node's editor description field changed. */ + readonly editor_description_changed: Signal1 + } +} diff --git a/godot/typings/godot4.gen.d.ts b/godot/typings/godot4.gen.d.ts new file mode 100644 index 0000000..75abaa0 --- /dev/null +++ b/godot/typings/godot4.gen.d.ts @@ -0,0 +1,9809 @@ +// AUTO-GENERATED +/// +declare module "godot" { + /** A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_node2d.html + */ + class Node2D extends CanvasItem { + constructor(identifier?: any) + /** Applies a rotation to the node, in radians, starting from its current rotation. */ + rotate(radians: float64): void + + /** Applies a local translation on the node's X axis based on the [method Node._process]'s [param delta]. If [param scaled] is `false`, normalizes the movement. */ + move_local_x(delta: float64, scaled: boolean = false): void + + /** Applies a local translation on the node's Y axis based on the [method Node._process]'s [param delta]. If [param scaled] is `false`, normalizes the movement. */ + move_local_y(delta: float64, scaled: boolean = false): void + + /** Translates the node by the given [param offset] in local coordinates. */ + translate(offset: Vector2): void + + /** Adds the [param offset] vector to the node's global position. */ + global_translate(offset: Vector2): void + + /** Multiplies the current scale by the [param ratio] vector. */ + apply_scale(ratio: Vector2): void + + /** Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates. + * [param point] should not be the same as the node's position, otherwise the node always looks to the right. + */ + look_at(point: Vector2): void + + /** Returns the angle between the node and the [param point] in radians. + * [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png]Illustration of the returned angle.[/url] + */ + get_angle_to(point: Vector2): float64 + + /** Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent. */ + to_local(global_point: Vector2): Vector2 + + /** Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position. */ + to_global(local_point: Vector2): Vector2 + + /** Returns the [Transform2D] relative to this node's parent. */ + get_relative_transform_to_parent(parent: Node): Transform2D + + /** Position, relative to the node's parent. */ + get position(): Vector2 + set position(value: Vector2) + + /** Rotation in radians, relative to the node's parent. + * + * **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. + */ + get rotation(): float64 + set rotation(value: float64) + + /** Helper property to access [member rotation] in degrees instead of radians. */ + get rotation_degrees(): float64 + set rotation_degrees(value: float64) + + /** The node's scale. Unscaled value: `(1, 1)`. + * + * **Note:** Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. + */ + get scale(): Vector2 + set scale(value: Vector2) + + /** Slants the node. + * + * **Note:** Skew is X axis only. + */ + get skew(): float64 + set skew(value: float64) + + /** Local [Transform2D]. */ + get transform(): Transform2D + set transform(value: Transform2D) + + /** Global position. */ + get global_position(): Vector2 + set global_position(value: Vector2) + + /** Global rotation in radians. */ + get global_rotation(): float64 + set global_rotation(value: float64) + + /** Helper property to access [member global_rotation] in degrees instead of radians. */ + get global_rotation_degrees(): float64 + set global_rotation_degrees(value: float64) + + /** Global scale. */ + get global_scale(): Vector2 + set global_scale(value: Vector2) + + /** Global skew in radians. */ + get global_skew(): float64 + set global_skew(value: float64) + + /** Global [Transform2D]. */ + get global_transform(): Transform2D + set global_transform(value: Transform2D) + } + namespace Node3D { + enum RotationEditMode { + /** The rotation is edited using [Vector3] Euler angles. */ + ROTATION_EDIT_MODE_EULER = 0, + + /** The rotation is edited using a [Quaternion]. */ + ROTATION_EDIT_MODE_QUATERNION = 1, + + /** The rotation is edited using a [Basis]. In this mode, [member scale] can't be edited separately. */ + ROTATION_EDIT_MODE_BASIS = 2, + } + } + /** Most basic 3D game object, parent of all 3D-related nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_node3d.html + */ + class Node3D extends Node { + /** [Node3D] nodes receive this notification when their global transform changes. This means that either the current or a parent node changed its transform. + * In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. + */ + static readonly NOTIFICATION_TRANSFORM_CHANGED = 2000 + + /** [Node3D] nodes receive this notification when they are registered to new [World3D] resource. */ + static readonly NOTIFICATION_ENTER_WORLD = 41 + + /** [Node3D] nodes receive this notification when they are unregistered from current [World3D] resource. */ + static readonly NOTIFICATION_EXIT_WORLD = 42 + + /** [Node3D] nodes receive this notification when their visibility changes. */ + static readonly NOTIFICATION_VISIBILITY_CHANGED = 43 + + /** [Node3D] nodes receive this notification when their local transform changes. This is not received when the transform of a parent node is changed. + * In order for [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_local_transform]. + */ + static readonly NOTIFICATION_LOCAL_TRANSFORM_CHANGED = 44 + constructor(identifier?: any) + + /** Returns the parent [Node3D], or `null` if no parent exists, the parent is not of type [Node3D], or [member top_level] is `true`. + * + * **Note:** Calling this method is not equivalent to `get_parent() as Node3D`, which does not take [member top_level] into account. + */ + get_parent_node_3d(): Node3D + + /** Sets whether the node ignores notification that its transformation (global or local) changed. */ + set_ignore_transform_notification(enabled: boolean): void + + /** Sets whether the node uses a scale of `(1, 1, 1)` or its local transformation scale. Changes to the local transformation scale are preserved. */ + set_disable_scale(disable: boolean): void + + /** Returns whether this node uses a scale of `(1, 1, 1)` or its local transformation scale. */ + is_scale_disabled(): boolean + + /** Returns the current [World3D] resource this [Node3D] node is registered to. */ + get_world_3d(): World3D + + /** Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. */ + force_update_transform(): void + + /** Updates all the [Node3D] gizmos attached to this node. */ + update_gizmos(): void + + /** Attach an editor gizmo to this [Node3D]. + * + * **Note:** The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D]. + */ + add_gizmo(gizmo: Node3DGizmo): void + + /** Returns all the gizmos attached to this [Node3D]. */ + get_gizmos(): GArray + + /** Clear all gizmos attached to this [Node3D]. */ + clear_gizmos(): void + + /** Set subgizmo selection for this node in the editor. + * + * **Note:** The gizmo object would typically be an instance of [EditorNode3DGizmo], but the argument type is kept generic to avoid creating a dependency on editor classes in [Node3D]. + */ + set_subgizmo_selection(gizmo: Node3DGizmo, id: int64, transform: Transform3D): void + + /** Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change. */ + clear_subgizmo_selection(): void + + /** Returns `true` if the node is present in the [SceneTree], its [member visible] property is `true` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree. */ + is_visible_in_tree(): boolean + + /** Enables rendering of this node. Changes [member visible] to `true`. */ + show(): void + + /** Disables rendering of this node. Changes [member visible] to `false`. */ + hide(): void + + /** Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default. */ + set_notify_local_transform(enable: boolean): void + + /** Returns whether node notifies about its local transformation changes. [Node3D] will not propagate this by default. */ + is_local_transform_notification_enabled(): boolean + + /** Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo. */ + set_notify_transform(enable: boolean): void + + /** Returns whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default. */ + is_transform_notification_enabled(): boolean + + /** Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. */ + rotate(axis: Vector3, angle: float64): void + + /** Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system. */ + global_rotate(axis: Vector3, angle: float64): void + + /** Scales the global (world) transformation by the given [Vector3] scale factors. */ + global_scale(scale: Vector3): void + + /** Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system. */ + global_translate(offset: Vector3): void + + /** Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system. */ + rotate_object_local(axis: Vector3, angle: float64): void + + /** Scales the local transformation by given 3D scale factors in object-local coordinate system. */ + scale_object_local(scale: Vector3): void + + /** Changes the node's position by the given offset [Vector3] in local space. */ + translate_object_local(offset: Vector3): void + + /** Rotates the local transformation around the X axis by angle in radians. */ + rotate_x(angle: float64): void + + /** Rotates the local transformation around the Y axis by angle in radians. */ + rotate_y(angle: float64): void + + /** Rotates the local transformation around the Z axis by angle in radians. */ + rotate_z(angle: float64): void + + /** Changes the node's position by the given offset [Vector3]. + * Note that the translation [param offset] is affected by the node's scale, so if scaled by e.g. `(10, 1, 1)`, a translation by an offset of `(2, 0, 0)` would actually add 20 (`2 * 10`) to the X coordinate. + */ + translate(offset: Vector3): void + + /** Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. */ + orthonormalize(): void + + /** Reset all transformations for this node (sets its [Transform3D] to the identity matrix). */ + set_identity(): void + + /** Rotates the node so that the local forward axis (-Z, [constant Vector3.FORWARD]) points toward the [param target] position. + * The local up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. + * The [param target] position cannot be the same as the node's position, the [param up] vector cannot be zero, and the direction from the node's position to the [param target] vector cannot be parallel to the [param up] vector. + * Operations take place in global space, which means that the node must be in the scene tree. + * If [param use_model_front] is `true`, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right). + */ + look_at(target: Vector3, up: Vector3 = Vector3.ZERO, use_model_front: boolean = false): void + + /** Moves the node to the specified [param position], and then rotates the node to point toward the [param target] as per [method look_at]. Operations take place in global space. */ + look_at_from_position(position: Vector3, target: Vector3, up: Vector3 = Vector3.ZERO, use_model_front: boolean = false): void + + /** Transforms [param global_point] from world space to this node's local space. */ + to_local(global_point: Vector3): Vector3 + + /** Transforms [param local_point] from this node's local space to world space. */ + to_global(local_point: Vector3): Vector3 + + /** Local space [Transform3D] of this node, with respect to the parent node. */ + get transform(): Transform3D + set transform(value: Transform3D) + + /** World3D space (global) [Transform3D] of this node. */ + get global_transform(): Transform3D + set global_transform(value: Transform3D) + + /** Local position or translation of this node relative to the parent. This is equivalent to `transform.origin`. */ + get position(): Vector3 + set position(value: Vector3) + + /** Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotation in the order specified by the [member rotation_order] property. + * + * **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + * + * **Note:** This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees]. + */ + get rotation(): Vector3 + set rotation(value: Vector3) + + /** Helper property to access [member rotation] in degrees instead of radians. */ + get rotation_degrees(): Vector3 + set rotation_degrees(value: Vector3) + + /** Access to the node rotation as a [Quaternion]. This property is ideal for tweening complex rotations. */ + get quaternion(): Quaternion + set quaternion(value: Quaternion) + + /** Basis of the [member transform] property. Represents the rotation, scale, and shear of this node. */ + get basis(): Basis + set basis(value: Basis) + + /** Scale part of the local transformation. + * + * **Note:** Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative. + * + * **Note:** Not all nodes are visually scaled by the [member scale] property. For example, [Light3D]s are not visually affected by [member scale]. + */ + get scale(): Vector3 + set scale(value: Vector3) + + /** Specify how rotation (and scale) will be presented in the editor. */ + get rotation_edit_mode(): int64 + set rotation_edit_mode(value: int64) + + /** Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. */ + get rotation_order(): int64 + set rotation_order(value: int64) + + /** If `true`, the node will not inherit its transformations from its parent. Node transformations are only in global space. */ + get top_level(): boolean + set top_level(value: boolean) + + /** Global position of this node. This is equivalent to `global_transform.origin`. */ + get global_position(): Vector3 + set global_position(value: Vector3) + + /** Global basis of this node. This is equivalent to `global_transform.basis`. */ + get global_basis(): Basis + set global_basis(value: Basis) + + /** Rotation part of the global transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). + * + * **Note:** In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + */ + get global_rotation(): Vector3 + set global_rotation(value: Vector3) + + /** Helper property to access [member global_rotation] in degrees instead of radians. */ + get global_rotation_degrees(): Vector3 + set global_rotation_degrees(value: Vector3) + + /** If `true`, this node is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return `true`). */ + get visible(): boolean + set visible(value: boolean) + + /** Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account. */ + get visibility_parent(): NodePath + set visibility_parent(value: NodePath | string) + + /** Emitted when node visibility changes. */ + readonly visibility_changed: Signal0 + } + class Node3DEditor extends VBoxContainer { + constructor(identifier?: any) + _get_editor_data(_unnamed_arg0: Object): Object + _request_gizmo(_unnamed_arg0: Object): void + _request_gizmo_for_id(_unnamed_arg0: int64): void + _set_subgizmo_selection(_unnamed_arg0: Object, _unnamed_arg1: Node3DGizmo, _unnamed_arg2: int64, _unnamed_arg3: Transform3D): void + _clear_subgizmo_selection(_unnamed_arg0: Object): void + _refresh_menu_icons(): void + update_all_gizmos(_unnamed_arg0: Node): void + update_transform_gizmo(): void + readonly transform_key_request: Signal0 + readonly item_lock_status_changed: Signal0 + readonly item_group_status_changed: Signal0 + } + class Node3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class Node3DEditorSelectedItem extends Object { + constructor(identifier?: any) + } + class Node3DEditorViewport extends Control { + constructor(identifier?: any) + readonly toggle_maximize_view: Signal1 + readonly clicked: Signal1 + } + class Node3DEditorViewportContainer extends Container { + constructor(identifier?: any) + } + /** Abstract class to expose editor gizmos for [Node3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_node3dgizmo.html + */ + class Node3DGizmo extends RefCounted { + constructor(identifier?: any) + } + class NodeDock extends VBoxContainer { + constructor(identifier?: any) + } + /** Abstract base class for noise generators. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_noise.html + */ + class Noise extends Resource { + constructor(identifier?: any) + /** Returns the 1D noise value at the given (x) coordinate. */ + get_noise_1d(x: float64): float64 + + /** Returns the 2D noise value at the given position. */ + get_noise_2d(x: float64, y: float64): float64 + + /** Returns the 2D noise value at the given position. */ + get_noise_2dv(v: Vector2): float64 + + /** Returns the 3D noise value at the given position. */ + get_noise_3d(x: float64, y: float64, z: float64): float64 + + /** Returns the 3D noise value at the given position. */ + get_noise_3dv(v: Vector3): float64 + + /** Returns an [Image] containing 2D noise values. + * + * **Note:** With [param normalize] set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + */ + get_image(width: int64, height: int64, invert: boolean = false, in_3d_space: boolean = false, normalize: boolean = true): Image + + /** Returns an [Image] containing seamless 2D noise values. + * + * **Note:** With [param normalize] set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + */ + get_seamless_image(width: int64, height: int64, invert: boolean = false, in_3d_space: boolean = false, skirt: float64 = 0.1, normalize: boolean = true): Image + + /** Returns an [Array] of [Image]s containing 3D noise values for use with [method ImageTexture3D.create]. + * + * **Note:** With [param normalize] set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + */ + get_image_3d(width: int64, height: int64, depth: int64, invert: boolean = false, normalize: boolean = true): GArray + + /** Returns an [Array] of [Image]s containing seamless 3D noise values for use with [method ImageTexture3D.create]. + * + * **Note:** With [param normalize] set to `false`, the default implementation expects the noise generator to return values in the range `-1.0` to `1.0`. + */ + get_seamless_image_3d(width: int64, height: int64, depth: int64, invert: boolean = false, skirt: float64 = 0.1, normalize: boolean = true): GArray + } + class NoiseEditorInspectorPlugin extends EditorInspectorPlugin { + constructor(identifier?: any) + } + class NoiseEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A 2D texture filled with noise generated by a [Noise] object. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_noisetexture2d.html + */ + class NoiseTexture2D extends Texture2D { + constructor(identifier?: any) + /** Width of the generated texture (in pixels). */ + get width(): int64 + set width(value: int64) + + /** Height of the generated texture (in pixels). */ + get height(): int64 + set height(value: int64) + + /** If `true`, inverts the noise texture. White becomes black, black becomes white. */ + get invert(): boolean + set invert(value: boolean) + + /** Determines whether the noise image is calculated in 3D space. May result in reduced contrast. */ + get in_3d_space(): boolean + set in_3d_space(value: boolean) + + /** Determines whether mipmaps are generated for this texture. Enabling this results in less texture aliasing in the distance, at the cost of increasing memory usage by roughly 33% and making the noise texture generation take longer. + * + * **Note:** [member generate_mipmaps] requires mipmap filtering to be enabled on the material using the [NoiseTexture2D] to have an effect. + */ + get generate_mipmaps(): boolean + set generate_mipmaps(value: boolean) + + /** If `true`, a seamless texture is requested from the [Noise] resource. + * + * **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used [Noise] resource. This is because some implementations use higher dimensions for generating seamless noise. + * + * **Note:** The default [FastNoiseLite] implementation uses the fallback path for seamless generation. If using a [member width] or [member height] lower than the default, you may need to increase [member seamless_blend_skirt] to make seamless blending more effective. + */ + get seamless(): boolean + set seamless(value: boolean) + + /** Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See [Noise] for further details. + * + * **Note:** If using a [member width] or [member height] lower than the default, you may need to increase [member seamless_blend_skirt] to make seamless blending more effective. + */ + get seamless_blend_skirt(): float64 + set seamless_blend_skirt(value: float64) + + /** If `true`, the resulting texture contains a normal map created from the original noise interpreted as a bump map. */ + get as_normal_map(): boolean + set as_normal_map(value: boolean) + + /** Strength of the bump maps used in this texture. A higher value will make the bump maps appear larger while a lower value will make them appear softer. */ + get bump_strength(): float64 + set bump_strength(value: float64) + + /** If `true`, the noise image coming from the noise generator is normalized to the range `0.0` to `1.0`. + * Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures. + */ + get normalize(): boolean + set normalize(value: boolean) + + /** A [Gradient] which is used to map the luminance of each pixel to a color value. */ + get color_ramp(): Gradient + set color_ramp(value: Gradient) + + /** The instance of the [Noise] object. */ + get noise(): Noise + set noise(value: Noise) + } + /** A 3D texture filled with noise generated by a [Noise] object. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_noisetexture3d.html + */ + class NoiseTexture3D extends Texture3D { + constructor(identifier?: any) + /** Width of the generated texture (in pixels). */ + get width(): int64 + set width(value: int64) + + /** Height of the generated texture (in pixels). */ + get height(): int64 + set height(value: int64) + + /** Depth of the generated texture (in pixels). */ + get depth(): int64 + set depth(value: int64) + + /** If `true`, inverts the noise texture. White becomes black, black becomes white. */ + get invert(): boolean + set invert(value: boolean) + + /** If `true`, a seamless texture is requested from the [Noise] resource. + * + * **Note:** Seamless noise textures may take longer to generate and/or can have a lower contrast compared to non-seamless noise depending on the used [Noise] resource. This is because some implementations use higher dimensions for generating seamless noise. + * + * **Note:** The default [FastNoiseLite] implementation uses the fallback path for seamless generation. If using a [member width], [member height] or [member depth] lower than the default, you may need to increase [member seamless_blend_skirt] to make seamless blending more effective. + */ + get seamless(): boolean + set seamless(value: boolean) + + /** Used for the default/fallback implementation of the seamless texture generation. It determines the distance over which the seams are blended. High values may result in less details and contrast. See [Noise] for further details. + * + * **Note:** If using a [member width], [member height] or [member depth] lower than the default, you may need to increase [member seamless_blend_skirt] to make seamless blending more effective. + */ + get seamless_blend_skirt(): float64 + set seamless_blend_skirt(value: float64) + + /** If `true`, the noise image coming from the noise generator is normalized to the range `0.0` to `1.0`. + * Turning normalization off can affect the contrast and allows you to generate non repeating tileable noise textures. + */ + get normalize(): boolean + set normalize(value: boolean) + + /** A [Gradient] which is used to map the luminance of each pixel to a color value. */ + get color_ramp(): Gradient + set color_ramp(value: Gradient) + + /** The instance of the [Noise] object. */ + get noise(): Noise + set noise(value: Noise) + } + /** A PBR (Physically Based Rendering) material to be used on 3D objects. Uses an ORM texture. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_ormmaterial3d.html + */ + class ORMMaterial3D extends BaseMaterial3D { + constructor(identifier?: any) + } + class ORMMaterial3DConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + namespace Object { + enum ConnectFlags { + /** Deferred connections trigger their [Callable]s on idle time (at the end of the frame), rather than instantly. */ + CONNECT_DEFERRED = 1, + + /** Persisting connections are stored when the object is serialized (such as when using [method PackedScene.pack]). In the editor, connections created through the Node dock are always persisting. */ + CONNECT_PERSIST = 2, + + /** One-shot connections disconnect themselves after emission. */ + CONNECT_ONE_SHOT = 4, + + /** Reference-counted connections can be assigned to the same [Callable] multiple times. Each disconnection decreases the internal counter. The signal fully disconnects only when the counter reaches 0. */ + CONNECT_REFERENCE_COUNTED = 8, + } + } + /** Base class for all other classes in the engine. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_object.html + */ + class Object { + /** Notification received when the object is initialized, before its script is attached. Used internally. */ + static readonly NOTIFICATION_POSTINITIALIZE = 0 + + /** Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages. */ + static readonly NOTIFICATION_PREDELETE = 1 + + /** Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived. */ + static readonly NOTIFICATION_EXTENSION_RELOADED = 2 + constructor(identifier?: any) + + /** Deletes the object from memory. Pre-existing references to the object become invalid, and any attempt to access them will result in a run-time error. Checking the references with [method @GlobalScope.is_instance_valid] will return `false`. */ + /* gdvirtual */ free(): void + + /** Called when the object receives a notification, which can be identified in [param what] by comparing it with a constant. See also [method notification]. + * + * + * **Note:** The base [Object] defines a few notifications ([constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE]). Inheriting classes such as [Node] define a lot more notifications, which are also received by this method. + */ + /* gdvirtual */ _notification(what: int64): void + + /** Override this method to customize the behavior of [method set]. Should set the [param property] to [param value] and return `true`, or `false` if the [param property] should be handled normally. The *exact* way to set the [param property] is up to this method's implementation. + * Combined with [method _get] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property *must* be present in [method get_property_list], otherwise this method will not be called. + * + */ + /* gdvirtual */ _set(property: StringName, value: any): boolean + + /** Override this method to customize the behavior of [method get]. Should return the given [param property]'s value, or `null` if the [param property] should be handled normally. + * Combined with [method _set] and [method _get_property_list], this method allows defining custom properties, which is particularly useful for editor plugins. Note that a property must be present in [method get_property_list], otherwise this method will not be called. + * + */ + /* gdvirtual */ _get(property: StringName): any + + /** Override this method to provide a custom list of additional properties to handle by the engine. + * Should return a property list, as an [Array] of dictionaries. The result is added to the array of [method get_property_list], and should be formatted in the same way. Each [Dictionary] must at least contain the `name` and `type` entries. + * You can use [method _property_can_revert] and [method _property_get_revert] to customize the default values of the properties added by this method. + * The example below displays a list of numbers shown as words going from `ZERO` to `FIVE`, with `number_count` controlling the size of the list: + * + * + * **Note:** This method is intended for advanced purposes. For most common use cases, the scripting languages offer easier ways to handle properties. See [annotation @GDScript.@export], [annotation @GDScript.@export_enum], [annotation @GDScript.@export_group], etc. If you want to customize exported properties, use [method _validate_property]. + * + * **Note:** If the object's script is not [annotation @GDScript.@tool], this method will not be called in the editor. + */ + /* gdvirtual */ _get_property_list(): GArray + + /** Override this method to customize existing properties. Every property info goes through this method, except properties added with [method _get_property_list]. The dictionary contents is the same as in [method _get_property_list]. + * + */ + /* gdvirtual */ _validate_property(property: GDictionary): void + + /** Override this method to customize the given [param property]'s revert behavior. Should return `true` if the [param property] has a custom default value and is revertible in the Inspector dock. Use [method _property_get_revert] to specify the [param property]'s default value. + * + * **Note:** This method must return consistently, regardless of the current value of the [param property]. + */ + /* gdvirtual */ _property_can_revert(property: StringName): boolean + + /** Override this method to customize the given [param property]'s revert behavior. Should return the default value for the [param property]. If the default value differs from the [param property]'s current value, a revert icon is displayed in the Inspector dock. + * + * **Note:** [method _property_can_revert] must also be overridden for this method to be called. + */ + /* gdvirtual */ _property_get_revert(property: StringName): any + + /** Called when the object's script is instantiated, oftentimes after the object is initialized in memory (through `Object.new()` in GDScript, or `new GodotObject` in C#). It can be also defined to take in parameters. This method is similar to a constructor in most programming languages. + * + * **Note:** If [method _init] is defined with *required* parameters, the Object with script may only be created directly. If any other means (such as [method PackedScene.instantiate] or [method Node.duplicate]) are used, the script's initialization will fail. + */ + /* gdvirtual */ _init(): void + + /** Override this method to customize the return value of [method to_string], and therefore the object's representation as a [String]. + * + */ + /* gdvirtual */ _to_string(): string + + /** Returns the object's built-in class name, as a [String]. See also [method is_class]. + * + * **Note:** This method ignores `class_name` declarations. If this object's script has defined a `class_name`, the base, built-in class name is returned instead. + */ + get_class(): string + + /** Returns `true` if the object inherits from the given [param class]. See also [method get_class]. + * + * + * **Note:** This method ignores `class_name` declarations in the object's script. + */ + is_class(class_: string): boolean + + /** Assigns [param value] to the given [param property]. If the property does not exist or the given [param value]'s type doesn't match, nothing happens. + * + * + * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + set(property: StringName, value: any): void + + /** Returns the [Variant] value of the given [param property]. If the [param property] does not exist, this method returns `null`. + * + * + * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + get(property: StringName): any + + /** Assigns a new [param value] to the property identified by the [param property_path]. The path should be a [NodePath] relative to this object, and can use the colon character (`:`) to access nested properties. + * + * + * **Note:** In C#, [param property_path] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + set_indexed(property_path: NodePath | string, value: any): void + + /** Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character (`:`) to access nested properties. + * **Examples:** `"position:x"` or `"material:next_pass:blend_mode"`. + * + * + * **Note:** In C#, [param property_path] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + * + * **Note:** This method does not support actual paths to nodes in the [SceneTree], only sub-property paths. In the context of nodes, use [method Node.get_node_and_resource] instead. + */ + get_indexed(property_path: NodePath | string): any + + /** Returns the object's property list as an [Array] of dictionaries. Each [Dictionary] contains the following entries: + * - `name` is the property's name, as a [String]; + * - `class_name` is an empty [StringName], unless the property is [constant TYPE_OBJECT] and it inherits from a class; + * - `type` is the property's type, as an [int] (see [enum Variant.Type]); + * - `hint` is *how* the property is meant to be edited (see [enum PropertyHint]); + * - `hint_string` depends on the hint (see [enum PropertyHint]); + * - `usage` is a combination of [enum PropertyUsageFlags]. + * + * **Note:** In GDScript, all class members are treated as properties. In C# and GDExtension, it may be necessary to explicitly mark class members as Godot properties using decorators or attributes. + */ + get_property_list(): GArray + + /** Returns this object's methods and their signatures as an [Array] of dictionaries. Each [Dictionary] contains the following entries: + * - `name` is the name of the method, as a [String]; + * - `args` is an [Array] of dictionaries representing the arguments; + * - `default_args` is the default arguments as an [Array] of variants; + * - `flags` is a combination of [enum MethodFlags]; + * - `id` is the method's internal identifier [int]; + * - `return` is the returned value, as a [Dictionary]; + * + * **Note:** The dictionaries of `args` and `return` are formatted identically to the results of [method get_property_list], although not all entries are used. + */ + get_method_list(): GArray + + /** Returns `true` if the given [param property] has a custom default value. Use [method property_get_revert] to get the [param property]'s default value. + * + * **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_can_revert] to customize the default value. If [method _property_can_revert] is not implemented, this method returns `false`. + */ + property_can_revert(property: StringName): boolean + + /** Returns the custom default value of the given [param property]. Use [method property_can_revert] to check if the [param property] has a custom default value. + * + * **Note:** This method is used by the Inspector dock to display a revert icon. The object must implement [method _property_get_revert] to customize the default value. If [method _property_get_revert] is not implemented, this method returns `null`. + */ + property_get_revert(property: StringName): any + + /** Sends the given [param what] notification to all classes inherited by the object, triggering calls to [method _notification], starting from the highest ancestor (the [Object] class) and going down to the object's script. + * If [param reversed] is `true`, the call order is reversed. + * + */ + notification(what: int64, reversed: boolean = false): void + + /** Returns a [String] representing the object. Defaults to `""`. Override [method _to_string] to customize the string representation of the object. */ + to_string(): string + + /** Returns the object's unique instance ID. This ID can be saved in [EncodedObjectAsID], and can be used to retrieve this object instance with [method @GlobalScope.instance_from_id]. + * + * **Note:** This ID is only useful during the current session. It won't correspond to a similar object if the ID is sent over a network, or loaded from a file at a later time. + */ + get_instance_id(): int64 + + /** Attaches [param script] to the object, and instantiates it. As a result, the script's [method _init] is called. A [Script] is used to extend the object's functionality. + * If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept. + */ + set_script(script: any): void + + /** Returns the object's [Script] instance, or `null` if no script is attached. */ + get_script(): any + + /** Adds or changes the entry [param name] inside the object's metadata. The metadata [param value] can be any [Variant], although some types cannot be serialized correctly. + * If [param value] is `null`, the entry is removed. This is the equivalent of using [method remove_meta]. See also [method has_meta] and [method get_meta]. + * + * **Note:** A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. + * + * **Note:** Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + */ + set_meta(name: StringName, value: any): void + + /** Removes the given entry [param name] from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. + * + * **Note:** A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. + * + * **Note:** Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + */ + remove_meta(name: StringName): void + + /** Returns the object's metadata value for the given entry [param name]. If the entry does not exist, returns [param default]. If [param default] is `null`, an error is also generated. + * + * **Note:** A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. + * + * **Note:** Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + */ + get_meta(name: StringName, default_: any = {}): any + + /** Returns `true` if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. + * + * **Note:** A metadata's name must be a valid identifier as per [method StringName.is_valid_identifier] method. + * + * **Note:** Metadata that has a name starting with an underscore (`_`) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited, although it can still be found by this method. + */ + has_meta(name: StringName): boolean + + /** Returns the object's metadata entry names as a [PackedStringArray]. */ + get_meta_list(): GArray + + /** Adds a user-defined [param signal]. Optional arguments for the signal can be added as an [Array] of dictionaries, each defining a `name` [String] and a `type` [int] (see [enum Variant.Type]). See also [method has_user_signal] and [method remove_user_signal]. + * + */ + add_user_signal(signal: string, arguments_: GArray = []): void + + /** Returns `true` if the given user-defined [param signal] name exists. Only signals added with [method add_user_signal] are included. See also [method remove_user_signal]. */ + has_user_signal(signal: StringName): boolean + + /** Removes the given user signal [param signal] from the object. See also [method add_user_signal] and [method has_user_signal]. */ + remove_user_signal(signal: StringName): void + + /** Emits the given [param signal] by name. The signal must exist, so it should be a built-in signal of this class or one of its inherited classes, or a user-defined signal (see [method add_user_signal]). This method supports a variable number of arguments, so parameters can be passed as a comma separated list. + * Returns [constant ERR_UNAVAILABLE] if [param signal] does not exist or the parameters are invalid. + * + * + * **Note:** In C#, [param signal] must be in snake_case when referring to built-in Godot signals. Prefer using the names exposed in the `SignalName` class to avoid allocating a new [StringName] on each call. + */ + emit_signal(signal: StringName, ...vargargs: any[]): GError + + /** Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters can be passed as a comma separated list. + * + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + call(method: StringName, ...vargargs: any[]): any + + /** Calls the [param method] on the object during idle time. Always returns null, **not** the method's result. + * Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. + * This method supports a variable number of arguments, so parameters can be passed as a comma separated list. + * + * See also [method Callable.call_deferred]. + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + * + * **Note:** If you're looking to delay the function call by a frame, refer to the [signal SceneTree.process_frame] and [signal SceneTree.physics_frame] signals. + * + */ + call_deferred(method: StringName, ...vargargs: any[]): any + + /** Assigns [param value] to the given [param property], at the end of the current frame. This is equivalent to calling [method set] through [method call_deferred]. + * + * + * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + set_deferred(property: StringName, value: any): void + + /** Calls the [param method] on the object and returns the result. Unlike [method call], this method expects all parameters to be contained inside [param arg_array]. + * + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + callv(method: StringName, arg_array: GArray): any + + /** Returns `true` if the given [param method] name exists in the object. + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + has_method(method: StringName): boolean + + /** Returns the number of arguments of the given [param method] by name. + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + get_method_argument_count(method: StringName): int64 + + /** Returns `true` if the given [param signal] name exists in the object. + * + * **Note:** In C#, [param signal] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `SignalName` class to avoid allocating a new [StringName] on each call. + */ + has_signal(signal: StringName): boolean + + /** Returns the list of existing signals as an [Array] of dictionaries. + * + * **Note:** Due of the implementation, each [Dictionary] is formatted very similarly to the returned values of [method get_method_list]. + */ + get_signal_list(): GArray + + /** Returns an [Array] of connections for the given [param signal] name. Each connection is represented as a [Dictionary] that contains three entries: + * - [code skip-lint]signal` is a reference to the [Signal]; + * - `callable` is a reference to the connected [Callable]; + * - `flags` is a combination of [enum ConnectFlags]. + */ + get_signal_connection_list(signal: StringName): GArray + + /** Returns an [Array] of signal connections received by this object. Each connection is represented as a [Dictionary] that contains three entries: + * - `signal` is a reference to the [Signal]; + * - `callable` is a reference to the [Callable]; + * - `flags` is a combination of [enum ConnectFlags]. + */ + get_incoming_connections(): GArray + + /** Connects a [param signal] by name to a [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum ConnectFlags] constants). + * A signal can only be connected once to the same [Callable]. If the signal is already connected, this method returns [constant ERR_INVALID_PARAMETER] and pushes an error message, unless the signal is connected with [constant CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections. + * If the [param callable]'s object is freed, the connection will be lost. + * **Examples with recommended syntax:** + * Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach. + * + * **[code skip-lint]Object.connect()` or [code skip-lint]Signal.connect()`?** + * As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one. + * + * While all options have the same outcome (`button`'s [signal BaseButton.button_down] signal will be connected to `_on_button_down`), **option 3** offers the best validation: it will print a compile-time error if either the `button_down` [Signal] or the `_on_button_down` [Callable] are not defined. On the other hand, **option 2** only relies on string names and will only be able to validate either names at runtime: it will print a runtime error if `"button_down"` doesn't correspond to a signal, or if `"_on_button_down"` is not a registered method in the object `self`. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. + * **Binding and passing parameters:** + * The syntax to bind parameters is through [method Callable.bind], which returns a copy of the [Callable] with its parameters bound. + * When calling [method emit_signal] or [method Signal.emit], the signal parameters can be also passed. The examples below show the relationship between these signal parameters and bound parameters. + * + */ + connect(signal: StringName, callable: Callable, flags: int64 = 0): GError + + /** Disconnects a [param signal] by name from a given [param callable]. If the connection does not exist, generates an error. Use [method is_connected] to make sure that the connection exists. */ + disconnect(signal: StringName, callable: Callable): void + + /** Returns `true` if a connection exists between the given [param signal] name and [param callable]. + * + * **Note:** In C#, [param signal] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `SignalName` class to avoid allocating a new [StringName] on each call. + */ + is_connected(signal: StringName, callable: Callable): boolean + + /** If set to `true`, the object becomes unable to emit signals. As such, [method emit_signal] and signal connections will not work, until it is set to `false`. */ + set_block_signals(enable: boolean): void + + /** Returns `true` if the object is blocking its signals from being emitted. See [method set_block_signals]. */ + is_blocking_signals(): boolean + + /** Emits the [signal property_list_changed] signal. This is mainly used to refresh the editor, so that the Inspector and editor plugins are properly updated. */ + notify_property_list_changed(): void + + /** If set to `true`, allows the object to translate messages with [method tr] and [method tr_n]. Enabled by default. See also [method can_translate_messages]. */ + set_message_translation(enable: boolean): void + + /** Returns `true` if the object is allowed to translate messages with [method tr] and [method tr_n]. See also [method set_message_translation]. */ + can_translate_messages(): boolean + + /** Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. + * If [method can_translate_messages] is `false`, or no translation is available, this method returns the [param message] without changes. See [method set_message_translation]. + * For detailed examples, see [url=https://docs.godotengine.org/en/4.3/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url]. + * + * **Note:** This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate]. + */ + tr(message: StringName, context: StringName = ''): string + + /** Translates a [param message] or [param plural_message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. + * If [method can_translate_messages] is `false`, or no translation is available, this method returns [param message] or [param plural_message], without changes. See [method set_message_translation]. + * The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. + * For detailed examples, see [url=https://docs.godotengine.org/en/4.3/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url]. + * + * **Note:** Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method tr]. + * + * **Note:** This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate_plural]. + */ + tr_n(message: StringName, plural_message: StringName, n: int64, context: StringName = ''): string + + /** Returns `true` if the [method Node.queue_free] method was called for the object. */ + is_queued_for_deletion(): boolean + + /** If this method is called during [constant NOTIFICATION_PREDELETE], this object will reject being freed and will remain allocated. This is mostly an internal function used for error handling to avoid the user from freeing objects when they are not intended to. */ + cancel_free(): void + + /** Emitted when the object's script is changed. + * + * **Note:** When this signal is emitted, the new script is not initialized yet. If you need to access the new script, defer connections to this signal with [constant CONNECT_DEFERRED]. + */ + readonly script_changed: Signal0 + + /** Emitted when [method notify_property_list_changed] is called. */ + readonly property_list_changed: Signal0 + } + /** Occluder shape resource for use with occlusion culling in [OccluderInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_occluder3d.html + */ + class Occluder3D extends Resource { + constructor(identifier?: any) + /** Returns the occluder shape's vertex positions. */ + get_vertices(): PackedVector3Array + + /** Returns the occluder shape's vertex indices. */ + get_indices(): PackedInt32Array + } + /** Provides occlusion culling for 3D nodes, which improves performance in closed areas. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_occluderinstance3d.html + */ + class OccluderInstance3D extends VisualInstance3D { + constructor(identifier?: any) + /** Based on [param value], enables or disables the specified layer in the [member bake_mask], given a [param layer_number] between 1 and 32. */ + set_bake_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_bake_mask_value(layer_number: int64): boolean + _is_editable_3d_polygon(): boolean + _get_editable_3d_polygon_resource(): Resource + + /** The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the **Bake Occluders** button at the top of the editor. + * You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the Inspector. + * Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D]. + */ + get occluder(): Occluder3D + set occluder(value: Occluder3D) + + /** The visual layers to account for when baking for occluders. Only [MeshInstance3D]s whose [member VisualInstance3D.layers] match with this [member bake_mask] will be included in the generated occluder mesh. By default, all objects with *opaque* materials are taken into account for the occluder baking. + * To improve performance and avoid artifacts, it is recommended to exclude dynamic objects, small objects and fixtures from the baking process by moving them to a separate visual layer and excluding this layer in [member bake_mask]. + */ + get bake_mask(): int64 + set bake_mask(value: int64) + + /** The simplification distance to use for simplifying the generated occluder polygon (in 3D units). Higher values result in a less detailed occluder mesh, which improves performance but reduces culling accuracy. + * The occluder geometry is rendered on the CPU, so it is important to keep its geometry as simple as possible. Since the buffer is rendered at a low resolution, less detailed occluder meshes generally still work well. The default value is fairly aggressive, so you may have to decrease it if you run into false negatives (objects being occluded even though they are visible by the camera). A value of `0.01` will act conservatively, and will keep geometry *perceptually* unaffected in the occlusion culling buffer. Depending on the scene, a value of `0.01` may still simplify the mesh noticeably compared to disabling simplification entirely. + * Setting this to `0.0` disables simplification entirely, but vertices in the exact same position will still be merged. The mesh will also be re-indexed to reduce both the number of vertices and indices. + * + * **Note:** This uses the [url=https://meshoptimizer.org/]meshoptimizer[/url] library under the hood, similar to LOD generation. + */ + get bake_simplification_distance(): float64 + set bake_simplification_distance(value: float64) + } + class OccluderInstance3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + _bake(): void + } + class OccluderInstance3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + namespace OccluderPolygon2D { + enum CullMode { + /** Culling is disabled. See [member cull_mode]. */ + CULL_DISABLED = 0, + + /** Culling is performed in the clockwise direction. See [member cull_mode]. */ + CULL_CLOCKWISE = 1, + + /** Culling is performed in the counterclockwise direction. See [member cull_mode]. */ + CULL_COUNTER_CLOCKWISE = 2, + } + } + /** Defines a 2D polygon for LightOccluder2D. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_occluderpolygon2d.html + */ + class OccluderPolygon2D extends Resource { + constructor(identifier?: any) + /** If `true`, closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. */ + get closed(): boolean + set closed(value: boolean) + + /** The culling mode to use. */ + get cull_mode(): int64 + set cull_mode(value: int64) + + /** A [Vector2] array with the index for polygon's vertices positions. */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + } + /** A [MultiplayerPeer] which is always connected and acts as a server. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_offlinemultiplayerpeer.html + */ + class OfflineMultiplayerPeer extends MultiplayerPeer { + constructor(identifier?: any) + } + /** A sequence of Ogg packets. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_oggpacketsequence.html + */ + class OggPacketSequence extends Resource { + constructor(identifier?: any) + /** The length of this stream, in seconds. */ + get_length(): float64 + + /** Contains the raw packets that make up this OggPacketSequence. */ + get packet_data(): GArray + set packet_data(value: GArray) + + /** Contains the granule positions for each page in this packet sequence. */ + get granule_positions(): PackedInt64Array + set granule_positions(value: PackedInt64Array | int64[]) + + /** Holds sample rate information about this sequence. Must be set by another class that actually understands the codec. */ + get sampling_rate(): float64 + set sampling_rate(value: float64) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_oggpacketsequenceplayback.html */ + class OggPacketSequencePlayback extends RefCounted { + constructor(identifier?: any) + } + namespace OmniLight3D { + enum ShadowMode { + /** Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality. */ + SHADOW_DUAL_PARABOLOID = 0, + + /** Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. */ + SHADOW_CUBE = 1, + } + } + /** Omnidirectional light, such as a light bulb or a candle. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_omnilight3d.html + */ + class OmniLight3D extends Light3D { + constructor(identifier?: any) + /** The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius. + * + * **Note:** [member omni_range] is not affected by [member Node3D.scale] (the light's scale or its parent's scale). + */ + get omni_range(): float64 + set omni_range(value: float64) + + /** Controls the distance attenuation function for omnilights. + * A value of `0.0` will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of `2.0` for physically accurate lights as it results in the proper inverse square attenutation. + * + * **Note:** Setting attenuation to `2.0` or higher may result in distant objects receiving minimal light, even within range. For example, with a range of `4096`, an object at `100` units is attenuated by a factor of `0.0001`. With a default brightness of `1`, the light would not be visible at that distance. + * + * **Note:** Using negative or values higher than `10.0` may lead to unexpected results. + */ + get omni_attenuation(): float64 + set omni_attenuation(value: float64) + + /** See [enum ShadowMode]. */ + get omni_shadow_mode(): int64 + set omni_shadow_mode(value: int64) + } + namespace OpenXRAPIExtension { + enum OpenXRAlphaBlendModeSupport { + /** Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] isn't supported at all. */ + OPENXR_ALPHA_BLEND_MODE_SUPPORT_NONE = 0, + + /** Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported. */ + OPENXR_ALPHA_BLEND_MODE_SUPPORT_REAL = 1, + + /** Means that [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is emulated. */ + OPENXR_ALPHA_BLEND_MODE_SUPPORT_EMULATING = 2, + } + } + /** Makes the OpenXR API available for GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrapiextension.html + */ + class OpenXRAPIExtension extends RefCounted { + constructor(identifier?: any) + /** Returns the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrInstance.html]XrInstance[/url] created during the initialization of the OpenXR API. */ + get_instance(): int64 + + /** Returns the id of the system, which is a [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSystemId.html]XrSystemId[/url] cast to an integer. */ + get_system_id(): int64 + + /** Returns the OpenXR session, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSession.html]XrSession[/url] cast to an integer. */ + get_session(): int64 + + /** Creates a [Transform3D] from an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrPosef.html]XrPosef[/url]. */ + transform_from_pose(pose: int64): Transform3D + + /** Returns `true` if the provided [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] (cast to an integer) is successful. Otherwise returns `false` and prints the [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url] converted to a string, with the specified additional information. */ + xr_result(result: int64, format: string, args: GArray): boolean + + /** Returns `true` if OpenXR is enabled. */ + static openxr_is_enabled(check_run_in_editor: boolean): boolean + + /** Returns the function pointer of the OpenXR function with the specified name, cast to an integer. If the function with the given name does not exist, the method returns `0`. + * + * **Note:** `openxr/util.h` contains utility macros for acquiring OpenXR functions, e.g. `GDEXTENSION_INIT_XR_FUNC_V(xrCreateAction)`. + */ + get_instance_proc_addr(name: string): int64 + + /** Returns an error string for the given [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrResult.html]XrResult[/url]. */ + get_error_string(result: int64): string + + /** Returns the name of the specified swapchain format. */ + get_swapchain_format_name(swapchain_format: int64): string + + /** Returns `true` if OpenXR is initialized. */ + is_initialized(): boolean + + /** Returns `true` if OpenXR is running ([url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/xrBeginSession.html]xrBeginSession[/url] was successfully called and the swapchains were created). */ + is_running(): boolean + + /** Returns the play space, which is an [url=https://registry.khronos.org/OpenXR/specs/1.0/man/html/XrSpace.html]XrSpace[/url] cast to an integer. */ + get_play_space(): int64 + + /** Returns the predicted display timing for the current frame. */ + get_predicted_display_time(): int64 + + /** Returns the predicted display timing for the next frame. */ + get_next_frame_time(): int64 + + /** Returns `true` if OpenXR is initialized for rendering with an XR viewport. */ + can_render(): boolean + + /** Returns the corresponding `XRHandTrackerEXT` handle for the given hand index value. */ + get_hand_tracker(hand_index: int64): int64 + + /** Registers the given extension as a composition layer provider. */ + register_composition_layer_provider(extension: OpenXRExtensionWrapperExtension): void + + /** Unregisters the given extension as a composition layer provider. */ + unregister_composition_layer_provider(extension: OpenXRExtensionWrapperExtension): void + + /** If set to `true`, an OpenXR extension is loaded which is capable of emulating the [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] blend mode. */ + set_emulate_environment_blend_mode_alpha_blend(enabled: boolean): void + + /** Returns [enum OpenXRAPIExtension.OpenXRAlphaBlendModeSupport] denoting if [constant XRInterface.XR_ENV_BLEND_MODE_ALPHA_BLEND] is really supported, emulated or not supported at all. */ + is_environment_blend_mode_alpha_supported(): OpenXRAPIExtension.OpenXRAlphaBlendModeSupport + } + namespace OpenXRAction { + enum ActionType { + /** This action provides a boolean value. */ + OPENXR_ACTION_BOOL = 0, + + /** This action provides a float value between `0.0` and `1.0` for any analog input such as triggers. */ + OPENXR_ACTION_FLOAT = 1, + + /** This action provides a [Vector2] value and can be bound to embedded trackpads and joysticks. */ + OPENXR_ACTION_VECTOR2 = 2, + OPENXR_ACTION_POSE = 3, + } + } + /** An OpenXR action. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxraction.html + */ + class OpenXRAction extends Resource { + constructor(identifier?: any) + /** The localized description of this action. */ + get localized_name(): string + set localized_name(value: string) + + /** The type of action. */ + get action_type(): int64 + set action_type(value: int64) + + /** A collections of toplevel paths to which this action can be bound. */ + get toplevel_paths(): PackedStringArray + set toplevel_paths(value: PackedStringArray | string[]) + } + /** Collection of [OpenXRActionSet] and [OpenXRInteractionProfile] resources for the OpenXR module. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxractionmap.html + */ + class OpenXRActionMap extends Resource { + constructor(identifier?: any) + /** Retrieve the number of actions sets in our action map. */ + get_action_set_count(): int64 + + /** Retrieve an action set by name. */ + find_action_set(name: string): OpenXRActionSet + + /** Retrieve the action set at this index. */ + get_action_set(idx: int64): OpenXRActionSet + + /** Add an action set. */ + add_action_set(action_set: OpenXRActionSet): void + + /** Remove an action set. */ + remove_action_set(action_set: OpenXRActionSet): void + + /** Retrieve the number of interaction profiles in our action map. */ + get_interaction_profile_count(): int64 + + /** Find an interaction profile by its name (path). */ + find_interaction_profile(name: string): OpenXRInteractionProfile + + /** Get the interaction profile at this index. */ + get_interaction_profile(idx: int64): OpenXRInteractionProfile + + /** Add an interaction profile. */ + add_interaction_profile(interaction_profile: OpenXRInteractionProfile): void + + /** Remove an interaction profile. */ + remove_interaction_profile(interaction_profile: OpenXRInteractionProfile): void + + /** Setup this action set with our default actions. */ + create_default_action_sets(): void + + /** Collection of [OpenXRActionSet]s that are part of this action map. */ + get action_sets(): OpenXRActionSet + set action_sets(value: OpenXRActionSet) + + /** Collection of [OpenXRInteractionProfile]s that are part of this action map. */ + get interaction_profiles(): OpenXRInteractionProfile + set interaction_profiles(value: OpenXRInteractionProfile) + } + /** Collection of [OpenXRAction] resources that make up an action set. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxractionset.html + */ + class OpenXRActionSet extends Resource { + constructor(identifier?: any) + /** Retrieve the number of actions in our action set. */ + get_action_count(): int64 + + /** Add an action to this action set. */ + add_action(action: OpenXRAction): void + + /** Remove an action from this action set. */ + remove_action(action: OpenXRAction): void + + /** The localized name of this action set. */ + get localized_name(): string + set localized_name(value: string) + + /** The priority for this action set. */ + get priority(): int64 + set priority(value: int64) + + /** Collection of actions for this action set. */ + get actions(): OpenXRAction + set actions(value: OpenXRAction) + } + /** The parent class of all OpenXR composition layer nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrcompositionlayer.html + */ + class OpenXRCompositionLayer extends Node3D { + constructor(identifier?: any) + /** Returns true if the OpenXR runtime natively supports this composition layer type. + * + * **Note:** This will only return an accurate result after the OpenXR session has started. + */ + is_natively_supported(): boolean + + /** Returns UV coordinates where the given ray intersects with the composition layer. [param origin] and [param direction] must be in global space. + * Returns `Vector2(-1.0, -1.0)` if the ray doesn't intersect. + */ + intersects_ray(origin: Vector3, direction: Vector3): Vector2 + + /** The [SubViewport] to render on the composition layer. */ + get layer_viewport(): Object + set layer_viewport(value: Object) + + /** The sort order for this composition layer. Higher numbers will be shown in front of lower numbers. + * + * **Note:** This will have no effect if a fallback mesh is being used. + */ + get sort_order(): int64 + set sort_order(value: int64) + + /** Enables the blending the layer using its alpha channel. + * Can be combined with [member Viewport.transparent_bg] to give the layer a transparent background. + */ + get alpha_blend(): boolean + set alpha_blend(value: boolean) + + /** Enables a technique called "hole punching", which allows putting the composition layer behind the main projection layer (i.e. setting [member sort_order] to a negative value) while "punching a hole" through everything rendered by Godot so that the layer is still visible. + * This can be used to create the illusion that the composition layer exists in the same 3D space as everything rendered by Godot, allowing objects to appear to pass both behind or in front of the composition layer. + */ + get enable_hole_punch(): boolean + set enable_hole_punch(value: boolean) + } + /** An OpenXR composition layer that is rendered as an internal slice of a cylinder. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrcompositionlayercylinder.html + */ + class OpenXRCompositionLayerCylinder extends OpenXRCompositionLayer { + constructor(identifier?: any) + /** The radius of the cylinder. */ + get radius(): float64 + set radius(value: float64) + + /** The aspect ratio of the slice. Used to set the height relative to the width. */ + get aspect_ratio(): float64 + set aspect_ratio(value: float64) + + /** The central angle of the cylinder. Used to set the width. */ + get central_angle(): float64 + set central_angle(value: float64) + + /** The number of segments to use in the fallback mesh. */ + get fallback_segments(): int64 + set fallback_segments(value: int64) + } + /** An OpenXR composition layer that is rendered as an internal slice of a sphere. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrcompositionlayerequirect.html + */ + class OpenXRCompositionLayerEquirect extends OpenXRCompositionLayer { + constructor(identifier?: any) + /** The radius of the sphere. */ + get radius(): float64 + set radius(value: float64) + + /** The central horizontal angle of the sphere. Used to set the width. */ + get central_horizontal_angle(): float64 + set central_horizontal_angle(value: float64) + + /** The upper vertical angle of the sphere. Used (together with [member lower_vertical_angle]) to set the height. */ + get upper_vertical_angle(): float64 + set upper_vertical_angle(value: float64) + + /** The lower vertical angle of the sphere. Used (together with [member upper_vertical_angle]) to set the height. */ + get lower_vertical_angle(): float64 + set lower_vertical_angle(value: float64) + + /** The number of segments to use in the fallback mesh. */ + get fallback_segments(): int64 + set fallback_segments(value: int64) + } + /** An OpenXR composition layer that is rendered as a quad. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrcompositionlayerquad.html + */ + class OpenXRCompositionLayerQuad extends OpenXRCompositionLayer { + constructor(identifier?: any) + /** The dimensions of the quad. */ + get quad_size(): Vector2 + set quad_size(value: Vector2) + } + /** Allows clients to implement OpenXR extensions with GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrextensionwrapperextension.html + */ + class OpenXRExtensionWrapperExtension extends Object { + constructor(identifier?: any) + /** Returns a [Dictionary] of OpenXR extensions related to this extension. The [Dictionary] should contain the name of the extension, mapped to a `bool *` cast to an integer: + * - If the `bool *` is a `nullptr` this extension is mandatory. + * - If the `bool *` points to a boolean, the boolean will be updated to `true` if the extension is enabled. + */ + /* gdvirtual */ _get_requested_extensions(): GDictionary + + /** Adds additional data structures when interogating OpenXR system abilities. */ + /* gdvirtual */ _set_system_properties_and_get_next_pointer(next_pointer: int64): int64 + + /** Adds additional data structures when the OpenXR instance is created. */ + /* gdvirtual */ _set_instance_create_info_and_get_next_pointer(next_pointer: int64): int64 + + /** Adds additional data structures when the OpenXR session is created. */ + /* gdvirtual */ _set_session_create_and_get_next_pointer(next_pointer: int64): int64 + + /** Adds additional data structures when creating OpenXR swapchains. */ + /* gdvirtual */ _set_swapchain_create_info_and_get_next_pointer(next_pointer: int64): int64 + + /** Adds additional data structures when each hand tracker is created. */ + /* gdvirtual */ _set_hand_joint_locations_and_get_next_pointer(hand_index: int64, next_pointer: int64): int64 + + /** Returns the number of composition layers this extension wrapper provides via [method _get_composition_layer]. + * This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider]. + */ + /* gdvirtual */ _get_composition_layer_count(): int64 + + /** Returns a pointer to an `XrCompositionLayerBaseHeader` struct to provide the given composition layer. + * This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider]. + */ + /* gdvirtual */ _get_composition_layer(index: int64): int64 + + /** Returns an integer that will be used to sort the given composition layer provided via [method _get_composition_layer]. Lower numbers will move the layer to the front of the list, and higher numbers to the end. The default projection layer has an order of `0`, so layers provided by this method should probably be above or below (but not exactly) `0`. + * This will only be called if the extension previously registered itself with [method OpenXRAPIExtension.register_composition_layer_provider]. + */ + /* gdvirtual */ _get_composition_layer_order(index: int64): int64 + + /** Returns a [PackedStringArray] of positional tracker names that are used within the extension wrapper. */ + /* gdvirtual */ _get_suggested_tracker_names(): PackedStringArray + + /** Allows extensions to register additional controller metadata. This function is called even when the OpenXR API is not constructed as the metadata needs to be available to the editor. + * Extensions should also provide metadata regardless of whether they are supported on the host system. The controller data is used to setup action maps for users who may have access to the relevant hardware. + */ + /* gdvirtual */ _on_register_metadata(): void + + /** Called before the OpenXR instance is created. */ + /* gdvirtual */ _on_before_instance_created(): void + + /** Called right after the OpenXR instance is created. */ + /* gdvirtual */ _on_instance_created(instance: int64): void + + /** Called right before the OpenXR instance is destroyed. */ + /* gdvirtual */ _on_instance_destroyed(): void + + /** Called right after the OpenXR session is created. */ + /* gdvirtual */ _on_session_created(session: int64): void + + /** Called as part of the OpenXR process handling. This happens right before general and physics processing steps of the main loop. During this step controller data is queried and made available to game logic. */ + /* gdvirtual */ _on_process(): void + + /** Called right before the XR viewports begin their rendering step. */ + /* gdvirtual */ _on_pre_render(): void + + /** Called right after the main swapchains are (re)created. */ + /* gdvirtual */ _on_main_swapchains_created(): void + + /** Called right before the OpenXR session is destroyed. */ + /* gdvirtual */ _on_session_destroyed(): void + + /** Called when the OpenXR session state is changed to idle. */ + /* gdvirtual */ _on_state_idle(): void + + /** Called when the OpenXR session state is changed to ready. This means OpenXR is ready to set up the session. */ + /* gdvirtual */ _on_state_ready(): void + + /** Called when the OpenXR session state is changed to synchronized. OpenXR also returns to this state when the application loses focus. */ + /* gdvirtual */ _on_state_synchronized(): void + + /** Called when the OpenXR session state is changed to visible. This means OpenXR is now ready to receive frames. */ + /* gdvirtual */ _on_state_visible(): void + + /** Called when the OpenXR session state is changed to focused. This state is the active state when the game runs. */ + /* gdvirtual */ _on_state_focused(): void + + /** Called when the OpenXR session state is changed to stopping. */ + /* gdvirtual */ _on_state_stopping(): void + + /** Called when the OpenXR session state is changed to loss pending. */ + /* gdvirtual */ _on_state_loss_pending(): void + + /** Called when the OpenXR session state is changed to exiting. */ + /* gdvirtual */ _on_state_exiting(): void + + /** Called when there is an OpenXR event to process. When implementing, return `true` if the event was handled, return `false` otherwise. */ + /* gdvirtual */ _on_event_polled(event: int64): boolean + + /** Adds additional data structures to composition layers created by [OpenXRCompositionLayer]. + * [param property_values] contains the values of the properties returned by [method _get_viewport_composition_layer_extension_properties]. + * [param layer] is a pointer to an `XrCompositionLayerBaseHeader` struct. + */ + /* gdvirtual */ _set_viewport_composition_layer_and_get_next_pointer(layer: int64, property_values: GDictionary, next_pointer: int64): int64 + + /** Gets an array of [Dictionary]s that represent properties, just like [method Object._get_property_list], that will be added to [OpenXRCompositionLayer] nodes. */ + /* gdvirtual */ _get_viewport_composition_layer_extension_properties(): GArray + + /** Gets a [Dictionary] containing the default values for the properties returned by [method _get_viewport_composition_layer_extension_properties]. */ + /* gdvirtual */ _get_viewport_composition_layer_extension_property_defaults(): GDictionary + + /** Called when a composition layer created via [OpenXRCompositionLayer] is destroyed. + * [param layer] is a pointer to an `XrCompositionLayerBaseHeader` struct. + */ + /* gdvirtual */ _on_viewport_composition_layer_destroyed(layer: int64): void + + /** Returns the created [OpenXRAPIExtension], which can be used to access the OpenXR API. */ + get_openxr_api(): OpenXRAPIExtension + + /** Registers the extension. This should happen at core module initialization level. */ + register_extension_wrapper(): void + } + namespace OpenXRHand { + enum Hands { + /** Tracking the player's left hand. */ + HAND_LEFT = 0, + + /** Tracking the player's right hand. */ + HAND_RIGHT = 1, + + /** Maximum supported hands. */ + HAND_MAX = 2, + } + enum MotionRange { + /** When player grips, hand skeleton will form a full fist. */ + MOTION_RANGE_UNOBSTRUCTED = 0, + + /** When player grips, hand skeleton conforms to the controller the player is holding. */ + MOTION_RANGE_CONFORM_TO_CONTROLLER = 1, + + /** Maximum supported motion ranges. */ + MOTION_RANGE_MAX = 2, + } + enum SkeletonRig { + /** An OpenXR compliant skeleton. */ + SKELETON_RIG_OPENXR = 0, + + /** A [SkeletonProfileHumanoid] compliant skeleton. */ + SKELETON_RIG_HUMANOID = 1, + + /** Maximum supported hands. */ + SKELETON_RIG_MAX = 2, + } + enum BoneUpdate { + /** The skeletons bones are fully updated (both position and rotation) to match the tracked bones. */ + BONE_UPDATE_FULL = 0, + + /** The skeletons bones are only rotated to align with the tracked bones, preserving bone length. */ + BONE_UPDATE_ROTATION_ONLY = 1, + + /** Maximum supported bone update mode. */ + BONE_UPDATE_MAX = 2, + } + } + /** Node supporting hand and finger tracking in OpenXR. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrhand.html + */ + class OpenXRHand extends Node3D { + constructor(identifier?: any) + /** Specifies whether this node tracks the left or right hand of the player. */ + get hand(): int64 + set hand(value: int64) + + /** Set the motion range (if supported) limiting the hand motion. */ + get motion_range(): int64 + set motion_range(value: int64) + + /** Set a [Skeleton3D] node for which the pose positions will be updated. */ + get hand_skeleton(): NodePath + set hand_skeleton(value: NodePath | string) + + /** Set the type of skeleton rig the [member hand_skeleton] is compliant with. */ + get skeleton_rig(): int64 + set skeleton_rig(value: int64) + + /** Specify the type of updates to perform on the bone. */ + get bone_update(): int64 + set bone_update(value: int64) + } + /** Defines a binding between an [OpenXRAction] and an XR input or output. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxripbinding.html + */ + class OpenXRIPBinding extends Resource { + constructor(identifier?: any) + /** Get the number of input/output paths in this binding. */ + get_path_count(): int64 + + /** Returns `true` if this input/output path is part of this binding. */ + has_path(path: string): boolean + + /** Add an input/output path to this binding. */ + add_path(path: string): void + + /** Removes this input/output path from this binding. */ + remove_path(path: string): void + + /** [OpenXRAction] that is bound to these paths. */ + get action(): OpenXRAction + set action(value: OpenXRAction) + + /** Paths that define the inputs or outputs bound on the device. */ + get paths(): PackedStringArray + set paths(value: PackedStringArray | string[]) + } + /** Suggested bindings object for OpenXR. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrinteractionprofile.html + */ + class OpenXRInteractionProfile extends Resource { + constructor(identifier?: any) + /** Get the number of bindings in this interaction profile. */ + get_binding_count(): int64 + + /** Retrieve the binding at this index. */ + get_binding(index: int64): OpenXRIPBinding + + /** The interaction profile path identifying the XR device. */ + get interaction_profile_path(): string + set interaction_profile_path(value: string) + + /** Action bindings for this interaction profile. */ + get bindings(): OpenXRIPBinding + set bindings(value: OpenXRIPBinding) + } + /** Meta class registering supported devices in OpenXR. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrinteractionprofilemetadata.html + */ + class OpenXRInteractionProfileMetadata extends Object { + constructor(identifier?: any) + /** Allows for renaming old interaction profile paths to new paths to maintain backwards compatibility with older action maps. */ + register_profile_rename(old_name: string, new_name: string): void + + /** Registers a top level path to which profiles can be bound. For instance `/user/hand/left` refers to the bind point for the player's left hand. Extensions can register additional top level paths, for instance a haptic vest extension might register `/user/body/vest`. + * [param display_name] is the name shown to the user. [param openxr_path] is the top level path being registered. [param openxr_extension_name] is optional and ensures the top level path is only used if the specified extension is available/enabled. + * When a top level path ends up being bound by OpenXR, a [XRPositionalTracker] is instantiated to manage the state of the device. + */ + register_top_level_path(display_name: string, openxr_path: string, openxr_extension_name: string): void + + /** Registers an interaction profile using its OpenXR designation (e.g. `/interaction_profiles/khr/simple_controller` is the profile for OpenXR's simple controller profile). + * [param display_name] is the description shown to the user. [param openxr_path] is the interaction profile path being registered. [param openxr_extension_name] optionally restricts this profile to the given extension being enabled/available. If the extension is not available, the profile and all related entries used in an action map are filtered out. + */ + register_interaction_profile(display_name: string, openxr_path: string, openxr_extension_name: string): void + + /** Registers an input/output path for the given [param interaction_profile]. The profile should previously have been registered using [method register_interaction_profile]. [param display_name] is the description shown to the user. [param toplevel_path] specifies the bind path this input/output can be bound to (e.g. `/user/hand/left` or `/user/hand/right`). [param openxr_path] is the action input/output being registered (e.g. `/user/hand/left/input/aim/pose`). [param openxr_extension_name] restricts this input/output to an enabled/available extension, this doesn't need to repeat the extension on the profile but relates to overlapping extension (e.g. `XR_EXT_palm_pose` that introduces `…/input/palm_ext/pose` input paths). [param action_type] defines the type of input or output provided by OpenXR. */ + register_io_path(interaction_profile: string, display_name: string, toplevel_path: string, openxr_path: string, openxr_extension_name: string, action_type: OpenXRAction.ActionType): void + } + namespace OpenXRInterface { + enum Hand { + /** Left hand. */ + HAND_LEFT = 0, + + /** Right hand. */ + HAND_RIGHT = 1, + + /** Maximum value for the hand enum. */ + HAND_MAX = 2, + } + enum HandMotionRange { + /** Full hand range, if user closes their hands, we make a full fist. */ + HAND_MOTION_RANGE_UNOBSTRUCTED = 0, + + /** Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller. */ + HAND_MOTION_RANGE_CONFORM_TO_CONTROLLER = 1, + + /** Maximum value for the motion range enum. */ + HAND_MOTION_RANGE_MAX = 2, + } + enum HandTrackedSource { + /** The source of hand tracking data is unknown (the extension is likely unsupported). */ + HAND_TRACKED_SOURCE_UNKNOWN = 0, + + /** The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc. */ + HAND_TRACKED_SOURCE_UNOBSTRUCTED = 1, + + /** The source of hand tracking is a controller, bone positions are inferred from controller inputs. */ + HAND_TRACKED_SOURCE_CONTROLLER = 2, + + /** Maximum value for the hand tracked source enum. */ + HAND_TRACKED_SOURCE_MAX = 3, + } + enum HandJoints { + /** Palm joint. */ + HAND_JOINT_PALM = 0, + + /** Wrist joint. */ + HAND_JOINT_WRIST = 1, + + /** Thumb metacarpal joint. */ + HAND_JOINT_THUMB_METACARPAL = 2, + + /** Thumb proximal joint. */ + HAND_JOINT_THUMB_PROXIMAL = 3, + + /** Thumb distal joint. */ + HAND_JOINT_THUMB_DISTAL = 4, + + /** Thumb tip joint. */ + HAND_JOINT_THUMB_TIP = 5, + + /** Index metacarpal joint. */ + HAND_JOINT_INDEX_METACARPAL = 6, + + /** Index proximal joint. */ + HAND_JOINT_INDEX_PROXIMAL = 7, + + /** Index intermediate joint. */ + HAND_JOINT_INDEX_INTERMEDIATE = 8, + + /** Index distal joint. */ + HAND_JOINT_INDEX_DISTAL = 9, + + /** Index tip joint. */ + HAND_JOINT_INDEX_TIP = 10, + + /** Middle metacarpal joint. */ + HAND_JOINT_MIDDLE_METACARPAL = 11, + + /** Middle proximal joint. */ + HAND_JOINT_MIDDLE_PROXIMAL = 12, + + /** Middle intermediate joint. */ + HAND_JOINT_MIDDLE_INTERMEDIATE = 13, + + /** Middle distal joint. */ + HAND_JOINT_MIDDLE_DISTAL = 14, + + /** Middle tip joint. */ + HAND_JOINT_MIDDLE_TIP = 15, + + /** Ring metacarpal joint. */ + HAND_JOINT_RING_METACARPAL = 16, + + /** Ring proximal joint. */ + HAND_JOINT_RING_PROXIMAL = 17, + + /** Ring intermediate joint. */ + HAND_JOINT_RING_INTERMEDIATE = 18, + + /** Ring distal joint. */ + HAND_JOINT_RING_DISTAL = 19, + + /** Ring tip joint. */ + HAND_JOINT_RING_TIP = 20, + + /** Little metacarpal joint. */ + HAND_JOINT_LITTLE_METACARPAL = 21, + + /** Little proximal joint. */ + HAND_JOINT_LITTLE_PROXIMAL = 22, + + /** Little intermediate joint. */ + HAND_JOINT_LITTLE_INTERMEDIATE = 23, + + /** Little distal joint. */ + HAND_JOINT_LITTLE_DISTAL = 24, + + /** Little tip joint. */ + HAND_JOINT_LITTLE_TIP = 25, + + /** Maximum value for the hand joint enum. */ + HAND_JOINT_MAX = 26, + } + enum HandJointFlags { + /** No flags are set. */ + HAND_JOINT_NONE = 0, + + /** If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used. */ + HAND_JOINT_ORIENTATION_VALID = 1, + + /** If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data. */ + HAND_JOINT_ORIENTATION_TRACKED = 2, + + /** If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used. */ + HAND_JOINT_POSITION_VALID = 4, + + /** If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data. */ + HAND_JOINT_POSITION_TRACKED = 8, + + /** If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used. */ + HAND_JOINT_LINEAR_VELOCITY_VALID = 16, + + /** If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used. */ + HAND_JOINT_ANGULAR_VELOCITY_VALID = 32, + } + } + /** Our OpenXR interface. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_openxrinterface.html + */ + class OpenXRInterface extends XRInterface { + constructor(identifier?: any) + /** Returns `true` if OpenXR's foveation extension is supported, the interface must be initialized before this returns a valid value. + * + * **Note:** This feature is only available on the compatibility renderer and currently only available on some stand alone headsets. For Vulkan set [member Viewport.vrs_mode] to `VRS_XR` on desktop. + */ + is_foveation_supported(): boolean + + /** Returns `true` if the given action set is active. */ + is_action_set_active(name: string): boolean + + /** Sets the given action set as active or inactive. */ + set_action_set_active(name: string, active: boolean): void + + /** Returns a list of action sets registered with Godot (loaded from the action map at runtime). */ + get_action_sets(): GArray + + /** Returns display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized. */ + get_available_display_refresh_rates(): GArray + + /** If handtracking is enabled and motion range is supported, sets the currently configured motion range for [param hand] to [param motion_range]. */ + set_motion_range(hand: OpenXRInterface.Hand, motion_range: OpenXRInterface.HandMotionRange): void + + /** If handtracking is enabled and motion range is supported, gets the currently configured motion range for [param hand]. */ + get_motion_range(hand: OpenXRInterface.Hand): OpenXRInterface.HandMotionRange + + /** If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for [param hand]. */ + get_hand_tracking_source(hand: OpenXRInterface.Hand): OpenXRInterface.HandTrackedSource + + /** If handtracking is enabled, returns flags that inform us of the validity of the tracking data. */ + get_hand_joint_flags(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): OpenXRInterface.HandJointFlags + + /** If handtracking is enabled, returns the rotation of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. */ + get_hand_joint_rotation(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): Quaternion + + /** If handtracking is enabled, returns the position of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied! */ + get_hand_joint_position(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): Vector3 + + /** If handtracking is enabled, returns the radius of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is without worldscale applied! */ + get_hand_joint_radius(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): float64 + + /** If handtracking is enabled, returns the linear velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D] without worldscale applied! */ + get_hand_joint_linear_velocity(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): Vector3 + + /** If handtracking is enabled, returns the angular velocity of a joint ([param joint]) of a hand ([param hand]) as provided by OpenXR. This is relative to [XROrigin3D]! */ + get_hand_joint_angular_velocity(hand: OpenXRInterface.Hand, joint: OpenXRInterface.HandJoints): Vector3 + + /** Returns `true` if OpenXR's hand tracking is supported and enabled. + * + * **Note:** This only returns a valid value after OpenXR has been initialized. + */ + is_hand_tracking_supported(): boolean + + /** Returns `true` if OpenXR's hand interaction profile is supported and enabled. + * + * **Note:** This only returns a valid value after OpenXR has been initialized. + */ + is_hand_interaction_supported(): boolean + + /** Returns the capabilities of the eye gaze interaction extension. + * + * **Note:** This only returns a valid value after OpenXR has been initialized. + */ + is_eye_gaze_interaction_supported(): boolean + + /** The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized. */ + get display_refresh_rate(): float64 + set display_refresh_rate(value: float64) + + /** The render size multiplier for the current HMD. Must be set before the interface has been initialized. */ + get render_target_size_multiplier(): float64 + set render_target_size_multiplier(value: float64) + + /** Set foveation level from 0 (off) to 3 (high), the interface must be initialized before this is accessible. + * + * **Note:** Only works on compatibility renderer. + */ + get foveation_level(): int64 + set foveation_level(value: int64) + + /** Enable dynamic foveation adjustment, the interface must be initialized before this is accessible. If enabled foveation will automatically adjusted between low and [member foveation_level]. + * + * **Note:** Only works on compatibility renderer. + */ + get foveation_dynamic(): boolean + set foveation_dynamic(value: boolean) + + /** The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + * + * **Note:** Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR]. + */ + get vrs_min_radius(): float64 + set vrs_min_radius(value: float64) + + /** The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. + * + * **Note:** Mobile and Forward+ renderers only. Requires [member Viewport.vrs_mode] to be set to [constant Viewport.VRS_XR]. + */ + get vrs_strength(): float64 + set vrs_strength(value: float64) + + /** Informs our OpenXR session has been started. */ + readonly session_begun: Signal0 + + /** Informs our OpenXR session is stopping. */ + readonly session_stopping: Signal0 + + /** Informs our OpenXR session now has focus. */ + readonly session_focussed: Signal0 + + /** Informs our OpenXR session is now visible (output is being sent to the HMD). */ + readonly session_visible: Signal0 + + /** Informs our OpenXR session is in the process of being lost. */ + readonly session_loss_pending: Signal0 + + /** Informs our OpenXR instance is exiting. */ + readonly instance_exiting: Signal0 + + /** Informs the user queued a recenter of the player position. */ + readonly pose_recentered: Signal0 + + /** Informs the user the HMD refresh rate has changed. + * + * **Note:** Only emitted if XR runtime supports the refresh rate extension. + */ + readonly refresh_rate_changed: Signal1 + } + /** An optimized translation, used by default for CSV Translations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_optimizedtranslation.html + */ + class OptimizedTranslation extends Translation { + constructor(identifier?: any) + /** Generates and sets an optimized translation from the given [Translation] resource. */ + generate(from: Translation): void + } + /** A button that brings up a dropdown with selectable options when pressed. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_optionbutton.html + */ + class OptionButton extends Button { + constructor(identifier?: any) + /** Adds an item, with text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end. */ + add_item(label: string, id: int64 = -1): void + + /** Adds an item, with a [param texture] icon, text [param label] and (optionally) [param id]. If no [param id] is passed, the item index will be used as the item's ID. New items are appended at the end. */ + add_icon_item(texture: Texture2D, label: string, id: int64 = -1): void + + /** Sets the text of the item at index [param idx]. */ + set_item_text(idx: int64, text: string): void + + /** Sets the icon of the item at index [param idx]. */ + set_item_icon(idx: int64, texture: Texture2D): void + + /** Sets whether the item at index [param idx] is disabled. + * Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. + */ + set_item_disabled(idx: int64, disabled: boolean): void + + /** Sets the ID of the item at index [param idx]. */ + set_item_id(idx: int64, id: int64): void + + /** Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. */ + set_item_metadata(idx: int64, metadata: any): void + + /** Sets the tooltip of the item at index [param idx]. */ + set_item_tooltip(idx: int64, tooltip: string): void + + /** Returns the text of the item at index [param idx]. */ + get_item_text(idx: int64): string + + /** Returns the icon of the item at index [param idx]. */ + get_item_icon(idx: int64): Texture2D + + /** Returns the ID of the item at index [param idx]. */ + get_item_id(idx: int64): int64 + + /** Returns the index of the item with the given [param id]. */ + get_item_index(id: int64): int64 + + /** Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. */ + get_item_metadata(idx: int64): any + + /** Returns the tooltip of the item at index [param idx]. */ + get_item_tooltip(idx: int64): string + + /** Returns `true` if the item at index [param idx] is disabled. */ + is_item_disabled(idx: int64): boolean + + /** Returns `true` if the item at index [param idx] is marked as a separator. */ + is_item_separator(idx: int64): boolean + + /** Adds a separator to the list of items. Separators help to group items, and can optionally be given a [param text] header. A separator also gets an index assigned, and is appended at the end of the item list. */ + add_separator(text: string = ''): void + + /** Clears all the items in the [OptionButton]. */ + clear(): void + + /** Selects an item by index and makes it the current item. This will work even if the item is disabled. + * Passing `-1` as the index deselects any currently selected item. + */ + select(idx: int64): void + + /** Returns the ID of the selected item, or `-1` if no item is selected. */ + get_selected_id(): int64 + + /** Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata]. */ + get_selected_metadata(): any + + /** Removes the item at index [param idx]. */ + remove_item(idx: int64): void + + /** Returns the [PopupMenu] contained in this button. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. + */ + get_popup(): PopupMenu + + /** Adjusts popup position and sizing for the [OptionButton], then shows the [PopupMenu]. Prefer this over using `get_popup().popup()`. */ + show_popup(): void + + /** Returns `true` if this button contains at least one item which is not disabled, or marked as a separator. */ + has_selectable_items(): boolean + + /** Returns the index of the first item which is not disabled, or marked as a separator. If [param from_last] is `true`, the items will be searched in reverse order. + * Returns `-1` if no item is found. + */ + get_selectable_item(from_last: boolean = false): int64 + + /** If `true`, shortcuts are disabled and cannot be used to trigger the button. */ + set_disable_shortcuts(disabled: boolean): void + + /** The index of the currently selected item, or `-1` if no item is selected. */ + get selected(): int64 + set selected(value: int64) + + /** If `true`, minimum size will be determined by the longest item's text, instead of the currently selected one's. + * + * **Note:** For performance reasons, the minimum size doesn't update immediately when adding, removing or modifying items. + */ + get fit_to_longest_item(): boolean + set fit_to_longest_item(value: boolean) + + /** If `true`, the currently selected item can be selected again. */ + get allow_reselect(): boolean + set allow_reselect(value: boolean) + + /** The number of items to select from. */ + get item_count(): any /*Items,popup/item_*/ + set item_count(value: any /*Items,popup/item_*/) + + /** Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. + * [member allow_reselect] must be enabled to reselect an item. + */ + readonly item_selected: Signal1 + + /** Emitted when the user navigates to an item using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input actions. The index of the item selected is passed as argument. */ + readonly item_focused: Signal1 + } + class OrphanResourcesDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + /** Creates packages that can be loaded into a running project. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pckpacker.html + */ + class PCKPacker extends RefCounted { + constructor(identifier?: any) + /** Creates a new PCK file with the name [param pck_name]. The `.pck` file extension isn't added automatically, so it should be part of [param pck_name] (even though it's not required). */ + pck_start(pck_name: string, alignment: int64 = 32, key: string = '0000000000000000000000000000000000000000000000000000000000000000', encrypt_directory: boolean = false): GError + + /** Adds the [param source_path] file to the current PCK package at the [param pck_path] internal path (should start with `res://`). */ + add_file(pck_path: string, source_path: string, encrypt: boolean = false): GError + + /** Writes the files specified using all [method add_file] calls since the last flush. If [param verbose] is `true`, a list of files added will be printed to the console for easier debugging. */ + flush(verbose: boolean = false): GError + } + /** Efficiently packs and serializes [Array] or [Dictionary]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packeddatacontainer.html + */ + class PackedDataContainer extends Resource { + constructor(identifier?: any) + _iter_init(_unnamed_arg0: GArray): any + _iter_get(_unnamed_arg0: any): any + _iter_next(_unnamed_arg0: GArray): any + + /** Packs the given container into a binary representation. The [param value] must be either [Array] or [Dictionary], any other type will result in invalid data error. + * + * **Note:** Subsequent calls to this method will overwrite the existing data. + */ + pack(value: any): GError + + /** Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]). */ + size(): int64 + get __data__(): PackedByteArray + set __data__(value: PackedByteArray | byte[] | ArrayBuffer) + } + /** An internal class used by [PackedDataContainer] to pack nested arrays and dictionaries. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packeddatacontainerref.html + */ + class PackedDataContainerRef extends RefCounted { + constructor(identifier?: any) + /** Returns the size of the packed container (see [method Array.size] and [method Dictionary.size]). */ + size(): int64 + _iter_init(_unnamed_arg0: GArray): any + _iter_get(_unnamed_arg0: any): any + _iter_next(_unnamed_arg0: GArray): any + } + namespace PackedScene { + enum GenEditState { + /** If passed to [method instantiate], blocks edits to the scene state. */ + GEN_EDIT_STATE_DISABLED = 0, + + /** If passed to [method instantiate], provides local scene resources to the local scene. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_INSTANCE = 1, + + /** If passed to [method instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_MAIN = 2, + + /** It's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_MAIN_INHERITED = 3, + } + } + /** An abstraction of a serialized scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packedscene.html + */ + class PackedScene extends Resource { + constructor(identifier?: any) + /** Packs the [param path] node, and all owned sub-nodes, into this [PackedScene]. Any existing data will be cleared. See [member Node.owner]. */ + pack(path: Node): GError + + /** Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_SCENE_INSTANTIATED] notification on the root node. */ + instantiate(edit_state: PackedScene.GenEditState = 0): Node + + /** Returns `true` if the scene file has nodes. */ + can_instantiate(): boolean + + /** Returns the [SceneState] representing the scene file contents. */ + get_state(): SceneState + + /** A dictionary representation of the scene contents. + * Available keys include "names" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. + */ + get _bundled(): GDictionary + set _bundled(value: GDictionary) + } + class PackedSceneEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class PackedSceneEditorTranslationParserPlugin extends EditorTranslationParserPlugin { + constructor(identifier?: any) + } + /** Abstraction and base class for packet-based protocols. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packetpeer.html + */ + class PacketPeer extends RefCounted { + constructor(identifier?: any) + /** Gets a Variant. If [param allow_objects] is `true`, decoding objects is allowed. + * Internally, this uses the same decoding mechanism as the [method @GlobalScope.bytes_to_var] method. + * **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. + */ + get_var(allow_objects: boolean = false): any + + /** Sends a [Variant] as a packet. If [param full_objects] is `true`, encoding objects is allowed (and can potentially include code). + * Internally, this uses the same encoding mechanism as the [method @GlobalScope.var_to_bytes] method. + */ + put_var(var_: any, full_objects: boolean = false): GError + + /** Gets a raw packet. */ + get_packet(): PackedByteArray + + /** Sends a raw packet. */ + put_packet(buffer: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Returns the error state of the last packet received (via [method get_packet] and [method get_var]). */ + get_packet_error(): GError + + /** Returns the number of packets currently available in the ring-buffer. */ + get_available_packet_count(): int64 + + /** Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations. + * The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [member encode_buffer_max_size], the method will error out with [constant ERR_OUT_OF_MEMORY]. + */ + get encode_buffer_max_size(): int64 + set encode_buffer_max_size(value: int64) + } + namespace PacketPeerDTLS { + enum Status { + /** A status representing a [PacketPeerDTLS] that is disconnected. */ + STATUS_DISCONNECTED = 0, + + /** A status representing a [PacketPeerDTLS] that is currently performing the handshake with a remote peer. */ + STATUS_HANDSHAKING = 1, + + /** A status representing a [PacketPeerDTLS] that is connected to a remote peer. */ + STATUS_CONNECTED = 2, + + /** A status representing a [PacketPeerDTLS] in a generic error state. */ + STATUS_ERROR = 3, + + /** An error status that shows a mismatch in the DTLS certificate domain presented by the host and the domain requested for validation. */ + STATUS_ERROR_HOSTNAME_MISMATCH = 4, + } + } + /** DTLS packet peer. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packetpeerdtls.html + */ + class PacketPeerDTLS extends PacketPeer { + constructor(identifier?: any) + /** Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. */ + poll(): void + + /** Connects a [param packet_peer] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). You can optionally specify the [param client_options] to be used while verifying the TLS connections. See [method TLSOptions.client] and [method TLSOptions.client_unsafe]. */ + connect_to_peer(packet_peer: PacketPeerUDP, hostname: string, client_options: TLSOptions = undefined): GError + + /** Returns the status of the connection. See [enum Status] for values. */ + get_status(): PacketPeerDTLS.Status + + /** Disconnects this peer, terminating the DTLS session. */ + disconnect_from_peer(): void + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_packetpeerextension.html */ + class PacketPeerExtension extends PacketPeer { + constructor(identifier?: any) + /* gdvirtual */ _get_packet(r_buffer: int64, r_buffer_size: int64): GError + /* gdvirtual */ _put_packet(p_buffer: int64, p_buffer_size: int64): GError + /* gdvirtual */ _get_available_packet_count(): int64 + /* gdvirtual */ _get_max_packet_size(): int64 + } + /** Wrapper to use a PacketPeer over a StreamPeer. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packetpeerstream.html + */ + class PacketPeerStream extends PacketPeer { + constructor(identifier?: any) + get input_buffer_max_size(): int64 + set input_buffer_max_size(value: int64) + get output_buffer_max_size(): int64 + set output_buffer_max_size(value: int64) + + /** The wrapped [StreamPeer] object. */ + get stream_peer(): StreamPeer + set stream_peer(value: StreamPeer) + } + /** UDP packet peer. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_packetpeerudp.html + */ + class PacketPeerUDP extends PacketPeer { + constructor(identifier?: any) + /** Binds this [PacketPeerUDP] to the specified [param port] and [param bind_address] with a buffer size [param recv_buf_size], allowing it to receive incoming packets. + * If [param bind_address] is set to `"*"` (default), the peer will be bound on all available addresses (both IPv4 and IPv6). + * If [param bind_address] is set to `"0.0.0.0"` (for IPv4) or `"::"` (for IPv6), the peer will be bound to all available addresses matching that IP type. + * If [param bind_address] is set to any valid address (e.g. `"192.168.1.101"`, `"::1"`, etc.), the peer will only be bound to the interface with that address (or fail if no interface with the given address exists). + */ + bind(port: int64, bind_address: string = '*', recv_buf_size: int64 = 65536): GError + + /** Closes the [PacketPeerUDP]'s underlying UDP socket. */ + close(): void + + /** Waits for a packet to arrive on the bound address. See [method bind]. + * + * **Note:** [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: + * + */ + wait(): GError + + /** Returns whether this [PacketPeerUDP] is bound to an address and can receive packets. */ + is_bound(): boolean + + /** Calling this method connects this UDP peer to the given [param host]/[param port] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. + * + * **Note:** Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like TLS or DTLS if you feel like your application is transferring sensitive information. + */ + connect_to_host(host: string, port: int64): GError + + /** Returns `true` if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. */ + is_socket_connected(): boolean + + /** Returns the IP of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). */ + get_packet_ip(): string + + /** Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). */ + get_packet_port(): int64 + + /** Returns the local port to which this peer is bound. */ + get_local_port(): int64 + + /** Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. + * + * **Note:** [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. `255.255.255.255`). + */ + set_dest_address(host: string, port: int64): GError + + /** Enable or disable sending of broadcast packets (e.g. `set_dest_address("255.255.255.255", 4343)`. This option is disabled by default. + * + * **Note:** Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission and this option to be enabled to receive broadcast packets too. + */ + set_broadcast_enabled(enabled: boolean): void + + /** Joins the multicast group specified by [param multicast_address] using the interface identified by [param interface_name]. + * You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. + * + * **Note:** Some Android devices might require the `CHANGE_WIFI_MULTICAST_STATE` permission for multicast to work. + */ + join_multicast_group(multicast_address: string, interface_name: string): GError + + /** Removes the interface identified by [param interface_name] from the multicast group specified by [param multicast_address]. */ + leave_multicast_group(multicast_address: string, interface_name: string): GError + } + /** A GUI control that displays a [StyleBox]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_panel.html + */ + class Panel extends Control { + constructor(identifier?: any) + } + /** A container that keeps its child controls within the area of a [StyleBox]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_panelcontainer.html + */ + class PanelContainer extends Container { + constructor(identifier?: any) + } + /** A material that provides a special texture to a [Sky], usually an HDR panorama. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_panoramaskymaterial.html + */ + class PanoramaSkyMaterial extends Material { + constructor(identifier?: any) + /** [Texture2D] to be applied to the [PanoramaSkyMaterial]. */ + get panorama(): Texture2D + set panorama(value: Texture2D) + + /** A boolean value to determine if the background texture should be filtered or not. */ + get filter(): boolean + set filter(value: boolean) + + /** The sky's overall brightness multiplier. Higher values result in a brighter sky. */ + get energy_multiplier(): float64 + set energy_multiplier(value: float64) + } + class PanoramaSkyMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + /** A node used to create a parallax scrolling background. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_parallax2d.html + */ + class Parallax2D extends Node2D { + constructor(identifier?: any) + _camera_moved(transform: Transform2D, screen_offset: Vector2, adj_screen_offset: Vector2): void + + /** Multiplier to the final [Parallax2D]'s offset. Can be used to simulate distance from the camera. + * For example, a value of `1` scrolls at the same speed as the camera. A value greater than `1` scrolls faster, making objects appear closer. Less than `1` scrolls slower, making objects appear further, and a value of `0` stops the objects completely. + */ + get scroll_scale(): Vector2 + set scroll_scale(value: Vector2) + + /** The [Parallax2D]'s offset. Similar to [member screen_offset] and [member Node2D.position], but will not be overridden. + * + * **Note:** Values will loop if [member repeat_size] is set higher than `0`. + */ + get scroll_offset(): Vector2 + set scroll_offset(value: Vector2) + + /** Repeats the [Texture2D] of each of this node's children and offsets them by this value. When scrolling, the node's position loops, giving the illusion of an infinite scrolling background if the values are larger than the screen size. If an axis is set to `0`, the [Texture2D] will not be repeated. */ + get repeat_size(): Vector2 + set repeat_size(value: Vector2) + + /** Velocity at which the offset scrolls automatically, in pixels per second. */ + get autoscroll(): Vector2 + set autoscroll(value: Vector2) + + /** Overrides the amount of times the texture repeats. Each texture copy spreads evenly from the original by [member repeat_size]. Useful for when zooming out with a camera. */ + get repeat_times(): int64 + set repeat_times(value: int64) + + /** Top-left limits for scrolling to begin. If the camera is outside of this limit, the [Parallax2D] stops scrolling. Must be lower than [member limit_end] minus the viewport size to work. */ + get limit_begin(): Vector2 + set limit_begin(value: Vector2) + + /** Bottom-right limits for scrolling to end. If the camera is outside of this limit, the [Parallax2D] will stop scrolling. Must be higher than [member limit_begin] and the viewport size combined to work. */ + get limit_end(): Vector2 + set limit_end(value: Vector2) + + /** If `true`, this [Parallax2D] is offset by the current camera's position. If the [Parallax2D] is in a [CanvasLayer] separate from the current camera, it may be desired to match the value with [member CanvasLayer.follow_viewport_enabled]. */ + get follow_viewport(): boolean + set follow_viewport(value: boolean) + + /** If `true`, [Parallax2D]'s position is not affected by the position of the camera. */ + get ignore_camera_scroll(): boolean + set ignore_camera_scroll(value: boolean) + + /** Offset used to scroll this [Parallax2D]. This value is updated automatically unless [member ignore_camera_scroll] is `true`. */ + get screen_offset(): Vector2 + set screen_offset(value: Vector2) + } + /** A node used to create a parallax scrolling background. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_parallaxbackground.html + */ + class ParallaxBackground extends CanvasLayer { + constructor(identifier?: any) + _camera_moved(_unnamed_arg0: Transform2D, _unnamed_arg1: Vector2, _unnamed_arg2: Vector2): void + + /** The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present. */ + get scroll_offset(): Vector2 + set scroll_offset(value: Vector2) + + /** The base position offset for all [ParallaxLayer] children. */ + get scroll_base_offset(): Vector2 + set scroll_base_offset(value: Vector2) + + /** The base motion scale for all [ParallaxLayer] children. */ + get scroll_base_scale(): Vector2 + set scroll_base_scale(value: Vector2) + + /** Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. */ + get scroll_limit_begin(): Vector2 + set scroll_limit_begin(value: Vector2) + + /** Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work. */ + get scroll_limit_end(): Vector2 + set scroll_limit_end(value: Vector2) + + /** If `true`, elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. */ + get scroll_ignore_camera_zoom(): boolean + set scroll_ignore_camera_zoom(value: boolean) + } + class ParallaxBackgroundEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** A parallax scrolling layer to be used with [ParallaxBackground]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_parallaxlayer.html + */ + class ParallaxLayer extends Node2D { + constructor(identifier?: any) + /** Multiplies the ParallaxLayer's motion. If an axis is set to `0`, it will not scroll. */ + get motion_scale(): Vector2 + set motion_scale(value: Vector2) + + /** The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]. */ + get motion_offset(): Vector2 + set motion_offset(value: Vector2) + + /** The interval, in pixels, at which the [ParallaxLayer] is drawn repeatedly. Useful for creating an infinitely scrolling background. If an axis is set to `0`, the [ParallaxLayer] will be drawn only once along that direction. + * + * **Note:** If you want the repetition to pixel-perfect match a [Texture2D] displayed by a child node, you should account for any scale applied to the texture when defining this interval. For example, if you use a child [Sprite2D] scaled to `0.5` to display a 600x600 texture, and want this sprite to be repeated continuously horizontally, you should set the mirroring to `Vector2(300, 0)`. + * + * **Note:** If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the layer at any given time. The visibility window is calculated from the parent [ParallaxBackground]'s position, not the layer's own position. So, if you use mirroring, **do not** change the [ParallaxLayer] position relative to its parent. Instead, if you need to adjust the background's position, set the [member CanvasLayer.offset] property in the parent [ParallaxBackground]. + * + * **Note:** Despite the name, the layer will not be mirrored, it will only be repeated. + */ + get motion_mirroring(): Vector2 + set motion_mirroring(value: Vector2) + } + namespace ParticleProcessMaterial { + enum Parameter { + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties. */ + PARAM_INITIAL_LINEAR_VELOCITY = 0, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties. */ + PARAM_ANGULAR_VELOCITY = 1, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties. */ + PARAM_ORBIT_VELOCITY = 2, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties. */ + PARAM_LINEAR_ACCEL = 3, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties. */ + PARAM_RADIAL_ACCEL = 4, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties. */ + PARAM_TANGENTIAL_ACCEL = 5, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties. */ + PARAM_DAMPING = 6, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties. */ + PARAM_ANGLE = 7, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties. */ + PARAM_SCALE = 8, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties. */ + PARAM_HUE_VARIATION = 9, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties. */ + PARAM_ANIM_SPEED = 10, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties. */ + PARAM_ANIM_OFFSET = 11, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial velocity properties. */ + PARAM_RADIAL_VELOCITY = 15, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set directional velocity properties. */ + PARAM_DIRECTIONAL_VELOCITY = 16, + + /** Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale over velocity properties. */ + PARAM_SCALE_OVER_VELOCITY = 17, + + /** Represents the size of the [enum Parameter] enum. */ + PARAM_MAX = 18, + + /** Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum und maximum influence on each particles velocity. */ + PARAM_TURB_VEL_INFLUENCE = 13, + + /** Use with [method set_param_min] and [method set_param_max] to set the turbulence minimum and maximum displacement of the particles spawn position. */ + PARAM_TURB_INIT_DISPLACEMENT = 14, + + /** Use with [method set_param_texture] to set the turbulence influence over the particles life time. */ + PARAM_TURB_INFLUENCE_OVER_LIFE = 12, + } + enum ParticleFlags { + /** Use with [method set_particle_flag] to set [member particle_flag_align_y]. */ + PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY = 0, + + /** Use with [method set_particle_flag] to set [member particle_flag_rotate_y]. */ + PARTICLE_FLAG_ROTATE_Y = 1, + + /** Use with [method set_particle_flag] to set [member particle_flag_disable_z]. */ + PARTICLE_FLAG_DISABLE_Z = 2, + PARTICLE_FLAG_DAMPING_AS_FRICTION = 3, + + /** Represents the size of the [enum ParticleFlags] enum. */ + PARTICLE_FLAG_MAX = 4, + } + enum EmissionShape { + /** All particles will be emitted from a single point. */ + EMISSION_SHAPE_POINT = 0, + + /** Particles will be emitted in the volume of a sphere. */ + EMISSION_SHAPE_SPHERE = 1, + + /** Particles will be emitted on the surface of a sphere. */ + EMISSION_SHAPE_SPHERE_SURFACE = 2, + + /** Particles will be emitted in the volume of a box. */ + EMISSION_SHAPE_BOX = 3, + + /** Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle color will be modulated by [member emission_color_texture]. */ + EMISSION_SHAPE_POINTS = 4, + + /** Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. */ + EMISSION_SHAPE_DIRECTED_POINTS = 5, + + /** Particles will be emitted in a ring or cylinder. */ + EMISSION_SHAPE_RING = 6, + + /** Represents the size of the [enum EmissionShape] enum. */ + EMISSION_SHAPE_MAX = 7, + } + enum SubEmitterMode { + SUB_EMITTER_DISABLED = 0, + SUB_EMITTER_CONSTANT = 1, + SUB_EMITTER_AT_END = 2, + SUB_EMITTER_AT_COLLISION = 3, + + /** Represents the size of the [enum SubEmitterMode] enum. */ + SUB_EMITTER_MAX = 4, + } + enum CollisionMode { + /** No collision for particles. Particles will go through [GPUParticlesCollision3D] nodes. */ + COLLISION_DISABLED = 0, + + /** [RigidBody3D]-style collision for particles using [GPUParticlesCollision3D] nodes. */ + COLLISION_RIGID = 1, + + /** Hide particles instantly when colliding with a [GPUParticlesCollision3D] node. This can be combined with a subemitter that uses the [constant COLLISION_RIGID] collision mode to "replace" the parent particle with the subemitter on impact. */ + COLLISION_HIDE_ON_CONTACT = 2, + + /** Represents the size of the [enum CollisionMode] enum. */ + COLLISION_MAX = 3, + } + } + /** Holds a particle configuration for [GPUParticles2D] or [GPUParticles3D] nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_particleprocessmaterial.html + */ + class ParticleProcessMaterial extends Material { + constructor(identifier?: any) + /** Sets the minimum and maximum values of the given [param param]. + * The `x` component of the argument vector corresponds to minimum and the `y` component corresponds to maximum. + */ + set_param(param: ParticleProcessMaterial.Parameter, value: Vector2): void + + /** Returns the minimum and maximum values of the given [param param] as a vector. + * The `x` component of the returned vector corresponds to minimum and the `y` component corresponds to maximum. + */ + get_param(param: ParticleProcessMaterial.Parameter): Vector2 + + /** Sets the minimum value range for the given parameter. */ + set_param_min(param: ParticleProcessMaterial.Parameter, value: float64): void + + /** Returns the minimum value range for the given parameter. */ + get_param_min(param: ParticleProcessMaterial.Parameter): float64 + + /** Sets the maximum value range for the given parameter. */ + set_param_max(param: ParticleProcessMaterial.Parameter, value: float64): void + + /** Returns the maximum value range for the given parameter. */ + get_param_max(param: ParticleProcessMaterial.Parameter): float64 + + /** Sets the [Texture2D] for the specified [enum Parameter]. */ + set_param_texture(param: ParticleProcessMaterial.Parameter, texture: Texture2D): void + + /** Returns the [Texture2D] used by the specified parameter. */ + get_param_texture(param: ParticleProcessMaterial.Parameter): Texture2D + + /** If `true`, enables the specified particle flag. See [enum ParticleFlags] for options. */ + set_particle_flag(particle_flag: ParticleProcessMaterial.ParticleFlags, enable: boolean): void + + /** Returns `true` if the specified particle flag is enabled. See [enum ParticleFlags] for options. */ + get_particle_flag(particle_flag: ParticleProcessMaterial.ParticleFlags): boolean + + /** Particle lifetime randomness ratio. The equation for the lifetime of a particle is `lifetime * (1.0 - randf() * lifetime_randomness)`. For example, a [member lifetime_randomness] of `0.4` scales the lifetime between `0.6` to `1.0` of its original value. */ + get lifetime_randomness(): float64 + set lifetime_randomness(value: float64) + + /** Align Y axis of particle with the direction of its velocity. */ + get particle_flag_align_y(): boolean + set particle_flag_align_y(value: boolean) + + /** If `true`, particles rotate around Y axis by [member angle_min]. */ + get particle_flag_rotate_y(): boolean + set particle_flag_rotate_y(value: boolean) + + /** If `true`, particles will not move on the z axis. */ + get particle_flag_disable_z(): boolean + set particle_flag_disable_z(value: boolean) + + /** Changes the behavior of the damping properties from a linear deceleration to a deceleration based on speed percentage. */ + get particle_flag_damping_as_friction(): boolean + set particle_flag_damping_as_friction(value: boolean) + + /** The offset for the [member emission_shape], in local space. */ + get emission_shape_offset(): Vector3 + set emission_shape_offset(value: Vector3) + + /** The scale of the [member emission_shape], in local space. */ + get emission_shape_scale(): Vector3 + set emission_shape_scale(value: Vector3) + + /** Particles will be emitted inside this region. Use [enum EmissionShape] constants for values. */ + get emission_shape(): int64 + set emission_shape(value: int64) + + /** The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]. */ + get emission_sphere_radius(): float64 + set emission_sphere_radius(value: float64) + + /** The box's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. + * + * **Note:** [member emission_box_extents] starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents. + */ + get emission_box_extents(): Vector3 + set emission_box_extents(value: Vector3) + + /** Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. */ + get emission_point_texture(): Texture2D + set emission_point_texture(value: Texture2D) + + /** Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. */ + get emission_normal_texture(): Texture2D + set emission_normal_texture(value: Texture2D) + + /** Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. + * + * **Note:** [member emission_color_texture] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member emission_color_texture] will have no visible effect. + */ + get emission_color_texture(): Texture2D + set emission_color_texture(value: Texture2D) + + /** The number of emission points if [member emission_shape] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. */ + get emission_point_count(): int64 + set emission_point_count(value: int64) + + /** The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_axis(): Vector3 + set emission_ring_axis(value: Vector3) + + /** The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_height(): float64 + set emission_ring_height(value: float64) + + /** The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_radius(): float64 + set emission_ring_radius(value: float64) + + /** The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. */ + get emission_ring_inner_radius(): float64 + set emission_ring_inner_radius(value: float64) + get angle(): Vector2 + set angle(value: Vector2) + + /** Minimum equivalent of [member angle_max]. */ + get angle_min(): float64 + set angle_min(value: float64) + + /** Maximum initial rotation applied to each particle, in degrees. + * Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are `true` or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + */ + get angle_max(): float64 + set angle_max(value: float64) + + /** Each particle's rotation will be animated along this [CurveTexture]. */ + get angle_curve(): CurveTexture + set angle_curve(value: CurveTexture) + + /** Percentage of the velocity of the respective [GPUParticles2D] or [GPUParticles3D] inherited by each particle when spawning. */ + get inherit_velocity_ratio(): float64 + set inherit_velocity_ratio(value: float64) + + /** A pivot point used to calculate radial and orbital velocity of particles. */ + get velocity_pivot(): Vector3 + set velocity_pivot(value: Vector3) + + /** Unit vector specifying the particles' emission direction. */ + get direction(): Vector3 + set direction(value: Vector3) + + /** Each particle's initial direction range from `+spread` to `-spread` degrees. */ + get spread(): float64 + set spread(value: float64) + + /** Amount of [member spread] along the Y axis. */ + get flatness(): float64 + set flatness(value: float64) + get initial_velocity(): Vector2 + set initial_velocity(value: Vector2) + + /** Minimum equivalent of [member initial_velocity_max]. */ + get initial_velocity_min(): float64 + set initial_velocity_min(value: float64) + + /** Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread]. */ + get initial_velocity_max(): float64 + set initial_velocity_max(value: float64) + get angular_velocity(): Vector2 + set angular_velocity(value: Vector2) + + /** Minimum equivalent of [member angular_velocity_max]. */ + get angular_velocity_min(): float64 + set angular_velocity_min(value: float64) + + /** Maximum initial angular velocity (rotation speed) applied to each particle in *degrees* per second. + * Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are `true` or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + */ + get angular_velocity_max(): float64 + set angular_velocity_max(value: float64) + + /** Each particle's angular velocity (rotation speed) will vary along this [CurveTexture] over its lifetime. */ + get angular_velocity_curve(): CurveTexture + set angular_velocity_curve(value: CurveTexture) + get directional_velocity(): Vector2 + set directional_velocity(value: Vector2) + + /** Minimum directional velocity value, which is multiplied by [member directional_velocity_curve]. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get directional_velocity_min(): float64 + set directional_velocity_min(value: float64) + + /** Maximum directional velocity value, which is multiplied by [member directional_velocity_curve]. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get directional_velocity_max(): float64 + set directional_velocity_max(value: float64) + + /** A curve that specifies the velocity along each of the axes of the particle system along its lifetime. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get directional_velocity_curve(): CurveXYZTexture + set directional_velocity_curve(value: CurveXYZTexture) + get orbit_velocity(): Vector2 + set orbit_velocity(value: Vector2) + + /** Minimum equivalent of [member orbit_velocity_max]. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get orbit_velocity_min(): float64 + set orbit_velocity_min(value: float64) + + /** Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get orbit_velocity_max(): float64 + set orbit_velocity_max(value: float64) + + /** Each particle's orbital velocity will vary along this [CurveTexture]. + * + * **Note:** For 3D orbital velocity, use a [CurveXYZTexture]. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get orbit_velocity_curve(): CurveTexture | CurveXYZTexture + set orbit_velocity_curve(value: CurveTexture | CurveXYZTexture) + get radial_velocity(): Vector2 + set radial_velocity(value: Vector2) + + /** Minimum radial velocity applied to each particle. Makes particles move away from the [member velocity_pivot], or toward it if negative. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get radial_velocity_min(): float64 + set radial_velocity_min(value: float64) + + /** Maximum radial velocity applied to each particle. Makes particles move away from the [member velocity_pivot], or toward it if negative. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get radial_velocity_max(): float64 + set radial_velocity_max(value: float64) + + /** A [CurveTexture] that defines the velocity over the particle's lifetime away (or toward) the [member velocity_pivot]. + * + * **Note:** Animated velocities will not be affected by damping, use [member velocity_limit_curve] instead. + */ + get radial_velocity_curve(): CurveTexture + set radial_velocity_curve(value: CurveTexture) + + /** A [CurveTexture] that defines the maximum velocity of a particle during its lifetime. */ + get velocity_limit_curve(): CurveTexture + set velocity_limit_curve(value: CurveTexture) + + /** Gravity applied to every particle. */ + get gravity(): Vector3 + set gravity(value: Vector3) + get linear_accel(): Vector2 + set linear_accel(value: Vector2) + + /** Minimum equivalent of [member linear_accel_max]. */ + get linear_accel_min(): float64 + set linear_accel_min(value: float64) + + /** Maximum linear acceleration applied to each particle in the direction of motion. */ + get linear_accel_max(): float64 + set linear_accel_max(value: float64) + + /** Each particle's linear acceleration will vary along this [CurveTexture]. */ + get linear_accel_curve(): CurveTexture + set linear_accel_curve(value: CurveTexture) + get radial_accel(): Vector2 + set radial_accel(value: Vector2) + + /** Minimum equivalent of [member radial_accel_max]. */ + get radial_accel_min(): float64 + set radial_accel_min(value: float64) + + /** Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative. */ + get radial_accel_max(): float64 + set radial_accel_max(value: float64) + + /** Each particle's radial acceleration will vary along this [CurveTexture]. */ + get radial_accel_curve(): CurveTexture + set radial_accel_curve(value: CurveTexture) + get tangential_accel(): Vector2 + set tangential_accel(value: Vector2) + + /** Minimum equivalent of [member tangential_accel_max]. */ + get tangential_accel_min(): float64 + set tangential_accel_min(value: float64) + + /** Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. */ + get tangential_accel_max(): float64 + set tangential_accel_max(value: float64) + + /** Each particle's tangential acceleration will vary along this [CurveTexture]. */ + get tangential_accel_curve(): CurveTexture + set tangential_accel_curve(value: CurveTexture) + get damping(): Vector2 + set damping(value: Vector2) + + /** Minimum equivalent of [member damping_max]. */ + get damping_min(): float64 + set damping_min(value: float64) + + /** The maximum rate at which particles lose velocity. For example value of `100` means that the particle will go from `100` velocity to `0` in `1` second. */ + get damping_max(): float64 + set damping_max(value: float64) + + /** Damping will vary along this [CurveTexture]. */ + get damping_curve(): CurveTexture + set damping_curve(value: CurveTexture) + + /** If `true`, interaction with particle attractors is enabled. In 3D, attraction only occurs within the area defined by the [GPUParticles3D] node's [member GPUParticles3D.visibility_aabb]. */ + get attractor_interaction_enabled(): boolean + set attractor_interaction_enabled(value: boolean) + get scale(): Vector2 + set scale(value: Vector2) + + /** Minimum equivalent of [member scale_max]. */ + get scale_min(): float64 + set scale_min(value: float64) + + /** Maximum initial scale applied to each particle. */ + get scale_max(): float64 + set scale_max(value: float64) + + /** Each particle's scale will vary along this [CurveTexture] over its lifetime. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis. */ + get scale_curve(): CurveTexture | CurveXYZTexture + set scale_curve(value: CurveTexture | CurveXYZTexture) + get scale_over_velocity(): Vector2 + set scale_over_velocity(value: Vector2) + + /** Minimum velocity value reference for [member scale_over_velocity_curve]. + * [member scale_over_velocity_curve] will be interpolated between [member scale_over_velocity_min] and [member scale_over_velocity_max]. + */ + get scale_over_velocity_min(): float64 + set scale_over_velocity_min(value: float64) + + /** Maximum velocity value reference for [member scale_over_velocity_curve]. + * [member scale_over_velocity_curve] will be interpolated between [member scale_over_velocity_min] and [member scale_over_velocity_max]. + */ + get scale_over_velocity_max(): float64 + set scale_over_velocity_max(value: float64) + + /** Either a [CurveTexture] or a [CurveXYZTexture] that scales each particle based on its velocity. */ + get scale_over_velocity_curve(): CurveTexture | CurveXYZTexture + set scale_over_velocity_curve(value: CurveTexture | CurveXYZTexture) + + /** Each particle's initial color. If the [GPUParticles2D]'s `texture` is defined, it will be multiplied by this color. + * + * **Note:** [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color] will have no visible effect. + */ + get color(): Color + set color(value: Color) + + /** Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]). + * + * **Note:** [member color_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color_ramp] will have no visible effect. + */ + get color_ramp(): GradientTexture1D + set color_ramp(value: GradientTexture1D) + + /** Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]). + * + * **Note:** [member color_initial_ramp] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] *must* be `true`. For a [ShaderMaterial], `ALBEDO *= COLOR.rgb;` must be inserted in the shader's `fragment()` function. Otherwise, [member color_initial_ramp] will have no visible effect. + */ + get color_initial_ramp(): GradientTexture1D + set color_initial_ramp(value: GradientTexture1D) + + /** The alpha value of each particle's color will be multiplied by this [CurveTexture] over its lifetime. */ + get alpha_curve(): CurveTexture + set alpha_curve(value: CurveTexture) + + /** Each particle's color will be multiplied by this [CurveTexture] over its lifetime. + * + * **Note:** This property won't have a visible effect unless the render material is marked as unshaded. + */ + get emission_curve(): CurveTexture + set emission_curve(value: CurveTexture) + get hue_variation(): Vector2 + set hue_variation(value: Vector2) + + /** Minimum equivalent of [member hue_variation_max]. */ + get hue_variation_min(): float64 + set hue_variation_min(value: float64) + + /** Maximum initial hue variation applied to each particle. It will shift the particle color's hue. */ + get hue_variation_max(): float64 + set hue_variation_max(value: float64) + + /** Each particle's hue will vary along this [CurveTexture]. */ + get hue_variation_curve(): CurveTexture + set hue_variation_curve(value: CurveTexture) + get anim_speed(): Vector2 + set anim_speed(value: Vector2) + + /** Minimum equivalent of [member anim_speed_max]. */ + get anim_speed_min(): float64 + set anim_speed_min(value: float64) + + /** Maximum particle animation speed. Animation speed of `1` means that the particles will make full `0` to `1` offset cycle during lifetime, `2` means `2` cycles etc. + * With animation speed greater than `1`, remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat. + */ + get anim_speed_max(): float64 + set anim_speed_max(value: float64) + + /** Each particle's animation speed will vary along this [CurveTexture]. */ + get anim_speed_curve(): CurveTexture + set anim_speed_curve(value: CurveTexture) + get anim_offset(): Vector2 + set anim_offset(value: Vector2) + + /** Minimum equivalent of [member anim_offset_max]. */ + get anim_offset_min(): float64 + set anim_offset_min(value: float64) + + /** Maximum animation offset that corresponds to frame index in the texture. `0` is the first frame, `1` is the last one. See [member CanvasItemMaterial.particles_animation]. */ + get anim_offset_max(): float64 + set anim_offset_max(value: float64) + + /** Each particle's animation offset will vary along this [CurveTexture]. */ + get anim_offset_curve(): CurveTexture + set anim_offset_curve(value: CurveTexture) + + /** If `true`, enables turbulence for the particle system. Turbulence can be used to vary particle movement according to its position (based on a 3D noise pattern). In 3D, [GPUParticlesAttractorVectorField3D] with [NoiseTexture3D] can be used as an alternative to turbulence that works in world space and with multiple particle systems reacting in the same way. + * + * **Note:** Enabling turbulence has a high performance cost on the GPU. Only enable turbulence on a few particle systems at once at most, and consider disabling it when targeting mobile/web platforms. + */ + get turbulence_enabled(): boolean + set turbulence_enabled(value: boolean) + + /** The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern. */ + get turbulence_noise_strength(): float64 + set turbulence_noise_strength(value: float64) + + /** This value controls the overall scale/frequency of the turbulence noise pattern. + * A small scale will result in smaller features with more detail while a high scale will result in smoother noise with larger features. + */ + get turbulence_noise_scale(): float64 + set turbulence_noise_scale(value: float64) + + /** A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. + * The default value of `Vector3(0, 0, 0)` turns off the scrolling. + */ + get turbulence_noise_speed(): Vector3 + set turbulence_noise_speed(value: Vector3) + + /** The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. + * A value of 0.0 will result in a fixed pattern. + */ + get turbulence_noise_speed_random(): float64 + set turbulence_noise_speed_random(value: float64) + get turbulence_influence(): Vector2 + set turbulence_influence(value: Vector2) + + /** Minimum turbulence influence on each particle. + * The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life]. + */ + get turbulence_influence_min(): float64 + set turbulence_influence_min(value: float64) + + /** Maximum turbulence influence on each particle. + * The actual amount of turbulence influence on each particle is calculated as a random value between [member turbulence_influence_min] and [member turbulence_influence_max] and multiplied by the amount of turbulence influence from [member turbulence_influence_over_life]. + */ + get turbulence_influence_max(): float64 + set turbulence_influence_max(value: float64) + get turbulence_initial_displacement(): Vector2 + set turbulence_initial_displacement(value: Vector2) + + /** Minimum displacement of each particle's spawn position by the turbulence. + * The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max]. + */ + get turbulence_initial_displacement_min(): float64 + set turbulence_initial_displacement_min(value: float64) + + /** Maximum displacement of each particle's spawn position by the turbulence. + * The actual amount of displacement will be a factor of the underlying turbulence multiplied by a random value between [member turbulence_initial_displacement_min] and [member turbulence_initial_displacement_max]. + */ + get turbulence_initial_displacement_max(): float64 + set turbulence_initial_displacement_max(value: float64) + + /** Each particle's amount of turbulence will be influenced along this [CurveTexture] over its life time. */ + get turbulence_influence_over_life(): CurveTexture + set turbulence_influence_over_life(value: CurveTexture) + + /** The particles' collision mode. + * + * **Note:** 3D Particles can only collide with [GPUParticlesCollision3D] nodes, not [PhysicsBody3D] nodes. To make particles collide with various objects, you can add [GPUParticlesCollision3D] nodes as children of [PhysicsBody3D] nodes. In 3D, collisions only occur within the area defined by the [GPUParticles3D] node's [member GPUParticles3D.visibility_aabb]. + * + * **Note:** 2D Particles can only collide with [LightOccluder2D] nodes, not [PhysicsBody2D] nodes. + */ + get collision_mode(): int64 + set collision_mode(value: int64) + + /** The particles' friction. Values range from `0` (frictionless) to `1` (maximum friction). Only effective if [member collision_mode] is [constant COLLISION_RIGID]. */ + get collision_friction(): float64 + set collision_friction(value: float64) + + /** The particles' bounciness. Values range from `0` (no bounce) to `1` (full bounciness). Only effective if [member collision_mode] is [constant COLLISION_RIGID]. */ + get collision_bounce(): float64 + set collision_bounce(value: float64) + + /** If `true`, [member GPUParticles3D.collision_base_size] is multiplied by the particle's effective scale (see [member scale_min], [member scale_max], [member scale_curve], and [member scale_over_velocity_curve]). */ + get collision_use_scale(): boolean + set collision_use_scale(value: boolean) + + /** The particle subemitter mode (see [member GPUParticles2D.sub_emitter] and [member GPUParticles3D.sub_emitter]). */ + get sub_emitter_mode(): int64 + set sub_emitter_mode(value: int64) + + /** The frequency at which particles should be emitted from the subemitter node. One particle will be spawned every [member sub_emitter_frequency] seconds. + * + * **Note:** This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + */ + get sub_emitter_frequency(): float64 + set sub_emitter_frequency(value: float64) + + /** The amount of particles to spawn from the subemitter node when the particle expires. + * + * **Note:** This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + */ + get sub_emitter_amount_at_end(): int64 + set sub_emitter_amount_at_end(value: int64) + + /** The amount of particles to spawn from the subemitter node when a collision occurs. When combined with [constant COLLISION_HIDE_ON_CONTACT] on the main particles material, this can be used to achieve effects such as raindrops hitting the ground. + * + * **Note:** This value shouldn't exceed [member GPUParticles2D.amount] or [member GPUParticles3D.amount] defined on the *subemitter node* (not the main node), relative to the subemitter's particle lifetime. If the number of particles is exceeded, no new particles will spawn from the subemitter until enough particles have expired. + */ + get sub_emitter_amount_at_collision(): int64 + set sub_emitter_amount_at_collision(value: int64) + + /** If `true`, the subemitter inherits the parent particle's velocity when it spawns. */ + get sub_emitter_keep_velocity(): boolean + set sub_emitter_keep_velocity(value: boolean) + } + class ParticleProcessMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + /** Contains a [Curve2D] path for [PathFollow2D] nodes to follow. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_path2d.html + */ + class Path2D extends Node2D { + constructor(identifier?: any) + /** A [Curve2D] describing the path. */ + get curve(): Curve2D + set curve(value: Curve2D) + } + class Path2DEditor extends HBoxContainer { + constructor(identifier?: any) + _clear_curve_points(_unnamed_arg0: Path2D): void + _restore_curve_points(_unnamed_arg0: Path2D, _unnamed_arg1: PackedVector2Array | Vector2[]): void + } + class Path2DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Contains a [Curve3D] path for [PathFollow3D] nodes to follow. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_path3d.html + */ + class Path3D extends Node3D { + constructor(identifier?: any) + /** A [Curve3D] describing the path. */ + get curve(): Curve3D + set curve(value: Curve3D) + + /** Emitted when the [member curve] changes. */ + readonly curve_changed: Signal0 + } + class Path3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + _clear_curve_points(): void + _restore_curve_points(_unnamed_arg0: PackedVector3Array | Vector3[]): void + } + class Path3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Point sampler for a [Path2D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pathfollow2d.html + */ + class PathFollow2D extends Node2D { + constructor(identifier?: any) + /** The distance along the path, in pixels. Changing this value sets this node's position to a point within the path. */ + get progress(): float64 + set progress(value: float64) + + /** The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the progress within the path, as the offset supplied is multiplied internally by the path's length. */ + get progress_ratio(): float64 + set progress_ratio(value: float64) + + /** The node's offset along the curve. */ + get h_offset(): float64 + set h_offset(value: float64) + + /** The node's offset perpendicular to the curve. */ + get v_offset(): float64 + set v_offset(value: float64) + + /** If `true`, this node rotates to follow the path, with the +X direction facing forward on the path. */ + get rotates(): boolean + set rotates(value: boolean) + + /** If `true`, the position between two cached points is interpolated cubically, and linearly otherwise. + * The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + * There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + */ + get cubic_interp(): boolean + set cubic_interp(value: boolean) + + /** If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. */ + get loop(): boolean + set loop(value: boolean) + } + namespace PathFollow3D { + enum RotationMode { + /** Forbids the PathFollow3D to rotate. */ + ROTATION_NONE = 0, + + /** Allows the PathFollow3D to rotate in the Y axis only. */ + ROTATION_Y = 1, + + /** Allows the PathFollow3D to rotate in both the X, and Y axes. */ + ROTATION_XY = 2, + + /** Allows the PathFollow3D to rotate in any axis. */ + ROTATION_XYZ = 3, + + /** Uses the up vector information in a [Curve3D] to enforce orientation. This rotation mode requires the [Path3D]'s [member Curve3D.up_vector_enabled] property to be set to `true`. */ + ROTATION_ORIENTED = 4, + } + } + /** Point sampler for a [Path3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pathfollow3d.html + */ + class PathFollow3D extends Node3D { + constructor(identifier?: any) + /** Correct the [param transform]. [param rotation_mode] implicitly specifies how posture (forward, up and sideway direction) is calculated. */ + static correct_posture(transform: Transform3D, rotation_mode: PathFollow3D.RotationMode): Transform3D + + /** The distance from the first vertex, measured in 3D units along the path. Changing this value sets this node's position to a point within the path. */ + get progress(): float64 + set progress(value: float64) + + /** The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the progress within the path, as the progress supplied is multiplied internally by the path's length. */ + get progress_ratio(): float64 + set progress_ratio(value: float64) + + /** The node's offset along the curve. */ + get h_offset(): float64 + set h_offset(value: float64) + + /** The node's offset perpendicular to the curve. */ + get v_offset(): float64 + set v_offset(value: float64) + + /** Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used. */ + get rotation_mode(): int64 + set rotation_mode(value: int64) + + /** If `true`, the node moves on the travel path with orienting the +Z axis as forward. See also [constant Vector3.FORWARD] and [constant Vector3.MODEL_FRONT]. */ + get use_model_front(): boolean + set use_model_front(value: boolean) + + /** If `true`, the position between two cached points is interpolated cubically, and linearly otherwise. + * The points along the [Curve3D] of the [Path3D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. + * There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + */ + get cubic_interp(): boolean + set cubic_interp(value: boolean) + + /** If `true`, any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. */ + get loop(): boolean + set loop(value: boolean) + + /** If `true`, the tilt property of [Curve3D] takes effect. */ + get tilt_enabled(): boolean + set tilt_enabled(value: boolean) + } + /** A [RigidBody2D]-derived node used to make [Bone2D]s in a [Skeleton2D] react to physics. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicalbone2d.html + */ + class PhysicalBone2D extends RigidBody2D { + constructor(identifier?: any) + /** Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [PhysicalBone2D] is autoconfiguring. */ + get_joint(): Joint2D + + /** Returns a boolean that indicates whether the [PhysicalBone2D] is running and simulating using the Godot 2D physics engine. When `true`, the PhysicalBone2D node is using physics. */ + is_simulating_physics(): boolean + + /** The [NodePath] to the [Bone2D] that this [PhysicalBone2D] should simulate. */ + get bone2d_nodepath(): NodePath + set bone2d_nodepath(value: NodePath | string) + + /** The index of the [Bone2D] that this [PhysicalBone2D] should simulate. */ + get bone2d_index(): int64 + set bone2d_index(value: int64) + + /** If `true`, the [PhysicalBone2D] will automatically configure the first [Joint2D] child node. The automatic configuration is limited to setting up the node properties and positioning the [Joint2D]. */ + get auto_configure_joint(): boolean + set auto_configure_joint(value: boolean) + + /** If `true`, the [PhysicalBone2D] will start simulating using physics. If `false`, the [PhysicalBone2D] will follow the transform of the [Bone2D] node. + * + * **Note:** To have the [Bone2D]s visually follow the [PhysicalBone2D], use a [SkeletonModification2DPhysicalBones] modification on the [Skeleton2D] node with the [Bone2D] nodes. + */ + get simulate_physics(): boolean + set simulate_physics(value: boolean) + + /** If `true`, the [PhysicalBone2D] will keep the transform of the bone it is bound to when simulating physics. */ + get follow_bone_when_simulating(): boolean + set follow_bone_when_simulating(value: boolean) + } + namespace PhysicalBone3D { + enum DampMode { + /** In this mode, the body's damping value is added to any value set in areas or the default value. */ + DAMP_MODE_COMBINE = 0, + + /** In this mode, the body's damping value replaces any value set in areas or the default value. */ + DAMP_MODE_REPLACE = 1, + } + enum JointType { + JOINT_TYPE_NONE = 0, + JOINT_TYPE_PIN = 1, + JOINT_TYPE_CONE = 2, + JOINT_TYPE_HINGE = 3, + JOINT_TYPE_SLIDER = 4, + JOINT_TYPE_6DOF = 5, + } + } + /** A physics body used to make bones in a [Skeleton3D] react to physics. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicalbone3d.html + */ + class PhysicalBone3D extends PhysicsBody3D { + constructor(identifier?: any) + /** Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body. */ + /* gdvirtual */ _integrate_forces(state: PhysicsDirectBodyState3D): void + apply_central_impulse(impulse: Vector3): void + apply_impulse(impulse: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + get_simulate_physics(): boolean + is_simulating_physics(): boolean + get_bone_id(): int64 + + /** Sets the joint type. See [enum JointType] for possible values. */ + get joint_type(): int64 + set joint_type(value: int64) + + /** Sets the joint's transform. */ + get joint_offset(): Transform3D + set joint_offset(value: Transform3D) + + /** Sets the joint's rotation in radians. */ + get joint_rotation(): Vector3 + set joint_rotation(value: Vector3) + + /** Sets the body's transform. */ + get body_offset(): Transform3D + set body_offset(value: Transform3D) + + /** The body's mass. */ + get mass(): float64 + set mass(value: float64) + + /** The body's friction, from `0` (frictionless) to `1` (max friction). */ + get friction(): float64 + set friction(value: float64) + + /** The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness). + * + * **Note:** Even with [member bounce] set to `1.0`, some energy will be lost over time due to linear and angular damping. To have a [PhysicalBone3D] that preserves all its energy over time, set [member bounce] to `1.0`, [member linear_damp_mode] to [constant DAMP_MODE_REPLACE], [member linear_damp] to `0.0`, [member angular_damp_mode] to [constant DAMP_MODE_REPLACE], and [member angular_damp] to `0.0`. + */ + get bounce(): float64 + set bounce(value: float64) + + /** This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce the body's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. */ + get gravity_scale(): float64 + set gravity_scale(value: float64) + + /** If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] method, if that virtual method is overridden. + * Setting this property will call the method [method PhysicsServer3D.body_set_omit_force_integration] internally. + */ + get custom_integrator(): boolean + set custom_integrator(value: boolean) + + /** Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. */ + get linear_damp_mode(): int64 + set linear_damp_mode(value: int64) + + /** Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. + */ + get linear_damp(): float64 + set linear_damp(value: float64) + + /** Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. */ + get angular_damp_mode(): int64 + set angular_damp_mode(value: int64) + + /** Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. + */ + get angular_damp(): float64 + set angular_damp(value: float64) + + /** The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, 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. */ + get linear_velocity(): Vector3 + set linear_velocity(value: Vector3) + + /** The PhysicalBone3D's rotational velocity in *radians* per second. */ + get angular_velocity(): Vector3 + set angular_velocity(value: Vector3) + + /** If `true`, the body is deactivated when there is no movement, so it will not take part in the simulation until it is awakened by an external force. */ + get can_sleep(): boolean + set can_sleep(value: boolean) + } + class PhysicalBone3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class PhysicalBone3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Node that can be the parent of [PhysicalBone3D] and can apply the simulation results to [Skeleton3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicalbonesimulator3d.html + */ + class PhysicalBoneSimulator3D extends SkeletonModifier3D { + constructor(identifier?: any) + /** Returns a boolean that indicates whether the [PhysicalBoneSimulator3D] is running and simulating. */ + is_simulating_physics(): boolean + + /** Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating. */ + physical_bones_stop_simulation(): void + + /** Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. + * Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. + */ + physical_bones_start_simulation(bones: GArray = []): void + + /** Adds a collision exception to the physical bone. + * Works just like the [RigidBody3D] node. + */ + physical_bones_add_collision_exception(exception: RID): void + + /** Removes a collision exception to the physical bone. + * Works just like the [RigidBody3D] node. + */ + physical_bones_remove_collision_exception(exception: RID): void + } + /** A material that defines a sky for a [Sky] resource by a set of physical properties. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicalskymaterial.html + */ + class PhysicalSkyMaterial extends Material { + constructor(identifier?: any) + /** Controls the strength of the [url=https://en.wikipedia.org/wiki/Rayleigh_scattering]Rayleigh scattering[/url]. Rayleigh scattering results from light colliding with small particles. It is responsible for the blue color of the sky. */ + get rayleigh_coefficient(): float64 + set rayleigh_coefficient(value: float64) + + /** Controls the [Color] of the [url=https://en.wikipedia.org/wiki/Rayleigh_scattering]Rayleigh scattering[/url]. While not physically accurate, this allows for the creation of alien-looking planets. For example, setting this to a red [Color] results in a Mars-looking atmosphere with a corresponding blue sunset. */ + get rayleigh_color(): Color + set rayleigh_color(value: Color) + + /** Controls the strength of [url=https://en.wikipedia.org/wiki/Mie_scattering]Mie scattering[/url] for the sky. Mie scattering results from light colliding with larger particles (like water). On earth, Mie scattering results in a whitish color around the sun and horizon. */ + get mie_coefficient(): float64 + set mie_coefficient(value: float64) + + /** Controls the direction of the [url=https://en.wikipedia.org/wiki/Mie_scattering]Mie scattering[/url]. A value of `1` means that when light hits a particle it's passing through straight forward. A value of `-1` means that all light is scatter backwards. */ + get mie_eccentricity(): float64 + set mie_eccentricity(value: float64) + + /** Controls the [Color] of the [url=https://en.wikipedia.org/wiki/Mie_scattering]Mie scattering[/url] effect. While not physically accurate, this allows for the creation of alien-looking planets. */ + get mie_color(): Color + set mie_color(value: Color) + + /** Sets the thickness of the atmosphere. High turbidity creates a foggy-looking atmosphere, while a low turbidity results in a clearer atmosphere. */ + get turbidity(): float64 + set turbidity(value: float64) + + /** Sets the size of the sun disk. Default value is based on Sol's perceived size from Earth. */ + get sun_disk_scale(): float64 + set sun_disk_scale(value: float64) + + /** Modulates the [Color] on the bottom half of the sky to represent the ground. */ + get ground_color(): Color + set ground_color(value: Color) + + /** The sky's overall brightness multiplier. Higher values result in a brighter sky. */ + get energy_multiplier(): float64 + set energy_multiplier(value: float64) + + /** If `true`, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. */ + get use_debanding(): boolean + set use_debanding(value: boolean) + + /** [Texture2D] for the night sky. This is added to the sky, so if it is bright enough, it may be visible during the day. */ + get night_sky(): Texture2D + set night_sky(value: Texture2D) + } + class PhysicalSkyMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + /** Abstract base class for 2D game objects affected by physics. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsbody2d.html + */ + class PhysicsBody2D extends CollisionObject2D { + constructor(identifier?: any) + /** Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using `delta`. + * Returns a [KinematicCollision2D], which contains information about the collision when stopped, or when touching another body along the motion. + * If [param test_only] is `true`, the body does not move but the would-be collision information is given. + * [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). + * If [param recovery_as_collision] is `true`, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping. + */ + move_and_collide(motion: Vector2, test_only: boolean = false, safe_margin: float64 = 0.08, recovery_as_collision: boolean = false): KinematicCollision2D + + /** Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using `delta`. + * Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [param motion]. Returns `true` if a collision would stop the body from moving along the whole path. + * [param collision] is an optional object of type [KinematicCollision2D], which contains additional information about the collision when stopped, or when touching another body along the motion. + * [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody2D.safe_margin] for more details). + * If [param recovery_as_collision] is `true`, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would *touch* any other bodies. + */ + test_move(from: Transform2D, motion: Vector2, collision: KinematicCollision2D = undefined, safe_margin: float64 = 0.08, recovery_as_collision: boolean = false): boolean + + /** Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from [Area2D] nodes and the global world gravity. */ + get_gravity(): Vector2 + + /** Returns an array of nodes that were added as collision exceptions for this body. */ + get_collision_exceptions(): GArray + + /** Adds a body to the list of bodies that this body can't collide with. */ + add_collision_exception_with(body: Node): void + + /** Removes a body from the list of bodies that this body can't collide with. */ + remove_collision_exception_with(body: Node): void + } + /** Abstract base class for 3D game objects affected by physics. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsbody3d.html + */ + class PhysicsBody3D extends CollisionObject3D { + constructor(identifier?: any) + /** Moves the body along the vector [param motion]. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using `delta`. + * The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision when stopped, or when touching another body along the motion. + * If [param test_only] is `true`, the body does not move but the would-be collision information is given. + * [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). + * If [param recovery_as_collision] is `true`, any depenetration from the recovery phase is also reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping. + * [param max_collisions] allows to retrieve more than one collision result. + */ + move_and_collide(motion: Vector3, test_only: boolean = false, safe_margin: float64 = 0.001, recovery_as_collision: boolean = false, max_collisions: int64 = 1): KinematicCollision3D + + /** Checks for collisions without moving the body. In order to be frame rate independent in [method Node._physics_process] or [method Node._process], [param motion] should be computed using `delta`. + * Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [param motion]. Returns `true` if a collision would stop the body from moving along the whole path. + * [param collision] is an optional object of type [KinematicCollision3D], which contains additional information about the collision when stopped, or when touching another body along the motion. + * [param safe_margin] is the extra margin used for collision recovery (see [member CharacterBody3D.safe_margin] for more details). + * If [param recovery_as_collision] is `true`, any depenetration from the recovery phase is also reported as a collision; this is useful for checking whether the body would *touch* any other bodies. + * [param max_collisions] allows to retrieve more than one collision result. + */ + test_move(from: Transform3D, motion: Vector3, collision: KinematicCollision3D = undefined, safe_margin: float64 = 0.001, recovery_as_collision: boolean = false, max_collisions: int64 = 1): boolean + + /** Returns the gravity vector computed from all sources that can affect the body, including all gravity overrides from [Area3D] nodes and the global world gravity. */ + get_gravity(): Vector3 + + /** Locks or unlocks the specified linear or rotational [param axis] depending on the value of [param lock]. */ + set_axis_lock(axis: PhysicsServer3D.BodyAxis, lock: boolean): void + + /** Returns `true` if the specified linear or rotational [param axis] is locked. */ + get_axis_lock(axis: PhysicsServer3D.BodyAxis): boolean + + /** Returns an array of nodes that were added as collision exceptions for this body. */ + get_collision_exceptions(): GArray + + /** Adds a body to the list of bodies that this body can't collide with. */ + add_collision_exception_with(body: Node): void + + /** Removes a body from the list of bodies that this body can't collide with. */ + remove_collision_exception_with(body: Node): void + + /** Lock the body's linear movement in the X axis. */ + get axis_lock_linear_x(): boolean + set axis_lock_linear_x(value: boolean) + + /** Lock the body's linear movement in the Y axis. */ + get axis_lock_linear_y(): boolean + set axis_lock_linear_y(value: boolean) + + /** Lock the body's linear movement in the Z axis. */ + get axis_lock_linear_z(): boolean + set axis_lock_linear_z(value: boolean) + + /** Lock the body's rotation in the X axis. */ + get axis_lock_angular_x(): boolean + set axis_lock_angular_x(value: boolean) + + /** Lock the body's rotation in the Y axis. */ + get axis_lock_angular_y(): boolean + set axis_lock_angular_y(value: boolean) + + /** Lock the body's rotation in the Z axis. */ + get axis_lock_angular_z(): boolean + set axis_lock_angular_z(value: boolean) + } + /** Provides direct access to a physics body in the [PhysicsServer2D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectbodystate2d.html + */ + class PhysicsDirectBodyState2D extends Object { + constructor(identifier?: any) + /** Returns the body's velocity at the given relative position, including both translation and rotation. */ + get_velocity_at_local_position(local_position: Vector2): Vector2 + + /** Applies a directional impulse without affecting rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method apply_impulse] at the body's center of mass. + */ + apply_central_impulse(impulse: Vector2): void + + /** Applies a rotational impulse to the body without affecting the position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * + * **Note:** [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia]. + */ + apply_torque_impulse(impulse: float64): void + + /** Applies a positioned impulse to the body. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + apply_impulse(impulse: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method apply_force] at the body's center of mass. + */ + apply_central_force(force: Vector2 = Vector2.ZERO): void + + /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + apply_force(force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + * + * **Note:** [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inverse_inertia]. + */ + apply_torque(torque: float64): void + + /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + * This is equivalent to using [method add_constant_force] at the body's center of mass. + */ + add_constant_central_force(force: Vector2 = Vector2.ZERO): void + + /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + * [param position] is the offset from the body origin in global coordinates. + */ + add_constant_force(force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = 0`. */ + add_constant_torque(torque: float64): void + + /** Sets the body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + set_constant_force(force: Vector2): void + + /** Returns the body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + get_constant_force(): Vector2 + + /** Sets the body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + set_constant_torque(torque: float64): void + + /** Returns the body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + get_constant_torque(): float64 + + /** Returns the number of contacts this body has with other bodies. + * + * **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. + */ + get_contact_count(): int64 + + /** Returns the position of the contact point on the body in the global coordinate system. */ + get_contact_local_position(contact_idx: int64): Vector2 + + /** Returns the local normal at the contact point. */ + get_contact_local_normal(contact_idx: int64): Vector2 + + /** Returns the local shape index of the collision. */ + get_contact_local_shape(contact_idx: int64): int64 + + /** Returns the velocity vector at the body's contact point. */ + get_contact_local_velocity_at_position(contact_idx: int64): Vector2 + + /** Returns the collider's [RID]. */ + get_contact_collider(contact_idx: int64): RID + + /** Returns the position of the contact point on the collider in the global coordinate system. */ + get_contact_collider_position(contact_idx: int64): Vector2 + + /** Returns the collider's object id. */ + get_contact_collider_id(contact_idx: int64): int64 + + /** Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). */ + get_contact_collider_object(contact_idx: int64): Object + + /** Returns the collider's shape index. */ + get_contact_collider_shape(contact_idx: int64): int64 + + /** Returns the velocity vector at the collider's contact point. */ + get_contact_collider_velocity_at_position(contact_idx: int64): Vector2 + + /** Returns the impulse created by the contact. */ + get_contact_impulse(contact_idx: int64): Vector2 + + /** Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. */ + integrate_forces(): void + + /** Returns the current state of the space, useful for queries. */ + get_space_state(): PhysicsDirectSpaceState2D + + /** The timestep (delta) used for the simulation. */ + get step(): float64 + + /** The inverse of the mass of the body. */ + get inverse_mass(): float64 + + /** The inverse of the inertia of the body. */ + get inverse_inertia(): float64 + + /** The rate at which the body stops rotating, if there are not any other forces moving it. */ + get total_angular_damp(): float64 + + /** The rate at which the body stops moving, if there are not any other forces moving it. */ + get total_linear_damp(): float64 + + /** The total gravity vector being currently applied to this body. */ + get total_gravity(): Vector2 + + /** The body's center of mass position relative to the body's center in the global coordinate system. */ + get center_of_mass(): Vector2 + + /** The body's center of mass position in the body's local coordinate system. */ + get center_of_mass_local(): Vector2 + + /** The body's rotational velocity in *radians* per second. */ + get angular_velocity(): float64 + set angular_velocity(value: float64) + + /** The body's linear velocity in pixels per second. */ + get linear_velocity(): Vector2 + set linear_velocity(value: Vector2) + + /** If `true`, this body is currently sleeping (not active). */ + get sleeping(): boolean + set sleeping(value: boolean) + + /** The body's transformation matrix. */ + get transform(): Transform2D + set transform(value: Transform2D) + } + /** Provides virtual methods that can be overridden to create custom [PhysicsDirectBodyState2D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectbodystate2dextension.html + */ + class PhysicsDirectBodyState2DExtension extends PhysicsDirectBodyState2D { + constructor(identifier?: any) + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.total_gravity] and its respective getter. */ + /* gdvirtual */ _get_total_gravity(): Vector2 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.total_linear_damp] and its respective getter. */ + /* gdvirtual */ _get_total_linear_damp(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.total_angular_damp] and its respective getter. */ + /* gdvirtual */ _get_total_angular_damp(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.center_of_mass] and its respective getter. */ + /* gdvirtual */ _get_center_of_mass(): Vector2 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.center_of_mass_local] and its respective getter. */ + /* gdvirtual */ _get_center_of_mass_local(): Vector2 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.inverse_mass] and its respective getter. */ + /* gdvirtual */ _get_inverse_mass(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.inverse_inertia] and its respective getter. */ + /* gdvirtual */ _get_inverse_inertia(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.linear_velocity] and its respective setter. */ + /* gdvirtual */ _set_linear_velocity(velocity: Vector2): void + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.linear_velocity] and its respective getter. */ + /* gdvirtual */ _get_linear_velocity(): Vector2 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.angular_velocity] and its respective setter. */ + /* gdvirtual */ _set_angular_velocity(velocity: float64): void + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.angular_velocity] and its respective getter. */ + /* gdvirtual */ _get_angular_velocity(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.transform] and its respective setter. */ + /* gdvirtual */ _set_transform(transform: Transform2D): void + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.transform] and its respective getter. */ + /* gdvirtual */ _get_transform(): Transform2D + + /** Overridable version of [method PhysicsDirectBodyState2D.get_velocity_at_local_position]. */ + /* gdvirtual */ _get_velocity_at_local_position(local_position: Vector2): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_central_impulse]. */ + /* gdvirtual */ _apply_central_impulse(impulse: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_impulse]. */ + /* gdvirtual */ _apply_impulse(impulse: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_torque_impulse]. */ + /* gdvirtual */ _apply_torque_impulse(impulse: float64): void + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_central_force]. */ + /* gdvirtual */ _apply_central_force(force: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_force]. */ + /* gdvirtual */ _apply_force(force: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.apply_torque]. */ + /* gdvirtual */ _apply_torque(torque: float64): void + + /** Overridable version of [method PhysicsDirectBodyState2D.add_constant_central_force]. */ + /* gdvirtual */ _add_constant_central_force(force: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.add_constant_force]. */ + /* gdvirtual */ _add_constant_force(force: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.add_constant_torque]. */ + /* gdvirtual */ _add_constant_torque(torque: float64): void + + /** Overridable version of [method PhysicsDirectBodyState2D.set_constant_force]. */ + /* gdvirtual */ _set_constant_force(force: Vector2): void + + /** Overridable version of [method PhysicsDirectBodyState2D.get_constant_force]. */ + /* gdvirtual */ _get_constant_force(): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.set_constant_torque]. */ + /* gdvirtual */ _set_constant_torque(torque: float64): void + + /** Overridable version of [method PhysicsDirectBodyState2D.get_constant_torque]. */ + /* gdvirtual */ _get_constant_torque(): float64 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.sleeping] and its respective setter. */ + /* gdvirtual */ _set_sleep_state(enabled: boolean): void + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.sleeping] and its respective getter. */ + /* gdvirtual */ _is_sleeping(): boolean + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_count]. */ + /* gdvirtual */ _get_contact_count(): int64 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_position]. */ + /* gdvirtual */ _get_contact_local_position(contact_idx: int64): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_normal]. */ + /* gdvirtual */ _get_contact_local_normal(contact_idx: int64): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_shape]. */ + /* gdvirtual */ _get_contact_local_shape(contact_idx: int64): int64 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_local_velocity_at_position]. */ + /* gdvirtual */ _get_contact_local_velocity_at_position(contact_idx: int64): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider]. */ + /* gdvirtual */ _get_contact_collider(contact_idx: int64): RID + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_position]. */ + /* gdvirtual */ _get_contact_collider_position(contact_idx: int64): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_id]. */ + /* gdvirtual */ _get_contact_collider_id(contact_idx: int64): int64 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_object]. */ + /* gdvirtual */ _get_contact_collider_object(contact_idx: int64): Object + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_shape]. */ + /* gdvirtual */ _get_contact_collider_shape(contact_idx: int64): int64 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_collider_velocity_at_position]. */ + /* gdvirtual */ _get_contact_collider_velocity_at_position(contact_idx: int64): Vector2 + + /** Overridable version of [method PhysicsDirectBodyState2D.get_contact_impulse]. */ + /* gdvirtual */ _get_contact_impulse(contact_idx: int64): Vector2 + + /** Implement to override the behavior of [member PhysicsDirectBodyState2D.step] and its respective getter. */ + /* gdvirtual */ _get_step(): float64 + + /** Overridable version of [method PhysicsDirectBodyState2D.integrate_forces]. */ + /* gdvirtual */ _integrate_forces(): void + + /** Overridable version of [method PhysicsDirectBodyState2D.get_space_state]. */ + /* gdvirtual */ _get_space_state(): PhysicsDirectSpaceState2D + } + /** Provides direct access to a physics body in the [PhysicsServer3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectbodystate3d.html + */ + class PhysicsDirectBodyState3D extends Object { + constructor(identifier?: any) + /** Returns the body's velocity at the given relative position, including both translation and rotation. */ + get_velocity_at_local_position(local_position: Vector3): Vector3 + + /** Applies a directional impulse without affecting rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method apply_impulse] at the body's center of mass. + */ + apply_central_impulse(impulse: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a positioned impulse to the body. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + apply_impulse(impulse: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational impulse to the body without affecting the position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * + * **Note:** [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia]. + */ + apply_torque_impulse(impulse: Vector3): void + + /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method apply_force] at the body's center of mass. + */ + apply_central_force(force: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + apply_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + * + * **Note:** [member inverse_inertia] is required for this to work. To have [member inverse_inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inverse_inertia]. + */ + apply_torque(torque: Vector3): void + + /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + * This is equivalent to using [method add_constant_force] at the body's center of mass. + */ + add_constant_central_force(force: Vector3 = new Vector3(0, 0, 0)): void + + /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + * [param position] is the offset from the body origin in global coordinates. + */ + add_constant_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = Vector3(0, 0, 0)`. */ + add_constant_torque(torque: Vector3): void + + /** Sets the body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + set_constant_force(force: Vector3): void + + /** Returns the body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + get_constant_force(): Vector3 + + /** Sets the body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + set_constant_torque(torque: Vector3): void + + /** Returns the body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + get_constant_torque(): Vector3 + + /** Returns the number of contacts this body has with other bodies. + * + * **Note:** By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor]. + */ + get_contact_count(): int64 + + /** Returns the position of the contact point on the body in the global coordinate system. */ + get_contact_local_position(contact_idx: int64): Vector3 + + /** Returns the local normal at the contact point. */ + get_contact_local_normal(contact_idx: int64): Vector3 + + /** Impulse created by the contact. */ + get_contact_impulse(contact_idx: int64): Vector3 + + /** Returns the local shape index of the collision. */ + get_contact_local_shape(contact_idx: int64): int64 + + /** Returns the linear velocity vector at the body's contact point. */ + get_contact_local_velocity_at_position(contact_idx: int64): Vector3 + + /** Returns the collider's [RID]. */ + get_contact_collider(contact_idx: int64): RID + + /** Returns the position of the contact point on the collider in the global coordinate system. */ + get_contact_collider_position(contact_idx: int64): Vector3 + + /** Returns the collider's object id. */ + get_contact_collider_id(contact_idx: int64): int64 + + /** Returns the collider object. */ + get_contact_collider_object(contact_idx: int64): Object + + /** Returns the collider's shape index. */ + get_contact_collider_shape(contact_idx: int64): int64 + + /** Returns the linear velocity vector at the collider's contact point. */ + get_contact_collider_velocity_at_position(contact_idx: int64): Vector3 + + /** Updates the body's linear and angular velocity by applying gravity and damping for the equivalent of one physics tick. */ + integrate_forces(): void + + /** Returns the current state of the space, useful for queries. */ + get_space_state(): PhysicsDirectSpaceState3D + + /** The timestep (delta) used for the simulation. */ + get step(): float64 + + /** The inverse of the mass of the body. */ + get inverse_mass(): float64 + + /** The rate at which the body stops rotating, if there are not any other forces moving it. */ + get total_angular_damp(): float64 + + /** The rate at which the body stops moving, if there are not any other forces moving it. */ + get total_linear_damp(): float64 + + /** The inverse of the inertia of the body. */ + get inverse_inertia(): Vector3 + + /** The inverse of the inertia tensor of the body. */ + get inverse_inertia_tensor(): Basis + + /** The total gravity vector being currently applied to this body. */ + get total_gravity(): Vector3 + + /** The body's center of mass position relative to the body's center in the global coordinate system. */ + get center_of_mass(): Vector3 + + /** The body's center of mass position in the body's local coordinate system. */ + get center_of_mass_local(): Vector3 + get principal_inertia_axes(): Basis + + /** The body's rotational velocity in *radians* per second. */ + get angular_velocity(): Vector3 + set angular_velocity(value: Vector3) + + /** The body's linear velocity in units per second. */ + get linear_velocity(): Vector3 + set linear_velocity(value: Vector3) + + /** If `true`, this body is currently sleeping (not active). */ + get sleeping(): boolean + set sleeping(value: boolean) + + /** The body's transformation matrix. */ + get transform(): Transform3D + set transform(value: Transform3D) + } + /** Provides virtual methods that can be overridden to create custom [PhysicsDirectBodyState3D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectbodystate3dextension.html + */ + class PhysicsDirectBodyState3DExtension extends PhysicsDirectBodyState3D { + constructor(identifier?: any) + /* gdvirtual */ _get_total_gravity(): Vector3 + /* gdvirtual */ _get_total_linear_damp(): float64 + /* gdvirtual */ _get_total_angular_damp(): float64 + /* gdvirtual */ _get_center_of_mass(): Vector3 + /* gdvirtual */ _get_center_of_mass_local(): Vector3 + /* gdvirtual */ _get_principal_inertia_axes(): Basis + /* gdvirtual */ _get_inverse_mass(): float64 + /* gdvirtual */ _get_inverse_inertia(): Vector3 + /* gdvirtual */ _get_inverse_inertia_tensor(): Basis + /* gdvirtual */ _set_linear_velocity(velocity: Vector3): void + /* gdvirtual */ _get_linear_velocity(): Vector3 + /* gdvirtual */ _set_angular_velocity(velocity: Vector3): void + /* gdvirtual */ _get_angular_velocity(): Vector3 + /* gdvirtual */ _set_transform(transform: Transform3D): void + /* gdvirtual */ _get_transform(): Transform3D + /* gdvirtual */ _get_velocity_at_local_position(local_position: Vector3): Vector3 + /* gdvirtual */ _apply_central_impulse(impulse: Vector3): void + /* gdvirtual */ _apply_impulse(impulse: Vector3, position: Vector3): void + /* gdvirtual */ _apply_torque_impulse(impulse: Vector3): void + /* gdvirtual */ _apply_central_force(force: Vector3): void + /* gdvirtual */ _apply_force(force: Vector3, position: Vector3): void + /* gdvirtual */ _apply_torque(torque: Vector3): void + /* gdvirtual */ _add_constant_central_force(force: Vector3): void + /* gdvirtual */ _add_constant_force(force: Vector3, position: Vector3): void + /* gdvirtual */ _add_constant_torque(torque: Vector3): void + /* gdvirtual */ _set_constant_force(force: Vector3): void + /* gdvirtual */ _get_constant_force(): Vector3 + /* gdvirtual */ _set_constant_torque(torque: Vector3): void + /* gdvirtual */ _get_constant_torque(): Vector3 + /* gdvirtual */ _set_sleep_state(enabled: boolean): void + /* gdvirtual */ _is_sleeping(): boolean + /* gdvirtual */ _get_contact_count(): int64 + /* gdvirtual */ _get_contact_local_position(contact_idx: int64): Vector3 + /* gdvirtual */ _get_contact_local_normal(contact_idx: int64): Vector3 + /* gdvirtual */ _get_contact_impulse(contact_idx: int64): Vector3 + /* gdvirtual */ _get_contact_local_shape(contact_idx: int64): int64 + /* gdvirtual */ _get_contact_local_velocity_at_position(contact_idx: int64): Vector3 + /* gdvirtual */ _get_contact_collider(contact_idx: int64): RID + /* gdvirtual */ _get_contact_collider_position(contact_idx: int64): Vector3 + /* gdvirtual */ _get_contact_collider_id(contact_idx: int64): int64 + /* gdvirtual */ _get_contact_collider_object(contact_idx: int64): Object + /* gdvirtual */ _get_contact_collider_shape(contact_idx: int64): int64 + /* gdvirtual */ _get_contact_collider_velocity_at_position(contact_idx: int64): Vector3 + /* gdvirtual */ _get_step(): float64 + /* gdvirtual */ _integrate_forces(): void + /* gdvirtual */ _get_space_state(): PhysicsDirectSpaceState3D + } + /** Provides direct access to a physics space in the [PhysicsServer2D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectspacestate2d.html + */ + class PhysicsDirectSpaceState2D extends Object { + constructor(identifier?: any) + /** Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters2D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. + * + * **Note:** [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in `Segments` build mode are not solid shapes. Therefore, they will not be detected. + */ + intersect_point(parameters: PhysicsPointQueryParameters2D, max_results: int64 = 32): GArray + + /** Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters2D]. The returned object is a dictionary with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `normal`: The object's surface normal at the intersection point, or `Vector2(0, 0)` if the ray starts inside the shape and [member PhysicsRayQueryParameters2D.hit_from_inside] is `true`. + * `position`: The intersection point. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * If the ray did not intersect anything, then an empty dictionary is returned instead. + */ + intersect_ray(parameters: PhysicsRayQueryParameters2D): GDictionary + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. + */ + intersect_shape(parameters: PhysicsShapeQueryParameters2D, max_results: int64 = 32): GArray + + /** Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object. + * Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned. + * + * **Note:** Any [Shape2D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape2D]s that the shape is already colliding with. + */ + cast_motion(parameters: PhysicsShapeQueryParameters2D): PackedFloat32Array + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. + * Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters2D] object, second one is in the collided shape from the physics space. + */ + collide_shape(parameters: PhysicsShapeQueryParameters2D, max_results: int64 = 32): GArray + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. + * + * **Note:** This method does not take into account the `motion` property of the object. The returned object is a dictionary containing the following fields: + * `collider_id`: The colliding object's ID. + * `linear_velocity`: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is `(0, 0)`. + * `normal`: The object's surface normal at the intersection point. + * `point`: The intersection point. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + */ + get_rest_info(parameters: PhysicsShapeQueryParameters2D): GDictionary + } + /** Provides virtual methods that can be overridden to create custom [PhysicsDirectSpaceState2D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectspacestate2dextension.html + */ + class PhysicsDirectSpaceState2DExtension extends PhysicsDirectSpaceState2D { + constructor(identifier?: any) + /* gdvirtual */ _intersect_ray(from: Vector2, to: Vector2, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, hit_from_inside: boolean, result: int64): boolean + /* gdvirtual */ _intersect_point(position: Vector2, canvas_instance_id: int64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, results: int64, max_results: int64): int64 + /* gdvirtual */ _intersect_shape(shape_rid: RID, transform: Transform2D, motion: Vector2, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, result: int64, max_results: int64): int64 + /* gdvirtual */ _cast_motion(shape_rid: RID, transform: Transform2D, motion: Vector2, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, closest_safe: int64, closest_unsafe: int64): boolean + /* gdvirtual */ _collide_shape(shape_rid: RID, transform: Transform2D, motion: Vector2, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, results: int64, max_results: int64, result_count: int64): boolean + /* gdvirtual */ _rest_info(shape_rid: RID, transform: Transform2D, motion: Vector2, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, rest_info: int64): boolean + is_body_excluded_from_query(body: RID): boolean + } + /** Provides direct access to a physics space in the [PhysicsServer3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectspacestate3d.html + */ + class PhysicsDirectSpaceState3D extends Object { + constructor(identifier?: any) + /** Checks whether a point is inside any solid shape. Position and other parameters are defined through [PhysicsPointQueryParameters3D]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. + */ + intersect_point(parameters: PhysicsPointQueryParameters3D, max_results: int64 = 32): GArray + + /** Intersects a ray in a given space. Ray position and other parameters are defined through [PhysicsRayQueryParameters3D]. The returned object is a dictionary with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `normal`: The object's surface normal at the intersection point, or `Vector3(0, 0, 0)` if the ray starts inside the shape and [member PhysicsRayQueryParameters3D.hit_from_inside] is `true`. + * `position`: The intersection point. + * `face_index`: The face index at the intersection point. + * + * **Note:** Returns a valid number only if the intersected shape is a [ConcavePolygonShape3D]. Otherwise, `-1` is returned. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * If the ray did not intersect anything, then an empty dictionary is returned instead. + */ + intersect_ray(parameters: PhysicsRayQueryParameters3D): GDictionary + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: + * `collider`: The colliding object. + * `collider_id`: The colliding object's ID. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * The number of intersections can be limited with the [param max_results] parameter, to reduce the processing time. + * + * **Note:** This method does not take into account the `motion` property of the object. + */ + intersect_shape(parameters: PhysicsShapeQueryParameters3D, max_results: int64 = 32): GArray + + /** Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object. + * Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of `[1.0, 1.0]` will be returned. + * + * **Note:** Any [Shape3D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape3D]s that the shape is already colliding with. + */ + cast_motion(parameters: PhysicsShapeQueryParameters3D): PackedFloat32Array + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. + * Returned points are a list of pairs of contact points. For each pair the first one is in the shape passed in [PhysicsShapeQueryParameters3D] object, second one is in the collided shape from the physics space. + * + * **Note:** This method does not take into account the `motion` property of the object. + */ + collide_shape(parameters: PhysicsShapeQueryParameters3D, max_results: int64 = 32): GArray + + /** Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: + * `collider_id`: The colliding object's ID. + * `linear_velocity`: The colliding object's velocity [Vector3]. If the object is an [Area3D], the result is `(0, 0, 0)`. + * `normal`: The object's surface normal at the intersection point. + * `point`: The intersection point. + * `rid`: The intersecting object's [RID]. + * `shape`: The shape index of the colliding shape. + * If the shape did not intersect anything, then an empty dictionary is returned instead. + * + * **Note:** This method does not take into account the `motion` property of the object. + */ + get_rest_info(parameters: PhysicsShapeQueryParameters3D): GDictionary + } + /** Provides virtual methods that can be overridden to create custom [PhysicsDirectSpaceState3D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsdirectspacestate3dextension.html + */ + class PhysicsDirectSpaceState3DExtension extends PhysicsDirectSpaceState3D { + constructor(identifier?: any) + /* gdvirtual */ _intersect_ray(from: Vector3, to: Vector3, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, hit_from_inside: boolean, hit_back_faces: boolean, pick_ray: boolean, result: int64): boolean + /* gdvirtual */ _intersect_point(position: Vector3, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, results: int64, max_results: int64): int64 + /* gdvirtual */ _intersect_shape(shape_rid: RID, transform: Transform3D, motion: Vector3, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, result_count: int64, max_results: int64): int64 + /* gdvirtual */ _cast_motion(shape_rid: RID, transform: Transform3D, motion: Vector3, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, closest_safe: int64, closest_unsafe: int64, info: int64): boolean + /* gdvirtual */ _collide_shape(shape_rid: RID, transform: Transform3D, motion: Vector3, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, results: int64, max_results: int64, result_count: int64): boolean + /* gdvirtual */ _rest_info(shape_rid: RID, transform: Transform3D, motion: Vector3, margin: float64, collision_mask: int64, collide_with_bodies: boolean, collide_with_areas: boolean, rest_info: int64): boolean + /* gdvirtual */ _get_closest_point_to_object_volume(object: RID, point: Vector3): Vector3 + is_body_excluded_from_query(body: RID): boolean + } + /** Holds physics-related properties of a surface, namely its roughness and bounciness. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsmaterial.html + */ + class PhysicsMaterial extends Resource { + constructor(identifier?: any) + /** The body's friction. Values range from `0` (frictionless) to `1` (maximum friction). */ + get friction(): float64 + set friction(value: float64) + + /** If `true`, the physics engine will use the friction of the object marked as "rough" when two objects collide. If `false`, the physics engine will use the lowest friction of all colliding objects instead. If `true` for both colliding objects, the physics engine will use the highest friction. */ + get rough(): boolean + set rough(value: boolean) + + /** The body's bounciness. Values range from `0` (no bounce) to `1` (full bounciness). + * + * **Note:** Even with [member bounce] set to `1.0`, some energy will be lost over time due to linear and angular damping. To have a physics body that preserves all its energy over time, set [member bounce] to `1.0`, the body's linear damp mode to **Replace** (if applicable), its linear damp to `0.0`, its angular damp mode to **Replace** (if applicable), and its angular damp to `0.0`. + */ + get bounce(): float64 + set bounce(value: float64) + + /** If `true`, subtracts the bounciness from the colliding object's bounciness instead of adding it. */ + get absorbent(): boolean + set absorbent(value: boolean) + } + /** Provides parameters for [method PhysicsDirectSpaceState2D.intersect_point]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicspointqueryparameters2d.html + */ + class PhysicsPointQueryParameters2D extends RefCounted { + constructor(identifier?: any) + /** The position being queried for, in global coordinates. */ + get position(): Vector2 + set position(value: Vector2) + + /** If different from `0`, restricts the query to a specific canvas layer specified by its instance ID. See [method Object.get_instance_id]. + * If `0`, restricts the query to the Viewport's default canvas layer. + */ + get canvas_instance_id(): int64 + set canvas_instance_id(value: int64) + + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject2D.get_rid] to get the [RID] associated with a [CollisionObject2D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** If `true`, the query will take [PhysicsBody2D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area2D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + } + /** Provides parameters for [method PhysicsDirectSpaceState3D.intersect_point]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicspointqueryparameters3d.html + */ + class PhysicsPointQueryParameters3D extends RefCounted { + constructor(identifier?: any) + /** The position being queried for, in global coordinates. */ + get position(): Vector3 + set position(value: Vector3) + + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject3D.get_rid] to get the [RID] associated with a [CollisionObject3D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** If `true`, the query will take [PhysicsBody3D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area3D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + } + /** Provides parameters for [method PhysicsDirectSpaceState2D.intersect_ray]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsrayqueryparameters2d.html + */ + class PhysicsRayQueryParameters2D extends RefCounted { + constructor(identifier?: any) + /** Returns a new, pre-configured [PhysicsRayQueryParameters2D] object. Use it to quickly create query parameters using the most common options. + * + */ + static create(from: Vector2, to: Vector2, collision_mask: int64 = 4294967295, exclude: GArray = []): PhysicsRayQueryParameters2D + + /** The starting point of the ray being queried for, in global coordinates. */ + get from(): Vector2 + set from(value: Vector2) + + /** The ending point of the ray being queried for, in global coordinates. */ + get to(): Vector2 + set to(value: Vector2) + + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject2D.get_rid] to get the [RID] associated with a [CollisionObject2D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** If `true`, the query will take [PhysicsBody2D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area2D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + + /** If `true`, the query will detect a hit when starting inside shapes. In this case the collision normal will be `Vector2(0, 0)`. Does not affect concave polygon shapes. */ + get hit_from_inside(): boolean + set hit_from_inside(value: boolean) + } + /** Provides parameters for [method PhysicsDirectSpaceState3D.intersect_ray]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsrayqueryparameters3d.html + */ + class PhysicsRayQueryParameters3D extends RefCounted { + constructor(identifier?: any) + /** Returns a new, pre-configured [PhysicsRayQueryParameters3D] object. Use it to quickly create query parameters using the most common options. + * + */ + static create(from: Vector3, to: Vector3, collision_mask: int64 = 4294967295, exclude: GArray = []): PhysicsRayQueryParameters3D + + /** The starting point of the ray being queried for, in global coordinates. */ + get from(): Vector3 + set from(value: Vector3) + + /** The ending point of the ray being queried for, in global coordinates. */ + get to(): Vector3 + set to(value: Vector3) + + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject3D.get_rid] to get the [RID] associated with a [CollisionObject3D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** If `true`, the query will take [PhysicsBody3D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area3D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + + /** If `true`, the query will detect a hit when starting inside shapes. In this case the collision normal will be `Vector3(0, 0, 0)`. Does not affect concave polygon shapes or heightmap shapes. */ + get hit_from_inside(): boolean + set hit_from_inside(value: boolean) + + /** If `true`, the query will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. */ + get hit_back_faces(): boolean + set hit_back_faces(value: boolean) + } + /** Provides virtual methods that can be overridden to create custom [PhysicsServer2D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver2dextension.html + */ + class PhysicsServer2DExtension extends PhysicsServer2D { + constructor(identifier?: any) + /** Overridable version of [method PhysicsServer2D.world_boundary_shape_create]. */ + /* gdvirtual */ _world_boundary_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.separation_ray_shape_create]. */ + /* gdvirtual */ _separation_ray_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.segment_shape_create]. */ + /* gdvirtual */ _segment_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.circle_shape_create]. */ + /* gdvirtual */ _circle_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.rectangle_shape_create]. */ + /* gdvirtual */ _rectangle_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.capsule_shape_create]. */ + /* gdvirtual */ _capsule_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.convex_polygon_shape_create]. */ + /* gdvirtual */ _convex_polygon_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.concave_polygon_shape_create]. */ + /* gdvirtual */ _concave_polygon_shape_create(): RID + + /** Overridable version of [method PhysicsServer2D.shape_set_data]. */ + /* gdvirtual */ _shape_set_data(shape: RID, data: any): void + + /** Should set the custom solver bias for the given [param shape]. It defines how much bodies are forced to separate on contact. + * Overridable version of [PhysicsServer2D]'s internal `shape_get_custom_solver_bias` method. Corresponds to [member Shape2D.custom_solver_bias]. + */ + /* gdvirtual */ _shape_set_custom_solver_bias(shape: RID, bias: float64): void + + /** Overridable version of [method PhysicsServer2D.shape_get_type]. */ + /* gdvirtual */ _shape_get_type(shape: RID): PhysicsServer2D.ShapeType + + /** Overridable version of [method PhysicsServer2D.shape_get_data]. */ + /* gdvirtual */ _shape_get_data(shape: RID): any + + /** Should return the custom solver bias of the given [param shape], which defines how much bodies are forced to separate on contact when this shape is involved. + * Overridable version of [PhysicsServer2D]'s internal `shape_get_custom_solver_bias` method. Corresponds to [member Shape2D.custom_solver_bias]. + */ + /* gdvirtual */ _shape_get_custom_solver_bias(shape: RID): float64 + + /** Given two shapes and their parameters, should return `true` if a collision between the two would occur, with additional details passed in [param results]. + * Overridable version of [PhysicsServer2D]'s internal `shape_collide` method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape]. + */ + /* gdvirtual */ _shape_collide(shape_A: RID, xform_A: Transform2D, motion_A: Vector2, shape_B: RID, xform_B: Transform2D, motion_B: Vector2, results: int64, result_max: int64, result_count: int64): boolean + + /** Overridable version of [method PhysicsServer2D.space_create]. */ + /* gdvirtual */ _space_create(): RID + + /** Overridable version of [method PhysicsServer2D.space_set_active]. */ + /* gdvirtual */ _space_set_active(space: RID, active: boolean): void + + /** Overridable version of [method PhysicsServer2D.space_is_active]. */ + /* gdvirtual */ _space_is_active(space: RID): boolean + + /** Overridable version of [method PhysicsServer2D.space_set_param]. */ + /* gdvirtual */ _space_set_param(space: RID, param: PhysicsServer2D.SpaceParameter, value: float64): void + + /** Overridable version of [method PhysicsServer2D.space_get_param]. */ + /* gdvirtual */ _space_get_param(space: RID, param: PhysicsServer2D.SpaceParameter): float64 + + /** Overridable version of [method PhysicsServer2D.space_get_direct_state]. */ + /* gdvirtual */ _space_get_direct_state(space: RID): PhysicsDirectSpaceState2D + + /** Used internally to allow the given [param space] to store contact points, up to [param max_contacts]. This is automatically set for the main [World2D]'s space when [member SceneTree.debug_collisions_hint] is `true`, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds. + * Overridable version of [PhysicsServer2D]'s internal `space_set_debug_contacts` method. + */ + /* gdvirtual */ _space_set_debug_contacts(space: RID, max_contacts: int64): void + + /** Should return the positions of all contacts that have occurred during the last physics step in the given [param space]. See also [method _space_get_contact_count] and [method _space_set_debug_contacts]. + * Overridable version of [PhysicsServer2D]'s internal `space_get_contacts` method. + */ + /* gdvirtual */ _space_get_contacts(space: RID): PackedVector2Array + + /** Should return how many contacts have occurred during the last physics step in the given [param space]. See also [method _space_get_contacts] and [method _space_set_debug_contacts]. + * Overridable version of [PhysicsServer2D]'s internal `space_get_contact_count` method. + */ + /* gdvirtual */ _space_get_contact_count(space: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_create]. */ + /* gdvirtual */ _area_create(): RID + + /** Overridable version of [method PhysicsServer2D.area_set_space]. */ + /* gdvirtual */ _area_set_space(area: RID, space: RID): void + + /** Overridable version of [method PhysicsServer2D.area_get_space]. */ + /* gdvirtual */ _area_get_space(area: RID): RID + + /** Overridable version of [method PhysicsServer2D.area_add_shape]. */ + /* gdvirtual */ _area_add_shape(area: RID, shape: RID, transform: Transform2D, disabled: boolean): void + + /** Overridable version of [method PhysicsServer2D.area_set_shape]. */ + /* gdvirtual */ _area_set_shape(area: RID, shape_idx: int64, shape: RID): void + + /** Overridable version of [method PhysicsServer2D.area_set_shape_transform]. */ + /* gdvirtual */ _area_set_shape_transform(area: RID, shape_idx: int64, transform: Transform2D): void + + /** Overridable version of [method PhysicsServer2D.area_set_shape_disabled]. */ + /* gdvirtual */ _area_set_shape_disabled(area: RID, shape_idx: int64, disabled: boolean): void + + /** Overridable version of [method PhysicsServer2D.area_get_shape_count]. */ + /* gdvirtual */ _area_get_shape_count(area: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_get_shape]. */ + /* gdvirtual */ _area_get_shape(area: RID, shape_idx: int64): RID + + /** Overridable version of [method PhysicsServer2D.area_get_shape_transform]. */ + /* gdvirtual */ _area_get_shape_transform(area: RID, shape_idx: int64): Transform2D + + /** Overridable version of [method PhysicsServer2D.area_remove_shape]. */ + /* gdvirtual */ _area_remove_shape(area: RID, shape_idx: int64): void + + /** Overridable version of [method PhysicsServer2D.area_clear_shapes]. */ + /* gdvirtual */ _area_clear_shapes(area: RID): void + + /** Overridable version of [method PhysicsServer2D.area_attach_object_instance_id]. */ + /* gdvirtual */ _area_attach_object_instance_id(area: RID, id: int64): void + + /** Overridable version of [method PhysicsServer2D.area_get_object_instance_id]. */ + /* gdvirtual */ _area_get_object_instance_id(area: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_attach_canvas_instance_id]. */ + /* gdvirtual */ _area_attach_canvas_instance_id(area: RID, id: int64): void + + /** Overridable version of [method PhysicsServer2D.area_get_canvas_instance_id]. */ + /* gdvirtual */ _area_get_canvas_instance_id(area: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_set_param]. */ + /* gdvirtual */ _area_set_param(area: RID, param: PhysicsServer2D.AreaParameter, value: any): void + + /** Overridable version of [method PhysicsServer2D.area_set_transform]. */ + /* gdvirtual */ _area_set_transform(area: RID, transform: Transform2D): void + + /** Overridable version of [method PhysicsServer2D.area_get_param]. */ + /* gdvirtual */ _area_get_param(area: RID, param: PhysicsServer2D.AreaParameter): any + + /** Overridable version of [method PhysicsServer2D.area_get_transform]. */ + /* gdvirtual */ _area_get_transform(area: RID): Transform2D + + /** Overridable version of [method PhysicsServer2D.area_set_collision_layer]. */ + /* gdvirtual */ _area_set_collision_layer(area: RID, layer: int64): void + + /** Overridable version of [method PhysicsServer2D.area_get_collision_layer]. */ + /* gdvirtual */ _area_get_collision_layer(area: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_set_collision_mask]. */ + /* gdvirtual */ _area_set_collision_mask(area: RID, mask: int64): void + + /** Overridable version of [method PhysicsServer2D.area_get_collision_mask]. */ + /* gdvirtual */ _area_get_collision_mask(area: RID): int64 + + /** Overridable version of [method PhysicsServer2D.area_set_monitorable]. */ + /* gdvirtual */ _area_set_monitorable(area: RID, monitorable: boolean): void + + /** If set to `true`, allows the area with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. + * Overridable version of [PhysicsServer2D]'s internal `area_set_pickable` method. Corresponds to [member CollisionObject2D.input_pickable]. + */ + /* gdvirtual */ _area_set_pickable(area: RID, pickable: boolean): void + + /** Overridable version of [method PhysicsServer2D.area_set_monitor_callback]. */ + /* gdvirtual */ _area_set_monitor_callback(area: RID, callback: Callable): void + + /** Overridable version of [method PhysicsServer2D.area_set_area_monitor_callback]. */ + /* gdvirtual */ _area_set_area_monitor_callback(area: RID, callback: Callable): void + + /** Overridable version of [method PhysicsServer2D.body_create]. */ + /* gdvirtual */ _body_create(): RID + + /** Overridable version of [method PhysicsServer2D.body_set_space]. */ + /* gdvirtual */ _body_set_space(body: RID, space: RID): void + + /** Overridable version of [method PhysicsServer2D.body_get_space]. */ + /* gdvirtual */ _body_get_space(body: RID): RID + + /** Overridable version of [method PhysicsServer2D.body_set_mode]. */ + /* gdvirtual */ _body_set_mode(body: RID, mode: PhysicsServer2D.BodyMode): void + + /** Overridable version of [method PhysicsServer2D.body_get_mode]. */ + /* gdvirtual */ _body_get_mode(body: RID): PhysicsServer2D.BodyMode + + /** Overridable version of [method PhysicsServer2D.body_add_shape]. */ + /* gdvirtual */ _body_add_shape(body: RID, shape: RID, transform: Transform2D, disabled: boolean): void + + /** Overridable version of [method PhysicsServer2D.body_set_shape]. */ + /* gdvirtual */ _body_set_shape(body: RID, shape_idx: int64, shape: RID): void + + /** Overridable version of [method PhysicsServer2D.body_set_shape_transform]. */ + /* gdvirtual */ _body_set_shape_transform(body: RID, shape_idx: int64, transform: Transform2D): void + + /** Overridable version of [method PhysicsServer2D.body_get_shape_count]. */ + /* gdvirtual */ _body_get_shape_count(body: RID): int64 + + /** Overridable version of [method PhysicsServer2D.body_get_shape]. */ + /* gdvirtual */ _body_get_shape(body: RID, shape_idx: int64): RID + + /** Overridable version of [method PhysicsServer2D.body_get_shape_transform]. */ + /* gdvirtual */ _body_get_shape_transform(body: RID, shape_idx: int64): Transform2D + + /** Overridable version of [method PhysicsServer2D.body_set_shape_disabled]. */ + /* gdvirtual */ _body_set_shape_disabled(body: RID, shape_idx: int64, disabled: boolean): void + + /** Overridable version of [method PhysicsServer2D.body_set_shape_as_one_way_collision]. */ + /* gdvirtual */ _body_set_shape_as_one_way_collision(body: RID, shape_idx: int64, enable: boolean, margin: float64): void + + /** Overridable version of [method PhysicsServer2D.body_remove_shape]. */ + /* gdvirtual */ _body_remove_shape(body: RID, shape_idx: int64): void + + /** Overridable version of [method PhysicsServer2D.body_clear_shapes]. */ + /* gdvirtual */ _body_clear_shapes(body: RID): void + + /** Overridable version of [method PhysicsServer2D.body_attach_object_instance_id]. */ + /* gdvirtual */ _body_attach_object_instance_id(body: RID, id: int64): void + + /** Overridable version of [method PhysicsServer2D.body_get_object_instance_id]. */ + /* gdvirtual */ _body_get_object_instance_id(body: RID): int64 + + /** Overridable version of [method PhysicsServer2D.body_attach_canvas_instance_id]. */ + /* gdvirtual */ _body_attach_canvas_instance_id(body: RID, id: int64): void + + /** Overridable version of [method PhysicsServer2D.body_get_canvas_instance_id]. */ + /* gdvirtual */ _body_get_canvas_instance_id(body: RID): int64 + + /** Overridable version of [method PhysicsServer2D.body_set_continuous_collision_detection_mode]. */ + /* gdvirtual */ _body_set_continuous_collision_detection_mode(body: RID, mode: PhysicsServer2D.CCDMode): void + + /** Overridable version of [method PhysicsServer2D.body_get_continuous_collision_detection_mode]. */ + /* gdvirtual */ _body_get_continuous_collision_detection_mode(body: RID): PhysicsServer2D.CCDMode + + /** Overridable version of [method PhysicsServer2D.body_set_collision_layer]. */ + /* gdvirtual */ _body_set_collision_layer(body: RID, layer: int64): void + + /** Overridable version of [method PhysicsServer2D.body_get_collision_layer]. */ + /* gdvirtual */ _body_get_collision_layer(body: RID): int64 + + /** Overridable version of [method PhysicsServer2D.body_set_collision_mask]. */ + /* gdvirtual */ _body_set_collision_mask(body: RID, mask: int64): void + + /** Overridable version of [method PhysicsServer2D.body_get_collision_mask]. */ + /* gdvirtual */ _body_get_collision_mask(body: RID): int64 + + /** Overridable version of [method PhysicsServer2D.body_set_collision_priority]. */ + /* gdvirtual */ _body_set_collision_priority(body: RID, priority: float64): void + + /** Overridable version of [method PhysicsServer2D.body_get_collision_priority]. */ + /* gdvirtual */ _body_get_collision_priority(body: RID): float64 + + /** Overridable version of [method PhysicsServer2D.body_set_param]. */ + /* gdvirtual */ _body_set_param(body: RID, param: PhysicsServer2D.BodyParameter, value: any): void + + /** Overridable version of [method PhysicsServer2D.body_get_param]. */ + /* gdvirtual */ _body_get_param(body: RID, param: PhysicsServer2D.BodyParameter): any + + /** Overridable version of [method PhysicsServer2D.body_reset_mass_properties]. */ + /* gdvirtual */ _body_reset_mass_properties(body: RID): void + + /** Overridable version of [method PhysicsServer2D.body_set_state]. */ + /* gdvirtual */ _body_set_state(body: RID, state: PhysicsServer2D.BodyState, value: any): void + + /** Overridable version of [method PhysicsServer2D.body_get_state]. */ + /* gdvirtual */ _body_get_state(body: RID, state: PhysicsServer2D.BodyState): any + + /** Overridable version of [method PhysicsServer2D.body_apply_central_impulse]. */ + /* gdvirtual */ _body_apply_central_impulse(body: RID, impulse: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_apply_torque_impulse]. */ + /* gdvirtual */ _body_apply_torque_impulse(body: RID, impulse: float64): void + + /** Overridable version of [method PhysicsServer2D.body_apply_impulse]. */ + /* gdvirtual */ _body_apply_impulse(body: RID, impulse: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_apply_central_force]. */ + /* gdvirtual */ _body_apply_central_force(body: RID, force: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_apply_force]. */ + /* gdvirtual */ _body_apply_force(body: RID, force: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_apply_torque]. */ + /* gdvirtual */ _body_apply_torque(body: RID, torque: float64): void + + /** Overridable version of [method PhysicsServer2D.body_add_constant_central_force]. */ + /* gdvirtual */ _body_add_constant_central_force(body: RID, force: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_add_constant_force]. */ + /* gdvirtual */ _body_add_constant_force(body: RID, force: Vector2, position: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_add_constant_torque]. */ + /* gdvirtual */ _body_add_constant_torque(body: RID, torque: float64): void + + /** Overridable version of [method PhysicsServer2D.body_set_constant_force]. */ + /* gdvirtual */ _body_set_constant_force(body: RID, force: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_get_constant_force]. */ + /* gdvirtual */ _body_get_constant_force(body: RID): Vector2 + + /** Overridable version of [method PhysicsServer2D.body_set_constant_torque]. */ + /* gdvirtual */ _body_set_constant_torque(body: RID, torque: float64): void + + /** Overridable version of [method PhysicsServer2D.body_get_constant_torque]. */ + /* gdvirtual */ _body_get_constant_torque(body: RID): float64 + + /** Overridable version of [method PhysicsServer2D.body_set_axis_velocity]. */ + /* gdvirtual */ _body_set_axis_velocity(body: RID, axis_velocity: Vector2): void + + /** Overridable version of [method PhysicsServer2D.body_add_collision_exception]. */ + /* gdvirtual */ _body_add_collision_exception(body: RID, excepted_body: RID): void + + /** Overridable version of [method PhysicsServer2D.body_remove_collision_exception]. */ + /* gdvirtual */ _body_remove_collision_exception(body: RID, excepted_body: RID): void + + /** Returns the [RID]s of all bodies added as collision exceptions for the given [param body]. See also [method _body_add_collision_exception] and [method _body_remove_collision_exception]. + * Overridable version of [PhysicsServer2D]'s internal `body_get_collision_exceptions` method. Corresponds to [method PhysicsBody2D.get_collision_exceptions]. + */ + /* gdvirtual */ _body_get_collision_exceptions(body: RID): GArray + + /** Overridable version of [method PhysicsServer2D.body_set_max_contacts_reported]. */ + /* gdvirtual */ _body_set_max_contacts_reported(body: RID, amount: int64): void + + /** Overridable version of [method PhysicsServer2D.body_get_max_contacts_reported]. */ + /* gdvirtual */ _body_get_max_contacts_reported(body: RID): int64 + + /** Overridable version of [PhysicsServer2D]'s internal `body_set_contacts_reported_depth_threshold` method. + * + * **Note:** This method is currently unused by Godot's default physics implementation. + */ + /* gdvirtual */ _body_set_contacts_reported_depth_threshold(body: RID, threshold: float64): void + + /** Overridable version of [PhysicsServer2D]'s internal `body_get_contacts_reported_depth_threshold` method. + * + * **Note:** This method is currently unused by Godot's default physics implementation. + */ + /* gdvirtual */ _body_get_contacts_reported_depth_threshold(body: RID): float64 + + /** Overridable version of [method PhysicsServer2D.body_set_omit_force_integration]. */ + /* gdvirtual */ _body_set_omit_force_integration(body: RID, enable: boolean): void + + /** Overridable version of [method PhysicsServer2D.body_is_omitting_force_integration]. */ + /* gdvirtual */ _body_is_omitting_force_integration(body: RID): boolean + + /** Assigns the [param body] to call the given [param callable] during the synchronization phase of the loop, before [method _step] is called. See also [method _sync]. + * Overridable version of [method PhysicsServer2D.body_set_state_sync_callback]. + */ + /* gdvirtual */ _body_set_state_sync_callback(body: RID, callable: Callable): void + + /** Overridable version of [method PhysicsServer2D.body_set_force_integration_callback]. */ + /* gdvirtual */ _body_set_force_integration_callback(body: RID, callable: Callable, userdata: any): void + + /** Given a [param body], a [param shape], and their respective parameters, this method should return `true` if a collision between the two would occur, with additional details passed in [param results]. + * Overridable version of [PhysicsServer2D]'s internal `shape_collide` method. Corresponds to [method PhysicsDirectSpaceState2D.collide_shape]. + */ + /* gdvirtual */ _body_collide_shape(body: RID, body_shape: int64, shape: RID, shape_xform: Transform2D, motion: Vector2, results: int64, result_max: int64, result_count: int64): boolean + + /** If set to `true`, allows the body with the given [RID] to detect mouse inputs when the mouse cursor is hovering on it. + * Overridable version of [PhysicsServer2D]'s internal `body_set_pickable` method. Corresponds to [member CollisionObject2D.input_pickable]. + */ + /* gdvirtual */ _body_set_pickable(body: RID, pickable: boolean): void + + /** Overridable version of [method PhysicsServer2D.body_get_direct_state]. */ + /* gdvirtual */ _body_get_direct_state(body: RID): PhysicsDirectBodyState2D + + /** Overridable version of [method PhysicsServer2D.body_test_motion]. Unlike the exposed implementation, this method does not receive all of the arguments inside a [PhysicsTestMotionParameters2D]. */ + /* gdvirtual */ _body_test_motion(body: RID, from: Transform2D, motion: Vector2, margin: float64, collide_separation_ray: boolean, recovery_as_collision: boolean, result: int64): boolean + + /** Overridable version of [method PhysicsServer2D.joint_create]. */ + /* gdvirtual */ _joint_create(): RID + + /** Overridable version of [method PhysicsServer2D.joint_clear]. */ + /* gdvirtual */ _joint_clear(joint: RID): void + + /** Overridable version of [method PhysicsServer2D.joint_set_param]. */ + /* gdvirtual */ _joint_set_param(joint: RID, param: PhysicsServer2D.JointParam, value: float64): void + + /** Overridable version of [method PhysicsServer2D.joint_get_param]. */ + /* gdvirtual */ _joint_get_param(joint: RID, param: PhysicsServer2D.JointParam): float64 + + /** Overridable version of [method PhysicsServer2D.joint_disable_collisions_between_bodies]. */ + /* gdvirtual */ _joint_disable_collisions_between_bodies(joint: RID, disable: boolean): void + + /** Overridable version of [method PhysicsServer2D.joint_is_disabled_collisions_between_bodies]. */ + /* gdvirtual */ _joint_is_disabled_collisions_between_bodies(joint: RID): boolean + + /** Overridable version of [method PhysicsServer2D.joint_make_pin]. */ + /* gdvirtual */ _joint_make_pin(joint: RID, anchor: Vector2, body_a: RID, body_b: RID): void + + /** Overridable version of [method PhysicsServer2D.joint_make_groove]. */ + /* gdvirtual */ _joint_make_groove(joint: RID, a_groove1: Vector2, a_groove2: Vector2, b_anchor: Vector2, body_a: RID, body_b: RID): void + + /** Overridable version of [method PhysicsServer2D.joint_make_damped_spring]. */ + /* gdvirtual */ _joint_make_damped_spring(joint: RID, anchor_a: Vector2, anchor_b: Vector2, body_a: RID, body_b: RID): void + + /** Overridable version of [method PhysicsServer2D.pin_joint_set_flag]. */ + /* gdvirtual */ _pin_joint_set_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: boolean): void + + /** Overridable version of [method PhysicsServer2D.pin_joint_get_flag]. */ + /* gdvirtual */ _pin_joint_get_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag): boolean + + /** Overridable version of [method PhysicsServer2D.pin_joint_set_param]. */ + /* gdvirtual */ _pin_joint_set_param(joint: RID, param: PhysicsServer2D.PinJointParam, value: float64): void + + /** Overridable version of [method PhysicsServer2D.pin_joint_get_param]. */ + /* gdvirtual */ _pin_joint_get_param(joint: RID, param: PhysicsServer2D.PinJointParam): float64 + + /** Overridable version of [method PhysicsServer2D.damped_spring_joint_set_param]. */ + /* gdvirtual */ _damped_spring_joint_set_param(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: float64): void + + /** Overridable version of [method PhysicsServer2D.damped_spring_joint_get_param]. */ + /* gdvirtual */ _damped_spring_joint_get_param(joint: RID, param: PhysicsServer2D.DampedSpringParam): float64 + + /** Overridable version of [method PhysicsServer2D.joint_get_type]. */ + /* gdvirtual */ _joint_get_type(joint: RID): PhysicsServer2D.JointType + + /** Overridable version of [method PhysicsServer2D.free_rid]. */ + /* gdvirtual */ _free_rid(rid: RID): void + + /** Overridable version of [method PhysicsServer2D.set_active]. */ + /* gdvirtual */ _set_active(active: boolean): void + + /** Called when the main loop is initialized and creates a new instance of this physics server. See also [method MainLoop._initialize] and [method _finish]. + * Overridable version of [PhysicsServer2D]'s internal `init` method. + */ + /* gdvirtual */ _init(): void + + /** Called every physics step to process the physics simulation. [param step] is the time elapsed since the last physics step, in seconds. It is usually the same as [method Node.get_physics_process_delta_time]. + * Overridable version of [PhysicsServer2D]'s internal [code skip-lint]step` method. + */ + /* gdvirtual */ _step(step: float64): void + + /** Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also [method _end_sync]. + * Overridable version of [PhysicsServer2D]'s internal `sync` method. + */ + /* gdvirtual */ _sync(): void + + /** Called every physics step before [method _step] to process all remaining queries. + * Overridable version of [PhysicsServer2D]'s internal `flush_queries` method. + */ + /* gdvirtual */ _flush_queries(): void + + /** Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also [method _sync]. + * Overridable version of [PhysicsServer2D]'s internal `end_sync` method. + */ + /* gdvirtual */ _end_sync(): void + + /** Called when the main loop finalizes to shut down the physics server. See also [method MainLoop._finalize] and [method _init]. + * Overridable version of [PhysicsServer2D]'s internal `finish` method. + */ + /* gdvirtual */ _finish(): void + + /** Overridable method that should return `true` when the physics server is processing queries. See also [method _flush_queries]. + * Overridable version of [PhysicsServer2D]'s internal `is_flushing_queries` method. + */ + /* gdvirtual */ _is_flushing_queries(): boolean + + /** Overridable version of [method PhysicsServer2D.get_process_info]. */ + /* gdvirtual */ _get_process_info(process_info: PhysicsServer2D.ProcessInfo): int64 + + /** Returns `true` if the body with the given [RID] is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id]. */ + body_test_motion_is_excluding_body(body: RID): boolean + + /** Returns `true` if the object with the given instance ID is being excluded from [method _body_test_motion]. See also [method Object.get_instance_id]. */ + body_test_motion_is_excluding_object(object: int64): boolean + } + /** Provides virtual methods that can be overridden to create custom [PhysicsServer3D] implementations. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver3dextension.html + */ + class PhysicsServer3DExtension extends PhysicsServer3D { + constructor(identifier?: any) + /* gdvirtual */ _world_boundary_shape_create(): RID + /* gdvirtual */ _separation_ray_shape_create(): RID + /* gdvirtual */ _sphere_shape_create(): RID + /* gdvirtual */ _box_shape_create(): RID + /* gdvirtual */ _capsule_shape_create(): RID + /* gdvirtual */ _cylinder_shape_create(): RID + /* gdvirtual */ _convex_polygon_shape_create(): RID + /* gdvirtual */ _concave_polygon_shape_create(): RID + /* gdvirtual */ _heightmap_shape_create(): RID + /* gdvirtual */ _custom_shape_create(): RID + /* gdvirtual */ _shape_set_data(shape: RID, data: any): void + /* gdvirtual */ _shape_set_custom_solver_bias(shape: RID, bias: float64): void + /* gdvirtual */ _shape_set_margin(shape: RID, margin: float64): void + /* gdvirtual */ _shape_get_margin(shape: RID): float64 + /* gdvirtual */ _shape_get_type(shape: RID): PhysicsServer3D.ShapeType + /* gdvirtual */ _shape_get_data(shape: RID): any + /* gdvirtual */ _shape_get_custom_solver_bias(shape: RID): float64 + /* gdvirtual */ _space_create(): RID + /* gdvirtual */ _space_set_active(space: RID, active: boolean): void + /* gdvirtual */ _space_is_active(space: RID): boolean + /* gdvirtual */ _space_set_param(space: RID, param: PhysicsServer3D.SpaceParameter, value: float64): void + /* gdvirtual */ _space_get_param(space: RID, param: PhysicsServer3D.SpaceParameter): float64 + /* gdvirtual */ _space_get_direct_state(space: RID): PhysicsDirectSpaceState3D + /* gdvirtual */ _space_set_debug_contacts(space: RID, max_contacts: int64): void + /* gdvirtual */ _space_get_contacts(space: RID): PackedVector3Array + /* gdvirtual */ _space_get_contact_count(space: RID): int64 + /* gdvirtual */ _area_create(): RID + /* gdvirtual */ _area_set_space(area: RID, space: RID): void + /* gdvirtual */ _area_get_space(area: RID): RID + /* gdvirtual */ _area_add_shape(area: RID, shape: RID, transform: Transform3D, disabled: boolean): void + /* gdvirtual */ _area_set_shape(area: RID, shape_idx: int64, shape: RID): void + /* gdvirtual */ _area_set_shape_transform(area: RID, shape_idx: int64, transform: Transform3D): void + /* gdvirtual */ _area_set_shape_disabled(area: RID, shape_idx: int64, disabled: boolean): void + /* gdvirtual */ _area_get_shape_count(area: RID): int64 + /* gdvirtual */ _area_get_shape(area: RID, shape_idx: int64): RID + /* gdvirtual */ _area_get_shape_transform(area: RID, shape_idx: int64): Transform3D + /* gdvirtual */ _area_remove_shape(area: RID, shape_idx: int64): void + /* gdvirtual */ _area_clear_shapes(area: RID): void + /* gdvirtual */ _area_attach_object_instance_id(area: RID, id: int64): void + /* gdvirtual */ _area_get_object_instance_id(area: RID): int64 + /* gdvirtual */ _area_set_param(area: RID, param: PhysicsServer3D.AreaParameter, value: any): void + /* gdvirtual */ _area_set_transform(area: RID, transform: Transform3D): void + /* gdvirtual */ _area_get_param(area: RID, param: PhysicsServer3D.AreaParameter): any + /* gdvirtual */ _area_get_transform(area: RID): Transform3D + /* gdvirtual */ _area_set_collision_layer(area: RID, layer: int64): void + /* gdvirtual */ _area_get_collision_layer(area: RID): int64 + /* gdvirtual */ _area_set_collision_mask(area: RID, mask: int64): void + /* gdvirtual */ _area_get_collision_mask(area: RID): int64 + /* gdvirtual */ _area_set_monitorable(area: RID, monitorable: boolean): void + /* gdvirtual */ _area_set_ray_pickable(area: RID, enable: boolean): void + /* gdvirtual */ _area_set_monitor_callback(area: RID, callback: Callable): void + /* gdvirtual */ _area_set_area_monitor_callback(area: RID, callback: Callable): void + /* gdvirtual */ _body_create(): RID + /* gdvirtual */ _body_set_space(body: RID, space: RID): void + /* gdvirtual */ _body_get_space(body: RID): RID + /* gdvirtual */ _body_set_mode(body: RID, mode: PhysicsServer3D.BodyMode): void + /* gdvirtual */ _body_get_mode(body: RID): PhysicsServer3D.BodyMode + /* gdvirtual */ _body_add_shape(body: RID, shape: RID, transform: Transform3D, disabled: boolean): void + /* gdvirtual */ _body_set_shape(body: RID, shape_idx: int64, shape: RID): void + /* gdvirtual */ _body_set_shape_transform(body: RID, shape_idx: int64, transform: Transform3D): void + /* gdvirtual */ _body_set_shape_disabled(body: RID, shape_idx: int64, disabled: boolean): void + /* gdvirtual */ _body_get_shape_count(body: RID): int64 + /* gdvirtual */ _body_get_shape(body: RID, shape_idx: int64): RID + /* gdvirtual */ _body_get_shape_transform(body: RID, shape_idx: int64): Transform3D + /* gdvirtual */ _body_remove_shape(body: RID, shape_idx: int64): void + /* gdvirtual */ _body_clear_shapes(body: RID): void + /* gdvirtual */ _body_attach_object_instance_id(body: RID, id: int64): void + /* gdvirtual */ _body_get_object_instance_id(body: RID): int64 + /* gdvirtual */ _body_set_enable_continuous_collision_detection(body: RID, enable: boolean): void + /* gdvirtual */ _body_is_continuous_collision_detection_enabled(body: RID): boolean + /* gdvirtual */ _body_set_collision_layer(body: RID, layer: int64): void + /* gdvirtual */ _body_get_collision_layer(body: RID): int64 + /* gdvirtual */ _body_set_collision_mask(body: RID, mask: int64): void + /* gdvirtual */ _body_get_collision_mask(body: RID): int64 + /* gdvirtual */ _body_set_collision_priority(body: RID, priority: float64): void + /* gdvirtual */ _body_get_collision_priority(body: RID): float64 + /* gdvirtual */ _body_set_user_flags(body: RID, flags: int64): void + /* gdvirtual */ _body_get_user_flags(body: RID): int64 + /* gdvirtual */ _body_set_param(body: RID, param: PhysicsServer3D.BodyParameter, value: any): void + /* gdvirtual */ _body_get_param(body: RID, param: PhysicsServer3D.BodyParameter): any + /* gdvirtual */ _body_reset_mass_properties(body: RID): void + /* gdvirtual */ _body_set_state(body: RID, state: PhysicsServer3D.BodyState, value: any): void + /* gdvirtual */ _body_get_state(body: RID, state: PhysicsServer3D.BodyState): any + /* gdvirtual */ _body_apply_central_impulse(body: RID, impulse: Vector3): void + /* gdvirtual */ _body_apply_impulse(body: RID, impulse: Vector3, position: Vector3): void + /* gdvirtual */ _body_apply_torque_impulse(body: RID, impulse: Vector3): void + /* gdvirtual */ _body_apply_central_force(body: RID, force: Vector3): void + /* gdvirtual */ _body_apply_force(body: RID, force: Vector3, position: Vector3): void + /* gdvirtual */ _body_apply_torque(body: RID, torque: Vector3): void + /* gdvirtual */ _body_add_constant_central_force(body: RID, force: Vector3): void + /* gdvirtual */ _body_add_constant_force(body: RID, force: Vector3, position: Vector3): void + /* gdvirtual */ _body_add_constant_torque(body: RID, torque: Vector3): void + /* gdvirtual */ _body_set_constant_force(body: RID, force: Vector3): void + /* gdvirtual */ _body_get_constant_force(body: RID): Vector3 + /* gdvirtual */ _body_set_constant_torque(body: RID, torque: Vector3): void + /* gdvirtual */ _body_get_constant_torque(body: RID): Vector3 + /* gdvirtual */ _body_set_axis_velocity(body: RID, axis_velocity: Vector3): void + /* gdvirtual */ _body_set_axis_lock(body: RID, axis: PhysicsServer3D.BodyAxis, lock: boolean): void + /* gdvirtual */ _body_is_axis_locked(body: RID, axis: PhysicsServer3D.BodyAxis): boolean + /* gdvirtual */ _body_add_collision_exception(body: RID, excepted_body: RID): void + /* gdvirtual */ _body_remove_collision_exception(body: RID, excepted_body: RID): void + /* gdvirtual */ _body_get_collision_exceptions(body: RID): GArray + /* gdvirtual */ _body_set_max_contacts_reported(body: RID, amount: int64): void + /* gdvirtual */ _body_get_max_contacts_reported(body: RID): int64 + /* gdvirtual */ _body_set_contacts_reported_depth_threshold(body: RID, threshold: float64): void + /* gdvirtual */ _body_get_contacts_reported_depth_threshold(body: RID): float64 + /* gdvirtual */ _body_set_omit_force_integration(body: RID, enable: boolean): void + /* gdvirtual */ _body_is_omitting_force_integration(body: RID): boolean + /* gdvirtual */ _body_set_state_sync_callback(body: RID, callable: Callable): void + /* gdvirtual */ _body_set_force_integration_callback(body: RID, callable: Callable, userdata: any): void + /* gdvirtual */ _body_set_ray_pickable(body: RID, enable: boolean): void + /* gdvirtual */ _body_test_motion(body: RID, from: Transform3D, motion: Vector3, margin: float64, max_collisions: int64, collide_separation_ray: boolean, recovery_as_collision: boolean, result: int64): boolean + /* gdvirtual */ _body_get_direct_state(body: RID): PhysicsDirectBodyState3D + /* gdvirtual */ _soft_body_create(): RID + /* gdvirtual */ _soft_body_update_rendering_server(body: RID, rendering_server_handler: PhysicsServer3DRenderingServerHandler): void + /* gdvirtual */ _soft_body_set_space(body: RID, space: RID): void + /* gdvirtual */ _soft_body_get_space(body: RID): RID + /* gdvirtual */ _soft_body_set_ray_pickable(body: RID, enable: boolean): void + /* gdvirtual */ _soft_body_set_collision_layer(body: RID, layer: int64): void + /* gdvirtual */ _soft_body_get_collision_layer(body: RID): int64 + /* gdvirtual */ _soft_body_set_collision_mask(body: RID, mask: int64): void + /* gdvirtual */ _soft_body_get_collision_mask(body: RID): int64 + /* gdvirtual */ _soft_body_add_collision_exception(body: RID, body_b: RID): void + /* gdvirtual */ _soft_body_remove_collision_exception(body: RID, body_b: RID): void + /* gdvirtual */ _soft_body_get_collision_exceptions(body: RID): GArray + /* gdvirtual */ _soft_body_set_state(body: RID, state: PhysicsServer3D.BodyState, variant: any): void + /* gdvirtual */ _soft_body_get_state(body: RID, state: PhysicsServer3D.BodyState): any + /* gdvirtual */ _soft_body_set_transform(body: RID, transform: Transform3D): void + /* gdvirtual */ _soft_body_set_simulation_precision(body: RID, simulation_precision: int64): void + /* gdvirtual */ _soft_body_get_simulation_precision(body: RID): int64 + /* gdvirtual */ _soft_body_set_total_mass(body: RID, total_mass: float64): void + /* gdvirtual */ _soft_body_get_total_mass(body: RID): float64 + /* gdvirtual */ _soft_body_set_linear_stiffness(body: RID, linear_stiffness: float64): void + /* gdvirtual */ _soft_body_get_linear_stiffness(body: RID): float64 + /* gdvirtual */ _soft_body_set_pressure_coefficient(body: RID, pressure_coefficient: float64): void + /* gdvirtual */ _soft_body_get_pressure_coefficient(body: RID): float64 + /* gdvirtual */ _soft_body_set_damping_coefficient(body: RID, damping_coefficient: float64): void + /* gdvirtual */ _soft_body_get_damping_coefficient(body: RID): float64 + /* gdvirtual */ _soft_body_set_drag_coefficient(body: RID, drag_coefficient: float64): void + /* gdvirtual */ _soft_body_get_drag_coefficient(body: RID): float64 + /* gdvirtual */ _soft_body_set_mesh(body: RID, mesh: RID): void + /* gdvirtual */ _soft_body_get_bounds(body: RID): AABB + /* gdvirtual */ _soft_body_move_point(body: RID, point_index: int64, global_position: Vector3): void + /* gdvirtual */ _soft_body_get_point_global_position(body: RID, point_index: int64): Vector3 + /* gdvirtual */ _soft_body_remove_all_pinned_points(body: RID): void + /* gdvirtual */ _soft_body_pin_point(body: RID, point_index: int64, pin: boolean): void + /* gdvirtual */ _soft_body_is_point_pinned(body: RID, point_index: int64): boolean + /* gdvirtual */ _joint_create(): RID + /* gdvirtual */ _joint_clear(joint: RID): void + /* gdvirtual */ _joint_make_pin(joint: RID, body_A: RID, local_A: Vector3, body_B: RID, local_B: Vector3): void + /* gdvirtual */ _pin_joint_set_param(joint: RID, param: PhysicsServer3D.PinJointParam, value: float64): void + /* gdvirtual */ _pin_joint_get_param(joint: RID, param: PhysicsServer3D.PinJointParam): float64 + /* gdvirtual */ _pin_joint_set_local_a(joint: RID, local_A: Vector3): void + /* gdvirtual */ _pin_joint_get_local_a(joint: RID): Vector3 + /* gdvirtual */ _pin_joint_set_local_b(joint: RID, local_B: Vector3): void + /* gdvirtual */ _pin_joint_get_local_b(joint: RID): Vector3 + /* gdvirtual */ _joint_make_hinge(joint: RID, body_A: RID, hinge_A: Transform3D, body_B: RID, hinge_B: Transform3D): void + /* gdvirtual */ _joint_make_hinge_simple(joint: RID, body_A: RID, pivot_A: Vector3, axis_A: Vector3, body_B: RID, pivot_B: Vector3, axis_B: Vector3): void + /* gdvirtual */ _hinge_joint_set_param(joint: RID, param: PhysicsServer3D.HingeJointParam, value: float64): void + /* gdvirtual */ _hinge_joint_get_param(joint: RID, param: PhysicsServer3D.HingeJointParam): float64 + /* gdvirtual */ _hinge_joint_set_flag(joint: RID, flag: PhysicsServer3D.HingeJointFlag, enabled: boolean): void + /* gdvirtual */ _hinge_joint_get_flag(joint: RID, flag: PhysicsServer3D.HingeJointFlag): boolean + /* gdvirtual */ _joint_make_slider(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + /* gdvirtual */ _slider_joint_set_param(joint: RID, param: PhysicsServer3D.SliderJointParam, value: float64): void + /* gdvirtual */ _slider_joint_get_param(joint: RID, param: PhysicsServer3D.SliderJointParam): float64 + /* gdvirtual */ _joint_make_cone_twist(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + /* gdvirtual */ _cone_twist_joint_set_param(joint: RID, param: PhysicsServer3D.ConeTwistJointParam, value: float64): void + /* gdvirtual */ _cone_twist_joint_get_param(joint: RID, param: PhysicsServer3D.ConeTwistJointParam): float64 + /* gdvirtual */ _joint_make_generic_6dof(joint: RID, body_A: RID, local_ref_A: Transform3D, body_B: RID, local_ref_B: Transform3D): void + /* gdvirtual */ _generic_6dof_joint_set_param(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam, value: float64): void + /* gdvirtual */ _generic_6dof_joint_get_param(joint: RID, axis: Vector3.Axis, param: PhysicsServer3D.G6DOFJointAxisParam): float64 + /* gdvirtual */ _generic_6dof_joint_set_flag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag, enable: boolean): void + /* gdvirtual */ _generic_6dof_joint_get_flag(joint: RID, axis: Vector3.Axis, flag: PhysicsServer3D.G6DOFJointAxisFlag): boolean + /* gdvirtual */ _joint_get_type(joint: RID): PhysicsServer3D.JointType + /* gdvirtual */ _joint_set_solver_priority(joint: RID, priority: int64): void + /* gdvirtual */ _joint_get_solver_priority(joint: RID): int64 + /* gdvirtual */ _joint_disable_collisions_between_bodies(joint: RID, disable: boolean): void + /* gdvirtual */ _joint_is_disabled_collisions_between_bodies(joint: RID): boolean + /* gdvirtual */ _free_rid(rid: RID): void + /* gdvirtual */ _set_active(active: boolean): void + /* gdvirtual */ _init(): void + /* gdvirtual */ _step(step: float64): void + /* gdvirtual */ _sync(): void + /* gdvirtual */ _flush_queries(): void + /* gdvirtual */ _end_sync(): void + /* gdvirtual */ _finish(): void + /* gdvirtual */ _is_flushing_queries(): boolean + /* gdvirtual */ _get_process_info(process_info: PhysicsServer3D.ProcessInfo): int64 + body_test_motion_is_excluding_body(body: RID): boolean + body_test_motion_is_excluding_object(object: int64): boolean + } + /** A class used to provide [method PhysicsServer3DExtension._soft_body_update_rendering_server] with a rendering handler for soft bodies. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsserver3drenderingserverhandler.html + */ + class PhysicsServer3DRenderingServerHandler extends Object { + constructor(identifier?: any) + /** Called by the [PhysicsServer3D] to set the position for the [SoftBody3D] vertex at the index specified by [param vertex_id]. + * + * **Note:** The [param vertex] parameter used to be of type `const void*` prior to Godot 4.2. + */ + /* gdvirtual */ _set_vertex(vertex_id: int64, vertex: Vector3): void + + /** Called by the [PhysicsServer3D] to set the normal for the [SoftBody3D] vertex at the index specified by [param vertex_id]. + * + * **Note:** The [param normal] parameter used to be of type `const void*` prior to Godot 4.2. + */ + /* gdvirtual */ _set_normal(vertex_id: int64, normal: Vector3): void + + /** Called by the [PhysicsServer3D] to set the bounding box for the [SoftBody3D]. */ + /* gdvirtual */ _set_aabb(aabb: AABB): void + + /** Sets the position for the [SoftBody3D] vertex at the index specified by [param vertex_id]. */ + set_vertex(vertex_id: int64, vertex: Vector3): void + + /** Sets the normal for the [SoftBody3D] vertex at the index specified by [param vertex_id]. */ + set_normal(vertex_id: int64, normal: Vector3): void + + /** Sets the bounding box for the [SoftBody3D]. */ + set_aabb(aabb: AABB): void + } + /** Provides parameters for [method PhysicsDirectSpaceState2D.intersect_shape]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsshapequeryparameters2d.html + */ + class PhysicsShapeQueryParameters2D extends RefCounted { + constructor(identifier?: any) + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject2D.get_rid] to get the [RID] associated with a [CollisionObject2D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** The collision margin for the shape. */ + get margin(): float64 + set margin(value: float64) + + /** The motion of the shape being queried for. */ + get motion(): Vector2 + set motion(value: Vector2) + + /** The [Shape2D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid]. */ + get shape(): Shape2D + set shape(value: Shape2D) + + /** The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: + * + */ + get shape_rid(): RID + set shape_rid(value: RID) + + /** The queried shape's transform matrix. */ + get transform(): Transform2D + set transform(value: Transform2D) + + /** If `true`, the query will take [PhysicsBody2D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area2D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + } + /** Provides parameters for [method PhysicsDirectSpaceState3D.intersect_shape]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicsshapequeryparameters3d.html + */ + class PhysicsShapeQueryParameters3D extends RefCounted { + constructor(identifier?: any) + /** The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** The list of object [RID]s that will be excluded from collisions. Use [method CollisionObject3D.get_rid] to get the [RID] associated with a [CollisionObject3D]-derived node. + * + * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again. + */ + get exclude(): GArray + set exclude(value: GArray) + + /** The collision margin for the shape. */ + get margin(): float64 + set margin(value: float64) + + /** The motion of the shape being queried for. */ + get motion(): Vector3 + set motion(value: Vector3) + + /** The [Shape3D] that will be used for collision/intersection queries. This stores the actual reference which avoids the shape to be released while being used for queries, so always prefer using this over [member shape_rid]. */ + get shape(): Shape3D + set shape(value: Shape3D) + + /** The queried shape's [RID] that will be used for collision/intersection queries. Use this over [member shape] if you want to optimize for performance using the Servers API: + * + */ + get shape_rid(): RID + set shape_rid(value: RID) + + /** The queried shape's transform matrix. */ + get transform(): Transform3D + set transform(value: Transform3D) + + /** If `true`, the query will take [PhysicsBody3D]s into account. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** If `true`, the query will take [Area3D]s into account. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + } + /** Provides parameters for [method PhysicsServer2D.body_test_motion]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicstestmotionparameters2d.html + */ + class PhysicsTestMotionParameters2D extends RefCounted { + constructor(identifier?: any) + /** Transform in global space where the motion should start. Usually set to [member Node2D.global_transform] for the current body's transform. */ + get from(): Transform2D + set from(value: Transform2D) + + /** Motion vector to define the length and direction of the motion to test. */ + get motion(): Vector2 + set motion(value: Vector2) + + /** Increases the size of the shapes involved in the collision detection. */ + get margin(): float64 + set margin(value: float64) + + /** If set to `true`, shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. + * If set to `false`, shapes of type [constant PhysicsServer2D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. + */ + get collide_separation_ray(): boolean + set collide_separation_ray(value: boolean) + + /** Optional array of body [RID] to exclude from collision. Use [method CollisionObject2D.get_rid] to get the [RID] associated with a [CollisionObject2D]-derived node. */ + get exclude_bodies(): GArray + set exclude_bodies(value: GArray) + + /** Optional array of object unique instance ID to exclude from collision. See [method Object.get_instance_id]. */ + get exclude_objects(): GArray + set exclude_objects(value: GArray) + + /** If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping. + * If set to `false`, only collisions resulting from the motion are reported, which is generally the desired behavior. + */ + get recovery_as_collision(): boolean + set recovery_as_collision(value: boolean) + } + /** Provides parameters for [method PhysicsServer3D.body_test_motion]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicstestmotionparameters3d.html + */ + class PhysicsTestMotionParameters3D extends RefCounted { + constructor(identifier?: any) + /** Transform in global space where the motion should start. Usually set to [member Node3D.global_transform] for the current body's transform. */ + get from(): Transform3D + set from(value: Transform3D) + + /** Motion vector to define the length and direction of the motion to test. */ + get motion(): Vector3 + set motion(value: Vector3) + + /** Increases the size of the shapes involved in the collision detection. */ + get margin(): float64 + set margin(value: float64) + + /** Maximum number of returned collisions, between `1` and `32`. Always returns the deepest detected collisions. */ + get max_collisions(): int64 + set max_collisions(value: int64) + + /** If set to `true`, shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are used to detect collisions and can stop the motion. Can be useful when snapping to the ground. + * If set to `false`, shapes of type [constant PhysicsServer3D.SHAPE_SEPARATION_RAY] are only used for separation when overlapping with other bodies. That's the main use for separation ray shapes. + */ + get collide_separation_ray(): boolean + set collide_separation_ray(value: boolean) + + /** Optional array of body [RID] to exclude from collision. Use [method CollisionObject3D.get_rid] to get the [RID] associated with a [CollisionObject3D]-derived node. */ + get exclude_bodies(): GArray + set exclude_bodies(value: GArray) + + /** Optional array of object unique instance ID to exclude from collision. See [method Object.get_instance_id]. */ + get exclude_objects(): GArray + set exclude_objects(value: GArray) + + /** If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping. + * If set to `false`, only collisions resulting from the motion are reported, which is generally the desired behavior. + */ + get recovery_as_collision(): boolean + set recovery_as_collision(value: boolean) + } + /** Describes the motion and collision result from [method PhysicsServer2D.body_test_motion]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicstestmotionresult2d.html + */ + class PhysicsTestMotionResult2D extends RefCounted { + constructor(identifier?: any) + /** Returns the moving object's travel before collision. */ + get_travel(): Vector2 + + /** Returns the moving object's remaining movement vector. */ + get_remainder(): Vector2 + + /** Returns the point of collision in global coordinates, if a collision occurred. */ + get_collision_point(): Vector2 + + /** Returns the colliding body's shape's normal at the point of collision, if a collision occurred. */ + get_collision_normal(): Vector2 + + /** Returns the colliding body's velocity, if a collision occurred. */ + get_collider_velocity(): Vector2 + + /** Returns the unique instance ID of the colliding body's attached [Object], if a collision occurred. See [method Object.get_instance_id]. */ + get_collider_id(): int64 + + /** Returns the colliding body's [RID] used by the [PhysicsServer2D], if a collision occurred. */ + get_collider_rid(): RID + + /** Returns the colliding body's attached [Object], if a collision occurred. */ + get_collider(): Object + + /** Returns the colliding body's shape index, if a collision occurred. See [CollisionObject2D]. */ + get_collider_shape(): int64 + + /** Returns the moving object's colliding shape, if a collision occurred. */ + get_collision_local_shape(): int64 + + /** Returns the length of overlap along the collision normal, if a collision occurred. */ + get_collision_depth(): float64 + + /** Returns the maximum fraction of the motion that can occur without a collision, between `0` and `1`. */ + get_collision_safe_fraction(): float64 + + /** Returns the minimum fraction of the motion needed to collide, if a collision occurred, between `0` and `1`. */ + get_collision_unsafe_fraction(): float64 + } + /** Describes the motion and collision result from [method PhysicsServer3D.body_test_motion]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_physicstestmotionresult3d.html + */ + class PhysicsTestMotionResult3D extends RefCounted { + constructor(identifier?: any) + /** Returns the moving object's travel before collision. */ + get_travel(): Vector3 + + /** Returns the moving object's remaining movement vector. */ + get_remainder(): Vector3 + + /** Returns the maximum fraction of the motion that can occur without a collision, between `0` and `1`. */ + get_collision_safe_fraction(): float64 + + /** Returns the minimum fraction of the motion needed to collide, if a collision occurred, between `0` and `1`. */ + get_collision_unsafe_fraction(): float64 + + /** Returns the number of detected collisions. */ + get_collision_count(): int64 + + /** Returns the point of collision in global coordinates given a collision index (the deepest collision by default), if a collision occurred. */ + get_collision_point(collision_index: int64 = 0): Vector3 + + /** Returns the colliding body's shape's normal at the point of collision given a collision index (the deepest collision by default), if a collision occurred. */ + get_collision_normal(collision_index: int64 = 0): Vector3 + + /** Returns the colliding body's velocity given a collision index (the deepest collision by default), if a collision occurred. */ + get_collider_velocity(collision_index: int64 = 0): Vector3 + + /** Returns the unique instance ID of the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. See [method Object.get_instance_id]. */ + get_collider_id(collision_index: int64 = 0): int64 + + /** Returns the colliding body's [RID] used by the [PhysicsServer3D] given a collision index (the deepest collision by default), if a collision occurred. */ + get_collider_rid(collision_index: int64 = 0): RID + + /** Returns the colliding body's attached [Object] given a collision index (the deepest collision by default), if a collision occurred. */ + get_collider(collision_index: int64 = 0): Object + + /** Returns the colliding body's shape index given a collision index (the deepest collision by default), if a collision occurred. See [CollisionObject3D]. */ + get_collider_shape(collision_index: int64 = 0): int64 + + /** Returns the moving object's colliding shape given a collision index (the deepest collision by default), if a collision occurred. */ + get_collision_local_shape(collision_index: int64 = 0): int64 + + /** Returns the length of overlap along the collision normal given a collision index (the deepest collision by default), if a collision occurred. */ + get_collision_depth(collision_index: int64 = 0): float64 + } + /** A physics joint that attaches two 2D physics bodies at a single point, allowing them to freely rotate. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pinjoint2d.html + */ + class PinJoint2D extends Joint2D { + constructor(identifier?: any) + /** The higher this value, the more the bond to the pinned partner can flex. */ + get softness(): float64 + set softness(value: float64) + + /** If `true`, the pin maximum and minimum rotation, defined by [member angular_limit_lower] and [member angular_limit_upper] are applied. */ + get angular_limit_enabled(): boolean + set angular_limit_enabled(value: boolean) + + /** The minimum rotation. Only active if [member angular_limit_enabled] is `true`. */ + get angular_limit_lower(): float64 + set angular_limit_lower(value: float64) + + /** The maximum rotation. Only active if [member angular_limit_enabled] is `true`. */ + get angular_limit_upper(): float64 + set angular_limit_upper(value: float64) + + /** When activated, a motor turns the pin. */ + get motor_enabled(): boolean + set motor_enabled(value: boolean) + + /** Target speed for the motor. In radians per second. */ + get motor_target_velocity(): float64 + set motor_target_velocity(value: float64) + } + namespace PinJoint3D { + enum Param { + /** The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. */ + PARAM_BIAS = 0, + + /** The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. */ + PARAM_DAMPING = 1, + + /** If above 0, this value is the maximum value for an impulse that this Joint3D produces. */ + PARAM_IMPULSE_CLAMP = 2, + } + } + /** A physics joint that attaches two 3D physics bodies at a single point, allowing them to freely rotate. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pinjoint3d.html + */ + class PinJoint3D extends Joint3D { + constructor(identifier?: any) + /** Sets the value of the specified parameter. */ + set_param(param: PinJoint3D.Param, value: float64): void + + /** Returns the value of the specified parameter. */ + get_param(param: PinJoint3D.Param): float64 + } + /** A [Cubemap] without image data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdercubemap.html + */ + class PlaceholderCubemap extends PlaceholderTextureLayered { + constructor(identifier?: any) + } + /** A [CubemapArray] without image data. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdercubemaparray.html + */ + class PlaceholderCubemapArray extends PlaceholderTextureLayered { + constructor(identifier?: any) + } + /** Placeholder class for a material. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdermaterial.html + */ + class PlaceholderMaterial extends Material { + constructor(identifier?: any) + } + /** Placeholder class for a mesh. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdermesh.html + */ + class PlaceholderMesh extends Mesh { + constructor(identifier?: any) + /** The smallest [AABB] enclosing this mesh in local space. */ + get aabb(): AABB + set aabb(value: AABB) + } + /** Placeholder class for a 2-dimensional texture. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdertexture2d.html + */ + class PlaceholderTexture2D extends Texture2D { + constructor(identifier?: any) + /** The texture's size (in pixels). */ + get size(): Vector2 + set size(value: Vector2) + } + /** Placeholder class for a 2-dimensional texture array. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdertexture2darray.html + */ + class PlaceholderTexture2DArray extends PlaceholderTextureLayered { + constructor(identifier?: any) + } + /** Placeholder class for a 3-dimensional texture. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdertexture3d.html + */ + class PlaceholderTexture3D extends Texture3D { + constructor(identifier?: any) + /** The texture's size (in pixels). */ + get size(): Vector3i + set size(value: Vector3i) + } + /** Placeholder class for a 2-dimensional texture array. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_placeholdertexturelayered.html + */ + class PlaceholderTextureLayered extends TextureLayered { + constructor(identifier?: any) + /** The size of each texture layer (in pixels). */ + get size(): Vector2i + set size(value: Vector2i) + + /** The number of layers in the texture array. */ + get layers(): int64 + set layers(value: int64) + } + namespace PlaneMesh { + enum Orientation { + /** [PlaneMesh] will face the positive X-axis. */ + FACE_X = 0, + + /** [PlaneMesh] will face the positive Y-axis. This matches the behavior of the [PlaneMesh] in Godot 3.x. */ + FACE_Y = 1, + + /** [PlaneMesh] will face the positive Z-axis. This matches the behavior of the QuadMesh in Godot 3.x. */ + FACE_Z = 2, + } + } + /** Class representing a planar [PrimitiveMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_planemesh.html + */ + class PlaneMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** Size of the generated plane. */ + get size(): Vector2 + set size(value: Vector2) + + /** Number of subdivision along the X axis. */ + get subdivide_width(): int64 + set subdivide_width(value: int64) + + /** Number of subdivision along the Z axis. */ + get subdivide_depth(): int64 + set subdivide_depth(value: int64) + + /** Offset of the generated plane. Useful for particles. */ + get center_offset(): Vector3 + set center_offset(value: Vector3) + + /** Direction that the [PlaneMesh] is facing. See [enum Orientation] for options. */ + get orientation(): int64 + set orientation(value: int64) + } + class PluginConfigDialog extends ConfirmationDialog { + constructor(identifier?: any) + readonly plugin_ready: Signal2 + } + /** Positional 2D light source. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pointlight2d.html + */ + class PointLight2D extends Light2D { + constructor(identifier?: any) + /** [Texture2D] used for the light's appearance. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** The offset of the light's [member texture]. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** The [member texture]'s scale factor. */ + get texture_scale(): float64 + set texture_scale(value: float64) + + /** The height of the light. Used with 2D normal mapping. The units are in pixels, e.g. if the height is 100, then it will illuminate an object 100 pixels away at a 45° angle to the plane. */ + get height(): float64 + set height(value: float64) + } + /** Mesh with a single Point primitive. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_pointmesh.html + */ + class PointMesh extends PrimitiveMesh { + constructor(identifier?: any) + } + /** A 2D polygon. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_polygon2d.html + */ + class Polygon2D extends Node2D { + constructor(identifier?: any) + /** Adds a bone with the specified [param path] and [param weights]. */ + add_bone(path: NodePath | string, weights: PackedFloat32Array | float32[]): void + + /** Returns the number of bones in this [Polygon2D]. */ + get_bone_count(): int64 + + /** Returns the path to the node associated with the specified bone. */ + get_bone_path(index: int64): NodePath + + /** Returns the weight values of the specified bone. */ + get_bone_weights(index: int64): PackedFloat32Array + + /** Removes the specified bone from this [Polygon2D]. */ + erase_bone(index: int64): void + + /** Removes all bones from this [Polygon2D]. */ + clear_bones(): void + + /** Sets the path to the node associated with the specified bone. */ + set_bone_path(index: int64, path: NodePath | string): void + + /** Sets the weight values for the specified bone. */ + set_bone_weights(index: int64, weights: PackedFloat32Array | float32[]): void + + /** The polygon's fill color. If [member texture] is set, it will be multiplied by this color. It will also be the default color for vertices not set in [member vertex_colors]. */ + get color(): Color + set color(value: Color) + + /** The offset applied to each vertex. */ + get offset(): Vector2 + set offset(value: Vector2) + + /** If `true`, polygon edges will be anti-aliased. */ + get antialiased(): boolean + set antialiased(value: boolean) + + /** The polygon's fill texture. Use [member uv] to set texture coordinates. */ + get texture(): Texture2D + set texture(value: Texture2D) + + /** Amount to offset the polygon's [member texture]. If set to `Vector2(0, 0)`, the texture's origin (its top-left corner) will be placed at the polygon's position. */ + get texture_offset(): Vector2 + set texture_offset(value: Vector2) + + /** Amount to multiply the [member uv] coordinates when using [member texture]. Larger values make the texture smaller, and vice versa. */ + get texture_scale(): Vector2 + set texture_scale(value: Vector2) + + /** The texture's rotation in radians. */ + get texture_rotation(): float64 + set texture_rotation(value: float64) + + /** Path to a [Skeleton2D] node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used. */ + get skeleton(): NodePath + set skeleton(value: NodePath | string) + + /** If `true`, the polygon will be inverted, containing the area outside the defined points and extending to the [member invert_border]. */ + get invert_enabled(): boolean + set invert_enabled(value: boolean) + + /** Added padding applied to the bounding box when [member invert_enabled] is set to `true`. Setting this value too small may result in a "Bad Polygon" error. */ + get invert_border(): float64 + set invert_border(value: float64) + + /** The polygon's list of vertices. The final point will be connected to the first. */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + + /** Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use `Vector2(0, 0)`. */ + get uv(): PackedVector2Array + set uv(value: PackedVector2Array | Vector2[]) + + /** 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 [member color]. */ + get vertex_colors(): PackedColorArray + set vertex_colors(value: PackedColorArray | Color[]) + + /** The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in. */ + get polygons(): GArray + set polygons(value: GArray) + + /** Internal list of [Bone2D] nodes used by the assigned [member skeleton]. Edited using the Polygon2D editor ("UV" button on the top toolbar). */ + get bones(): GArray + set bones(value: GArray) + + /** Number of internal vertices, used for UV mapping. */ + get internal_vertex_count(): int64 + set internal_vertex_count(value: int64) + } + class Polygon2DEditor extends AbstractPolygon2DEditor { + constructor(identifier?: any) + _update_bone_list(): void + _update_polygon_editing_state(): void + } + class Polygon2DEditorPlugin extends AbstractPolygon2DEditorPlugin { + constructor(identifier?: any) + } + class Polygon3DEditor extends HBoxContainer { + constructor(identifier?: any) + _polygon_draw(): void + } + class Polygon3DEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + /** Flat 2D polygon shape for use with occlusion culling in [OccluderInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_polygonoccluder3d.html + */ + class PolygonOccluder3D extends Occluder3D { + constructor(identifier?: any) + _has_editable_3d_polygon_no_depth(): boolean + + /** The polygon to use for occlusion culling. The polygon can be convex or concave, but it should have as few points as possible to maximize performance. + * The polygon must *not* have intersecting lines. Otherwise, triangulation will fail (with an error message printed). + */ + get polygon(): PackedVector2Array + set polygon(value: PackedVector2Array | Vector2[]) + } + /** @link https://docs.godotengine.org/en/4.3/classes/class_polygonpathfinder.html */ + class PolygonPathFinder extends Resource { + constructor(identifier?: any) + setup(points: PackedVector2Array | Vector2[], connections: PackedInt32Array | int32[]): void + find_path(from: Vector2, to: Vector2): PackedVector2Array + get_intersections(from: Vector2, to: Vector2): PackedVector2Array + get_closest_point(point: Vector2): Vector2 + is_point_inside(point: Vector2): boolean + set_point_penalty(idx: int64, penalty: float64): void + get_point_penalty(idx: int64): float64 + get_bounds(): Rect2 + get data(): GDictionary + set data(value: GDictionary) + } + /** Base class for contextual windows and panels with fixed position. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_popup.html + */ + class Popup extends Window { + constructor(identifier?: any) + /** Emitted when the popup is hidden. */ + readonly popup_hide: Signal0 + } + /** A modal window used to display a list of options. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_popupmenu.html + */ + class PopupMenu extends Popup { + constructor(identifier?: any) + /** Checks the provided [param event] against the [PopupMenu]'s shortcuts and accelerators, and activates the first item with matching events. If [param for_global_only] is `true`, only shortcuts and accelerators with `global` set to `true` will be called. + * Returns `true` if an item was successfully activated. + * + * **Note:** Certain [Control]s, such as [MenuButton], will call this method automatically. + */ + activate_item_by_event(event: InputEvent, for_global_only: boolean = false): boolean + + /** Returns `true` if the system native menu is supported and currently used by this [PopupMenu]. */ + is_native_menu(): boolean + + /** Adds a new item with text [param label]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + * + * **Note:** The provided [param id] is used only in [signal id_pressed] and [signal id_focused] signals. It's not related to the `index` arguments in e.g. [method set_item_checked]. + */ + add_item(label: string, id: int64 = -1, accel: Key = 0): void + + /** Adds a new item with text [param label] and icon [param texture]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + */ + add_icon_item(texture: Texture2D, label: string, id: int64 = -1, accel: Key = 0): void + + /** Adds a new checkable item with text [param label]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_check_item(label: string, id: int64 = -1, accel: Key = 0): void + + /** Adds a new checkable item with text [param label] and icon [param texture]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_icon_check_item(texture: Texture2D, label: string, id: int64 = -1, accel: Key = 0): void + + /** Adds a new radio check button with text [param label]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_radio_check_item(label: string, id: int64 = -1, accel: Key = 0): void + + /** Same as [method add_icon_check_item], but uses a radio check button. */ + add_icon_radio_check_item(texture: Texture2D, label: string, id: int64 = -1, accel: Key = 0): void + + /** Adds a new multistate item with text [param label]. + * Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. The default value is defined by [param default_state]. + * An [param id] can optionally be provided, as well as an accelerator ([param accel]). If no [param id] is provided, one will be created from the index. If no [param accel] is provided, then the default value of 0 (corresponding to [constant @GlobalScope.KEY_NONE]) will be assigned to the item (which means it won't have any accelerator). See [method get_item_accelerator] for more info on accelerators. + * + * **Note:** Multistate items don't update their state automatically and must be done manually. See [method toggle_item_multistate], [method set_item_multistate] and [method get_item_multistate] for more info on how to control it. + * Example usage: + * + */ + add_multistate_item(label: string, max_states: int64, default_state: int64 = 0, id: int64 = -1, accel: Key = 0): void + + /** Adds a [Shortcut]. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + * If [param allow_echo] is `true`, the shortcut can be activated with echo events. + */ + add_shortcut(shortcut: Shortcut, id: int64 = -1, global: boolean = false, allow_echo: boolean = false): void + + /** Adds a new item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + * If [param allow_echo] is `true`, the shortcut can be activated with echo events. + */ + add_icon_shortcut(texture: Texture2D, shortcut: Shortcut, id: int64 = -1, global: boolean = false, allow_echo: boolean = false): void + + /** Adds a new checkable item and assigns the specified [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_check_shortcut(shortcut: Shortcut, id: int64 = -1, global: boolean = false): void + + /** Adds a new checkable item and assigns the specified [Shortcut] and icon [param texture] to it. Sets the label of the checkbox to the [Shortcut]'s name. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_icon_check_shortcut(texture: Texture2D, shortcut: Shortcut, id: int64 = -1, global: boolean = false): void + + /** Adds a new radio check button and assigns a [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. + */ + add_radio_check_shortcut(shortcut: Shortcut, id: int64 = -1, global: boolean = false): void + + /** Same as [method add_icon_check_shortcut], but uses a radio check button. */ + add_icon_radio_check_shortcut(texture: Texture2D, shortcut: Shortcut, id: int64 = -1, global: boolean = false): void + + /** Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [param submenu] argument must be the name of an existing [PopupMenu] that has been added as a child to this node. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the `ui_select` or `ui_right` input actions. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + */ + add_submenu_item(label: string, submenu: string, id: int64 = -1): void + + /** Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. This submenu will be shown when the item is clicked, hovered for long enough, or activated using the `ui_select` or `ui_right` input actions. + * [param submenu] must be either child of this [PopupMenu] or has no parent node (in which case it will be automatically added as a child). If the [param submenu] popup has another parent, this method will fail. + * An [param id] can optionally be provided. If no [param id] is provided, one will be created from the index. + */ + add_submenu_node_item(label: string, submenu: PopupMenu, id: int64 = -1): void + + /** Sets the text of the item at the given [param index]. */ + set_item_text(index: int64, text: string): void + + /** Sets item's text base writing direction. */ + set_item_text_direction(index: int64, direction: Control.TextDirection): void + + /** Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + set_item_language(index: int64, language: string): void + + /** Replaces the [Texture2D] icon of the item at the given [param index]. */ + set_item_icon(index: int64, icon: Texture2D): void + + /** Sets the maximum allowed width of the icon for the item at the given [param index]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio. */ + set_item_icon_max_width(index: int64, width: int64): void + + /** Sets a modulating [Color] of the item's icon at the given [param index]. */ + set_item_icon_modulate(index: int64, modulate: Color): void + + /** Sets the checkstate status of the item at the given [param index]. */ + set_item_checked(index: int64, checked: boolean): void + + /** Sets the [param id] of the item at the given [param index]. + * The [param id] is used in [signal id_pressed] and [signal id_focused] signals. + */ + set_item_id(index: int64, id: int64): void + + /** Sets the accelerator of the item at the given [param index]. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. [param accel] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). */ + set_item_accelerator(index: int64, accel: Key): void + + /** Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. */ + set_item_metadata(index: int64, metadata: any): void + + /** Enables/disables the item at the given [param index]. When it is disabled, it can't be selected and its action can't be invoked. */ + set_item_disabled(index: int64, disabled: boolean): void + + /** Sets the submenu of the item at the given [param index]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. */ + set_item_submenu(index: int64, submenu: string): void + + /** Sets the submenu of the item at the given [param index]. The submenu is a [PopupMenu] node that would be shown when the item is clicked. It must either be a child of this [PopupMenu] or has no parent (in which case it will be automatically added as a child). If the [param submenu] popup has another parent, this method will fail. */ + set_item_submenu_node(index: int64, submenu: PopupMenu): void + + /** Mark the item at the given [param index] as a separator, which means that it would be displayed as a line. If `false`, sets the type of the item to plain text. */ + set_item_as_separator(index: int64, enable: boolean): void + + /** Sets whether the item at the given [param index] has a checkbox. If `false`, sets the type of the item to plain text. + * + * **Note:** Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + */ + set_item_as_checkable(index: int64, enable: boolean): void + + /** Sets the type of the item at the given [param index] to radio button. If `false`, sets the type of the item to plain text. */ + set_item_as_radio_checkable(index: int64, enable: boolean): void + + /** Sets the [String] tooltip of the item at the given [param index]. */ + set_item_tooltip(index: int64, tooltip: string): void + + /** Sets a [Shortcut] for the item at the given [param index]. */ + set_item_shortcut(index: int64, shortcut: Shortcut, global: boolean = false): void + + /** Sets the horizontal offset of the item at the given [param index]. */ + set_item_indent(index: int64, indent: int64): void + + /** Sets the state of a multistate item. See [method add_multistate_item] for details. */ + set_item_multistate(index: int64, state: int64): void + + /** Sets the max states of a multistate item. See [method add_multistate_item] for details. */ + set_item_multistate_max(index: int64, max_states: int64): void + + /** Disables the [Shortcut] of the item at the given [param index]. */ + set_item_shortcut_disabled(index: int64, disabled: boolean): void + + /** Toggles the check state of the item at the given [param index]. */ + toggle_item_checked(index: int64): void + + /** Cycle to the next state of a multistate item. See [method add_multistate_item] for details. */ + toggle_item_multistate(index: int64): void + + /** Returns the text of the item at the given [param index]. */ + get_item_text(index: int64): string + + /** Returns item's text base writing direction. */ + get_item_text_direction(index: int64): Control.TextDirection + + /** Returns item's text language code. */ + get_item_language(index: int64): string + + /** Returns the icon of the item at the given [param index]. */ + get_item_icon(index: int64): Texture2D + + /** Returns the maximum allowed width of the icon for the item at the given [param index]. */ + get_item_icon_max_width(index: int64): int64 + + /** Returns a [Color] modulating the item's icon at the given [param index]. */ + get_item_icon_modulate(index: int64): Color + + /** Returns `true` if the item at the given [param index] is checked. */ + is_item_checked(index: int64): boolean + + /** Returns the ID of the item at the given [param index]. `id` can be manually assigned, while index can not. */ + get_item_id(index: int64): int64 + + /** Returns the index of the item containing the specified [param id]. Index is automatically assigned to each item by the engine and can not be set manually. */ + get_item_index(id: int64): int64 + + /** Returns the accelerator of the item at the given [param index]. An accelerator is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The return value is an integer which is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as `KEY_MASK_CTRL | KEY_A` ([kbd]Ctrl + A[/kbd]). If no accelerator is defined for the specified [param index], [method get_item_accelerator] returns `0` (corresponding to [constant @GlobalScope.KEY_NONE]). */ + get_item_accelerator(index: int64): Key + + /** Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. */ + get_item_metadata(index: int64): any + + /** Returns `true` if the item at the given [param index] is disabled. When it is disabled it can't be selected, or its action invoked. + * See [method set_item_disabled] for more info on how to disable an item. + */ + is_item_disabled(index: int64): boolean + + /** Returns the submenu name of the item at the given [param index]. See [method add_submenu_item] for more info on how to add a submenu. */ + get_item_submenu(index: int64): string + + /** Returns the submenu of the item at the given [param index], or `null` if no submenu was added. See [method add_submenu_node_item] for more info on how to add a submenu. */ + get_item_submenu_node(index: int64): PopupMenu + + /** Returns `true` if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator. */ + is_item_separator(index: int64): boolean + + /** Returns `true` if the item at the given [param index] is checkable in some way, i.e. if it has a checkbox or radio button. + * + * **Note:** Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. + */ + is_item_checkable(index: int64): boolean + + /** Returns `true` if the item at the given [param index] has radio button-style checkability. + * + * **Note:** This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. + */ + is_item_radio_checkable(index: int64): boolean + + /** Returns `true` if the specified item's shortcut is disabled. */ + is_item_shortcut_disabled(index: int64): boolean + + /** Returns the tooltip associated with the item at the given [param index]. */ + get_item_tooltip(index: int64): string + + /** Returns the [Shortcut] associated with the item at the given [param index]. */ + get_item_shortcut(index: int64): Shortcut + + /** Returns the horizontal offset of the item at the given [param index]. */ + get_item_indent(index: int64): int64 + + /** Returns the max states of the item at the given [param index]. */ + get_item_multistate_max(index: int64): int64 + + /** Returns the state of the item at the given [param index]. */ + get_item_multistate(index: int64): int64 + + /** Sets the currently focused item as the given [param index]. + * Passing `-1` as the index makes so that no item is focused. + */ + set_focused_item(index: int64): void + + /** Returns the index of the currently focused item. Returns `-1` if no item is focused. */ + get_focused_item(): int64 + + /** Moves the scroll view to make the item at the given [param index] visible. */ + scroll_to_item(index: int64): void + + /** Removes the item at the given [param index] from the menu. + * + * **Note:** The indices of items after the removed item will be shifted by one. + */ + remove_item(index: int64): void + + /** Adds a separator between items. Separators also occupy an index, which you can set by using the [param id] parameter. + * A [param label] can optionally be provided, which will appear at the center of the separator. + */ + add_separator(label: string = '', id: int64 = -1): void + + /** Removes all items from the [PopupMenu]. If [param free_submenus] is `true`, the submenu nodes are automatically freed. */ + clear(free_submenus: boolean = false): void + + /** Returns `true` if the menu is bound to the special system menu. */ + is_system_menu(): boolean + + /** If `true`, hides the [PopupMenu] when an item is selected. */ + get hide_on_item_selection(): boolean + set hide_on_item_selection(value: boolean) + + /** If `true`, hides the [PopupMenu] when a checkbox or radio button is selected. */ + get hide_on_checkable_item_selection(): boolean + set hide_on_checkable_item_selection(value: boolean) + + /** If `true`, hides the [PopupMenu] when a state item is selected. */ + get hide_on_state_item_selection(): boolean + set hide_on_state_item_selection(value: boolean) + + /** Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. */ + get submenu_popup_delay(): float64 + set submenu_popup_delay(value: float64) + + /** If `true`, allows navigating [PopupMenu] with letter keys. */ + get allow_search(): boolean + set allow_search(value: boolean) + + /** If set to one of the values of [enum NativeMenu.SystemMenus], this [PopupMenu] is bound to the special system menu. Only one [PopupMenu] can be bound to each special menu at a time. */ + get system_menu_id(): int64 + set system_menu_id(value: int64) + + /** If `true`, [MenuBar] will use native menu when supported. + * + * **Note:** If [PopupMenu] is linked to [StatusIndicator], [MenuBar], or another [PopupMenu] item it can use native menu regardless of this property, use [method is_native_menu] to check it. + */ + get prefer_native_menu(): boolean + set prefer_native_menu(value: boolean) + + /** The number of items currently in the list. */ + get item_count(): any /*Items,item_*/ + set item_count(value: any /*Items,item_*/) + + /** Emitted when an item of some [param id] is pressed or its accelerator is activated. + * + * **Note:** If [param id] is negative (either explicitly or due to overflow), this will return the corresponding index instead. + */ + readonly id_pressed: Signal1 + + /** Emitted when the user navigated to an item of some [param id] using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input action. */ + readonly id_focused: Signal1 + + /** Emitted when an item of some [param index] is pressed or its accelerator is activated. */ + readonly index_pressed: Signal1 + + /** Emitted when any item is added, modified or removed. */ + readonly menu_changed: Signal0 + } + /** A popup with a panel background. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_popuppanel.html + */ + class PopupPanel extends Popup { + constructor(identifier?: any) + } + namespace PortableCompressedTexture2D { + enum CompressionMode { + COMPRESSION_MODE_LOSSLESS = 0, + COMPRESSION_MODE_LOSSY = 1, + COMPRESSION_MODE_BASIS_UNIVERSAL = 2, + COMPRESSION_MODE_S3TC = 3, + COMPRESSION_MODE_ETC2 = 4, + COMPRESSION_MODE_BPTC = 5, + } + } + /** Provides a compressed texture for disk and/or VRAM in a way that is portable. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_portablecompressedtexture2d.html + */ + class PortableCompressedTexture2D extends Texture2D { + constructor(identifier?: any) + /** Initializes the compressed texture from a base image. The compression mode must be provided. + * [param normal_map] is recommended to ensure optimum quality if this image will be used as a normal map. + * If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. + */ + create_from_image(image: Image, compression_mode: PortableCompressedTexture2D.CompressionMode, normal_map: boolean = false, lossy_quality: float64 = 0.8): void + + /** Return the image format used (valid after initialized). */ + get_format(): Image.Format + + /** Return the compression mode used (valid after initialized). */ + get_compression_mode(): PortableCompressedTexture2D.CompressionMode + + /** Overrides the flag globally for all textures of this type. This is used primarily by the editor. */ + static set_keep_all_compressed_buffers(keep: boolean): void + + /** Return whether the flag is overridden for all textures of this type. */ + static is_keeping_all_compressed_buffers(): boolean + get _data(): PackedByteArray + set _data(value: PackedByteArray | byte[] | ArrayBuffer) + + /** Allow overriding the texture size (for 2D only). */ + get size_override(): Vector2 + set size_override(value: Vector2) + + /** When running on the editor, this class will keep the source compressed data in memory. Otherwise, the source compressed data is lost after loading and the resource can't be re saved. + * This flag allows to keep the compressed data in memory if you intend it to persist after loading. + */ + get keep_compressed_buffer(): boolean + set keep_compressed_buffer(value: boolean) + } + class PostImportPluginSkeletonRenamer extends EditorScenePostImportPlugin { + constructor(identifier?: any) + } + class PostImportPluginSkeletonRestFixer extends EditorScenePostImportPlugin { + constructor(identifier?: any) + } + class PostImportPluginSkeletonTrackOrganizer extends EditorScenePostImportPlugin { + constructor(identifier?: any) + } + /** Base class for all primitive meshes. Handles applying a [Material] to a primitive mesh. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_primitivemesh.html + */ + class PrimitiveMesh extends Mesh { + constructor(identifier?: any) + /** Override this method to customize how this primitive mesh should be generated. Should return an [Array] where each element is another Array of values required for the mesh (see the [enum Mesh.ArrayType] constants). */ + /* gdvirtual */ _create_mesh_array(): GArray + + /** Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example: + * + */ + get_mesh_arrays(): GArray + + /** Request an update of this primitive mesh based on its properties. */ + request_update(): void + + /** The current [Material] of the primitive mesh. */ + get material(): BaseMaterial3D | ShaderMaterial + set material(value: BaseMaterial3D | ShaderMaterial) + + /** Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. */ + get custom_aabb(): AABB + set custom_aabb(value: AABB) + + /** If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + * This gives the same result as using [constant BaseMaterial3D.CULL_FRONT] in [member BaseMaterial3D.cull_mode]. + */ + get flip_faces(): boolean + set flip_faces(value: boolean) + + /** If set, generates UV2 UV coordinates applying a padding using the [member uv2_padding] setting. UV2 is needed for lightmapping. */ + get add_uv2(): boolean + set add_uv2(value: boolean) + + /** If [member add_uv2] is set, specifies the padding in pixels applied along seams of the mesh. Lower padding values allow making better use of the lightmap texture (resulting in higher texel density), but may introduce visible lightmap bleeding along edges. + * If the size of the lightmap texture can't be determined when generating the mesh, UV2 is calculated assuming a texture size of 1024x1024. + */ + get uv2_padding(): float64 + set uv2_padding(value: float64) + } + /** Class representing a prism-shaped [PrimitiveMesh]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_prismmesh.html + */ + class PrismMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. */ + get left_to_right(): float64 + set left_to_right(value: float64) + + /** Size of the prism. */ + get size(): Vector3 + set size(value: Vector3) + + /** Number of added edge loops along the X axis. */ + get subdivide_width(): int64 + set subdivide_width(value: int64) + + /** Number of added edge loops along the Y axis. */ + get subdivide_height(): int64 + set subdivide_height(value: int64) + + /** Number of added edge loops along the Z axis. */ + get subdivide_depth(): int64 + set subdivide_depth(value: int64) + } + /** A material that defines a simple sky for a [Sky] resource. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_proceduralskymaterial.html + */ + class ProceduralSkyMaterial extends Material { + constructor(identifier?: any) + /** Color of the sky at the top. Blends with [member sky_horizon_color]. */ + get sky_top_color(): Color + set sky_top_color(value: Color) + + /** Color of the sky at the horizon. Blends with [member sky_top_color]. */ + get sky_horizon_color(): Color + set sky_horizon_color(value: Color) + + /** How quickly the [member sky_horizon_color] fades into the [member sky_top_color]. */ + get sky_curve(): float64 + set sky_curve(value: float64) + + /** Multiplier for sky color. A higher value will make the sky brighter. */ + get sky_energy_multiplier(): float64 + set sky_energy_multiplier(value: float64) + + /** The sky cover texture to use. This texture must use an equirectangular projection (similar to [PanoramaSkyMaterial]). The texture's colors will be *added* to the existing sky color, and will be multiplied by [member sky_energy_multiplier] and [member sky_cover_modulate]. This is mainly suited to displaying stars at night, but it can also be used to display clouds at day or night (with a non-physically-accurate look). */ + get sky_cover(): Texture2D + set sky_cover(value: Texture2D) + + /** The tint to apply to the [member sky_cover] texture. This can be used to change the sky cover's colors or opacity independently of the sky energy, which is useful for day/night or weather transitions. Only effective if a texture is defined in [member sky_cover]. */ + get sky_cover_modulate(): Color + set sky_cover_modulate(value: Color) + + /** Color of the ground at the bottom. Blends with [member ground_horizon_color]. */ + get ground_bottom_color(): Color + set ground_bottom_color(value: Color) + + /** Color of the ground at the horizon. Blends with [member ground_bottom_color]. */ + get ground_horizon_color(): Color + set ground_horizon_color(value: Color) + + /** How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color]. */ + get ground_curve(): float64 + set ground_curve(value: float64) + + /** Multiplier for ground color. A higher value will make the ground brighter. */ + get ground_energy_multiplier(): float64 + set ground_energy_multiplier(value: float64) + + /** Distance from center of sun where it fades out completely. */ + get sun_angle_max(): float64 + set sun_angle_max(value: float64) + + /** How quickly the sun fades away between the edge of the sun disk and [member sun_angle_max]. */ + get sun_curve(): float64 + set sun_curve(value: float64) + + /** If `true`, enables debanding. Debanding adds a small amount of noise which helps reduce banding that appears from the smooth changes in color in the sky. */ + get use_debanding(): boolean + set use_debanding(value: boolean) + + /** The sky's overall brightness multiplier. Higher values result in a brighter sky. */ + get energy_multiplier(): float64 + set energy_multiplier(value: float64) + } + class ProceduralSkyMaterialConversionPlugin extends EditorResourceConversionPlugin { + constructor(identifier?: any) + } + namespace ProgressBar { + enum FillMode { + /** The progress bar fills from begin to end horizontally, according to the language direction. If [method Control.is_layout_rtl] returns `false`, it fills from left to right, and if it returns `true`, it fills from right to left. */ + FILL_BEGIN_TO_END = 0, + + /** The progress bar fills from end to begin horizontally, according to the language direction. If [method Control.is_layout_rtl] returns `false`, it fills from right to left, and if it returns `true`, it fills from left to right. */ + FILL_END_TO_BEGIN = 1, + + /** The progress fills from top to bottom. */ + FILL_TOP_TO_BOTTOM = 2, + + /** The progress fills from bottom to top. */ + FILL_BOTTOM_TO_TOP = 3, + } + } + /** A control used for visual representation of a percentage. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_progressbar.html + */ + class ProgressBar extends Range { + constructor(identifier?: any) + /** The fill direction. See [enum FillMode] for possible values. */ + get fill_mode(): int64 + set fill_mode(value: int64) + + /** If `true`, the fill percentage is displayed on the bar. */ + get show_percentage(): boolean + set show_percentage(value: boolean) + + /** When set to `true`, the progress bar indicates that something is happening with an animation, but does not show the fill percentage or value. */ + get indeterminate(): boolean + set indeterminate(value: boolean) + + /** If `false`, the [member indeterminate] animation will be paused in the editor. */ + get editor_preview_indeterminate(): boolean + set editor_preview_indeterminate(value: boolean) + } + class ProgressDialog extends PopupPanel { + constructor(identifier?: any) + } + class ProjectExportDialog extends ConfirmationDialog { + constructor(identifier?: any) + get_current_preset(): any /*EditorExportPreset*/ + get export_path(): string + set export_path(value: string) + } + class ProjectExportTextureFormatError extends HBoxContainer { + constructor(identifier?: any) + readonly texture_format_enabled: Signal0 + } + class ProjectSettingsEditor extends AcceptDialog { + constructor(identifier?: any) + queue_save(): void + _update_action_map_editor(): void + } + class PropertySelector extends ConfirmationDialog { + constructor(identifier?: any) + readonly selected: Signal1 + } + /** Interpolates an [Object]'s property over time. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_propertytweener.html + */ + class PropertyTweener extends Tweener { + constructor(identifier?: any) + /** Sets a custom initial value to the [PropertyTweener]. + * **Example:** + * + */ + from(value: any): PropertyTweener + + /** Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same: + * + */ + from_current(): PropertyTweener + + /** When called, the final value will be used as a relative value instead. + * **Example:** + * + */ + as_relative(): PropertyTweener + + /** Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. */ + set_trans(trans: Tween.TransitionType): PropertyTweener + + /** Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. */ + set_ease(ease: Tween.EaseType): PropertyTweener + + /** Allows interpolating the value with a custom easing function. The provided [param interpolator_method] will be called with a value ranging from `0.0` to `1.0` and is expected to return a value within the same range (values outside the range can be used for overshoot). The return value of the method is then used for interpolation between initial and final value. Note that the parameter passed to the method is still subject to the tweener's own easing. + * **Example:** + * + */ + set_custom_interpolator(interpolator_method: Callable): PropertyTweener + + /** Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay. */ + set_delay(delay: float64): PropertyTweener + } + /** Class representing a square mesh facing the camera. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_quadmesh.html + */ + class QuadMesh extends PlaneMesh { + constructor(identifier?: any) + } + /** Flat plane shape for use with occlusion culling in [OccluderInstance3D]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_quadoccluder3d.html + */ + class QuadOccluder3D extends Occluder3D { + constructor(identifier?: any) + /** The quad's size in 3D units. */ + get size(): Vector2 + set size(value: Vector2) + } + /** Attachment format (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdattachmentformat.html + */ + class RDAttachmentFormat extends RefCounted { + constructor(identifier?: any) + /** The attachment's data format. */ + get format(): int64 + set format(value: int64) + + /** The number of samples used when sampling the attachment. */ + get samples(): int64 + set samples(value: int64) + + /** The attachment's usage flags, which determine what can be done with it. */ + get usage_flags(): int64 + set usage_flags(value: int64) + } + /** Framebuffer pass attachment description (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdframebufferpass.html + */ + class RDFramebufferPass extends RefCounted { + /** Attachment is unused. */ + static readonly ATTACHMENT_UNUSED = -1 + constructor(identifier?: any) + + /** Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip. */ + get color_attachments(): PackedInt32Array + set color_attachments(value: PackedInt32Array | int32[]) + + /** Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the [RDUniform] for the uniform set. */ + get input_attachments(): PackedInt32Array + set input_attachments(value: PackedInt32Array | int32[]) + + /** If the color attachments are multisampled, non-multisampled resolve attachments can be provided. */ + get resolve_attachments(): PackedInt32Array + set resolve_attachments(value: PackedInt32Array | int32[]) + + /** Attachments to preserve in this pass (otherwise they are erased). */ + get preserve_attachments(): PackedInt32Array + set preserve_attachments(value: PackedInt32Array | int32[]) + + /** Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass. */ + get depth_attachment(): int64 + set depth_attachment(value: int64) + } + /** Pipeline color blend state (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinecolorblendstate.html + */ + class RDPipelineColorBlendState extends RefCounted { + constructor(identifier?: any) + /** If `true`, performs the logic operation defined in [member logic_op]. */ + get enable_logic_op(): boolean + set enable_logic_op(value: boolean) + + /** The logic operation to perform for blending. Only effective if [member enable_logic_op] is `true`. */ + get logic_op(): int64 + set logic_op(value: int64) + + /** The constant color to blend with. See also [method RenderingDevice.draw_list_set_blend_constants]. */ + get blend_constant(): Color + set blend_constant(value: Color) + + /** The attachments that are blended together. */ + get attachments(): GArray + set attachments(value: GArray) + } + /** Pipeline color blend state attachment (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinecolorblendstateattachment.html + */ + class RDPipelineColorBlendStateAttachment extends RefCounted { + constructor(identifier?: any) + /** Convenience method to perform standard mix blending with straight (non-premultiplied) alpha. This sets [member enable_blend] to `true`, [member src_color_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_SRC_ALPHA], [member dst_color_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA], [member src_alpha_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_SRC_ALPHA] and [member dst_alpha_blend_factor] to [constant RenderingDevice.BLEND_FACTOR_ONE_MINUS_SRC_ALPHA]. */ + set_as_mix(): void + + /** If `true`, performs blending between the source and destination according to the factors defined in [member src_color_blend_factor], [member dst_color_blend_factor], [member src_alpha_blend_factor] and [member dst_alpha_blend_factor]. The blend modes [member color_blend_op] and [member alpha_blend_op] are also taken into account, with [member write_r], [member write_g], [member write_b] and [member write_a] controlling the output. */ + get enable_blend(): boolean + set enable_blend(value: boolean) + + /** Controls how the blend factor for the color channels is determined based on the source's fragments. */ + get src_color_blend_factor(): int64 + set src_color_blend_factor(value: int64) + + /** Controls how the blend factor for the color channels is determined based on the destination's fragments. */ + get dst_color_blend_factor(): int64 + set dst_color_blend_factor(value: int64) + + /** The blend mode to use for the red/green/blue color channels. */ + get color_blend_op(): int64 + set color_blend_op(value: int64) + + /** Controls how the blend factor for the alpha channel is determined based on the source's fragments. */ + get src_alpha_blend_factor(): int64 + set src_alpha_blend_factor(value: int64) + + /** Controls how the blend factor for the alpha channel is determined based on the destination's fragments. */ + get dst_alpha_blend_factor(): int64 + set dst_alpha_blend_factor(value: int64) + + /** The blend mode to use for the alpha channel. */ + get alpha_blend_op(): int64 + set alpha_blend_op(value: int64) + + /** If `true`, writes the new red color channel to the final result. */ + get write_r(): boolean + set write_r(value: boolean) + + /** If `true`, writes the new green color channel to the final result. */ + get write_g(): boolean + set write_g(value: boolean) + + /** If `true`, writes the new blue color channel to the final result. */ + get write_b(): boolean + set write_b(value: boolean) + + /** If `true`, writes the new alpha channel to the final result. */ + get write_a(): boolean + set write_a(value: boolean) + } + /** Pipeline depth/stencil state (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinedepthstencilstate.html + */ + class RDPipelineDepthStencilState extends RefCounted { + constructor(identifier?: any) + /** If `true`, enables depth testing which allows objects to be automatically occluded by other objects based on their depth. This also allows objects to be partially occluded by other objects. If `false`, objects will appear in the order they were drawn (like in Godot's 2D renderer). */ + get enable_depth_test(): boolean + set enable_depth_test(value: boolean) + + /** If `true`, writes to the depth buffer whenever the depth test returns true. Only works when enable_depth_test is also true. */ + get enable_depth_write(): boolean + set enable_depth_write(value: boolean) + + /** The method used for comparing the previous and current depth values. */ + get depth_compare_operator(): int64 + set depth_compare_operator(value: int64) + + /** If `true`, each depth value will be tested to see if it is between [member depth_range_min] and [member depth_range_max]. If it is outside of these values, it is discarded. */ + get enable_depth_range(): boolean + set enable_depth_range(value: boolean) + + /** The minimum depth that returns true for [member enable_depth_range]. */ + get depth_range_min(): float64 + set depth_range_min(value: float64) + + /** The maximum depth that returns true for [member enable_depth_range]. */ + get depth_range_max(): float64 + set depth_range_max(value: float64) + + /** If `true`, enables stencil testing. There are separate stencil buffers for front-facing triangles and back-facing triangles. See properties that begin with "front_op" and properties with "back_op" for each. */ + get enable_stencil(): boolean + set enable_stencil(value: boolean) + + /** The operation to perform on the stencil buffer for front pixels that fail the stencil test. */ + get front_op_fail(): int64 + set front_op_fail(value: int64) + + /** The operation to perform on the stencil buffer for front pixels that pass the stencil test. */ + get front_op_pass(): int64 + set front_op_pass(value: int64) + + /** The operation to perform on the stencil buffer for front pixels that pass the stencil test but fail the depth test. */ + get front_op_depth_fail(): int64 + set front_op_depth_fail(value: int64) + + /** The method used for comparing the previous front stencil value and [member front_op_reference]. */ + get front_op_compare(): int64 + set front_op_compare(value: int64) + + /** Selects which bits from the front stencil value will be compared. */ + get front_op_compare_mask(): int64 + set front_op_compare_mask(value: int64) + + /** Selects which bits from the front stencil value will be changed. */ + get front_op_write_mask(): int64 + set front_op_write_mask(value: int64) + + /** The value the previous front stencil value will be compared to. */ + get front_op_reference(): int64 + set front_op_reference(value: int64) + + /** The operation to perform on the stencil buffer for back pixels that fail the stencil test */ + get back_op_fail(): int64 + set back_op_fail(value: int64) + + /** The operation to perform on the stencil buffer for back pixels that pass the stencil test. */ + get back_op_pass(): int64 + set back_op_pass(value: int64) + + /** The operation to perform on the stencil buffer for back pixels that pass the stencil test but fail the depth test. */ + get back_op_depth_fail(): int64 + set back_op_depth_fail(value: int64) + + /** The method used for comparing the previous back stencil value and [member back_op_reference]. */ + get back_op_compare(): int64 + set back_op_compare(value: int64) + + /** Selects which bits from the back stencil value will be compared. */ + get back_op_compare_mask(): int64 + set back_op_compare_mask(value: int64) + + /** Selects which bits from the back stencil value will be changed. */ + get back_op_write_mask(): int64 + set back_op_write_mask(value: int64) + + /** The value the previous back stencil value will be compared to. */ + get back_op_reference(): int64 + set back_op_reference(value: int64) + } + /** Pipeline multisample state (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinemultisamplestate.html + */ + class RDPipelineMultisampleState extends RefCounted { + constructor(identifier?: any) + /** The number of MSAA samples (or SSAA samples if [member enable_sample_shading] is `true`) to perform. Higher values result in better antialiasing, at the cost of performance. */ + get sample_count(): int64 + set sample_count(value: int64) + + /** If `true`, enables per-sample shading which replaces MSAA by SSAA. This provides higher quality antialiasing that works with transparent (alpha scissor) edges. This has a very high performance cost. See also [member min_sample_shading]. See the [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#primsrast-sampleshading]per-sample shading Vulkan documentation[/url] for more details. */ + get enable_sample_shading(): boolean + set enable_sample_shading(value: boolean) + + /** The multiplier of [member sample_count] that determines how many samples are performed for each fragment. Must be between `0.0` and `1.0` (inclusive). Only effective if [member enable_sample_shading] is `true`. If [member min_sample_shading] is `1.0`, fragment invocation must only read from the coverage index sample. Tile image access must not be used if [member enable_sample_shading] is *not* `1.0`. */ + get min_sample_shading(): float64 + set min_sample_shading(value: float64) + + /** If `true`, alpha to coverage is enabled. This generates a temporary coverage value based on the alpha component of the fragment's first color output. This allows alpha transparency to make use of multisample antialiasing. */ + get enable_alpha_to_coverage(): boolean + set enable_alpha_to_coverage(value: boolean) + + /** If `true`, alpha is forced to either `0.0` or `1.0`. This allows hardening the edges of antialiased alpha transparencies. Only relevant if [member enable_alpha_to_coverage] is `true`. */ + get enable_alpha_to_one(): boolean + set enable_alpha_to_one(value: boolean) + + /** The sample mask array. See the [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-samplemask]sample mask Vulkan documentation[/url] for more details. */ + get sample_masks(): GArray + set sample_masks(value: GArray) + } + /** Pipeline rasterization state (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinerasterizationstate.html + */ + class RDPipelineRasterizationState extends RefCounted { + constructor(identifier?: any) + /** If `true`, clamps depth values according to the minimum and maximum depth of the associated viewport. */ + get enable_depth_clamp(): boolean + set enable_depth_clamp(value: boolean) + + /** If `true`, primitives are discarded immediately before the rasterization stage. */ + get discard_primitives(): boolean + set discard_primitives(value: boolean) + + /** If `true`, performs wireframe rendering for triangles instead of flat or textured rendering. */ + get wireframe(): boolean + set wireframe(value: boolean) + + /** The cull mode to use when drawing polygons, which determines whether front faces or backfaces are hidden. */ + get cull_mode(): int64 + set cull_mode(value: int64) + + /** The winding order to use to determine which face of a triangle is considered its front face. */ + get front_face(): int64 + set front_face(value: int64) + + /** If `true`, each generated depth value will by offset by some amount. The specific amount is generated per polygon based on the values of [member depth_bias_slope_factor] and [member depth_bias_constant_factor]. */ + get depth_bias_enabled(): boolean + set depth_bias_enabled(value: boolean) + + /** A constant offset added to each depth value. Applied after [member depth_bias_slope_factor]. */ + get depth_bias_constant_factor(): float64 + set depth_bias_constant_factor(value: float64) + + /** A limit for how much each depth value can be offset. If negative, it serves as a minimum value, but if positive, it serves as a maximum value. */ + get depth_bias_clamp(): float64 + set depth_bias_clamp(value: float64) + + /** A constant scale applied to the slope of each polygons' depth. Applied before [member depth_bias_constant_factor]. */ + get depth_bias_slope_factor(): float64 + set depth_bias_slope_factor(value: float64) + + /** The line width to use when drawing lines (in pixels). Thick lines may not be supported on all hardware. */ + get line_width(): float64 + set line_width(value: float64) + + /** The number of control points to use when drawing a patch with tessellation enabled. Higher values result in higher quality at the cost of performance. */ + get patch_control_points(): int64 + set patch_control_points(value: int64) + } + /** Pipeline specialization constant (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdpipelinespecializationconstant.html + */ + class RDPipelineSpecializationConstant extends RefCounted { + constructor(identifier?: any) + /** The specialization constant's value. Only [bool], [int] and [float] types are valid for specialization constants. */ + get value(): any + set value(value: any) + + /** The identifier of the specialization constant. This is a value starting from `0` and that increments for every different specialization constant for a given shader. */ + get constant_id(): int64 + set constant_id(value: int64) + } + /** Sampler state (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdsamplerstate.html + */ + class RDSamplerState extends RefCounted { + constructor(identifier?: any) + /** The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels. */ + get mag_filter(): int64 + set mag_filter(value: int64) + + /** The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels. */ + get min_filter(): int64 + set min_filter(value: int64) + + /** The filtering method to use for mipmaps. */ + get mip_filter(): int64 + set mip_filter(value: int64) + + /** The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. */ + get repeat_u(): int64 + set repeat_u(value: int64) + + /** The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. */ + get repeat_v(): int64 + set repeat_v(value: int64) + + /** The repeat mode to use along the W axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. Only effective for 3D samplers. */ + get repeat_w(): int64 + set repeat_w(value: int64) + + /** The mipmap LOD bias to use. Positive values will make the sampler blurrier at a given distance, while negative values will make the sampler sharper at a given distance (at the risk of looking grainy). Recommended values are between `-0.5` and `0.0`. Only effective if the sampler has mipmaps available. */ + get lod_bias(): float64 + set lod_bias(value: float64) + + /** If `true`, perform anisotropic sampling. See [member anisotropy_max]. */ + get use_anisotropy(): boolean + set use_anisotropy(value: boolean) + + /** Maximum anisotropy that can be used when sampling. Only effective if [member use_anisotropy] is `true`. Higher values result in a sharper sampler at oblique angles, at the cost of performance (due to memory bandwidth). This value may be limited by the graphics hardware in use. Most graphics hardware only supports values up to `16.0`. + * If [member anisotropy_max] is `1.0`, forcibly disables anisotropy even if [member use_anisotropy] is `true`. + */ + get anisotropy_max(): float64 + set anisotropy_max(value: float64) + + /** If `true`, returned values will be based on the comparison operation defined in [member compare_op]. This is a hardware-based approach and is therefore faster than performing this manually in a shader. For example, compare operations are used for shadow map rendering by comparing depth values from a shadow sampler. */ + get enable_compare(): boolean + set enable_compare(value: boolean) + + /** The compare operation to use. Only effective if [member enable_compare] is `true`. */ + get compare_op(): int64 + set compare_op(value: int64) + + /** The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available. */ + get min_lod(): float64 + set min_lod(value: float64) + + /** The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available. */ + get max_lod(): float64 + set max_lod(value: float64) + + /** The border color that will be returned when sampling outside the sampler's bounds and the [member repeat_u], [member repeat_v] or [member repeat_w] modes have repeating disabled. */ + get border_color(): int64 + set border_color(value: int64) + + /** If `true`, the texture will be sampled with coordinates ranging from 0 to the texture's resolution. Otherwise, the coordinates will be normalized and range from 0 to 1. */ + get unnormalized_uvw(): boolean + set unnormalized_uvw(value: boolean) + } + /** Compiled shader file in SPIR-V form (used by [RenderingDevice]). Not to be confused with Godot's own [Shader]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdshaderfile.html + */ + class RDShaderFile extends Resource { + constructor(identifier?: any) + /** Sets the SPIR-V [param bytecode] that will be compiled for the specified [param version]. */ + set_bytecode(bytecode: RDShaderSPIRV, version: StringName = ''): void + + /** Returns the SPIR-V intermediate representation for the specified shader [param version]. */ + get_spirv(version: StringName = ''): RDShaderSPIRV + + /** Returns the list of compiled versions for this shader. */ + get_version_list(): GArray + get _versions(): GDictionary + set _versions(value: GDictionary) + + /** The base compilation error message, which indicates errors not related to a specific shader stage if non-empty. If empty, shader compilation is not necessarily successful (check [RDShaderSPIRV]'s error message members). */ + get base_error(): string + set base_error(value: string) + } + /** SPIR-V intermediate representation as part of a [RDShaderFile] (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdshaderspirv.html + */ + class RDShaderSPIRV extends Resource { + constructor(identifier?: any) + /** Sets the SPIR-V [param bytecode] for the given shader [param stage]. Equivalent to setting one of [member bytecode_compute], [member bytecode_fragment], [member bytecode_tesselation_control], [member bytecode_tesselation_evaluation], [member bytecode_vertex]. */ + set_stage_bytecode(stage: RenderingDevice.ShaderStage, bytecode: PackedByteArray | byte[] | ArrayBuffer): void + + /** Equivalent to getting one of [member bytecode_compute], [member bytecode_fragment], [member bytecode_tesselation_control], [member bytecode_tesselation_evaluation], [member bytecode_vertex]. */ + get_stage_bytecode(stage: RenderingDevice.ShaderStage): PackedByteArray + + /** Sets the compilation error message for the given shader [param stage] to [param compile_error]. Equivalent to setting one of [member compile_error_compute], [member compile_error_fragment], [member compile_error_tesselation_control], [member compile_error_tesselation_evaluation], [member compile_error_vertex]. */ + set_stage_compile_error(stage: RenderingDevice.ShaderStage, compile_error: string): void + + /** Returns the compilation error message for the given shader [param stage]. Equivalent to getting one of [member compile_error_compute], [member compile_error_fragment], [member compile_error_tesselation_control], [member compile_error_tesselation_evaluation], [member compile_error_vertex]. */ + get_stage_compile_error(stage: RenderingDevice.ShaderStage): string + + /** The SPIR-V bytecode for the vertex shader stage. */ + get bytecode_vertex(): PackedByteArray + set bytecode_vertex(value: PackedByteArray | byte[] | ArrayBuffer) + + /** The SPIR-V bytecode for the fragment shader stage. */ + get bytecode_fragment(): PackedByteArray + set bytecode_fragment(value: PackedByteArray | byte[] | ArrayBuffer) + + /** The SPIR-V bytecode for the tessellation control shader stage. */ + get bytecode_tesselation_control(): PackedByteArray + set bytecode_tesselation_control(value: PackedByteArray | byte[] | ArrayBuffer) + + /** The SPIR-V bytecode for the tessellation evaluation shader stage. */ + get bytecode_tesselation_evaluation(): PackedByteArray + set bytecode_tesselation_evaluation(value: PackedByteArray | byte[] | ArrayBuffer) + + /** The SPIR-V bytecode for the compute shader stage. */ + get bytecode_compute(): PackedByteArray + set bytecode_compute(value: PackedByteArray | byte[] | ArrayBuffer) + + /** The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. */ + get compile_error_vertex(): string + set compile_error_vertex(value: string) + + /** The compilation error message for the fragment shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. */ + get compile_error_fragment(): string + set compile_error_fragment(value: string) + + /** The compilation error message for the tessellation control shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. */ + get compile_error_tesselation_control(): string + set compile_error_tesselation_control(value: string) + + /** The compilation error message for the tessellation evaluation shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. */ + get compile_error_tesselation_evaluation(): string + set compile_error_tesselation_evaluation(value: string) + + /** The compilation error message for the compute shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful. */ + get compile_error_compute(): string + set compile_error_compute(value: string) + } + /** Shader source code (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdshadersource.html + */ + class RDShaderSource extends RefCounted { + constructor(identifier?: any) + /** Sets [param source] code for the specified shader [param stage]. Equivalent to setting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex]. */ + set_stage_source(stage: RenderingDevice.ShaderStage, source: string): void + + /** Returns source code for the specified shader [param stage]. Equivalent to getting one of [member source_compute], [member source_fragment], [member source_tesselation_control], [member source_tesselation_evaluation] or [member source_vertex]. */ + get_stage_source(stage: RenderingDevice.ShaderStage): string + + /** Source code for the shader's vertex stage. */ + get source_vertex(): string + set source_vertex(value: string) + + /** Source code for the shader's fragment stage. */ + get source_fragment(): string + set source_fragment(value: string) + + /** Source code for the shader's tessellation control stage. */ + get source_tesselation_control(): string + set source_tesselation_control(value: string) + + /** Source code for the shader's tessellation evaluation stage. */ + get source_tesselation_evaluation(): string + set source_tesselation_evaluation(value: string) + + /** Source code for the shader's compute stage. */ + get source_compute(): string + set source_compute(value: string) + + /** The language the shader is written in. */ + get language(): int64 + set language(value: int64) + } + /** Texture format (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdtextureformat.html + */ + class RDTextureFormat extends RefCounted { + constructor(identifier?: any) + add_shareable_format(format: RenderingDevice.DataFormat): void + remove_shareable_format(format: RenderingDevice.DataFormat): void + + /** The texture's pixel data format. */ + get format(): int64 + set format(value: int64) + + /** The texture's width (in pixels). */ + get width(): int64 + set width(value: int64) + + /** The texture's height (in pixels). */ + get height(): int64 + set height(value: int64) + + /** The texture's depth (in pixels). This is always `1` for 2D textures. */ + get depth(): int64 + set depth(value: int64) + + /** The number of layers in the texture. Only relevant for 2D texture arrays. */ + get array_layers(): int64 + set array_layers(value: int64) + + /** The number of mipmaps available in the texture. */ + get mipmaps(): int64 + set mipmaps(value: int64) + + /** The texture type. */ + get texture_type(): int64 + set texture_type(value: int64) + + /** The number of samples used when sampling the texture. */ + get samples(): int64 + set samples(value: int64) + + /** The texture's usage bits, which determine what can be done using the texture. */ + get usage_bits(): int64 + set usage_bits(value: int64) + } + /** Texture view (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdtextureview.html + */ + class RDTextureView extends RefCounted { + constructor(identifier?: any) + /** Optional override for the data format to return sampled values in. The default value of [constant RenderingDevice.DATA_FORMAT_MAX] does not override the format. */ + get format_override(): int64 + set format_override(value: int64) + + /** The channel to sample when sampling the red color channel. */ + get swizzle_r(): int64 + set swizzle_r(value: int64) + + /** The channel to sample when sampling the green color channel. */ + get swizzle_g(): int64 + set swizzle_g(value: int64) + + /** The channel to sample when sampling the blue color channel. */ + get swizzle_b(): int64 + set swizzle_b(value: int64) + + /** The channel to sample when sampling the alpha channel. */ + get swizzle_a(): int64 + set swizzle_a(value: int64) + } + /** Shader uniform (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rduniform.html + */ + class RDUniform extends RefCounted { + constructor(identifier?: any) + /** Binds the given id to the uniform. The data associated with the id is then used when the uniform is passed to a shader. */ + add_id(id: RID): void + + /** Unbinds all ids currently bound to the uniform. */ + clear_ids(): void + + /** The uniform's data type. */ + get uniform_type(): int64 + set uniform_type(value: int64) + + /** The uniform's binding. */ + get binding(): int64 + set binding(value: int64) + get _ids(): GArray + set _ids(value: GArray) + } + /** Vertex attribute (used by [RenderingDevice]). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rdvertexattribute.html + */ + class RDVertexAttribute extends RefCounted { + constructor(identifier?: any) + get location(): int64 + set location(value: int64) + get offset(): int64 + set offset(value: int64) + get format(): int64 + set format(value: int64) + get stride(): int64 + set stride(value: int64) + get frequency(): int64 + set frequency(value: int64) + } + /** Provides methods for generating pseudo-random numbers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_randomnumbergenerator.html + */ + class RandomNumberGenerator extends RefCounted { + constructor(identifier?: any) + /** Returns a pseudo-random 32-bit unsigned integer between `0` and `4294967295` (inclusive). */ + randi(): int64 + + /** Returns a pseudo-random float between `0.0` and `1.0` (inclusive). */ + randf(): float64 + + /** Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url], pseudo-random floating-point number from the specified [param mean] and a standard [param deviation]. This is also known as a Gaussian distribution. + * + * **Note:** This method uses the [url=https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform]Box-Muller transform[/url] algorithm. + */ + randfn(mean: float64 = 0, deviation: float64 = 1): float64 + + /** Returns a pseudo-random float between [param from] and [param to] (inclusive). */ + randf_range(from: float64, to: float64): float64 + + /** Returns a pseudo-random 32-bit signed integer between [param from] and [param to] (inclusive). */ + randi_range(from: int64, to: int64): int64 + + /** Returns a random index with non-uniform weights. Prints an error and returns `-1` if the array is empty. + * + */ + rand_weighted(weights: PackedFloat32Array | float32[]): int64 + + /** Sets up a time-based seed for this [RandomNumberGenerator] instance. Unlike the [@GlobalScope] random number generation functions, different [RandomNumberGenerator] instances can use different seeds. */ + randomize(): void + + /** Initializes the random number generator state based on the given seed value. A given seed will give a reproducible sequence of pseudo-random numbers. + * + * **Note:** The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally. + * + * **Note:** Setting this property produces a side effect of changing the internal [member state], so make sure to initialize the seed *before* modifying the [member state]: + * + * **Note:** The default value of this property is pseudo-random, and changes when calling [method randomize]. The `0` value documented here is a placeholder, and not the actual default seed. + * + */ + get seed(): int64 + set seed(value: int64) + + /** The current state of the random number generator. Save and restore this property to restore the generator to a previous state: + * + * + * **Note:** Do not set state to arbitrary values, since the random number generator requires the state to have certain qualities to behave properly. It should only be set to values that came from the state property itself. To initialize the random number generator with arbitrary input, use [member seed] instead. + * + * **Note:** The default value of this property is pseudo-random, and changes when calling [method randomize]. The `0` value documented here is a placeholder, and not the actual default seed. + */ + get state(): int64 + set state(value: int64) + } + /** Abstract base class for controls that represent a number within a range. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_range.html + */ + class Range extends Control { + constructor(identifier?: any) + /** Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]). */ + /* gdvirtual */ _value_changed(new_value: float64): void + + /** Sets the [Range]'s current value to the specified [param value], without emitting the [signal value_changed] signal. */ + set_value_no_signal(value: float64): void + + /** Binds two [Range]s together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. */ + share(with_: Node): void + + /** Stops the [Range] from sharing its member variables with any other. */ + unshare(): void + + /** Minimum value. Range is clamped if [member value] is less than [member min_value]. */ + get min_value(): float64 + set min_value(value: float64) + + /** Maximum value. Range is clamped if [member value] is greater than [member max_value]. */ + get max_value(): float64 + set max_value(value: float64) + + /** If greater than 0, [member value] will always be rounded to a multiple of this property's value. If [member rounded] is also `true`, [member value] will first be rounded to a multiple of this property's value, then rounded to the nearest integer. */ + get step(): float64 + set step(value: float64) + + /** Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [member page] over the difference between [member min_value] and [member max_value]. */ + get page(): float64 + set page(value: float64) + + /** Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it. */ + get value(): float64 + set value(value: float64) + + /** The value mapped between 0 and 1. */ + get ratio(): float64 + set ratio(value: float64) + + /** If `true`, and [member min_value] is greater than 0, [member value] will be represented exponentially rather than linearly. */ + get exp_edit(): boolean + set exp_edit(value: boolean) + + /** If `true`, [member value] will always be rounded to the nearest integer. */ + get rounded(): boolean + set rounded(value: boolean) + + /** If `true`, [member value] may be greater than [member max_value]. */ + get allow_greater(): boolean + set allow_greater(value: boolean) + + /** If `true`, [member value] may be less than [member min_value]. */ + get allow_lesser(): boolean + set allow_lesser(value: boolean) + + /** Emitted when [member value] changes. When used on a [Slider], this is called continuously while dragging (potentially every frame). If you are performing an expensive operation in a function connected to [signal value_changed], consider using a *debouncing* [Timer] to call the function less often. + * + * **Note:** Unlike signals such as [signal LineEdit.text_changed], [signal value_changed] is also emitted when [param value] is set directly via code. + */ + readonly value_changed: Signal1 + + /** Emitted when [member min_value], [member max_value], [member page], or [member step] change. */ + readonly changed: Signal0 + } + /** A ray in 2D space, used to find the first [CollisionObject2D] it intersects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_raycast2d.html + */ + class RayCast2D extends Node2D { + constructor(identifier?: any) + /** Returns whether any object is intersecting with the ray's vector (considering the vector length). */ + is_colliding(): boolean + + /** Updates the collision information for the ray immediately, without waiting for the next `_physics_process` call. Use this method, for example, when the ray or its parent has changed state. + * + * **Note:** [member enabled] does not need to be `true` for this to work. + */ + force_raycast_update(): void + + /** Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). */ + get_collider(): Object + + /** Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). */ + get_collider_rid(): RID + + /** Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). + * To get the intersected shape node, for a [CollisionObject2D] target, use: + * + */ + get_collider_shape(): int64 + + /** Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If [member hit_from_inside] is `true` and the ray starts inside of a collision shape, this function will return the origin point of the ray. + * + * **Note:** Check that [method is_colliding] returns `true` before calling this method to ensure the returned point is valid and up-to-date. + */ + get_collision_point(): Vector2 + + /** Returns the normal of the intersecting object's shape at the collision point, or `Vector2(0, 0)` if the ray starts inside the shape and [member hit_from_inside] is `true`. + * + * **Note:** Check that [method is_colliding] returns `true` before calling this method to ensure the returned normal is valid and up-to-date. + */ + get_collision_normal(): Vector2 + + /** Adds a collision exception so the ray does not report collisions with the specified [RID]. */ + add_exception_rid(rid: RID): void + + /** Adds a collision exception so the ray does not report collisions with the specified [CollisionObject2D] node. */ + add_exception(node: CollisionObject2D): void + + /** Removes a collision exception so the ray does report collisions with the specified [RID]. */ + remove_exception_rid(rid: RID): void + + /** Removes a collision exception so the ray does report collisions with the specified [CollisionObject2D] node. */ + remove_exception(node: CollisionObject2D): void + + /** Removes all collision exceptions for this ray. */ + clear_exceptions(): void + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** If `true`, collisions will be reported. */ + get enabled(): boolean + set enabled(value: boolean) + + /** If `true`, the parent node will be excluded from collision detection. */ + get exclude_parent(): boolean + set exclude_parent(value: boolean) + + /** The ray's destination point, relative to the RayCast's `position`. */ + get target_position(): Vector2 + set target_position(value: Vector2) + + /** The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** If `true`, the ray will detect a hit when starting inside shapes. In this case the collision normal will be `Vector2(0, 0)`. Does not affect concave polygon shapes. */ + get hit_from_inside(): boolean + set hit_from_inside(value: boolean) + + /** If `true`, collisions with [Area2D]s will be reported. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + + /** If `true`, collisions with [PhysicsBody2D]s will be reported. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + } + /** A ray in 3D space, used to find the first [CollisionObject3D] it intersects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_raycast3d.html + */ + class RayCast3D extends Node3D { + constructor(identifier?: any) + /** Returns whether any object is intersecting with the ray's vector (considering the vector length). */ + is_colliding(): boolean + + /** Updates the collision information for the ray immediately, without waiting for the next `_physics_process` call. Use this method, for example, when the ray or its parent has changed state. + * + * **Note:** [member enabled] does not need to be `true` for this to work. + */ + force_raycast_update(): void + + /** Returns the first object that the ray intersects, or `null` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). */ + get_collider(): Object + + /** Returns the [RID] of the first object that the ray intersects, or an empty [RID] if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). */ + get_collider_rid(): RID + + /** Returns the shape ID of the first object that the ray intersects, or `0` if no object is intersecting the ray (i.e. [method is_colliding] returns `false`). + * To get the intersected shape node, for a [CollisionObject3D] target, use: + * + */ + get_collider_shape(): int64 + + /** Returns the collision point at which the ray intersects the closest object, in the global coordinate system. If [member hit_from_inside] is `true` and the ray starts inside of a collision shape, this function will return the origin point of the ray. + * + * **Note:** Check that [method is_colliding] returns `true` before calling this method to ensure the returned point is valid and up-to-date. + */ + get_collision_point(): Vector3 + + /** Returns the normal of the intersecting object's shape at the collision point, or `Vector3(0, 0, 0)` if the ray starts inside the shape and [member hit_from_inside] is `true`. + * + * **Note:** Check that [method is_colliding] returns `true` before calling this method to ensure the returned normal is valid and up-to-date. + */ + get_collision_normal(): Vector3 + + /** Returns the collision object's face index at the collision point, or `-1` if the shape intersecting the ray is not a [ConcavePolygonShape3D]. */ + get_collision_face_index(): int64 + + /** Adds a collision exception so the ray does not report collisions with the specified [RID]. */ + add_exception_rid(rid: RID): void + + /** Adds a collision exception so the ray does not report collisions with the specified [CollisionObject3D] node. */ + add_exception(node: CollisionObject3D): void + + /** Removes a collision exception so the ray does report collisions with the specified [RID]. */ + remove_exception_rid(rid: RID): void + + /** Removes a collision exception so the ray does report collisions with the specified [CollisionObject3D] node. */ + remove_exception(node: CollisionObject3D): void + + /** Removes all collision exceptions for this ray. */ + clear_exceptions(): void + + /** Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32. */ + set_collision_mask_value(layer_number: int64, value: boolean): void + + /** Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32. */ + get_collision_mask_value(layer_number: int64): boolean + + /** If `true`, collisions will be reported. */ + get enabled(): boolean + set enabled(value: boolean) + + /** If `true`, collisions will be ignored for this RayCast3D's immediate parent. */ + get exclude_parent(): boolean + set exclude_parent(value: boolean) + + /** The ray's destination point, relative to the RayCast's `position`. */ + get target_position(): Vector3 + set target_position(value: Vector3) + + /** The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/4.3/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. */ + get collision_mask(): int64 + set collision_mask(value: int64) + + /** If `true`, the ray will detect a hit when starting inside shapes. In this case the collision normal will be `Vector3(0, 0, 0)`. Does not affect shapes with no volume like concave polygon or heightmap. */ + get hit_from_inside(): boolean + set hit_from_inside(value: boolean) + + /** If `true`, the ray will hit back faces with concave polygon shapes with back face enabled or heightmap shapes. */ + get hit_back_faces(): boolean + set hit_back_faces(value: boolean) + + /** If `true`, collisions with [Area3D]s will be reported. */ + get collide_with_areas(): boolean + set collide_with_areas(value: boolean) + + /** If `true`, collisions with [PhysicsBody3D]s will be reported. */ + get collide_with_bodies(): boolean + set collide_with_bodies(value: boolean) + + /** The custom color to use to draw the shape in the editor and at run-time if **Visible Collision Shapes** is enabled in the **Debug** menu. This color will be highlighted at run-time if the [RayCast3D] is colliding with something. + * If set to `Color(0.0, 0.0, 0.0)` (by default), the color set in [member ProjectSettings.debug/shapes/collision/shape_color] is used. + */ + get debug_shape_custom_color(): Color + set debug_shape_custom_color(value: Color) + + /** If set to `1`, a line is used as the debug shape. Otherwise, a truncated pyramid is drawn to represent the [RayCast3D]. Requires **Visible Collision Shapes** to be enabled in the **Debug** menu for the debug shape to be visible at run-time. */ + get debug_shape_thickness(): int64 + set debug_shape_thickness(value: int64) + } + class RayCast3DGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** A 2D rectangle shape used for physics collision. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rectangleshape2d.html + */ + class RectangleShape2D extends Shape2D { + constructor(identifier?: any) + /** The rectangle's width and height. */ + get size(): Vector2 + set size(value: Vector2) + } + /** Base class for reference-counted objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_refcounted.html + */ + class RefCounted extends Object { + constructor(identifier?: any) + /** Initializes the internal reference counter. Use this only if you really know what you are doing. + * Returns whether the initialization was successful. + */ + init_ref(): boolean + + /** Increments the internal reference counter. Use this only if you really know what you are doing. + * Returns `true` if the increment was successful, `false` otherwise. + */ + reference(): boolean + + /** Decrements the internal reference counter. Use this only if you really know what you are doing. + * Returns `true` if the object should be freed after the decrement, `false` otherwise. + */ + unreference(): boolean + + /** Returns the current reference count. */ + get_reference_count(): int64 + } + /** A rectangle hint for designing UIs. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_referencerect.html + */ + class ReferenceRect extends Control { + constructor(identifier?: any) + /** Sets the border color of the [ReferenceRect]. */ + get border_color(): Color + set border_color(value: Color) + + /** Sets the border width of the [ReferenceRect]. The border grows both inwards and outwards with respect to the rectangle box. */ + get border_width(): float64 + set border_width(value: float64) + + /** If `true`, the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in the running project. */ + get editor_only(): boolean + set editor_only(value: boolean) + } + namespace ReflectionProbe { + enum UpdateMode { + /** Update the probe once on the next frame (recommended for most objects). The corresponding radiance map will be generated over the following six frames. This takes more time to update than [constant UPDATE_ALWAYS], but it has a lower performance cost and can result in higher-quality reflections. The ReflectionProbe is updated when its transform changes, but not when nearby geometry changes. You can force a [ReflectionProbe] update by moving the [ReflectionProbe] slightly in any direction. */ + UPDATE_ONCE = 0, + + /** Update the probe every frame. This provides better results for fast-moving dynamic objects (such as cars). However, it has a significant performance cost. Due to the cost, it's recommended to only use one ReflectionProbe with [constant UPDATE_ALWAYS] at most per scene. For all other use cases, use [constant UPDATE_ONCE]. */ + UPDATE_ALWAYS = 1, + } + enum AmbientMode { + /** Do not apply any ambient lighting inside the [ReflectionProbe]'s box defined by its [member size]. */ + AMBIENT_DISABLED = 0, + + /** Apply automatically-sourced environment lighting inside the [ReflectionProbe]'s box defined by its [member size]. */ + AMBIENT_ENVIRONMENT = 1, + + /** Apply custom ambient lighting inside the [ReflectionProbe]'s box defined by its [member size]. See [member ambient_color] and [member ambient_color_energy]. */ + AMBIENT_COLOR = 2, + } + } + /** Captures its surroundings to create fast, accurate reflections from a given point. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_reflectionprobe.html + */ + class ReflectionProbe extends VisualInstance3D { + constructor(identifier?: any) + /** Sets how frequently the [ReflectionProbe] is updated. Can be [constant UPDATE_ONCE] or [constant UPDATE_ALWAYS]. */ + get update_mode(): int64 + set update_mode(value: int64) + + /** Defines the reflection intensity. Intensity modulates the strength of the reflection. */ + get intensity(): float64 + set intensity(value: float64) + + /** The maximum distance away from the [ReflectionProbe] an object can be before it is culled. Decrease this to improve performance, especially when using the [constant UPDATE_ALWAYS] [member update_mode]. + * + * **Note:** The maximum reflection distance is always at least equal to the probe's extents. This means that decreasing [member max_distance] will not always cull objects from reflections, especially if the reflection probe's box defined by its [member size] is already large. + */ + get max_distance(): float64 + set max_distance(value: float64) + + /** The size of the reflection probe. The larger the size, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the size only as large as you need it. + * + * **Note:** To better fit areas that are not aligned to the grid, you can rotate the [ReflectionProbe] node. + */ + get size(): Vector3 + set size(value: Vector3) + + /** Sets the origin offset to be used when this [ReflectionProbe] is in [member box_projection] mode. This can be set to a non-zero value to ensure a reflection fits a rectangle-shaped room, while reducing the number of objects that "get in the way" of the reflection. */ + get origin_offset(): Vector3 + set origin_offset(value: Vector3) + + /** If `true`, enables box projection. This makes reflections look more correct in rectangle-shaped rooms by offsetting the reflection center depending on the camera's location. + * + * **Note:** To better fit rectangle-shaped rooms that are not aligned to the grid, you can rotate the [ReflectionProbe] node. + */ + get box_projection(): boolean + set box_projection(value: boolean) + + /** If `true`, reflections will ignore sky contribution. */ + get interior(): boolean + set interior(value: boolean) + + /** If `true`, computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode]. */ + get enable_shadows(): boolean + set enable_shadows(value: boolean) + + /** Sets the cull mask which determines what objects are drawn by this probe. Every [VisualInstance3D] with a layer included in this cull mask will be rendered by the probe. It is best to only include large objects which are likely to take up a lot of space in the reflection in order to save on rendering cost. + * This can also be used to prevent an object from reflecting upon itself (for instance, a [ReflectionProbe] centered on a vehicle). + */ + get cull_mask(): int64 + set cull_mask(value: int64) + + /** Sets the reflection mask which determines what objects have reflections applied from this probe. Every [VisualInstance3D] with a layer included in this reflection mask will have reflections applied from this probe. See also [member cull_mask], which can be used to exclude objects from appearing in the reflection while still making them affected by the [ReflectionProbe]. */ + get reflection_mask(): int64 + set reflection_mask(value: int64) + + /** The automatic LOD bias to use for meshes rendered within the [ReflectionProbe] (this is analog to [member Viewport.mesh_lod_threshold]). Higher values will use less detailed versions of meshes that have LOD variations generated. If set to `0.0`, automatic LOD is disabled. Increase [member mesh_lod_threshold] to improve performance at the cost of geometry detail, especially when using the [constant UPDATE_ALWAYS] [member update_mode]. + * + * **Note:** [member mesh_lod_threshold] does not affect [GeometryInstance3D] visibility ranges (also known as "manual" LOD or hierarchical LOD). + */ + get mesh_lod_threshold(): float64 + set mesh_lod_threshold(value: float64) + + /** The ambient color to use within the [ReflectionProbe]'s box defined by its [member size]. The ambient color will smoothly blend with other [ReflectionProbe]s and the rest of the scene (outside the [ReflectionProbe]'s box defined by its [member size]). */ + get ambient_mode(): int64 + set ambient_mode(value: int64) + + /** The custom ambient color to use within the [ReflectionProbe]'s box defined by its [member size]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR]. */ + get ambient_color(): Color + set ambient_color(value: Color) + + /** The custom ambient color energy to use within the [ReflectionProbe]'s box defined by its [member size]. Only effective if [member ambient_mode] is [constant AMBIENT_COLOR]. */ + get ambient_color_energy(): float64 + set ambient_color_energy(value: float64) + } + class ReflectionProbeGizmoPlugin extends EditorNode3DGizmoPlugin { + constructor(identifier?: any) + } + /** Class for searching text for patterns using regular expressions. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_regex.html + */ + class RegEx extends RefCounted { + constructor(identifier?: any) + /** Creates and compiles a new [RegEx] object. */ + static create_from_string(pattern: string): RegEx + + /** This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. */ + clear(): void + + /** Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. */ + compile(pattern: string): GError + + /** Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise `null`. + * The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by [param offset], and the character before [param offset] will be checked for the word boundary `\b`. + */ + search(subject: string, offset: int64 = 0, end: int64 = -1): RegExMatch + + /** Searches the text for the compiled pattern. Returns an array of [RegExMatch] containers for each non-overlapping result. If no results were found, an empty array is returned instead. + * The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by [param offset], and the character before [param offset] will be checked for the word boundary `\b`. + */ + search_all(subject: string, offset: int64 = 0, end: int64 = -1): GArray + + /** Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as `$1` and `$name` are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). + * The region to search within can be specified with [param offset] and [param end]. This is useful when searching for another match in the same [param subject] by calling this method again after a previous success. Note that setting these parameters differs from passing over a shortened string. For example, the start anchor `^` is not affected by [param offset], and the character before [param offset] will be checked for the word boundary `\b`. + */ + sub(subject: string, replacement: string, all: boolean = false, offset: int64 = 0, end: int64 = -1): string + + /** Returns whether this object has a valid search pattern assigned. */ + is_valid(): boolean + + /** Returns the original search pattern that was compiled. */ + get_pattern(): string + + /** Returns the number of capturing groups in compiled pattern. */ + get_group_count(): int64 + + /** Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. */ + get_names(): PackedStringArray + } + /** Contains the results of a [RegEx] search. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_regexmatch.html + */ + class RegExMatch extends RefCounted { + constructor(identifier?: any) + /** Returns the number of capturing groups. */ + get_group_count(): int64 + + /** Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + * Returns an empty string if the group did not match or doesn't exist. + */ + get_string(name: any = {}): string + + /** Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + * Returns -1 if the group did not match or doesn't exist. + */ + get_start(name: any = {}): int64 + + /** Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. + * Returns -1 if the group did not match or doesn't exist. + */ + get_end(name: any = {}): int64 + + /** The source string used with the search pattern to find this matching result. */ + get subject(): string + + /** A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. */ + get names(): GDictionary + + /** An [Array] of the match and its capturing groups. */ + get strings(): GArray + } + /** RemoteTransform2D pushes its own [Transform2D] to another [Node2D] derived node in the scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_remotetransform2d.html + */ + class RemoteTransform2D extends Node2D { + constructor(identifier?: any) + /** [RemoteTransform2D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. */ + force_update_cache(): void + + /** The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene. */ + get remote_path(): NodePath + set remote_path(value: NodePath | string) + + /** If `true`, global coordinates are used. If `false`, local coordinates are used. */ + get use_global_coordinates(): boolean + set use_global_coordinates(value: boolean) + + /** If `true`, the remote node's position is updated. */ + get update_position(): boolean + set update_position(value: boolean) + + /** If `true`, the remote node's rotation is updated. */ + get update_rotation(): boolean + set update_rotation(value: boolean) + + /** If `true`, the remote node's scale is updated. */ + get update_scale(): boolean + set update_scale(value: boolean) + } + /** RemoteTransform3D pushes its own [Transform3D] to another [Node3D] derived Node in the scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_remotetransform3d.html + */ + class RemoteTransform3D extends Node3D { + constructor(identifier?: any) + /** [RemoteTransform3D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. */ + force_update_cache(): void + + /** The [NodePath] to the remote node, relative to the RemoteTransform3D's position in the scene. */ + get remote_path(): NodePath + set remote_path(value: NodePath | string) + + /** If `true`, global coordinates are used. If `false`, local coordinates are used. */ + get use_global_coordinates(): boolean + set use_global_coordinates(value: boolean) + + /** If `true`, the remote node's position is updated. */ + get update_position(): boolean + set update_position(value: boolean) + + /** If `true`, the remote node's rotation is updated. */ + get update_rotation(): boolean + set update_rotation(value: boolean) + + /** If `true`, the remote node's scale is updated. */ + get update_scale(): boolean + set update_scale(value: boolean) + } + class RenameDialog extends ConfirmationDialog { + constructor(identifier?: any) + rename(): void + } + class RenderBufferCustomDataRD extends RefCounted { + constructor(identifier?: any) + } + class RenderBufferDataForwardClustered extends RenderBufferCustomDataRD { + constructor(identifier?: any) + } + class RenderBuffersGI extends RenderBufferCustomDataRD { + constructor(identifier?: any) + } + /** Abstract render data object, holds frame data related to rendering a single frame of a viewport. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderdata.html + */ + class RenderData extends Object { + constructor(identifier?: any) + /** Returns the [RenderSceneBuffers] object managing the scene buffers for rendering this viewport. */ + get_render_scene_buffers(): RenderSceneBuffers + + /** Returns the [RenderSceneData] object managing this frames scene data. */ + get_render_scene_data(): RenderSceneData + + /** Returns the [RID] of the environments object in the [RenderingServer] being used to render this viewport. */ + get_environment(): RID + + /** Returns the [RID] of the camera attributes object in the [RenderingServer] being used to render this viewport. */ + get_camera_attributes(): RID + } + /** This class allows for a RenderData implementation to be made in GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderdataextension.html + */ + class RenderDataExtension extends RenderData { + constructor(identifier?: any) + /** Implement this in GDExtension to return the implementation's [RenderSceneBuffers] object. */ + /* gdvirtual */ _get_render_scene_buffers(): RenderSceneBuffers + + /** Implement this in GDExtension to return the implementation's [RenderSceneDataExtension] object. */ + /* gdvirtual */ _get_render_scene_data(): RenderSceneData + + /** Implement this in GDExtension to return the [RID] of the implementation's environment object. */ + /* gdvirtual */ _get_environment(): RID + + /** Implement this in GDExtension to return the [RID] for the implementation's camera attributes object. */ + /* gdvirtual */ _get_camera_attributes(): RID + } + /** Render data implementation for the RenderingDevice based renderers. + * + * **Note:** This is an internal rendering server object, do not instantiate this from script. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderdatard.html + */ + class RenderDataRD extends RenderData { + constructor(identifier?: any) + } + /** Abstract scene buffers object, created for each viewport for which 3D rendering is done. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenebuffers.html + */ + class RenderSceneBuffers extends RefCounted { + constructor(identifier?: any) + /** This method is called by the rendering server when the associated viewports configuration is changed. It will discard the old buffers and recreate the internal buffers used. */ + configure(config: RenderSceneBuffersConfiguration): void + } + /** Configuration object used to setup a [RenderSceneBuffers] object. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenebuffersconfiguration.html + */ + class RenderSceneBuffersConfiguration extends RefCounted { + constructor(identifier?: any) + /** The render target associated with these buffer. */ + get render_target(): RID + set render_target(value: RID) + + /** The size of the 3D render buffer used for rendering. */ + get internal_size(): Vector2i + set internal_size(value: Vector2i) + + /** The target (upscale) size if scaling is used. */ + get target_size(): Vector2i + set target_size(value: Vector2i) + + /** The number of views we're rendering. */ + get view_count(): int64 + set view_count(value: int64) + + /** The requested scaling mode with which we upscale/downscale if [member internal_size] and [member target_size] are not equal. */ + get scaling_3d_mode(): int64 + set scaling_3d_mode(value: int64) + + /** The MSAA mode we're using for 3D rendering. */ + get msaa_3d(): int64 + set msaa_3d(value: int64) + + /** The requested screen space AA applied in post processing. */ + get screen_space_aa(): int64 + set screen_space_aa(value: int64) + + /** FSR Sharpness applicable if FSR upscaling is used. */ + get fsr_sharpness(): boolean + set fsr_sharpness(value: boolean) + + /** Bias applied to mipmaps. */ + get texture_mipmap_bias(): boolean + set texture_mipmap_bias(value: boolean) + } + /** This class allows for a RenderSceneBuffer implementation to be made in GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenebuffersextension.html + */ + class RenderSceneBuffersExtension extends RenderSceneBuffers { + constructor(identifier?: any) + /** Implement this in GDExtension to handle the (re)sizing of a viewport. */ + /* gdvirtual */ _configure(config: RenderSceneBuffersConfiguration): void + + /** Implement this in GDExtension to record a new FSR sharpness value. */ + /* gdvirtual */ _set_fsr_sharpness(fsr_sharpness: float64): void + + /** Implement this in GDExtension to change the texture mipmap bias. */ + /* gdvirtual */ _set_texture_mipmap_bias(texture_mipmap_bias: float64): void + + /** Implement this in GDExtension to react to the debanding flag changing. */ + /* gdvirtual */ _set_use_debanding(use_debanding: boolean): void + } + /** Render scene buffer implementation for the RenderingDevice based renderers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenebuffersrd.html + */ + class RenderSceneBuffersRD extends RenderSceneBuffers { + constructor(identifier?: any) + /** Returns `true` if a cached texture exists for this name. */ + has_texture(context: StringName, name: StringName): boolean + + /** Create a new texture with the given definition and cache this under the given name. Will return the existing texture if it already exists. */ + create_texture(context: StringName, name: StringName, data_format: RenderingDevice.DataFormat, usage_bits: int64, texture_samples: RenderingDevice.TextureSamples, size: Vector2i, layers: int64, mipmaps: int64, unique: boolean): RID + + /** Create a new texture using the given format and view and cache this under the given name. Will return the existing texture if it already exists. */ + create_texture_from_format(context: StringName, name: StringName, format: RDTextureFormat, view: RDTextureView, unique: boolean): RID + + /** Create a new texture view for an existing texture and cache this under the given view_name. Will return the existing teture view if it already exists. Will error if the source texture doesn't exist. */ + create_texture_view(context: StringName, name: StringName, view_name: StringName, view: RDTextureView): RID + + /** Returns a cached texture with this name. */ + get_texture(context: StringName, name: StringName): RID + + /** Returns the texture format information with which a cached texture was created. */ + get_texture_format(context: StringName, name: StringName): RDTextureFormat + + /** Returns a specific slice (layer or mipmap) for a cached texture. */ + get_texture_slice(context: StringName, name: StringName, layer: int64, mipmap: int64, layers: int64, mipmaps: int64): RID + + /** Returns a specific view of a slice (layer or mipmap) for a cached texture. */ + get_texture_slice_view(context: StringName, name: StringName, layer: int64, mipmap: int64, layers: int64, mipmaps: int64, view: RDTextureView): RID + + /** Returns the texture size of a given slice of a cached texture. */ + get_texture_slice_size(context: StringName, name: StringName, mipmap: int64): Vector2i + + /** Frees all buffers related to this context. */ + clear_context(context: StringName): void + + /** Returns the color texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + * If [param msaa] is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + */ + get_color_texture(msaa: boolean = false): RID + + /** Returns the specified layer from the color texture we are rendering 3D content to. + * If [param msaa] is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + */ + get_color_layer(layer: int64, msaa: boolean = false): RID + + /** Returns the depth texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + * If [param msaa] is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + */ + get_depth_texture(msaa: boolean = false): RID + + /** Returns the specified layer from the depth texture we are rendering 3D content to. + * If [param msaa] is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + */ + get_depth_layer(layer: int64, msaa: boolean = false): RID + + /** Returns the velocity texture we are rendering 3D content to. If multiview is used this will be a texture array with all views. + * If [param msaa] is **true** and MSAA is enabled, this returns the MSAA variant of the buffer. + */ + get_velocity_texture(msaa: boolean = false): RID + + /** Returns the specified layer from the velocity texture we are rendering 3D content to. */ + get_velocity_layer(layer: int64, msaa: boolean = false): RID + + /** Returns the render target associated with this buffers object. */ + get_render_target(): RID + + /** Returns the view count for the associated viewport. */ + get_view_count(): int64 + + /** Returns the internal size of the render buffer (size before upscaling) with which textures are created by default. */ + get_internal_size(): Vector2i + + /** Returns the target size of the render buffer (size after upscaling). */ + get_target_size(): Vector2i + + /** Returns the scaling mode used for upscaling. */ + get_scaling_3d_mode(): RenderingServer.ViewportScaling3DMode + + /** Returns the FSR sharpness value used while rendering the 3D content (if [method get_scaling_3d_mode] is an FSR mode). */ + get_fsr_sharpness(): float64 + + /** Returns the applied 3D MSAA mode for this viewport. */ + get_msaa_3d(): RenderingServer.ViewportMSAA + + /** Returns the number of MSAA samples used. */ + get_texture_samples(): RenderingDevice.TextureSamples + + /** Returns the screen-space antialiasing method applied. */ + get_screen_space_aa(): RenderingServer.ViewportScreenSpaceAA + + /** Returns `true` if TAA is enabled. */ + get_use_taa(): boolean + + /** Returns `true` if debanding is enabled. */ + get_use_debanding(): boolean + } + /** Abstract render data object, holds scene data related to rendering a single frame of a viewport. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenedata.html + */ + class RenderSceneData extends Object { + constructor(identifier?: any) + /** Returns the camera transform used to render this frame. + * + * **Note:** If more than one view is rendered, this will return a centered transform. + */ + get_cam_transform(): Transform3D + + /** Returns the camera projection used to render this frame. + * + * **Note:** If more than one view is rendered, this will return a combined projection. + */ + get_cam_projection(): Projection + + /** Returns the number of views being rendered. */ + get_view_count(): int64 + + /** Returns the eye offset per view used to render this frame. This is the offset between our camera transform and the eye transform. */ + get_view_eye_offset(view: int64): Vector3 + + /** Returns the view projection per view used to render this frame. + * + * **Note:** If a single view is rendered, this returns the camera projection. If more than one view is rendered, this will return a projection for the given view including the eye offset. + */ + get_view_projection(view: int64): Projection + + /** Return the [RID] of the uniform buffer containing the scene data as a UBO. */ + get_uniform_buffer(): RID + } + /** This class allows for a RenderSceneData implementation to be made in GDExtension. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenedataextension.html + */ + class RenderSceneDataExtension extends RenderSceneData { + constructor(identifier?: any) + /** Implement this in GDExtension to return the camera [Transform3D]. */ + /* gdvirtual */ _get_cam_transform(): Transform3D + + /** Implement this in GDExtension to return the camera [Projection]. */ + /* gdvirtual */ _get_cam_projection(): Projection + + /** Implement this in GDExtension to return the view count. */ + /* gdvirtual */ _get_view_count(): int64 + + /** Implement this in GDExtension to return the eye offset for the given [param view]. */ + /* gdvirtual */ _get_view_eye_offset(view: int64): Vector3 + + /** Implement this in GDExtension to return the view [Projection] for the given [param view]. */ + /* gdvirtual */ _get_view_projection(view: int64): Projection + + /** Implement this in GDExtension to return the [RID] of the uniform buffer containing the scene data as a UBO. */ + /* gdvirtual */ _get_uniform_buffer(): RID + } + /** Render scene data implementation for the RenderingDevice based renderers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderscenedatard.html + */ + class RenderSceneDataRD extends RenderSceneData { + constructor(identifier?: any) + } + namespace RenderingDevice { + enum DeviceType { + /** Rendering device type does not match any of the other enum values or is unknown. */ + DEVICE_TYPE_OTHER = 0, + + /** Rendering device is an integrated GPU, which is typically *(but not always)* slower than dedicated GPUs ([constant DEVICE_TYPE_DISCRETE_GPU]). On Android and iOS, the rendering device type is always considered to be [constant DEVICE_TYPE_INTEGRATED_GPU]. */ + DEVICE_TYPE_INTEGRATED_GPU = 1, + + /** Rendering device is a dedicated GPU, which is typically *(but not always)* faster than integrated GPUs ([constant DEVICE_TYPE_INTEGRATED_GPU]). */ + DEVICE_TYPE_DISCRETE_GPU = 2, + + /** Rendering device is an emulated GPU in a virtual environment. This is typically much slower than the host GPU, which means the expected performance level on a dedicated GPU will be roughly equivalent to [constant DEVICE_TYPE_INTEGRATED_GPU]. Virtual machine GPU passthrough (such as VFIO) will not report the device type as [constant DEVICE_TYPE_VIRTUAL_GPU]. Instead, the host GPU's device type will be reported as if the GPU was not emulated. */ + DEVICE_TYPE_VIRTUAL_GPU = 3, + + /** Rendering device is provided by software emulation (such as Lavapipe or [url=https://github.com/google/swiftshader]SwiftShader[/url]). This is the slowest kind of rendering device available; it's typically much slower than [constant DEVICE_TYPE_INTEGRATED_GPU]. */ + DEVICE_TYPE_CPU = 4, + + /** Represents the size of the [enum DeviceType] enum. */ + DEVICE_TYPE_MAX = 5, + } + enum DriverResource { + /** Specific device object based on a physical device. + * - Vulkan: Vulkan device driver resource (`VkDevice`). (`rid` argument doesn't apply.) + */ + DRIVER_RESOURCE_LOGICAL_DEVICE = 0, + + /** Physical device the specific logical device is based on. + * - Vulkan: `VkDevice`. (`rid` argument doesn't apply.) + */ + DRIVER_RESOURCE_PHYSICAL_DEVICE = 1, + + /** Top-most graphics API entry object. + * - Vulkan: `VkInstance`. (`rid` argument doesn't apply.) + */ + DRIVER_RESOURCE_TOPMOST_OBJECT = 2, + + /** The main graphics-compute command queue. + * - Vulkan: `VkQueue`. (`rid` argument doesn't apply.) + */ + DRIVER_RESOURCE_COMMAND_QUEUE = 3, + + /** The specific family the main queue belongs to. + * - Vulkan: the queue family index, an `uint32_t`. (`rid` argument doesn't apply.) + */ + DRIVER_RESOURCE_QUEUE_FAMILY = 4, + + /** - Vulkan: `VkImage`. */ + DRIVER_RESOURCE_TEXTURE = 5, + + /** The view of an owned or shared texture. + * - Vulkan: `VkImageView`. + */ + DRIVER_RESOURCE_TEXTURE_VIEW = 6, + + /** The native id of the data format of the texture. + * - Vulkan: `VkFormat`. + */ + DRIVER_RESOURCE_TEXTURE_DATA_FORMAT = 7, + + /** - Vulkan: `VkSampler`. */ + DRIVER_RESOURCE_SAMPLER = 8, + + /** - Vulkan: `VkDescriptorSet`. */ + DRIVER_RESOURCE_UNIFORM_SET = 9, + + /** Buffer of any kind of (storage, vertex, etc.). + * - Vulkan: `VkBuffer`. + */ + DRIVER_RESOURCE_BUFFER = 10, + + /** - Vulkan: `VkPipeline`. */ + DRIVER_RESOURCE_COMPUTE_PIPELINE = 11, + + /** - Vulkan: `VkPipeline`. */ + DRIVER_RESOURCE_RENDER_PIPELINE = 12, + DRIVER_RESOURCE_VULKAN_DEVICE = 0, + DRIVER_RESOURCE_VULKAN_PHYSICAL_DEVICE = 1, + DRIVER_RESOURCE_VULKAN_INSTANCE = 2, + DRIVER_RESOURCE_VULKAN_QUEUE = 3, + DRIVER_RESOURCE_VULKAN_QUEUE_FAMILY_INDEX = 4, + DRIVER_RESOURCE_VULKAN_IMAGE = 5, + DRIVER_RESOURCE_VULKAN_IMAGE_VIEW = 6, + DRIVER_RESOURCE_VULKAN_IMAGE_NATIVE_TEXTURE_FORMAT = 7, + DRIVER_RESOURCE_VULKAN_SAMPLER = 8, + DRIVER_RESOURCE_VULKAN_DESCRIPTOR_SET = 9, + DRIVER_RESOURCE_VULKAN_BUFFER = 10, + DRIVER_RESOURCE_VULKAN_COMPUTE_PIPELINE = 11, + DRIVER_RESOURCE_VULKAN_RENDER_PIPELINE = 12, + } + enum DataFormat { + /** 4-bit-per-channel red/green channel data format, packed into 8 bits. Values are in the `[0.0, 1.0]` range. + * + * **Note:** More information on all data formats can be found on the [url=https://registry.khronos.org/vulkan/specs/1.1/html/vkspec.html#_identification_of_formats]Identification of formats[/url] section of the Vulkan specification, as well as the [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFormat.html]VkFormat[/url] enum. + */ + DATA_FORMAT_R4G4_UNORM_PACK8 = 0, + + /** 4-bit-per-channel red/green/blue/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R4G4B4A4_UNORM_PACK16 = 1, + + /** 4-bit-per-channel blue/green/red/alpha channel data format, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B4G4R4A4_UNORM_PACK16 = 2, + + /** Red/green/blue channel data format with 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R5G6B5_UNORM_PACK16 = 3, + + /** Blue/green/red channel data format with 5 bits of blue, 6 bits of green and 5 bits of red, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B5G6R5_UNORM_PACK16 = 4, + + /** Red/green/blue/alpha channel data format with 5 bits of red, 6 bits of green, 5 bits of blue and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R5G5B5A1_UNORM_PACK16 = 5, + + /** Blue/green/red/alpha channel data format with 5 bits of blue, 6 bits of green, 5 bits of red and 1 bit of alpha, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B5G5R5A1_UNORM_PACK16 = 6, + + /** Alpha/red/green/blue channel data format with 1 bit of alpha, 5 bits of red, 6 bits of green and 5 bits of blue, packed into 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_A1R5G5B5_UNORM_PACK16 = 7, + + /** 8-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8_UNORM = 8, + + /** 8-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R8_SNORM = 9, + + /** 8-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_R8_USCALED = 10, + + /** 8-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_R8_SSCALED = 11, + + /** 8-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_R8_UINT = 12, + + /** 8-bit-per-channel signed integer red channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_R8_SINT = 13, + + /** 8-bit-per-channel unsigned floating-point red channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8_SRGB = 14, + + /** 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8_UNORM = 15, + + /** 8-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R8G8_SNORM = 16, + + /** 8-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_R8G8_USCALED = 17, + + /** 8-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_R8G8_SSCALED = 18, + + /** 8-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_R8G8_UINT = 19, + + /** 8-bit-per-channel signed integer red/green channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_R8G8_SINT = 20, + + /** 8-bit-per-channel unsigned floating-point red/green channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8_SRGB = 21, + + /** 8-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8_UNORM = 22, + + /** 8-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8_SNORM = 23, + + /** 8-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_R8G8B8_USCALED = 24, + + /** 8-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_R8G8B8_SSCALED = 25, + + /** 8-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_R8G8B8_UINT = 26, + + /** 8-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_R8G8B8_SINT = 27, + + /** 8-bit-per-channel unsigned floating-point red/green/blue/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8_SRGB = 28, + + /** 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8_UNORM = 29, + + /** 8-bit-per-channel signed floating-point blue/green/red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8_SNORM = 30, + + /** 8-bit-per-channel unsigned floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_B8G8R8_USCALED = 31, + + /** 8-bit-per-channel signed floating-point blue/green/red channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_B8G8R8_SSCALED = 32, + + /** 8-bit-per-channel unsigned integer blue/green/red channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_B8G8R8_UINT = 33, + + /** 8-bit-per-channel signed integer blue/green/red channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_B8G8R8_SINT = 34, + + /** 8-bit-per-channel unsigned floating-point blue/green/red data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8_SRGB = 35, + + /** 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8A8_UNORM = 36, + + /** 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8A8_SNORM = 37, + + /** 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_R8G8B8A8_USCALED = 38, + + /** 8-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_R8G8B8A8_SSCALED = 39, + + /** 8-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_R8G8B8A8_UINT = 40, + + /** 8-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_R8G8B8A8_SINT = 41, + + /** 8-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R8G8B8A8_SRGB = 42, + + /** 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8A8_UNORM = 43, + + /** 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8A8_SNORM = 44, + + /** 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_B8G8R8A8_USCALED = 45, + + /** 8-bit-per-channel signed floating-point blue/green/red/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_B8G8R8A8_SSCALED = 46, + + /** 8-bit-per-channel unsigned integer blue/green/red/alpha channel data format. Values are in the `[0, 255]` range. */ + DATA_FORMAT_B8G8R8A8_UINT = 47, + + /** 8-bit-per-channel signed integer blue/green/red/alpha channel data format. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_B8G8R8A8_SINT = 48, + + /** 8-bit-per-channel unsigned floating-point blue/green/red/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_B8G8R8A8_SRGB = 49, + + /** 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_A8B8G8R8_UNORM_PACK32 = 50, + + /** 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_A8B8G8R8_SNORM_PACK32 = 51, + + /** 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[0.0, 255.0]` range. */ + DATA_FORMAT_A8B8G8R8_USCALED_PACK32 = 52, + + /** 8-bit-per-channel signed floating-point alpha/red/green/blue channel data format with scaled value (value is converted from integer to float), packed in 32 bits. Values are in the `[-127.0, 127.0]` range. */ + DATA_FORMAT_A8B8G8R8_SSCALED_PACK32 = 53, + + /** 8-bit-per-channel unsigned integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[0, 255]` range. */ + DATA_FORMAT_A8B8G8R8_UINT_PACK32 = 54, + + /** 8-bit-per-channel signed integer alpha/red/green/blue channel data format, packed in 32 bits. Values are in the `[-127, 127]` range. */ + DATA_FORMAT_A8B8G8R8_SINT_PACK32 = 55, + + /** 8-bit-per-channel unsigned floating-point alpha/red/green/blue channel data format with normalized value and non-linear sRGB encoding, packed in 32 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_A8B8G8R8_SRGB_PACK32 = 56, + + /** Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_A2R10G10B10_UNORM_PACK32 = 57, + + /** Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_A2R10G10B10_SNORM_PACK32 = 58, + + /** Unsigned floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0.0, 1023.0]` range for red/green/blue and `[0.0, 3.0]` for alpha. */ + DATA_FORMAT_A2R10G10B10_USCALED_PACK32 = 59, + + /** Signed floating-point alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511.0, 511.0]` range for red/green/blue and `[-1.0, 1.0]` for alpha. */ + DATA_FORMAT_A2R10G10B10_SSCALED_PACK32 = 60, + + /** Unsigned integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[0, 1023]` range for red/green/blue and `[0, 3]` for alpha. */ + DATA_FORMAT_A2R10G10B10_UINT_PACK32 = 61, + + /** Signed integer alpha/red/green/blue channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of red, 10 bits of green and 10 bits of blue. Values are in the `[-511, 511]` range for red/green/blue and `[-1, 1]` for alpha. */ + DATA_FORMAT_A2R10G10B10_SINT_PACK32 = 62, + + /** Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_A2B10G10R10_UNORM_PACK32 = 63, + + /** Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_A2B10G10R10_SNORM_PACK32 = 64, + + /** Unsigned floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0.0, 1023.0]` range for blue/green/red and `[0.0, 3.0]` for alpha. */ + DATA_FORMAT_A2B10G10R10_USCALED_PACK32 = 65, + + /** Signed floating-point alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511.0, 511.0]` range for blue/green/red and `[-1.0, 1.0]` for alpha. */ + DATA_FORMAT_A2B10G10R10_SSCALED_PACK32 = 66, + + /** Unsigned integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[0, 1023]` range for blue/green/red and `[0, 3]` for alpha. */ + DATA_FORMAT_A2B10G10R10_UINT_PACK32 = 67, + + /** Signed integer alpha/blue/green/red channel data format with normalized value, packed in 32 bits. Format contains 2 bits of alpha, 10 bits of blue, 10 bits of green and 10 bits of red. Values are in the `[-511, 511]` range for blue/green/red and `[-1, 1]` for alpha. */ + DATA_FORMAT_A2B10G10R10_SINT_PACK32 = 68, + + /** 16-bit-per-channel unsigned floating-point red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R16_UNORM = 69, + + /** 16-bit-per-channel signed floating-point red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R16_SNORM = 70, + + /** 16-bit-per-channel unsigned floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. */ + DATA_FORMAT_R16_USCALED = 71, + + /** 16-bit-per-channel signed floating-point red channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. */ + DATA_FORMAT_R16_SSCALED = 72, + + /** 16-bit-per-channel unsigned integer red channel data format. Values are in the `[0.0, 65535]` range. */ + DATA_FORMAT_R16_UINT = 73, + + /** 16-bit-per-channel signed integer red channel data format. Values are in the `[-32767, 32767]` range. */ + DATA_FORMAT_R16_SINT = 74, + + /** 16-bit-per-channel signed floating-point red channel data format with the value stored as-is. */ + DATA_FORMAT_R16_SFLOAT = 75, + + /** 16-bit-per-channel unsigned floating-point red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R16G16_UNORM = 76, + + /** 16-bit-per-channel signed floating-point red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R16G16_SNORM = 77, + + /** 16-bit-per-channel unsigned floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. */ + DATA_FORMAT_R16G16_USCALED = 78, + + /** 16-bit-per-channel signed floating-point red/green channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. */ + DATA_FORMAT_R16G16_SSCALED = 79, + + /** 16-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0.0, 65535]` range. */ + DATA_FORMAT_R16G16_UINT = 80, + + /** 16-bit-per-channel signed integer red/green channel data format. Values are in the `[-32767, 32767]` range. */ + DATA_FORMAT_R16G16_SINT = 81, + + /** 16-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. */ + DATA_FORMAT_R16G16_SFLOAT = 82, + + /** 16-bit-per-channel unsigned floating-point red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R16G16B16_UNORM = 83, + + /** 16-bit-per-channel signed floating-point red/green/blue channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R16G16B16_SNORM = 84, + + /** 16-bit-per-channel unsigned floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. */ + DATA_FORMAT_R16G16B16_USCALED = 85, + + /** 16-bit-per-channel signed floating-point red/green/blue channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. */ + DATA_FORMAT_R16G16B16_SSCALED = 86, + + /** 16-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0.0, 65535]` range. */ + DATA_FORMAT_R16G16B16_UINT = 87, + + /** 16-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[-32767, 32767]` range. */ + DATA_FORMAT_R16G16B16_SINT = 88, + + /** 16-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. */ + DATA_FORMAT_R16G16B16_SFLOAT = 89, + + /** 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R16G16B16A16_UNORM = 90, + + /** 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. */ + DATA_FORMAT_R16G16B16A16_SNORM = 91, + + /** 16-bit-per-channel unsigned floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[0.0, 65535.0]` range. */ + DATA_FORMAT_R16G16B16A16_USCALED = 92, + + /** 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with scaled value (value is converted from integer to float). Values are in the `[-32767.0, 32767.0]` range. */ + DATA_FORMAT_R16G16B16A16_SSCALED = 93, + + /** 16-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0.0, 65535]` range. */ + DATA_FORMAT_R16G16B16A16_UINT = 94, + + /** 16-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[-32767, 32767]` range. */ + DATA_FORMAT_R16G16B16A16_SINT = 95, + + /** 16-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. */ + DATA_FORMAT_R16G16B16A16_SFLOAT = 96, + + /** 32-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^32 - 1]` range. */ + DATA_FORMAT_R32_UINT = 97, + + /** 32-bit-per-channel signed integer red channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. */ + DATA_FORMAT_R32_SINT = 98, + + /** 32-bit-per-channel signed floating-point red channel data format with the value stored as-is. */ + DATA_FORMAT_R32_SFLOAT = 99, + + /** 32-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^32 - 1]` range. */ + DATA_FORMAT_R32G32_UINT = 100, + + /** 32-bit-per-channel signed integer red/green channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. */ + DATA_FORMAT_R32G32_SINT = 101, + + /** 32-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. */ + DATA_FORMAT_R32G32_SFLOAT = 102, + + /** 32-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^32 - 1]` range. */ + DATA_FORMAT_R32G32B32_UINT = 103, + + /** 32-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. */ + DATA_FORMAT_R32G32B32_SINT = 104, + + /** 32-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. */ + DATA_FORMAT_R32G32B32_SFLOAT = 105, + + /** 32-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^32 - 1]` range. */ + DATA_FORMAT_R32G32B32A32_UINT = 106, + + /** 32-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^31 + 1, 2^31 - 1]` range. */ + DATA_FORMAT_R32G32B32A32_SINT = 107, + + /** 32-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. */ + DATA_FORMAT_R32G32B32A32_SFLOAT = 108, + + /** 64-bit-per-channel unsigned integer red channel data format. Values are in the `[0, 2^64 - 1]` range. */ + DATA_FORMAT_R64_UINT = 109, + + /** 64-bit-per-channel signed integer red channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. */ + DATA_FORMAT_R64_SINT = 110, + + /** 64-bit-per-channel signed floating-point red channel data format with the value stored as-is. */ + DATA_FORMAT_R64_SFLOAT = 111, + + /** 64-bit-per-channel unsigned integer red/green channel data format. Values are in the `[0, 2^64 - 1]` range. */ + DATA_FORMAT_R64G64_UINT = 112, + + /** 64-bit-per-channel signed integer red/green channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. */ + DATA_FORMAT_R64G64_SINT = 113, + + /** 64-bit-per-channel signed floating-point red/green channel data format with the value stored as-is. */ + DATA_FORMAT_R64G64_SFLOAT = 114, + + /** 64-bit-per-channel unsigned integer red/green/blue channel data format. Values are in the `[0, 2^64 - 1]` range. */ + DATA_FORMAT_R64G64B64_UINT = 115, + + /** 64-bit-per-channel signed integer red/green/blue channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. */ + DATA_FORMAT_R64G64B64_SINT = 116, + + /** 64-bit-per-channel signed floating-point red/green/blue channel data format with the value stored as-is. */ + DATA_FORMAT_R64G64B64_SFLOAT = 117, + + /** 64-bit-per-channel unsigned integer red/green/blue/alpha channel data format. Values are in the `[0, 2^64 - 1]` range. */ + DATA_FORMAT_R64G64B64A64_UINT = 118, + + /** 64-bit-per-channel signed integer red/green/blue/alpha channel data format. Values are in the `[2^63 + 1, 2^63 - 1]` range. */ + DATA_FORMAT_R64G64B64A64_SINT = 119, + + /** 64-bit-per-channel signed floating-point red/green/blue/alpha channel data format with the value stored as-is. */ + DATA_FORMAT_R64G64B64A64_SFLOAT = 120, + + /** Unsigned floating-point blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 10 bits of blue channel, 11 bits of green channel and 11 bits of red channel. */ + DATA_FORMAT_B10G11R11_UFLOAT_PACK32 = 121, + + /** Unsigned floating-point exposure/blue/green/red data format with the value stored as-is, packed in 32 bits. The format's precision is 5 bits of exposure, 9 bits of blue channel, 9 bits of green channel and 9 bits of red channel. */ + DATA_FORMAT_E5B9G9R9_UFLOAT_PACK32 = 122, + + /** 16-bit unsigned floating-point depth data format with normalized value. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_D16_UNORM = 123, + + /** 24-bit unsigned floating-point depth data format with normalized value, plus 8 unused bits, packed in 32 bits. Values for depth are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_X8_D24_UNORM_PACK32 = 124, + + /** 32-bit signed floating-point depth data format with the value stored as-is. */ + DATA_FORMAT_D32_SFLOAT = 125, + + /** 8-bit unsigned integer stencil data format. */ + DATA_FORMAT_S8_UINT = 126, + + /** 16-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range. */ + DATA_FORMAT_D16_UNORM_S8_UINT = 127, + + /** 24-bit unsigned floating-point depth data format with normalized value, plus 8 bits of stencil in unsigned integer format. Values for depth are in the `[0.0, 1.0]` range. Values for stencil are in the `[0, 255]` range. */ + DATA_FORMAT_D24_UNORM_S8_UINT = 128, + + /** 32-bit signed floating-point depth data format with the value stored as-is, plus 8 bits of stencil in unsigned integer format. Values for stencil are in the `[0, 255]` range. */ + DATA_FORMAT_D32_SFLOAT_S8_UINT = 129, + + /** VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). */ + DATA_FORMAT_BC1_RGB_UNORM_BLOCK = 130, + + /** VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel and 5 bits of blue channel. Using BC1 texture compression (also known as S3TC DXT1). */ + DATA_FORMAT_BC1_RGB_SRGB_BLOCK = 131, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). */ + DATA_FORMAT_BC1_RGBA_UNORM_BLOCK = 132, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 1 bit of alpha channel. Using BC1 texture compression (also known as S3TC DXT1). */ + DATA_FORMAT_BC1_RGBA_SRGB_BLOCK = 133, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). */ + DATA_FORMAT_BC2_UNORM_BLOCK = 134, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 4 bits of alpha channel. Using BC2 texture compression (also known as S3TC DXT3). */ + DATA_FORMAT_BC2_SRGB_BLOCK = 135, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). */ + DATA_FORMAT_BC3_UNORM_BLOCK = 136, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is 5 bits of red channel, 6 bits of green channel, 5 bits of blue channel and 8 bits of alpha channel. Using BC3 texture compression (also known as S3TC DXT5). */ + DATA_FORMAT_BC3_SRGB_BLOCK = 137, + + /** VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. */ + DATA_FORMAT_BC4_UNORM_BLOCK = 138, + + /** VRAM-compressed signed red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel. Using BC4 texture compression. */ + DATA_FORMAT_BC4_SNORM_BLOCK = 139, + + /** VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). */ + DATA_FORMAT_BC5_UNORM_BLOCK = 140, + + /** VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. The format's precision is 8 bits of red channel and 8 bits of green channel. Using BC5 texture compression (also known as S3TC RGTC). */ + DATA_FORMAT_BC5_SNORM_BLOCK = 141, + + /** VRAM-compressed unsigned red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR). */ + DATA_FORMAT_BC6H_UFLOAT_BLOCK = 142, + + /** VRAM-compressed signed red/green/blue channel data format with the floating-point value stored as-is. The format's precision is between 10 and 13 bits for the red/green/blue channels. Using BC6H texture compression (also known as BPTC HDR). */ + DATA_FORMAT_BC6H_SFLOAT_BLOCK = 143, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. */ + DATA_FORMAT_BC7_UNORM_BLOCK = 144, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. The format's precision is between 4 and 7 bits for the red/green/blue channels and between 0 and 8 bits for the alpha channel. Also known as BPTC LDR. */ + DATA_FORMAT_BC7_SRGB_BLOCK = 145, + + /** VRAM-compressed unsigned red/green/blue channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8_UNORM_BLOCK = 146, + + /** VRAM-compressed unsigned red/green/blue channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8_SRGB_BLOCK = 147, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK = 148, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bit of precision each, with alpha using 1 bit of precision. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK = 149, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK = 150, + + /** VRAM-compressed unsigned red/green/blue/alpha channel data format with normalized value and non-linear sRGB encoding. Values are in the `[0.0, 1.0]` range. Red/green/blue use 8 bits of precision each, with alpha using 8 bits of precision. Using ETC2 texture compression. */ + DATA_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK = 151, + + /** 11-bit VRAM-compressed unsigned red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_EAC_R11_UNORM_BLOCK = 152, + + /** 11-bit VRAM-compressed signed red channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_EAC_R11_SNORM_BLOCK = 153, + + /** 11-bit VRAM-compressed unsigned red/green channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_EAC_R11G11_UNORM_BLOCK = 154, + + /** 11-bit VRAM-compressed signed red/green channel data format with normalized value. Values are in the `[-1.0, 1.0]` range. Using ETC2 texture compression. */ + DATA_FORMAT_EAC_R11G11_SNORM_BLOCK = 155, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_4x4_UNORM_BLOCK = 156, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 4×4 blocks (highest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_4x4_SRGB_BLOCK = 157, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_5x4_UNORM_BLOCK = 158, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×4 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_5x4_SRGB_BLOCK = 159, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_5x5_UNORM_BLOCK = 160, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 5×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_5x5_SRGB_BLOCK = 161, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_6x5_UNORM_BLOCK = 162, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_6x5_SRGB_BLOCK = 163, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_6x6_UNORM_BLOCK = 164, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 6×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_6x6_SRGB_BLOCK = 165, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x5_UNORM_BLOCK = 166, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x5_SRGB_BLOCK = 167, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x6_UNORM_BLOCK = 168, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x6_SRGB_BLOCK = 169, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x8_UNORM_BLOCK = 170, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 8×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_8x8_SRGB_BLOCK = 171, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x5_UNORM_BLOCK = 172, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×5 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x5_SRGB_BLOCK = 173, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x6_UNORM_BLOCK = 174, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×6 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x6_SRGB_BLOCK = 175, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x8_UNORM_BLOCK = 176, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×8 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x8_SRGB_BLOCK = 177, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x10_UNORM_BLOCK = 178, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 10×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_10x10_SRGB_BLOCK = 179, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_12x10_UNORM_BLOCK = 180, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12×10 blocks. Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_12x10_SRGB_BLOCK = 181, + + /** VRAM-compressed unsigned floating-point data format with normalized value, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_12x12_UNORM_BLOCK = 182, + + /** VRAM-compressed unsigned floating-point data format with normalized value and non-linear sRGB encoding, packed in 12 blocks (lowest quality). Values are in the `[0.0, 1.0]` range. Using ASTC compression. */ + DATA_FORMAT_ASTC_12x12_SRGB_BLOCK = 183, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G8B8G8R8_422_UNORM = 184, + + /** 8-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_B8G8R8G8_422_UNORM = 185, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G8_B8_R8_3PLANE_420_UNORM = 186, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G8_B8R8_2PLANE_420_UNORM = 187, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G8_B8_R8_3PLANE_422_UNORM = 188, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G8_B8R8_2PLANE_422_UNORM = 189, + + /** 8-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, stored across 3 separate planes. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_G8_B8_R8_3PLANE_444_UNORM = 190, + + /** 10-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R10X6_UNORM_PACK16 = 191, + + /** 10-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R10X6G10X6_UNORM_2PACK16 = 192, + + /** 10-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16 = 193, + + /** 10-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. */ + DATA_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16 = 194, + + /** 10-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. */ + DATA_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16 = 195, + + /** 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16 = 196, + + /** 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16 = 197, + + /** 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16 = 198, + + /** 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16 = 199, + + /** 10-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16 = 200, + + /** 12-bit-per-channel unsigned floating-point red channel data with normalized value, plus 6 unused bits, packed in 16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R12X4_UNORM_PACK16 = 201, + + /** 12-bit-per-channel unsigned floating-point red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 2×16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R12X4G12X4_UNORM_2PACK16 = 202, + + /** 12-bit-per-channel unsigned floating-point red/green/blue/alpha channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16 = 203, + + /** 12-bit-per-channel unsigned floating-point green/blue/green/red channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. */ + DATA_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16 = 204, + + /** 12-bit-per-channel unsigned floating-point blue/green/red/green channel data with normalized value, plus 6 unused bits after each channel, packed in 4×16 bits. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). The green channel is listed twice, but contains different values to allow it to be represented at full resolution. */ + DATA_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16 = 205, + + /** 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16 = 206, + + /** 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16 = 207, + + /** 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16 = 208, + + /** 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16 = 209, + + /** 12-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Packed in 3×16 bits and stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16 = 210, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G16B16G16R16_422_UNORM = 211, + + /** 16-bit-per-channel unsigned floating-point blue/green/red channel data format with normalized value. Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_B16G16R16G16_422_UNORM = 212, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G16_B16_R16_3PLANE_420_UNORM = 213, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 2 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal and vertical resolution (i.e. 2×2 adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G16_B16R16_2PLANE_420_UNORM = 214, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G16_B16_R16_3PLANE_422_UNORM = 215, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue/red). Values are in the `[0.0, 1.0]` range. Blue and red channel data is stored at halved horizontal resolution (i.e. 2 horizontally adjacent pixels will share the same value for the blue/red channel). */ + DATA_FORMAT_G16_B16R16_2PLANE_422_UNORM = 216, + + /** 16-bit-per-channel unsigned floating-point green/blue/red channel data with normalized value, plus 6 unused bits after each channel. Stored across 3 separate planes (green + blue + red). Values are in the `[0.0, 1.0]` range. */ + DATA_FORMAT_G16_B16_R16_3PLANE_444_UNORM = 217, + + /** Represents the size of the [enum DataFormat] enum. */ + DATA_FORMAT_MAX = 218, + } + enum BarrierMask { + /** Vertex shader barrier mask. */ + BARRIER_MASK_VERTEX = 1, + + /** Fragment shader barrier mask. */ + BARRIER_MASK_FRAGMENT = 8, + + /** Compute barrier mask. */ + BARRIER_MASK_COMPUTE = 2, + + /** Transfer barrier mask. */ + BARRIER_MASK_TRANSFER = 4, + + /** Raster barrier mask (vertex and fragment). Equivalent to `BARRIER_MASK_VERTEX | BARRIER_MASK_FRAGMENT`. */ + BARRIER_MASK_RASTER = 9, + + /** Barrier mask for all types (vertex, fragment, compute, transfer). */ + BARRIER_MASK_ALL_BARRIERS = 32767, + + /** No barrier for any type. */ + BARRIER_MASK_NO_BARRIER = 32768, + } + enum TextureType { + /** 1-dimensional texture. */ + TEXTURE_TYPE_1D = 0, + + /** 2-dimensional texture. */ + TEXTURE_TYPE_2D = 1, + + /** 3-dimensional texture. */ + TEXTURE_TYPE_3D = 2, + + /** [Cubemap] texture. */ + TEXTURE_TYPE_CUBE = 3, + + /** Array of 1-dimensional textures. */ + TEXTURE_TYPE_1D_ARRAY = 4, + + /** Array of 2-dimensional textures. */ + TEXTURE_TYPE_2D_ARRAY = 5, + + /** Array of [Cubemap] textures. */ + TEXTURE_TYPE_CUBE_ARRAY = 6, + + /** Represents the size of the [enum TextureType] enum. */ + TEXTURE_TYPE_MAX = 7, + } + enum TextureSamples { + /** Perform 1 texture sample (this is the fastest but lowest-quality for antialiasing). */ + TEXTURE_SAMPLES_1 = 0, + + /** Perform 2 texture samples. */ + TEXTURE_SAMPLES_2 = 1, + + /** Perform 4 texture samples. */ + TEXTURE_SAMPLES_4 = 2, + + /** Perform 8 texture samples. Not supported on mobile GPUs (including Apple Silicon). */ + TEXTURE_SAMPLES_8 = 3, + + /** Perform 16 texture samples. Not supported on mobile GPUs and many desktop GPUs. */ + TEXTURE_SAMPLES_16 = 4, + + /** Perform 32 texture samples. Not supported on most GPUs. */ + TEXTURE_SAMPLES_32 = 5, + + /** Perform 64 texture samples (this is the slowest but highest-quality for antialiasing). Not supported on most GPUs. */ + TEXTURE_SAMPLES_64 = 6, + + /** Represents the size of the [enum TextureSamples] enum. */ + TEXTURE_SAMPLES_MAX = 7, + } + enum TextureUsageBits { + /** Texture can be sampled. */ + TEXTURE_USAGE_SAMPLING_BIT = 1, + + /** Texture can be used as a color attachment in a framebuffer. */ + TEXTURE_USAGE_COLOR_ATTACHMENT_BIT = 2, + + /** Texture can be used as a depth/stencil attachment in a framebuffer. */ + TEXTURE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 4, + + /** Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-storageimage]storage image[/url]. */ + TEXTURE_USAGE_STORAGE_BIT = 8, + + /** Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-storageimage]storage image[/url] with support for atomic operations. */ + TEXTURE_USAGE_STORAGE_ATOMIC_BIT = 16, + + /** Texture can be read back on the CPU using [method texture_get_data] faster than without this bit, since it is always kept in the system memory. */ + TEXTURE_USAGE_CPU_READ_BIT = 32, + + /** Texture can be updated using [method texture_update]. */ + TEXTURE_USAGE_CAN_UPDATE_BIT = 64, + + /** Texture can be a source for [method texture_copy]. */ + TEXTURE_USAGE_CAN_COPY_FROM_BIT = 128, + + /** Texture can be a destination for [method texture_copy]. */ + TEXTURE_USAGE_CAN_COPY_TO_BIT = 256, + + /** Texture can be used as a [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#descriptorsets-inputattachment]input attachment[/url] in a framebuffer. */ + TEXTURE_USAGE_INPUT_ATTACHMENT_BIT = 512, + } + enum TextureSwizzle { + /** Return the sampled value as-is. */ + TEXTURE_SWIZZLE_IDENTITY = 0, + + /** Always return `0.0` when sampling. */ + TEXTURE_SWIZZLE_ZERO = 1, + + /** Always return `1.0` when sampling. */ + TEXTURE_SWIZZLE_ONE = 2, + + /** Sample the red color channel. */ + TEXTURE_SWIZZLE_R = 3, + + /** Sample the green color channel. */ + TEXTURE_SWIZZLE_G = 4, + + /** Sample the blue color channel. */ + TEXTURE_SWIZZLE_B = 5, + + /** Sample the alpha channel. */ + TEXTURE_SWIZZLE_A = 6, + + /** Represents the size of the [enum TextureSwizzle] enum. */ + TEXTURE_SWIZZLE_MAX = 7, + } + enum TextureSliceType { + /** 2-dimensional texture slice. */ + TEXTURE_SLICE_2D = 0, + + /** Cubemap texture slice. */ + TEXTURE_SLICE_CUBEMAP = 1, + + /** 3-dimensional texture slice. */ + TEXTURE_SLICE_3D = 2, + } + enum SamplerFilter { + /** Nearest-neighbor sampler filtering. Sampling at higher resolutions than the source will result in a pixelated look. */ + SAMPLER_FILTER_NEAREST = 0, + + /** Bilinear sampler filtering. Sampling at higher resolutions than the source will result in a blurry look. */ + SAMPLER_FILTER_LINEAR = 1, + } + enum SamplerRepeatMode { + /** Sample with repeating enabled. */ + SAMPLER_REPEAT_MODE_REPEAT = 0, + + /** Sample with mirrored repeating enabled. When sampling outside the `[0.0, 1.0]` range, return a mirrored version of the sampler. This mirrored version is mirrored again if sampling further away, with the pattern repeating indefinitely. */ + SAMPLER_REPEAT_MODE_MIRRORED_REPEAT = 1, + + /** Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the color of the last pixel on the edge. */ + SAMPLER_REPEAT_MODE_CLAMP_TO_EDGE = 2, + + /** Sample with repeating disabled. When sampling outside the `[0.0, 1.0]` range, return the specified [member RDSamplerState.border_color]. */ + SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER = 3, + + /** Sample with mirrored repeating enabled, but only once. When sampling in the `[-1.0, 0.0]` range, return a mirrored version of the sampler. When sampling outside the `[-1.0, 1.0]` range, return the color of the last pixel on the edge. */ + SAMPLER_REPEAT_MODE_MIRROR_CLAMP_TO_EDGE = 4, + + /** Represents the size of the [enum SamplerRepeatMode] enum. */ + SAMPLER_REPEAT_MODE_MAX = 5, + } + enum SamplerBorderColor { + /** Return a floating-point transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK = 0, + + /** Return a integer transparent black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_INT_TRANSPARENT_BLACK = 1, + + /** Return a floating-point opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_BLACK = 2, + + /** Return a integer opaque black color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_INT_OPAQUE_BLACK = 3, + + /** Return a floating-point opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_FLOAT_OPAQUE_WHITE = 4, + + /** Return a integer opaque white color when sampling outside the `[0.0, 1.0]` range. Only effective if the sampler repeat mode is [constant SAMPLER_REPEAT_MODE_CLAMP_TO_BORDER]. */ + SAMPLER_BORDER_COLOR_INT_OPAQUE_WHITE = 5, + + /** Represents the size of the [enum SamplerBorderColor] enum. */ + SAMPLER_BORDER_COLOR_MAX = 6, + } + enum VertexFrequency { + /** Vertex attribute addressing is a function of the vertex. This is used to specify the rate at which vertex attributes are pulled from buffers. */ + VERTEX_FREQUENCY_VERTEX = 0, + + /** Vertex attribute addressing is a function of the instance index. This is used to specify the rate at which vertex attributes are pulled from buffers. */ + VERTEX_FREQUENCY_INSTANCE = 1, + } + enum IndexBufferFormat { + /** Index buffer in 16-bit unsigned integer format. This limits the maximum index that can be specified to `65535`. */ + INDEX_BUFFER_FORMAT_UINT16 = 0, + + /** Index buffer in 32-bit unsigned integer format. This limits the maximum index that can be specified to `4294967295`. */ + INDEX_BUFFER_FORMAT_UINT32 = 1, + } + enum StorageBufferUsage { + STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT = 1, + } + enum UniformType { + /** Sampler uniform. */ + UNIFORM_TYPE_SAMPLER = 0, + + /** Sampler uniform with a texture. */ + UNIFORM_TYPE_SAMPLER_WITH_TEXTURE = 1, + + /** Texture uniform. */ + UNIFORM_TYPE_TEXTURE = 2, + + /** Image uniform. */ + UNIFORM_TYPE_IMAGE = 3, + + /** Texture buffer uniform. */ + UNIFORM_TYPE_TEXTURE_BUFFER = 4, + + /** Sampler uniform with a texture buffer. */ + UNIFORM_TYPE_SAMPLER_WITH_TEXTURE_BUFFER = 5, + + /** Image buffer uniform. */ + UNIFORM_TYPE_IMAGE_BUFFER = 6, + + /** Uniform buffer uniform. */ + UNIFORM_TYPE_UNIFORM_BUFFER = 7, + + /** [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]Storage buffer[/url] uniform. */ + UNIFORM_TYPE_STORAGE_BUFFER = 8, + + /** Input attachment uniform. */ + UNIFORM_TYPE_INPUT_ATTACHMENT = 9, + + /** Represents the size of the [enum UniformType] enum. */ + UNIFORM_TYPE_MAX = 10, + } + enum RenderPrimitive { + /** Point rendering primitive (with constant size, regardless of distance from camera). */ + RENDER_PRIMITIVE_POINTS = 0, + + /** Line list rendering primitive. Lines are drawn separated from each other. */ + RENDER_PRIMITIVE_LINES = 1, + + /** [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-line-lists-with-adjacency]Line list rendering primitive with adjacency.[/url] + * + * **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. + */ + RENDER_PRIMITIVE_LINES_WITH_ADJACENCY = 2, + + /** Line strip rendering primitive. Lines drawn are connected to the previous vertex. */ + RENDER_PRIMITIVE_LINESTRIPS = 3, + + /** [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-line-strips-with-adjacency]Line strip rendering primitive with adjacency.[/url] + * + * **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. + */ + RENDER_PRIMITIVE_LINESTRIPS_WITH_ADJACENCY = 4, + + /** Triangle list rendering primitive. Triangles are drawn separated from each other. */ + RENDER_PRIMITIVE_TRIANGLES = 5, + + /** [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-triangle-lists-with-adjacency]Triangle list rendering primitive with adjacency.[/url] + * + * **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. + */ + RENDER_PRIMITIVE_TRIANGLES_WITH_ADJACENCY = 6, + + /** Triangle strip rendering primitive. Triangles drawn are connected to the previous triangle. */ + RENDER_PRIMITIVE_TRIANGLE_STRIPS = 7, + + /** [url=https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#drawing-triangle-strips-with-adjacency]Triangle strip rendering primitive with adjacency.[/url] + * + * **Note:** Adjacency is only useful with geometry shaders, which Godot does not expose. + */ + RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_AJACENCY = 8, + + /** Triangle strip rendering primitive with *primitive restart* enabled. Triangles drawn are connected to the previous triangle, but a primitive restart index can be specified before drawing to create a second triangle strip after the specified index. + * + * **Note:** Only compatible with indexed draws. + */ + RENDER_PRIMITIVE_TRIANGLE_STRIPS_WITH_RESTART_INDEX = 9, + + /** Tessellation patch rendering primitive. Only useful with tessellation shaders, which can be used to deform these patches. */ + RENDER_PRIMITIVE_TESSELATION_PATCH = 10, + + /** Represents the size of the [enum RenderPrimitive] enum. */ + RENDER_PRIMITIVE_MAX = 11, + } + enum PolygonCullMode { + /** Do not use polygon front face or backface culling. */ + POLYGON_CULL_DISABLED = 0, + + /** Use polygon frontface culling (faces pointing towards the camera are hidden). */ + POLYGON_CULL_FRONT = 1, + + /** Use polygon backface culling (faces pointing away from the camera are hidden). */ + POLYGON_CULL_BACK = 2, + } + enum PolygonFrontFace { + /** Clockwise winding order to determine which face of a polygon is its front face. */ + POLYGON_FRONT_FACE_CLOCKWISE = 0, + + /** Counter-clockwise winding order to determine which face of a polygon is its front face. */ + POLYGON_FRONT_FACE_COUNTER_CLOCKWISE = 1, + } + enum StencilOperation { + /** Keep the current stencil value. */ + STENCIL_OP_KEEP = 0, + + /** Set the stencil value to `0`. */ + STENCIL_OP_ZERO = 1, + + /** Replace the existing stencil value with the new one. */ + STENCIL_OP_REPLACE = 2, + + /** Increment the existing stencil value and clamp to the maximum representable unsigned value if reached. Stencil bits are considered as an unsigned integer. */ + STENCIL_OP_INCREMENT_AND_CLAMP = 3, + + /** Decrement the existing stencil value and clamp to the minimum value if reached. Stencil bits are considered as an unsigned integer. */ + STENCIL_OP_DECREMENT_AND_CLAMP = 4, + + /** Bitwise-invert the existing stencil value. */ + STENCIL_OP_INVERT = 5, + + /** Increment the stencil value and wrap around to `0` if reaching the maximum representable unsigned. Stencil bits are considered as an unsigned integer. */ + STENCIL_OP_INCREMENT_AND_WRAP = 6, + + /** Decrement the stencil value and wrap around to the maximum representable unsigned if reaching the minimum. Stencil bits are considered as an unsigned integer. */ + STENCIL_OP_DECREMENT_AND_WRAP = 7, + + /** Represents the size of the [enum StencilOperation] enum. */ + STENCIL_OP_MAX = 8, + } + enum CompareOperator { + /** "Never" comparison (opposite of [constant COMPARE_OP_ALWAYS]). */ + COMPARE_OP_NEVER = 0, + + /** "Less than" comparison. */ + COMPARE_OP_LESS = 1, + + /** "Equal" comparison. */ + COMPARE_OP_EQUAL = 2, + + /** "Less than or equal" comparison. */ + COMPARE_OP_LESS_OR_EQUAL = 3, + + /** "Greater than" comparison. */ + COMPARE_OP_GREATER = 4, + + /** "Not equal" comparison. */ + COMPARE_OP_NOT_EQUAL = 5, + + /** "Greater than or equal" comparison. */ + COMPARE_OP_GREATER_OR_EQUAL = 6, + + /** "Always" comparison (opposite of [constant COMPARE_OP_NEVER]). */ + COMPARE_OP_ALWAYS = 7, + + /** Represents the size of the [enum CompareOperator] enum. */ + COMPARE_OP_MAX = 8, + } + enum LogicOperation { + /** Clear logic operation (result is always `0`). See also [constant LOGIC_OP_SET]. */ + LOGIC_OP_CLEAR = 0, + + /** AND logic operation. */ + LOGIC_OP_AND = 1, + + /** AND logic operation with the *destination* operand being inverted. See also [constant LOGIC_OP_AND_INVERTED]. */ + LOGIC_OP_AND_REVERSE = 2, + + /** Copy logic operation (keeps the *source* value as-is). See also [constant LOGIC_OP_COPY_INVERTED] and [constant LOGIC_OP_NO_OP]. */ + LOGIC_OP_COPY = 3, + + /** AND logic operation with the *source* operand being inverted. See also [constant LOGIC_OP_AND_REVERSE]. */ + LOGIC_OP_AND_INVERTED = 4, + + /** No-op logic operation (keeps the *destination* value as-is). See also [constant LOGIC_OP_COPY]. */ + LOGIC_OP_NO_OP = 5, + + /** Exclusive or (XOR) logic operation. */ + LOGIC_OP_XOR = 6, + + /** OR logic operation. */ + LOGIC_OP_OR = 7, + + /** Not-OR (NOR) logic operation. */ + LOGIC_OP_NOR = 8, + + /** Not-XOR (XNOR) logic operation. */ + LOGIC_OP_EQUIVALENT = 9, + + /** Invert logic operation. */ + LOGIC_OP_INVERT = 10, + + /** OR logic operation with the *destination* operand being inverted. See also [constant LOGIC_OP_OR_REVERSE]. */ + LOGIC_OP_OR_REVERSE = 11, + + /** NOT logic operation (inverts the value). See also [constant LOGIC_OP_COPY]. */ + LOGIC_OP_COPY_INVERTED = 12, + + /** OR logic operation with the *source* operand being inverted. See also [constant LOGIC_OP_OR_REVERSE]. */ + LOGIC_OP_OR_INVERTED = 13, + + /** Not-AND (NAND) logic operation. */ + LOGIC_OP_NAND = 14, + + /** SET logic operation (result is always `1`). See also [constant LOGIC_OP_CLEAR]. */ + LOGIC_OP_SET = 15, + + /** Represents the size of the [enum LogicOperation] enum. */ + LOGIC_OP_MAX = 16, + } + enum BlendFactor { + /** Constant `0.0` blend factor. */ + BLEND_FACTOR_ZERO = 0, + + /** Constant `1.0` blend factor. */ + BLEND_FACTOR_ONE = 1, + + /** Color blend factor is `source color`. Alpha blend factor is `source alpha`. */ + BLEND_FACTOR_SRC_COLOR = 2, + + /** Color blend factor is `1.0 - source color`. Alpha blend factor is `1.0 - source alpha`. */ + BLEND_FACTOR_ONE_MINUS_SRC_COLOR = 3, + + /** Color blend factor is `destination color`. Alpha blend factor is `destination alpha`. */ + BLEND_FACTOR_DST_COLOR = 4, + + /** Color blend factor is `1.0 - destination color`. Alpha blend factor is `1.0 - destination alpha`. */ + BLEND_FACTOR_ONE_MINUS_DST_COLOR = 5, + + /** Color and alpha blend factor is `source alpha`. */ + BLEND_FACTOR_SRC_ALPHA = 6, + + /** Color and alpha blend factor is `1.0 - source alpha`. */ + BLEND_FACTOR_ONE_MINUS_SRC_ALPHA = 7, + + /** Color and alpha blend factor is `destination alpha`. */ + BLEND_FACTOR_DST_ALPHA = 8, + + /** Color and alpha blend factor is `1.0 - destination alpha`. */ + BLEND_FACTOR_ONE_MINUS_DST_ALPHA = 9, + + /** Color blend factor is `blend constant color`. Alpha blend factor is `blend constant alpha` (see [method draw_list_set_blend_constants]). */ + BLEND_FACTOR_CONSTANT_COLOR = 10, + + /** Color blend factor is `1.0 - blend constant color`. Alpha blend factor is `1.0 - blend constant alpha` (see [method draw_list_set_blend_constants]). */ + BLEND_FACTOR_ONE_MINUS_CONSTANT_COLOR = 11, + + /** Color and alpha blend factor is `blend constant alpha` (see [method draw_list_set_blend_constants]). */ + BLEND_FACTOR_CONSTANT_ALPHA = 12, + + /** Color and alpha blend factor is `1.0 - blend constant alpha` (see [method draw_list_set_blend_constants]). */ + BLEND_FACTOR_ONE_MINUS_CONSTANT_ALPHA = 13, + + /** Color blend factor is `min(source alpha, 1.0 - destination alpha)`. Alpha blend factor is `1.0`. */ + BLEND_FACTOR_SRC_ALPHA_SATURATE = 14, + + /** Color blend factor is `second source color`. Alpha blend factor is `second source alpha`. Only relevant for dual-source blending. */ + BLEND_FACTOR_SRC1_COLOR = 15, + + /** Color blend factor is `1.0 - second source color`. Alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending. */ + BLEND_FACTOR_ONE_MINUS_SRC1_COLOR = 16, + + /** Color and alpha blend factor is `second source alpha`. Only relevant for dual-source blending. */ + BLEND_FACTOR_SRC1_ALPHA = 17, + + /** Color and alpha blend factor is `1.0 - second source alpha`. Only relevant for dual-source blending. */ + BLEND_FACTOR_ONE_MINUS_SRC1_ALPHA = 18, + + /** Represents the size of the [enum BlendFactor] enum. */ + BLEND_FACTOR_MAX = 19, + } + enum BlendOperation { + /** Additive blending operation (`source + destination`). */ + BLEND_OP_ADD = 0, + + /** Subtractive blending operation (`source - destination`). */ + BLEND_OP_SUBTRACT = 1, + + /** Reverse subtractive blending operation (`destination - source`). */ + BLEND_OP_REVERSE_SUBTRACT = 2, + + /** Minimum blending operation (keep the lowest value of the two). */ + BLEND_OP_MINIMUM = 3, + + /** Maximum blending operation (keep the highest value of the two). */ + BLEND_OP_MAXIMUM = 4, + + /** Represents the size of the [enum BlendOperation] enum. */ + BLEND_OP_MAX = 5, + } + enum PipelineDynamicStateFlags { + /** Allows dynamically changing the width of rendering lines. */ + DYNAMIC_STATE_LINE_WIDTH = 1, + + /** Allows dynamically changing the depth bias. */ + DYNAMIC_STATE_DEPTH_BIAS = 2, + DYNAMIC_STATE_BLEND_CONSTANTS = 4, + DYNAMIC_STATE_DEPTH_BOUNDS = 8, + DYNAMIC_STATE_STENCIL_COMPARE_MASK = 16, + DYNAMIC_STATE_STENCIL_WRITE_MASK = 32, + DYNAMIC_STATE_STENCIL_REFERENCE = 64, + } + enum InitialAction { + /** Load the previous contents of the framebuffer. */ + INITIAL_ACTION_LOAD = 0, + + /** Clear the whole framebuffer or its specified region. */ + INITIAL_ACTION_CLEAR = 1, + + /** Ignore the previous contents of the framebuffer. This is the fastest option if you'll overwrite all of the pixels and don't need to read any of them. */ + INITIAL_ACTION_DISCARD = 2, + + /** Represents the size of the [enum InitialAction] enum. */ + INITIAL_ACTION_MAX = 3, + INITIAL_ACTION_CLEAR_REGION = 1, + INITIAL_ACTION_CLEAR_REGION_CONTINUE = 1, + INITIAL_ACTION_KEEP = 0, + INITIAL_ACTION_DROP = 2, + INITIAL_ACTION_CONTINUE = 0, + } + enum FinalAction { + /** Store the result of the draw list in the framebuffer. This is generally what you want to do. */ + FINAL_ACTION_STORE = 0, + + /** Discard the contents of the framebuffer. This is the fastest option if you don't need to use the results of the draw list. */ + FINAL_ACTION_DISCARD = 1, + + /** Represents the size of the [enum FinalAction] enum. */ + FINAL_ACTION_MAX = 2, + FINAL_ACTION_READ = 0, + FINAL_ACTION_CONTINUE = 0, + } + enum ShaderStage { + /** Vertex shader stage. This can be used to manipulate vertices from a shader (but not create new vertices). */ + SHADER_STAGE_VERTEX = 0, + + /** Fragment shader stage (called "pixel shader" in Direct3D). This can be used to manipulate pixels from a shader. */ + SHADER_STAGE_FRAGMENT = 1, + + /** Tessellation control shader stage. This can be used to create additional geometry from a shader. */ + SHADER_STAGE_TESSELATION_CONTROL = 2, + + /** Tessellation evaluation shader stage. This can be used to create additional geometry from a shader. */ + SHADER_STAGE_TESSELATION_EVALUATION = 3, + + /** Compute shader stage. This can be used to run arbitrary computing tasks in a shader, performing them on the GPU instead of the CPU. */ + SHADER_STAGE_COMPUTE = 4, + + /** Represents the size of the [enum ShaderStage] enum. */ + SHADER_STAGE_MAX = 5, + + /** Vertex shader stage bit (see also [constant SHADER_STAGE_VERTEX]). */ + SHADER_STAGE_VERTEX_BIT = 1, + + /** Fragment shader stage bit (see also [constant SHADER_STAGE_FRAGMENT]). */ + SHADER_STAGE_FRAGMENT_BIT = 2, + + /** Tessellation control shader stage bit (see also [constant SHADER_STAGE_TESSELATION_CONTROL]). */ + SHADER_STAGE_TESSELATION_CONTROL_BIT = 4, + + /** Tessellation evaluation shader stage bit (see also [constant SHADER_STAGE_TESSELATION_EVALUATION]). */ + SHADER_STAGE_TESSELATION_EVALUATION_BIT = 8, + + /** Compute shader stage bit (see also [constant SHADER_STAGE_COMPUTE]). */ + SHADER_STAGE_COMPUTE_BIT = 16, + } + enum ShaderLanguage { + /** Khronos' GLSL shading language (used natively by OpenGL and Vulkan). This is the language used for core Godot shaders. */ + SHADER_LANGUAGE_GLSL = 0, + + /** Microsoft's High-Level Shading Language (used natively by Direct3D, but can also be used in Vulkan). */ + SHADER_LANGUAGE_HLSL = 1, + } + enum PipelineSpecializationConstantType { + /** Boolean specialization constant. */ + PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL = 0, + + /** Integer specialization constant. */ + PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT = 1, + + /** Floating-point specialization constant. */ + PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT = 2, + } + enum Limit { + /** Maximum number of uniform sets that can be bound at a given time. */ + LIMIT_MAX_BOUND_UNIFORM_SETS = 0, + + /** Maximum number of color framebuffer attachments that can be used at a given time. */ + LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS = 1, + + /** Maximum number of textures that can be used per uniform set. */ + LIMIT_MAX_TEXTURES_PER_UNIFORM_SET = 2, + + /** Maximum number of samplers that can be used per uniform set. */ + LIMIT_MAX_SAMPLERS_PER_UNIFORM_SET = 3, + + /** Maximum number of [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffers[/url] per uniform set. */ + LIMIT_MAX_STORAGE_BUFFERS_PER_UNIFORM_SET = 4, + + /** Maximum number of storage images per uniform set. */ + LIMIT_MAX_STORAGE_IMAGES_PER_UNIFORM_SET = 5, + + /** Maximum number of uniform buffers per uniform set. */ + LIMIT_MAX_UNIFORM_BUFFERS_PER_UNIFORM_SET = 6, + + /** Maximum index for an indexed draw command. */ + LIMIT_MAX_DRAW_INDEXED_INDEX = 7, + + /** Maximum height of a framebuffer (in pixels). */ + LIMIT_MAX_FRAMEBUFFER_HEIGHT = 8, + + /** Maximum width of a framebuffer (in pixels). */ + LIMIT_MAX_FRAMEBUFFER_WIDTH = 9, + + /** Maximum number of texture array layers. */ + LIMIT_MAX_TEXTURE_ARRAY_LAYERS = 10, + + /** Maximum supported 1-dimensional texture size (in pixels on a single axis). */ + LIMIT_MAX_TEXTURE_SIZE_1D = 11, + + /** Maximum supported 2-dimensional texture size (in pixels on a single axis). */ + LIMIT_MAX_TEXTURE_SIZE_2D = 12, + + /** Maximum supported 3-dimensional texture size (in pixels on a single axis). */ + LIMIT_MAX_TEXTURE_SIZE_3D = 13, + + /** Maximum supported cubemap texture size (in pixels on a single axis of a single face). */ + LIMIT_MAX_TEXTURE_SIZE_CUBE = 14, + + /** Maximum number of textures per shader stage. */ + LIMIT_MAX_TEXTURES_PER_SHADER_STAGE = 15, + + /** Maximum number of samplers per shader stage. */ + LIMIT_MAX_SAMPLERS_PER_SHADER_STAGE = 16, + + /** Maximum number of [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffers[/url] per shader stage. */ + LIMIT_MAX_STORAGE_BUFFERS_PER_SHADER_STAGE = 17, + + /** Maximum number of storage images per shader stage. */ + LIMIT_MAX_STORAGE_IMAGES_PER_SHADER_STAGE = 18, + + /** Maximum number of uniform buffers per uniform set. */ + LIMIT_MAX_UNIFORM_BUFFERS_PER_SHADER_STAGE = 19, + + /** Maximum size of a push constant. A lot of devices are limited to 128 bytes, so try to avoid exceeding 128 bytes in push constants to ensure compatibility even if your GPU is reporting a higher value. */ + LIMIT_MAX_PUSH_CONSTANT_SIZE = 20, + + /** Maximum size of a uniform buffer. */ + LIMIT_MAX_UNIFORM_BUFFER_SIZE = 21, + + /** Maximum vertex input attribute offset. */ + LIMIT_MAX_VERTEX_INPUT_ATTRIBUTE_OFFSET = 22, + + /** Maximum number of vertex input attributes. */ + LIMIT_MAX_VERTEX_INPUT_ATTRIBUTES = 23, + + /** Maximum number of vertex input bindings. */ + LIMIT_MAX_VERTEX_INPUT_BINDINGS = 24, + + /** Maximum vertex input binding stride. */ + LIMIT_MAX_VERTEX_INPUT_BINDING_STRIDE = 25, + + /** Minimum uniform buffer offset alignment. */ + LIMIT_MIN_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 26, + + /** Maximum shared memory size for compute shaders. */ + LIMIT_MAX_COMPUTE_SHARED_MEMORY_SIZE = 27, + + /** Maximum number of workgroups for compute shaders on the X axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_X = 28, + + /** Maximum number of workgroups for compute shaders on the Y axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Y = 29, + + /** Maximum number of workgroups for compute shaders on the Z axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_COUNT_Z = 30, + + /** Maximum number of workgroup invocations for compute shaders. */ + LIMIT_MAX_COMPUTE_WORKGROUP_INVOCATIONS = 31, + + /** Maximum workgroup size for compute shaders on the X axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_X = 32, + + /** Maximum workgroup size for compute shaders on the Y axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Y = 33, + + /** Maximum workgroup size for compute shaders on the Z axis. */ + LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z = 34, + + /** Maximum viewport width (in pixels). */ + LIMIT_MAX_VIEWPORT_DIMENSIONS_X = 35, + + /** Maximum viewport height (in pixels). */ + LIMIT_MAX_VIEWPORT_DIMENSIONS_Y = 36, + } + enum MemoryType { + /** Memory taken by textures. */ + MEMORY_TEXTURES = 0, + + /** Memory taken by buffers. */ + MEMORY_BUFFERS = 1, + + /** Total memory taken. This is greater than the sum of [constant MEMORY_TEXTURES] and [constant MEMORY_BUFFERS], as it also includes miscellaneous memory usage. */ + MEMORY_TOTAL = 2, + } + } + /** Abstraction for working with modern low-level graphics APIs. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_renderingdevice.html + */ + class RenderingDevice extends Object { + /** Returned by functions that return an ID if a value is invalid. */ + static readonly INVALID_ID = -1 + + /** Returned by functions that return a format ID if a value is invalid. */ + static readonly INVALID_FORMAT_ID = -1 + constructor(identifier?: any) + + /** Creates a new texture. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + * + * **Note:** Not to be confused with [method RenderingServer.texture_2d_create], which creates the Godot-specific [Texture2D] resource as opposed to the graphics API's own texture type. + */ + texture_create(format: RDTextureFormat, view: RDTextureView, data: GArray = []): RID + + /** Creates a shared texture using the specified [param view] and the texture information from [param with_texture]. */ + texture_create_shared(view: RDTextureView, with_texture: RID): RID + + /** Creates a shared texture using the specified [param view] and the texture information from [param with_texture]'s [param layer] and [param mipmap]. The number of included mipmaps from the original texture can be controlled using the [param mipmaps] parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use [method texture_create_shared] + * For 2D textures (which only have one layer), [param layer] must be `0`. + * + * **Note:** Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps. + */ + texture_create_shared_from_slice(view: RDTextureView, with_texture: RID, layer: int64, mipmap: int64, mipmaps: int64 = 1, slice_type: RenderingDevice.TextureSliceType = 0): RID + + /** Returns an RID for an existing [param image] (`VkImage`) with the given [param type], [param format], [param samples], [param usage_flags], [param width], [param height], [param depth], and [param layers]. This can be used to allow Godot to render onto foreign images. */ + texture_create_from_extension(type: RenderingDevice.TextureType, format: RenderingDevice.DataFormat, samples: RenderingDevice.TextureSamples, usage_flags: RenderingDevice.TextureUsageBits, image: int64, width: int64, height: int64, depth: int64, layers: int64): RID + + /** Updates texture data with new data, replacing the previous data in place. The updated texture data must have the same dimensions and format. For 2D textures (which only have one layer), [param layer] must be `0`. Returns [constant @GlobalScope.OK] if the update was successful, [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. + * + * **Note:** Updating textures is forbidden during creation of a draw or compute list. + * + * **Note:** The existing [param texture] can't be updated while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to update this texture. + * + * **Note:** The existing [param texture] requires the [constant TEXTURE_USAGE_CAN_UPDATE_BIT] to be updatable. + */ + texture_update(texture: RID, layer: int64, data: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Returns the [param texture] data for the specified [param layer] as raw binary data. For 2D textures (which only have one layer), [param layer] must be `0`. + * + * **Note:** [param texture] can't be retrieved while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to retrieve this texture. Otherwise, an error is printed and a empty [PackedByteArray] is returned. + * + * **Note:** [param texture] requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. Otherwise, an error is printed and a empty [PackedByteArray] is returned. + */ + texture_get_data(texture: RID, layer: int64): PackedByteArray + + /** Returns `true` if the specified [param format] is supported for the given [param usage_flags], `false` otherwise. */ + texture_is_format_supported_for_usage(format: RenderingDevice.DataFormat, usage_flags: RenderingDevice.TextureUsageBits): boolean + + /** Returns `true` if the [param texture] is shared, `false` otherwise. See [RDTextureView]. */ + texture_is_shared(texture: RID): boolean + + /** Returns `true` if the [param texture] is valid, `false` otherwise. */ + texture_is_valid(texture: RID): boolean + + /** Copies the [param from_texture] to [param to_texture] with the specified [param from_pos], [param to_pos] and [param size] coordinates. The Z axis of the [param from_pos], [param to_pos] and [param size] must be `0` for 2-dimensional textures. Source and destination mipmaps/layers must also be specified, with these parameters being `0` for textures without mipmaps or single-layer textures. Returns [constant @GlobalScope.OK] if the texture copy was successful or [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. + * + * **Note:** [param from_texture] texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to copy this texture. + * + * **Note:** [param from_texture] texture requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. + * + * **Note:** [param to_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to copy this texture. + * + * **Note:** [param to_texture] requires the [constant TEXTURE_USAGE_CAN_COPY_TO_BIT] to be retrieved. + * + * **Note:** [param from_texture] and [param to_texture] must be of the same type (color or depth). + */ + texture_copy(from_texture: RID, to_texture: RID, from_pos: Vector3, to_pos: Vector3, size: Vector3, src_mipmap: int64, dst_mipmap: int64, src_layer: int64, dst_layer: int64): GError + + /** Clears the specified [param texture] by replacing all of its pixels with the specified [param color]. [param base_mipmap] and [param mipmap_count] determine which mipmaps of the texture are affected by this clear operation, while [param base_layer] and [param layer_count] determine which layers of a 3D texture (or texture array) are affected by this clear operation. For 2D textures (which only have one layer by design), [param base_layer] must be `0` and [param layer_count] must be `1`. + * + * **Note:** [param texture] can't be cleared while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to clear this texture. + */ + texture_clear(texture: RID, color: Color, base_mipmap: int64, mipmap_count: int64, base_layer: int64, layer_count: int64): GError + + /** Resolves the [param from_texture] texture onto [param to_texture] with multisample antialiasing enabled. This must be used when rendering a framebuffer for MSAA to work. Returns [constant @GlobalScope.OK] if successful, [constant @GlobalScope.ERR_INVALID_PARAMETER] otherwise. + * + * **Note:** [param from_texture] and [param to_texture] textures must have the same dimension, format and type (color or depth). + * + * **Note:** [param from_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to resolve this texture. + * + * **Note:** [param from_texture] requires the [constant TEXTURE_USAGE_CAN_COPY_FROM_BIT] to be retrieved. + * + * **Note:** [param from_texture] must be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). + * + * **Note:** [param to_texture] can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to [constant FINAL_ACTION_CONTINUE]) to resolve this texture. + * + * **Note:** [param to_texture] texture requires the [constant TEXTURE_USAGE_CAN_COPY_TO_BIT] to be retrieved. + * + * **Note:** [param to_texture] texture must **not** be multisampled and must also be 2D (or a slice of a 3D/cubemap texture). + */ + texture_resolve_multisample(from_texture: RID, to_texture: RID): GError + + /** Returns the data format used to create this texture. */ + texture_get_format(texture: RID): RDTextureFormat + + /** Returns the internal graphics handle for this texture object. For use when communicating with third-party APIs mostly with GDExtension. + * + * **Note:** This function returns a `uint64_t` which internally maps to a `GLuint` (OpenGL) or `VkImage` (Vulkan). + */ + texture_get_native_handle(texture: RID): int64 + + /** Creates a new framebuffer format with the specified [param attachments] and [param view_count]. Returns the new framebuffer's unique framebuffer format ID. + * If [param view_count] is greater than or equal to `2`, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. + */ + framebuffer_format_create(attachments: GArray, view_count: int64 = 1): int64 + + /** Creates a multipass framebuffer format with the specified [param attachments], [param passes] and [param view_count] and returns its ID. If [param view_count] is greater than or equal to `2`, enables multiview which is used for VR rendering. This requires support for the Vulkan multiview extension. */ + framebuffer_format_create_multipass(attachments: GArray, passes: GArray, view_count: int64 = 1): int64 + + /** Creates a new empty framebuffer format with the specified number of [param samples] and returns its ID. */ + framebuffer_format_create_empty(samples: RenderingDevice.TextureSamples = 0): int64 + + /** Returns the number of texture samples used for the given framebuffer [param format] ID (returned by [method framebuffer_get_format]). */ + framebuffer_format_get_texture_samples(format: int64, render_pass: int64 = 0): RenderingDevice.TextureSamples + + /** Creates a new framebuffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + framebuffer_create(textures: GArray, validate_with_format: int64 = -1, view_count: int64 = 1): RID + + /** Creates a new multipass framebuffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + framebuffer_create_multipass(textures: GArray, passes: GArray, validate_with_format: int64 = -1, view_count: int64 = 1): RID + + /** Creates a new empty framebuffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + framebuffer_create_empty(size: Vector2i, samples: RenderingDevice.TextureSamples = 0, validate_with_format: int64 = -1): RID + + /** Returns the format ID of the framebuffer specified by the [param framebuffer] RID. This ID is guaranteed to be unique for the same formats and does not need to be freed. */ + framebuffer_get_format(framebuffer: RID): int64 + + /** Returns `true` if the framebuffer specified by the [param framebuffer] RID is valid, `false` otherwise. */ + framebuffer_is_valid(framebuffer: RID): boolean + + /** Creates a new sampler. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + sampler_create(state: RDSamplerState): RID + + /** Returns `true` if implementation supports using a texture of [param format] with the given [param sampler_filter]. */ + sampler_is_format_supported_for_filter(format: RenderingDevice.DataFormat, sampler_filter: RenderingDevice.SamplerFilter): boolean + + /** It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + vertex_buffer_create(size_bytes: int64, data: PackedByteArray | byte[] | ArrayBuffer = [], use_as_storage: boolean = false): RID + + /** Creates a new vertex format with the specified [param vertex_descriptions]. Returns a unique vertex format ID corresponding to the newly created vertex format. */ + vertex_format_create(vertex_descriptions: GArray): int64 + + /** Creates a vertex array based on the specified buffers. Optionally, [param offsets] (in bytes) may be defined for each buffer. */ + vertex_array_create(vertex_count: int64, vertex_format: int64, src_buffers: GArray, offsets: PackedInt64Array | int64[] = []): RID + + /** Creates a new index buffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + index_buffer_create(size_indices: int64, format: RenderingDevice.IndexBufferFormat, data: PackedByteArray | byte[] | ArrayBuffer = [], use_restart_indices: boolean = false): RID + + /** Creates a new index array. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + index_array_create(index_buffer: RID, index_offset: int64, index_count: int64): RID + + /** Compiles a SPIR-V from the shader source code in [param shader_source] and returns the SPIR-V as a [RDShaderSPIRV]. This intermediate language shader is portable across different GPU models and driver versions, but cannot be run directly by GPUs until compiled into a binary shader using [method shader_compile_binary_from_spirv]. + * If [param allow_cache] is `true`, make use of the shader cache generated by Godot. This avoids a potentially lengthy shader compilation step if the shader is already in cache. If [param allow_cache] is `false`, Godot's shader cache is ignored and the shader will always be recompiled. + */ + shader_compile_spirv_from_source(shader_source: RDShaderSource, allow_cache: boolean = true): RDShaderSPIRV + + /** Compiles a binary shader from [param spirv_data] and returns the compiled binary data as a [PackedByteArray]. This compiled shader is specific to the GPU model and driver version used; it will not work on different GPU models or even different driver versions. See also [method shader_compile_spirv_from_source]. + * [param name] is an optional human-readable name that can be given to the compiled shader for organizational purposes. + */ + shader_compile_binary_from_spirv(spirv_data: RDShaderSPIRV, name: string = ''): PackedByteArray + + /** Creates a new shader instance from SPIR-V intermediate code. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_spirv_from_source] and [method shader_create_from_bytecode]. + */ + shader_create_from_spirv(spirv_data: RDShaderSPIRV, name: string = ''): RID + + /** Creates a new shader instance from a binary compiled shader. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. See also [method shader_compile_binary_from_spirv] and [method shader_create_from_spirv]. + */ + shader_create_from_bytecode(binary_data: PackedByteArray | byte[] | ArrayBuffer, placeholder_rid: RID = new RID()): RID + + /** Create a placeholder RID by allocating an RID without initializing it for use in [method shader_create_from_bytecode]. This allows you to create an RID for a shader and pass it around, but defer compiling the shader to a later time. */ + shader_create_placeholder(): RID + + /** Returns the internal vertex input mask. Internally, the vertex input mask is an unsigned integer consisting of the locations (specified in GLSL via. `layout(location = ...)`) of the input variables (specified in GLSL by the `in` keyword). */ + shader_get_vertex_input_attribute_mask(shader: RID): int64 + + /** Creates a new uniform buffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + uniform_buffer_create(size_bytes: int64, data: PackedByteArray | byte[] | ArrayBuffer = []): RID + + /** Creates a [url=https://vkguide.dev/docs/chapter-4/storage_buffers/]storage buffer[/url] with the specified [param data] and [param usage]. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + storage_buffer_create(size_bytes: int64, data: PackedByteArray | byte[] | ArrayBuffer = [], usage: RenderingDevice.StorageBufferUsage = 0): RID + + /** Creates a new texture buffer. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + texture_buffer_create(size_bytes: int64, format: RenderingDevice.DataFormat, data: PackedByteArray | byte[] | ArrayBuffer = []): RID + + /** Creates a new uniform set. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + uniform_set_create(uniforms: GArray, shader: RID, shader_set: int64): RID + + /** Checks if the [param uniform_set] is valid, i.e. is owned. */ + uniform_set_is_valid(uniform_set: RID): boolean + + /** Copies [param size] bytes from the [param src_buffer] at [param src_offset] into [param dst_buffer] at [param dst_offset]. + * Prints an error if: + * - [param size] exceeds the size of either [param src_buffer] or [param dst_buffer] at their corresponding offsets + * - a draw list is currently active (created by [method draw_list_begin]) + * - a compute list is currently active (created by [method compute_list_begin]) + */ + buffer_copy(src_buffer: RID, dst_buffer: RID, src_offset: int64, dst_offset: int64, size: int64): GError + + /** Updates a region of [param size_bytes] bytes, starting at [param offset], in the buffer, with the specified [param data]. + * Prints an error if: + * - the region specified by [param offset] + [param size_bytes] exceeds the buffer + * - a draw list is currently active (created by [method draw_list_begin]) + * - a compute list is currently active (created by [method compute_list_begin]) + */ + buffer_update(buffer: RID, offset: int64, size_bytes: int64, data: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Clears the contents of the [param buffer], clearing [param size_bytes] bytes, starting at [param offset]. + * Prints an error if: + * - the size isn't a multiple of four + * - the region specified by [param offset] + [param size_bytes] exceeds the buffer + * - a draw list is currently active (created by [method draw_list_begin]) + * - a compute list is currently active (created by [method compute_list_begin]) + */ + buffer_clear(buffer: RID, offset: int64, size_bytes: int64): GError + + /** Returns a copy of the data of the specified [param buffer], optionally [param offset_bytes] and [param size_bytes] can be set to copy only a portion of the buffer. */ + buffer_get_data(buffer: RID, offset_bytes: int64 = 0, size_bytes: int64 = 0): PackedByteArray + + /** Creates a new render pipeline. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + render_pipeline_create(shader: RID, framebuffer_format: int64, vertex_format: int64, primitive: RenderingDevice.RenderPrimitive, rasterization_state: RDPipelineRasterizationState, multisample_state: RDPipelineMultisampleState, stencil_state: RDPipelineDepthStencilState, color_blend_state: RDPipelineColorBlendState, dynamic_state_flags: RenderingDevice.PipelineDynamicStateFlags = 0, for_render_pass: int64 = 0, specialization_constants: GArray = []): RID + + /** Returns `true` if the render pipeline specified by the [param render_pipeline] RID is valid, `false` otherwise. */ + render_pipeline_is_valid(render_pipeline: RID): boolean + + /** Creates a new compute pipeline. It can be accessed with the RID that is returned. + * Once finished with your RID, you will want to free the RID using the RenderingDevice's [method free_rid] method. + */ + compute_pipeline_create(shader: RID, specialization_constants: GArray = []): RID + + /** Returns `true` if the compute pipeline specified by the [param compute_pipeline] RID is valid, `false` otherwise. */ + compute_pipeline_is_valid(compute_pipeline: RID): boolean + + /** Returns the window width matching the graphics API context for the given window ID (in pixels). Despite the parameter being named [param screen], this returns the *window* size. See also [method screen_get_height]. + * + * **Note:** Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a width. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID]. + */ + screen_get_width(screen: int64 = 0): int64 + + /** Returns the window height matching the graphics API context for the given window ID (in pixels). Despite the parameter being named [param screen], this returns the *window* size. See also [method screen_get_width]. + * + * **Note:** Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a height. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID]. + */ + screen_get_height(screen: int64 = 0): int64 + + /** Returns the framebuffer format of the given screen. + * + * **Note:** Only the main [RenderingDevice] returned by [method RenderingServer.get_rendering_device] has a format. If called on a local [RenderingDevice], this method prints an error and returns [constant INVALID_ID]. + */ + screen_get_framebuffer_format(screen: int64 = 0): int64 + + /** High-level variant of [method draw_list_begin], with the parameters automatically being adjusted for drawing onto the window specified by the [param screen] ID. + * + * **Note:** Cannot be used with local RenderingDevices, as these don't have a screen. If called on a local RenderingDevice, [method draw_list_begin_for_screen] returns [constant INVALID_ID]. + */ + draw_list_begin_for_screen(screen: int64 = 0, clear_color: Color = new Color(0, 0, 0, 1)): int64 + + /** Starts a list of raster drawing commands created with the `draw_*` methods. The returned value should be passed to other `draw_list_*` functions. + * Multiple draw lists cannot be created at the same time; you must finish the previous draw list first using [method draw_list_end]. + * A simple drawing operation might look like this (code is not a complete example): + * + */ + draw_list_begin(framebuffer: RID, initial_color_action: RenderingDevice.InitialAction, final_color_action: RenderingDevice.FinalAction, initial_depth_action: RenderingDevice.InitialAction, final_depth_action: RenderingDevice.FinalAction, clear_color_values: PackedColorArray | Color[] = [], clear_depth: float64 = 1, clear_stencil: int64 = 0, region: Rect2 = new Rect2(0, 0, 0, 0)): int64 + + /** This method does nothing and always returns an empty [PackedInt64Array]. */ + draw_list_begin_split(framebuffer: RID, splits: int64, initial_color_action: RenderingDevice.InitialAction, final_color_action: RenderingDevice.FinalAction, initial_depth_action: RenderingDevice.InitialAction, final_depth_action: RenderingDevice.FinalAction, clear_color_values: PackedColorArray | Color[] = [], clear_depth: float64 = 1, clear_stencil: int64 = 0, region: Rect2 = new Rect2(0, 0, 0, 0), storage_textures: GArray = []): PackedInt64Array + + /** Sets blend constants for the specified [param draw_list] to [param color]. Blend constants are used only if the graphics pipeline is created with [constant DYNAMIC_STATE_BLEND_CONSTANTS] flag set. */ + draw_list_set_blend_constants(draw_list: int64, color: Color): void + + /** Binds [param render_pipeline] to the specified [param draw_list]. */ + draw_list_bind_render_pipeline(draw_list: int64, render_pipeline: RID): void + + /** Binds [param uniform_set] to the specified [param draw_list]. A [param set_index] must also be specified, which is an identifier starting from `0` that must match the one expected by the draw list. */ + draw_list_bind_uniform_set(draw_list: int64, uniform_set: RID, set_index: int64): void + + /** Binds [param vertex_array] to the specified [param draw_list]. */ + draw_list_bind_vertex_array(draw_list: int64, vertex_array: RID): void + + /** Binds [param index_array] to the specified [param draw_list]. */ + draw_list_bind_index_array(draw_list: int64, index_array: RID): void + + /** Sets the push constant data to [param buffer] for the specified [param draw_list]. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in [param size_bytes] (this can be obtained by calling the [method PackedByteArray.size] method on the passed [param buffer]). */ + draw_list_set_push_constant(draw_list: int64, buffer: PackedByteArray | byte[] | ArrayBuffer, size_bytes: int64): void + + /** Submits [param draw_list] for rendering on the GPU. This is the raster equivalent to [method compute_list_dispatch]. */ + draw_list_draw(draw_list: int64, use_indices: boolean, instances: int64, procedural_vertex_count: int64 = 0): void + + /** Creates a scissor rectangle and enables it for the specified [param draw_list]. Scissor rectangles are used for clipping by discarding fragments that fall outside a specified rectangular portion of the screen. See also [method draw_list_disable_scissor]. + * + * **Note:** The specified [param rect] is automatically intersected with the screen's dimensions, which means it cannot exceed the screen's dimensions. + */ + draw_list_enable_scissor(draw_list: int64, rect: Rect2 = new Rect2(0, 0, 0, 0)): void + + /** Removes and disables the scissor rectangle for the specified [param draw_list]. See also [method draw_list_enable_scissor]. */ + draw_list_disable_scissor(draw_list: int64): void + + /** Switches to the next draw pass. */ + draw_list_switch_to_next_pass(): int64 + + /** This method does nothing and always returns an empty [PackedInt64Array]. */ + draw_list_switch_to_next_pass_split(splits: int64): PackedInt64Array + + /** Finishes a list of raster drawing commands created with the `draw_*` methods. */ + draw_list_end(): void + + /** Starts a list of compute commands created with the `compute_*` methods. The returned value should be passed to other `compute_list_*` functions. + * Multiple compute lists cannot be created at the same time; you must finish the previous compute list first using [method compute_list_end]. + * A simple compute operation might look like this (code is not a complete example): + * + */ + compute_list_begin(): int64 + + /** Tells the GPU what compute pipeline to use when processing the compute list. If the shader has changed since the last time this function was called, Godot will unbind all descriptor sets and will re-bind them inside [method compute_list_dispatch]. */ + compute_list_bind_compute_pipeline(compute_list: int64, compute_pipeline: RID): void + + /** Sets the push constant data to [param buffer] for the specified [param compute_list]. The shader determines how this binary data is used. The buffer's size in bytes must also be specified in [param size_bytes] (this can be obtained by calling the [method PackedByteArray.size] method on the passed [param buffer]). */ + compute_list_set_push_constant(compute_list: int64, buffer: PackedByteArray | byte[] | ArrayBuffer, size_bytes: int64): void + + /** Binds the [param uniform_set] to this [param compute_list]. Godot ensures that all textures in the uniform set have the correct Vulkan access masks. If Godot had to change access masks of textures, it will raise a Vulkan image memory barrier. */ + compute_list_bind_uniform_set(compute_list: int64, uniform_set: RID, set_index: int64): void + + /** Submits the compute list for processing on the GPU. This is the compute equivalent to [method draw_list_draw]. */ + compute_list_dispatch(compute_list: int64, x_groups: int64, y_groups: int64, z_groups: int64): void + + /** Submits the compute list for processing on the GPU with the given group counts stored in the [param buffer] at [param offset]. Buffer must have been created with [constant STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT] flag. */ + compute_list_dispatch_indirect(compute_list: int64, buffer: RID, offset: int64): void + + /** Raises a Vulkan compute barrier in the specified [param compute_list]. */ + compute_list_add_barrier(compute_list: int64): void + + /** Finishes a list of compute commands created with the `compute_*` methods. */ + compute_list_end(): void + + /** Tries to free an object in the RenderingDevice. To avoid memory leaks, this should be called after using an object as memory management does not occur automatically when using RenderingDevice directly. */ + free_rid(rid: RID): void + + /** Creates a timestamp marker with the specified [param name]. This is used for performance reporting with the [method get_captured_timestamp_cpu_time], [method get_captured_timestamp_gpu_time] and [method get_captured_timestamp_name] methods. */ + capture_timestamp(name: string): void + + /** Returns the total number of timestamps (rendering steps) available for profiling. */ + get_captured_timestamps_count(): int64 + + /** Returns the index of the last frame rendered that has rendering timestamps available for querying. */ + get_captured_timestamps_frame(): int64 + + /** Returns the timestamp in GPU time for the rendering step specified by [param index] (in microseconds since the engine started). See also [method get_captured_timestamp_cpu_time] and [method capture_timestamp]. */ + get_captured_timestamp_gpu_time(index: int64): int64 + + /** Returns the timestamp in CPU time for the rendering step specified by [param index] (in microseconds since the engine started). See also [method get_captured_timestamp_gpu_time] and [method capture_timestamp]. */ + get_captured_timestamp_cpu_time(index: int64): int64 + + /** Returns the timestamp's name for the rendering step specified by [param index]. See also [method capture_timestamp]. */ + get_captured_timestamp_name(index: int64): string + + /** Returns the value of the specified [param limit]. This limit varies depending on the current graphics hardware (and sometimes the driver version). If the given limit is exceeded, rendering errors will occur. + * Limits for various graphics hardware can be found in the [url=https://vulkan.gpuinfo.org/]Vulkan Hardware Database[/url]. + */ + limit_get(limit: RenderingDevice.Limit): int64 + + /** Returns the frame count kept by the graphics API. Higher values result in higher input lag, but with more consistent throughput. For the main [RenderingDevice], frames are cycled (usually 3 with triple-buffered V-Sync enabled). However, local [RenderingDevice]s only have 1 frame. */ + get_frame_delay(): int64 + + /** Pushes the frame setup and draw command buffers then marks the local device as currently processing (which allows calling [method sync]). + * + * **Note:** Only available in local RenderingDevices. + */ + submit(): void + + /** Forces a synchronization between the CPU and GPU, which may be required in certain cases. Only call this when needed, as CPU-GPU synchronization has a performance cost. + * + * **Note:** Only available in local RenderingDevices. + * + * **Note:** [method sync] can only be called after a [method submit]. + */ + sync(): void + + /** This method does nothing. */ + barrier(from: RenderingDevice.BarrierMask = 32767, to: RenderingDevice.BarrierMask = 32767): void + + /** This method does nothing. */ + full_barrier(): void + + /** Create a new local [RenderingDevice]. This is most useful for performing compute operations on the GPU independently from the rest of the engine. */ + create_local_device(): RenderingDevice + + /** Sets the resource name for [param id] to [param name]. This is used for debugging with third-party tools such as [url=https://renderdoc.org/]RenderDoc[/url]. + * The following types of resources can be named: texture, sampler, vertex buffer, index buffer, uniform buffer, texture buffer, storage buffer, uniform set buffer, shader, render pipeline and compute pipeline. Framebuffers cannot be named. Attempting to name an incompatible resource type will print an error. + * + * **Note:** Resource names are only set when the engine runs in verbose mode ([method OS.is_stdout_verbose] = `true`), or when using an engine build compiled with the `dev_mode=yes` SCons option. The graphics driver must also support the `VK_EXT_DEBUG_UTILS_EXTENSION_NAME` Vulkan extension for named resources to work. + */ + set_resource_name(id: RID, name: string): void + + /** Create a command buffer debug label region that can be displayed in third-party tools such as [url=https://renderdoc.org/]RenderDoc[/url]. All regions must be ended with a [method draw_command_end_label] call. When viewed from the linear series of submissions to a single queue, calls to [method draw_command_begin_label] and [method draw_command_end_label] must be matched and balanced. + * The `VK_EXT_DEBUG_UTILS_EXTENSION_NAME` Vulkan extension must be available and enabled for command buffer debug label region to work. See also [method draw_command_end_label]. + */ + draw_command_begin_label(name: string, color: Color): void + + /** This method does nothing. */ + draw_command_insert_label(name: string, color: Color): void + + /** Ends the command buffer debug label region started by a [method draw_command_begin_label] call. */ + draw_command_end_label(): void + + /** Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). Equivalent to [method RenderingServer.get_video_adapter_vendor]. See also [method get_device_name]. */ + get_device_vendor_name(): string + + /** Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). Equivalent to [method RenderingServer.get_video_adapter_name]. See also [method get_device_vendor_name]. */ + get_device_name(): string + + /** Returns the universally unique identifier for the pipeline cache. This is used to cache shader files on disk, which avoids shader recompilations on subsequent engine runs. This UUID varies depending on the graphics card model, but also the driver version. Therefore, updating graphics drivers will invalidate the shader cache. */ + get_device_pipeline_cache_uuid(): string + + /** Returns the memory usage in bytes corresponding to the given [param type]. When using Vulkan, these statistics are calculated by [url=https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator]Vulkan Memory Allocator[/url]. */ + get_memory_usage(type: RenderingDevice.MemoryType): int64 + + /** Returns the unique identifier of the driver [param resource] for the specified [param rid]. Some driver resource types ignore the specified [param rid] (see [enum DriverResource] descriptions). [param index] is always ignored but must be specified anyway. */ + get_driver_resource(resource: RenderingDevice.DriverResource, rid: RID, index: int64): int64 + } +} diff --git a/godot/typings/godot5.gen.d.ts b/godot/typings/godot5.gen.d.ts new file mode 100644 index 0000000..d00d6bc --- /dev/null +++ b/godot/typings/godot5.gen.d.ts @@ -0,0 +1,9686 @@ +// AUTO-GENERATED +/// +declare module "godot" { + class ReparentDialog extends ConfirmationDialog { + constructor(identifier?: any) + _cancel(): void + readonly reparent: Signal2 + } + class ReplicationEditor extends VBoxContainer { + constructor(identifier?: any) + _update_config(): void + _update_value(property: NodePath | string, column: int64, value: int64): void + } + /** Base class for serializable objects. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resource.html + */ + class Resource extends RefCounted { + constructor(identifier?: any) + /** Override this method to return a custom [RID] when [method get_rid] is called. */ + /* gdvirtual */ _get_rid(): RID + + /** Override this method to customize the newly duplicated resource created from [method PackedScene.instantiate], if the original's [member resource_local_to_scene] is set to `true`. + * **Example:** Set a random `damage` value to every local resource from an instantiated scene. + * + */ + /* gdvirtual */ _setup_local_to_scene(): void + + /** Sets the [member resource_path] to [param path], potentially overriding an existing cache entry for this path. Further attempts to load an overridden resource by path will instead return this resource. */ + take_over_path(path: string): void + + /** Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID]. */ + get_rid(): RID + + /** If [member resource_local_to_scene] is set to `true` and the resource has been loaded from a [PackedScene] instantiation, returns the root [Node] of the scene where this resource is used. Otherwise, returns `null`. */ + get_local_scene(): Node + + /** Calls [method _setup_local_to_scene]. If [member resource_local_to_scene] is set to `true`, this method is automatically called from [method PackedScene.instantiate] by the newly duplicated resource within the scene instance. */ + setup_local_to_scene(): void + + /** Generates a unique identifier for a resource to be contained inside a [PackedScene], based on the current date, time, and a random value. The returned string is only composed of letters (`a` to `y`) and numbers (`0` to `8`). See also [member resource_scene_unique_id]. */ + static generate_scene_unique_id(): string + + /** Emits the [signal changed] signal. This method is called automatically for some built-in resources. + * + * **Note:** For custom resources, it's recommended to call this method whenever a meaningful change occurs, such as a modified property. This ensures that custom [Object]s depending on the resource are properly updated. + * + */ + emit_changed(): void + + /** Duplicates this resource, returning a new resource with its `export`ed or [constant PROPERTY_USAGE_STORAGE] properties copied from the original. + * If [param subresources] is `false`, a shallow copy is returned; nested resources within subresources are not duplicated and are shared with the original resource (with one exception; see below). If [param subresources] is `true`, a deep copy is returned; nested subresources will be duplicated and are not shared (with two exceptions; see below). + * [param subresources] is usually respected, with the following exceptions: + * - Subresource properties with the [constant PROPERTY_USAGE_ALWAYS_DUPLICATE] flag are always duplicated. + * - Subresource properties with the [constant PROPERTY_USAGE_NEVER_DUPLICATE] flag are never duplicated. + * - Subresources inside [Array] and [Dictionary] properties are never duplicated. + * + * **Note:** For custom resources, this method will fail if [method Object._init] has been defined with required parameters. + */ + duplicate(subresources: boolean = false): Resource + + /** If `true`, the resource is duplicated for each instance of all scenes using it. At run-time, the resource can be modified in one scene without affecting other instances (see [method PackedScene.instantiate]). + * + * **Note:** Changing this property at run-time has no effect on already created duplicate resources. + */ + get resource_local_to_scene(): boolean + set resource_local_to_scene(value: boolean) + + /** The unique path to this resource. If it has been saved to disk, the value will be its filepath. If the resource is exclusively contained within a scene, the value will be the [PackedScene]'s filepath, followed by a unique identifier. + * + * **Note:** Setting this property manually may fail if a resource with the same path has already been previously loaded. If necessary, use [method take_over_path]. + */ + get resource_path(): string + set resource_path(value: string) + + /** An optional name for this resource. When defined, its value is displayed to represent the resource in the Inspector dock. For built-in scripts, the name is displayed as part of the tab name in the script editor. + * + * **Note:** Some resource formats do not support resource names. You can still set the name in the editor or via code, but it will be lost when the resource is reloaded. For example, only built-in scripts can have a resource name, while scripts stored in separate files cannot. + */ + get resource_name(): string + set resource_name(value: string) + + /** An unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a [PackedScene]. If the resource is not inside a scene, this property is empty by default. + * + * **Note:** When the [PackedScene] is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from [method generate_scene_unique_id]. + * + * **Note:** Setting this property does not emit the [signal changed] signal. + * **Warning:** When setting, the ID must only consist of letters, numbers, and underscores. Otherwise, it will fail and default to a randomly generated ID. + */ + get resource_scene_unique_id(): string + set resource_scene_unique_id(value: string) + + /** Emitted when the resource changes, usually when one of its properties is modified. See also [method emit_changed]. + * + * **Note:** This signal is not emitted automatically for properties of custom resources. If necessary, a setter needs to be created to emit the signal. + */ + readonly changed: Signal0 + + /** Emitted by a newly duplicated resource with [member resource_local_to_scene] set to `true`. */ + readonly setup_local_to_scene_requested: Signal0 + } + class ResourceFormatImporterSaver extends ResourceFormatSaver { + constructor(identifier?: any) + } + namespace ResourceFormatLoader { + enum CacheMode { + /** Neither the main resource (the one requested to be loaded) nor any of its subresources are retrieved from cache nor stored into it. Dependencies (external resources) are loaded with [constant CACHE_MODE_REUSE]. */ + CACHE_MODE_IGNORE = 0, + + /** The main resource (the one requested to be loaded), its subresources, and its dependencies (external resources) are retrieved from cache if present, instead of loaded. Those not cached are loaded and then stored into the cache. The same rules are propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_REUSE = 1, + + /** Like [constant CACHE_MODE_REUSE], but the cache is checked for the main resource (the one requested to be loaded) as well as for each of its subresources. Those already in the cache, as long as the loaded and cached types match, have their data refreshed from storage into the already existing instances. Otherwise, they are recreated as completely new objects. */ + CACHE_MODE_REPLACE = 2, + + /** Like [constant CACHE_MODE_IGNORE], but propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_IGNORE_DEEP = 3, + + /** Like [constant CACHE_MODE_REPLACE], but propagated recursively down the tree of dependencies (external resources). */ + CACHE_MODE_REPLACE_DEEP = 4, + } + } + /** Loads a specific resource type from a file. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceformatloader.html + */ + class ResourceFormatLoader extends RefCounted { + constructor(identifier?: any) + /** Gets the list of extensions for files this loader is able to read. */ + /* gdvirtual */ _get_recognized_extensions(): PackedStringArray + + /** Tells whether or not this loader should load a resource from its resource path for a given type. + * If it is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions], and if the type is within the ones provided by [method _get_resource_type]. + */ + /* gdvirtual */ _recognize_path(path: string, type: StringName): boolean + + /** Tells which resource class this loader can load. + * + * **Note:** Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle `"Resource"` for them. + */ + /* gdvirtual */ _handles_type(type: StringName): boolean + + /** Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return `""`. + * + * **Note:** Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return `"Resource"` for them. + */ + /* gdvirtual */ _get_resource_type(path: string): string + + /** Returns the script class name associated with the [Resource] under the given [param path]. If the resource has no script or the script isn't a named class, it should return `""`. */ + /* gdvirtual */ _get_resource_script_class(path: string): string + /* gdvirtual */ _get_resource_uid(path: string): int64 + + /** If implemented, gets the dependencies of a given resource. If [param add_types] is `true`, paths should be appended `::TypeName`, where `TypeName` is the class name of the dependency. + * + * **Note:** Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return `"Resource"` for them. + */ + /* gdvirtual */ _get_dependencies(path: string, add_types: boolean): PackedStringArray + + /** If implemented, renames dependencies within the given resource and saves it. [param renames] is a dictionary `{ String => String }` mapping old dependency paths to new paths. + * Returns [constant OK] on success, or an [enum Error] constant in case of failure. + */ + /* gdvirtual */ _rename_dependencies(path: string, renames: GDictionary): GError + /* gdvirtual */ _exists(path: string): boolean + /* gdvirtual */ _get_classes_used(path: string): PackedStringArray + + /** Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [param original_path] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. + * The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. + */ + /* gdvirtual */ _load(path: string, original_path: string, use_sub_threads: boolean, cache_mode: int64): any + } + /** Saves a specific resource type to a file. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceformatsaver.html + */ + class ResourceFormatSaver extends RefCounted { + constructor(identifier?: any) + /** Saves the given resource object to a file at the target [param path]. [param flags] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. + * Returns [constant OK] on success, or an [enum Error] constant in case of failure. + */ + /* gdvirtual */ _save(resource: Resource, path: string, flags: int64): GError + + /** Sets a new UID for the resource at the given [param path]. Returns [constant OK] on success, or an [enum Error] constant in case of failure. */ + /* gdvirtual */ _set_uid(path: string, uid: int64): GError + + /** Returns whether the given resource object can be saved by this saver. */ + /* gdvirtual */ _recognize(resource: Resource): boolean + + /** Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]). */ + /* gdvirtual */ _get_recognized_extensions(resource: Resource): PackedStringArray + + /** Returns `true` if this saver handles a given save path and `false` otherwise. + * If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions]. + */ + /* gdvirtual */ _recognize_path(resource: Resource, path: string): boolean + } + namespace ResourceImporter { + enum ImportOrder { + /** The default import order. */ + IMPORT_ORDER_DEFAULT = 0, + + /** The import order for scenes, which ensures scenes are imported *after* all other core resources such as textures. Custom importers should generally have an import order lower than `100` to avoid issues when importing scenes that rely on custom resources. */ + IMPORT_ORDER_SCENE = 100, + } + } + /** Base class for resource importers. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporter.html + */ + class ResourceImporter extends RefCounted { + constructor(identifier?: any) + } + /** Imports a bitmap font in the BMFont (`.fnt`) format. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterbmfont.html + */ + class ResourceImporterBMFont extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a [BitMap] resource (2D array of boolean values). + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterbitmap.html + */ + class ResourceImporterBitMap extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports comma-separated values + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimportercsvtranslation.html + */ + class ResourceImporterCSVTranslation extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a TTF, TTC, OTF, OTC, WOFF or WOFF2 font file for font rendering that adapts to any size. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterdynamicfont.html + */ + class ResourceImporterDynamicFont extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a image for use in scripting, with no rendering capabilities. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterimage.html + */ + class ResourceImporterImage extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a bitmap font where all glyphs have the same width and height. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterimagefont.html + */ + class ResourceImporterImageFont extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a 3-dimensional texture ([Texture3D]), a [Texture2DArray], a [Cubemap] or a [CubemapArray]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterlayeredtexture.html + */ + class ResourceImporterLayeredTexture extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports an MP3 audio file for playback. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimportermp3.html + */ + class ResourceImporterMP3 extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports an OBJ 3D model as an independent [Mesh] or scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterobj.html + */ + class ResourceImporterOBJ extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports an Ogg Vorbis audio file for playback. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporteroggvorbis.html + */ + class ResourceImporterOggVorbis extends ResourceImporter { + constructor(identifier?: any) + /** This method loads audio data from a PackedByteArray buffer into an AudioStreamOggVorbis object. */ + static load_from_buffer(buffer: PackedByteArray | byte[] | ArrayBuffer): AudioStreamOggVorbis + + /** This method loads audio data from a file into an AudioStreamOggVorbis object. The file path is provided as a string. */ + static load_from_file(path: string): AudioStreamOggVorbis + } + /** Imports a glTF, FBX, Collada or Blender 3D scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterscene.html + */ + class ResourceImporterScene extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports native GLSL shaders (not Godot shaders) as a [RDShaderFile]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimportershaderfile.html + */ + class ResourceImporterShaderFile extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports an image for use in 2D or 3D rendering. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimportertexture.html + */ + class ResourceImporterTexture extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a collection of textures from a PNG image into an optimized [AtlasTexture] for 2D rendering. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimportertextureatlas.html + */ + class ResourceImporterTextureAtlas extends ResourceImporter { + constructor(identifier?: any) + } + /** Imports a WAV audio file for playback. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourceimporterwav.html + */ + class ResourceImporterWAV extends ResourceImporter { + constructor(identifier?: any) + } + /** A node used to preload sub-resources inside a scene. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_resourcepreloader.html + */ + class ResourcePreloader extends Node { + constructor(identifier?: any) + /** Adds a resource to the preloader with the given [param name]. If a resource with the given [param name] already exists, the new resource will be renamed to "[param name] N" where N is an incrementing number starting from 2. */ + add_resource(name: StringName, resource: Resource): void + + /** Removes the resource associated to [param name] from the preloader. */ + remove_resource(name: StringName): void + + /** Renames a resource inside the preloader from [param name] to [param newname]. */ + rename_resource(name: StringName, newname: StringName): void + + /** Returns `true` if the preloader contains a resource associated to [param name]. */ + has_resource(name: StringName): boolean + + /** Returns the resource associated to [param name]. */ + get_resource(name: StringName): Resource + + /** Returns the list of resources inside the preloader. */ + get_resource_list(): PackedStringArray + get resources(): GArray + set resources(value: GArray) + } + class ResourcePreloaderEditor extends PanelContainer { + constructor(identifier?: any) + _update_library(): void + _remove_resource(to_remove: string): void + } + class ResourcePreloaderEditorPlugin extends EditorPlugin { + constructor(identifier?: any) + } + namespace RibbonTrailMesh { + enum Shape { + /** Gives the mesh a single flat face. */ + SHAPE_FLAT = 0, + + /** Gives the mesh two perpendicular flat faces, making a cross shape. */ + SHAPE_CROSS = 1, + } + } + /** Represents a straight ribbon-shaped [PrimitiveMesh] with variable width. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_ribbontrailmesh.html + */ + class RibbonTrailMesh extends PrimitiveMesh { + constructor(identifier?: any) + /** Determines the shape of the ribbon. */ + get shape(): int64 + set shape(value: int64) + + /** The baseline size of the ribbon. The size of a particular section segment is obtained by multiplying this size by the value of the [member curve] at the given distance. */ + get size(): float64 + set size(value: float64) + + /** The total number of sections on the ribbon. */ + get sections(): int64 + set sections(value: int64) + + /** The length of a section of the ribbon. */ + get section_length(): float64 + set section_length(value: float64) + + /** The number of segments in a section. The [member curve] is sampled on each segment to determine its size. Higher values result in a more detailed ribbon at the cost of performance. */ + get section_segments(): int64 + set section_segments(value: int64) + + /** Determines the size of the ribbon along its length. The size of a particular section segment is obtained by multiplying the baseline [member size] by the value of this curve at the given distance. For values smaller than `0`, the faces will be inverted. */ + get curve(): Curve + set curve(value: Curve) + } + /** A custom effect for a [RichTextLabel]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_richtexteffect.html + */ + class RichTextEffect extends Resource { + constructor(identifier?: any) + /** Override this method to modify properties in [param char_fx]. The method must return `true` if the character could be transformed successfully. If the method returns `false`, it will skip transformation to avoid displaying broken text. */ + /* gdvirtual */ _process_custom_fx(char_fx: CharFXTransform): boolean + } + namespace RichTextLabel { + enum ListType { + /** Each list item has a number marker. */ + LIST_NUMBERS = 0, + + /** Each list item has a letter marker. */ + LIST_LETTERS = 1, + + /** Each list item has a roman number marker. */ + LIST_ROMAN = 2, + + /** Each list item has a filled circle marker. */ + LIST_DOTS = 3, + } + enum MenuItems { + /** Copies the selected text. */ + MENU_COPY = 0, + + /** Selects the whole [RichTextLabel] text. */ + MENU_SELECT_ALL = 1, + + /** Represents the size of the [enum MenuItems] enum. */ + MENU_MAX = 2, + } + enum MetaUnderline { + /** Meta tag does not display an underline, even if [member meta_underlined] is `true`. */ + META_UNDERLINE_NEVER = 0, + + /** If [member meta_underlined] is `true`, meta tag always display an underline. */ + META_UNDERLINE_ALWAYS = 1, + + /** If [member meta_underlined] is `true`, meta tag display an underline when the mouse cursor is over it. */ + META_UNDERLINE_ON_HOVER = 2, + } + enum ImageUpdateMask { + /** If this bit is set, [method update_image] changes image texture. */ + UPDATE_TEXTURE = 1, + + /** If this bit is set, [method update_image] changes image size. */ + UPDATE_SIZE = 2, + + /** If this bit is set, [method update_image] changes image color. */ + UPDATE_COLOR = 4, + + /** If this bit is set, [method update_image] changes image inline alignment. */ + UPDATE_ALIGNMENT = 8, + + /** If this bit is set, [method update_image] changes image texture region. */ + UPDATE_REGION = 16, + + /** If this bit is set, [method update_image] changes image padding. */ + UPDATE_PAD = 32, + + /** If this bit is set, [method update_image] changes image tooltip. */ + UPDATE_TOOLTIP = 64, + + /** If this bit is set, [method update_image] changes image width from/to percents. */ + UPDATE_WIDTH_IN_PERCENT = 128, + } + } + /** A control for displaying text that can contain different font styles, images, and basic formatting. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_richtextlabel.html + */ + class RichTextLabel extends Control { + constructor(identifier?: any) + /** Returns the text without BBCode mark-up. */ + get_parsed_text(): string + + /** Adds raw non-BBCode-parsed text to the tag stack. */ + add_text(text: string): void + + /** Adds an image's opening and closing tags to the tag stack, optionally providing a [param width] and [param height] to resize the image, a [param color] to tint the image and a [param region] to only use parts of the image. + * If [param width] or [param height] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. + * If [param width] and [param height] are not set, but [param region] is, the region's rect will be used. + * [param key] is an optional identifier, that can be used to modify the image via [method update_image]. + * If [param pad] is set, and the image is smaller than the size specified by [param width] and [param height], the image padding is added to match the size instead of upscaling. + * If [param size_in_percent] is set, [param width] and [param height] values are percentages of the control width instead of pixels. + */ + add_image(image: Texture2D, width: int64 = 0, height: int64 = 0, color: Color = new Color(1, 1, 1, 1), inline_align: InlineAlignment = 5, region: Rect2 = new Rect2(0, 0, 0, 0), key: any = {}, pad: boolean = false, tooltip: string = '', size_in_percent: boolean = false): void + + /** Updates the existing images with the key [param key]. Only properties specified by [param mask] bits are updated. See [method add_image]. */ + update_image(key: any, mask: RichTextLabel.ImageUpdateMask, image: Texture2D, width: int64 = 0, height: int64 = 0, color: Color = new Color(1, 1, 1, 1), inline_align: InlineAlignment = 5, region: Rect2 = new Rect2(0, 0, 0, 0), pad: boolean = false, tooltip: string = '', size_in_percent: boolean = false): void + + /** Adds a newline tag to the tag stack. */ + newline(): void + + /** Removes a paragraph of content from the label. Returns `true` if the paragraph exists. + * The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval `[0, get_paragraph_count() - 1]`. + * If [param no_invalidate] is set to `true`, cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation. + */ + remove_paragraph(paragraph: int64, no_invalidate: boolean = false): boolean + + /** Invalidates [param paragraph] and all subsequent paragraphs cache. */ + invalidate_paragraph(paragraph: int64): boolean + + /** Adds a [code skip-lint][font]` tag to the tag stack. Overrides default fonts for its duration. + * Passing `0` to [param font_size] will use the existing default font size. + */ + push_font(font: Font, font_size: int64 = 0): void + + /** Adds a [code skip-lint][font_size]` tag to the tag stack. Overrides default font size for its duration. */ + push_font_size(font_size: int64): void + + /** Adds a [code skip-lint][font]` tag with a normal font to the tag stack. */ + push_normal(): void + + /** Adds a [code skip-lint][font]` tag with a bold font to the tag stack. This is the same as adding a [code skip-lint]**` tag if not currently in a [code skip-lint] *` tag. */ + push_bold(): void + + /** Adds a [code skip-lint][font]` tag with a bold italics font to the tag stack. */ + push_bold_italics(): void + + /** Adds a [code skip-lint][font]` tag with an italics font to the tag stack. This is the same as adding an [code skip-lint] *` tag if not currently in a [code skip-lint]**` tag. */ + push_italics(): void + + /** Adds a [code skip-lint][font]` tag with a monospace font to the tag stack. */ + push_mono(): void + + /** Adds a [code skip-lint][color]` tag to the tag stack. */ + push_color(color: Color): void + + /** Adds a [code skip-lint][outline_size]` tag to the tag stack. Overrides default text outline size for its duration. */ + push_outline_size(outline_size: int64): void + + /** Adds a [code skip-lint][outline_color]` tag to the tag stack. Adds text outline for its duration. */ + push_outline_color(color: Color): void + + /** Adds a [code skip-lint][p]` tag to the tag stack. */ + push_paragraph(alignment: HorizontalAlignment, base_direction: Control.TextDirection = 0, language: string = '', st_parser: TextServer.StructuredTextParser = 0, justification_flags: TextServer.JustificationFlag = 163, tab_stops: PackedFloat32Array | float32[] = []): void + + /** Adds an [code skip-lint][indent]` tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length. */ + push_indent(level: int64): void + + /** Adds [code skip-lint][ol]` or [code skip-lint][ul]` tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length. */ + push_list(level: int64, type: RichTextLabel.ListType, capitalize: boolean, bullet: string = '•'): void + + /** Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint][url=something]{text}[/url]`, but supports non-[String] metadata types. + * If [member meta_underlined] is `true`, meta tags display an underline. This behavior can be customized with [param underline_mode]. + * + * **Note:** Meta tags do nothing by default when clicked. To assign behavior when clicked, connect [signal meta_clicked] to a function that is called when the meta tag is clicked. + */ + push_meta(data: any, underline_mode: RichTextLabel.MetaUnderline = 1): void + + /** Adds a [code skip-lint][hint]` tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint]`. */ + push_hint(description: string): void + + /** Adds language code used for text shaping algorithm and Open-Type font features. */ + push_language(language: string): void + + /** Adds a [code skip-lint][u]` tag to the tag stack. */ + push_underline(): void + + /** Adds a [code skip-lint][s]` tag to the tag stack. */ + push_strikethrough(): void + + /** Adds a [code skip-lint][table=columns,inline_align]` tag to the tag stack. Use [method set_table_column_expand] to set column expansion ratio. Use [method push_cell] to add cells. */ + push_table(columns: int64, inline_align: InlineAlignment = 0, align_to_row: int64 = -1): void + + /** Adds a [code skip-lint][dropcap]` tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. */ + push_dropcap(string_: string, font: Font, size: int64, dropcap_margins: Rect2 = new Rect2(0, 0, 0, 0), color: Color = new Color(1, 1, 1, 1), outline_size: int64 = 0, outline_color: Color = new Color(0, 0, 0, 0)): void + + /** Edits the selected column's expansion options. If [param expand] is `true`, the column expands in proportion to its expansion ratio versus the other columns' ratios. + * For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. + * If [param expand] is `false`, the column will not contribute to the total ratio. + */ + set_table_column_expand(column: int64, expand: boolean, ratio: int64 = 1): void + + /** Sets color of a table cell. Separate colors for alternating rows can be specified. */ + set_cell_row_background_color(odd_row_bg: Color, even_row_bg: Color): void + + /** Sets color of a table cell border. */ + set_cell_border_color(color: Color): void + + /** Sets minimum and maximum size overrides for a table cell. */ + set_cell_size_override(min_size: Vector2, max_size: Vector2): void + + /** Sets inner padding of a table cell. */ + set_cell_padding(padding: Rect2): void + + /** Adds a [code skip-lint][cell]` tag to the tag stack. Must be inside a [code skip-lint][table]` tag. See [method push_table] for details. Use [method set_table_column_expand] to set column expansion ratio, [method set_cell_border_color] to set cell border, [method set_cell_row_background_color] to set cell background, [method set_cell_size_override] to override cell size, and [method set_cell_padding] to set padding. */ + push_cell(): void + + /** Adds a [code skip-lint][fgcolor]` tag to the tag stack. */ + push_fgcolor(fgcolor: Color): void + + /** Adds a [code skip-lint][bgcolor]` tag to the tag stack. */ + push_bgcolor(bgcolor: Color): void + + /** Adds a custom effect tag to the tag stack. The effect does not need to be in [member custom_effects]. The environment is directly passed to the effect. */ + push_customfx(effect: RichTextEffect, env: GDictionary): void + + /** Adds a context marker to the tag stack. See [method pop_context]. */ + push_context(): void + + /** Terminates tags opened after the last [method push_context] call (including context marker), or all tags if there's no context marker on the stack. */ + pop_context(): void + + /** Terminates the current tag. Use after `push_*` methods to close BBCodes manually. Does not need to follow `add_*` methods. */ + pop(): void + + /** Terminates all tags opened by `push_*` methods. */ + pop_all(): void + + /** Clears the tag stack, causing the label to display nothing. + * + * **Note:** This method does not affect [member text], and its contents will show again if the label is redrawn. However, setting [member text] to an empty [String] also clears the stack. + */ + clear(): void + + /** Returns the vertical scrollbar. + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property. + */ + get_v_scroll_bar(): VScrollBar + + /** Scrolls the window's top line to match [param line]. */ + scroll_to_line(line: int64): void + + /** Scrolls the window's top line to match first line of the [param paragraph]. */ + scroll_to_paragraph(paragraph: int64): void + + /** Scrolls to the beginning of the current selection. */ + scroll_to_selection(): void + + /** Returns the current selection first character index if a selection is active, `-1` otherwise. Does not include BBCodes. */ + get_selection_from(): int64 + + /** Returns the current selection last character index if a selection is active, `-1` otherwise. Does not include BBCodes. */ + get_selection_to(): int64 + + /** Select all the text. + * If [member selection_enabled] is `false`, no selection will occur. + */ + select_all(): void + + /** Returns the current selection text. Does not include BBCodes. */ + get_selected_text(): string + + /** Clears the current selection. */ + deselect(): void + + /** The assignment version of [method append_text]. Clears the tag stack and inserts the new content. */ + parse_bbcode(bbcode: string): void + + /** Parses [param bbcode] and adds tags to the tag stack as needed. + * + * **Note:** Using this method, you can't close a tag that was opened in a previous [method append_text] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member text] instead of using [method append_text]. + */ + append_text(bbcode: string): void + + /** If [member threaded] is enabled, returns `true` if the background thread has finished text processing, otherwise always return `true`. */ + is_ready(): boolean + + /** Returns the line number of the character position provided. Line and character numbers are both zero-indexed. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_character_line(character: int64): int64 + + /** Returns the paragraph number of the character position provided. Paragraph and character numbers are both zero-indexed. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_character_paragraph(character: int64): int64 + + /** Returns the total number of characters from text tags. Does not include BBCodes. */ + get_total_character_count(): int64 + + /** Returns the total number of lines in the text. Wrapped text is counted as multiple lines. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_line_count(): int64 + + /** Returns the number of visible lines. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_visible_line_count(): int64 + + /** Returns the total number of paragraphs (newlines or `p` tags in the tag stack's text tags). Considers wrapped text as one paragraph. */ + get_paragraph_count(): int64 + + /** Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_visible_paragraph_count(): int64 + + /** Returns the height of the content. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_content_height(): int64 + + /** Returns the width of the content. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_content_width(): int64 + + /** Returns the vertical offset of the line found at the provided index. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_line_offset(line: int64): float64 + + /** Returns the vertical offset of the paragraph found at the provided index. + * + * **Note:** If [member threaded] is enabled, this method returns a value for the loaded part of the document. Use [method is_ready] or [signal finished] to determine whether document is fully loaded. + */ + get_paragraph_offset(paragraph: int64): float64 + + /** Parses BBCode parameter [param expressions] into a dictionary. */ + parse_expressions_for_values(expressions: PackedStringArray | string[]): GDictionary + + /** Installs a custom effect. This can also be done in the RichTextLabel inspector using the [member custom_effects] property. [param effect] should be a valid [RichTextEffect]. + * Example RichTextEffect: + * + * Registering the above effect in RichTextLabel from script: + * + */ + install_effect(effect: any): void + + /** Returns the [PopupMenu] of this [RichTextLabel]. By default, this menu is displayed when right-clicking on the [RichTextLabel]. + * You can add custom menu items or remove standard ones. Make sure your IDs don't conflict with the standard ones (see [enum MenuItems]). For example: + * + * **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property. + */ + get_menu(): PopupMenu + + /** Returns whether the menu is visible. Use this instead of `get_menu().visible` to improve performance (so the creation of the menu is avoided). */ + is_menu_visible(): boolean + + /** Executes a given action as defined in the [enum MenuItems] enum. */ + menu_option(option: int64): void + + /** If `true`, the label uses BBCode formatting. + * + * **Note:** This only affects the contents of [member text], not the tag stack. + */ + get bbcode_enabled(): boolean + set bbcode_enabled(value: boolean) + + /** The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + * + * **Note:** If [member bbcode_enabled] is `true`, it is unadvised to use the `+=` operator with [member text] (e.g. `text += "some string"`) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using `push_*` methods. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call. + */ + get text(): string + set text(value: string) + + /** If `true`, the label's minimum size will be automatically updated to fit its content, matching the behavior of [Label]. */ + get fit_content(): boolean + set fit_content(value: boolean) + + /** If `true`, the scrollbar is visible. Setting this to `false` does not block scrolling completely. See [method scroll_to_line]. */ + get scroll_active(): boolean + set scroll_active(value: boolean) + + /** If `true`, the window scrolls down to display new content automatically. */ + get scroll_following(): boolean + set scroll_following(value: boolean) + + /** If set to something other than [constant TextServer.AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. To see how each mode behaves, see [enum TextServer.AutowrapMode]. */ + get autowrap_mode(): int64 + set autowrap_mode(value: int64) + + /** The number of spaces associated with a single tab length. Does not affect `\t` in text tags, only indent tags. */ + get tab_size(): int64 + set tab_size(value: int64) + + /** If `true`, a right-click displays the context menu. */ + get context_menu_enabled(): boolean + set context_menu_enabled(value: boolean) + + /** If `true`, shortcut keys for context menu items are enabled, even if the context menu is disabled. */ + get shortcut_keys_enabled(): boolean + set shortcut_keys_enabled(value: boolean) + + /** The currently installed custom effects. This is an array of [RichTextEffect]s. + * To add a custom effect, it's more convenient to use [method install_effect]. + */ + get custom_effects(): GArray + set custom_effects(value: GArray) + + /** If `true`, the label underlines meta tags such as [code skip-lint][url]{text}[/url]`. These tags can call a function when clicked if [signal meta_clicked] is connected to a function. */ + get meta_underlined(): boolean + set meta_underlined(value: boolean) + + /** If `true`, the label underlines hint tags such as [code skip-lint][hint=description]{text}[/hint]`. */ + get hint_underlined(): boolean + set hint_underlined(value: boolean) + + /** If `true`, text processing is done in a background thread. */ + get threaded(): boolean + set threaded(value: boolean) + + /** The delay after which the loading progress bar is displayed, in milliseconds. Set to `-1` to disable progress bar entirely. + * + * **Note:** Progress bar is displayed only if [member threaded] is enabled. + */ + get progress_bar_delay(): int64 + set progress_bar_delay(value: int64) + + /** If `true`, the label allows text selection. */ + get selection_enabled(): boolean + set selection_enabled(value: boolean) + + /** If `true`, the selected text will be deselected when focus is lost. */ + get deselect_on_focus_loss_enabled(): boolean + set deselect_on_focus_loss_enabled(value: boolean) + + /** If `true`, allow drag and drop of selected text. */ + get drag_and_drop_selection_enabled(): boolean + set drag_and_drop_selection_enabled(value: boolean) + + /** The number of characters to display. If set to `-1`, all characters are displayed. This can be useful when animating the text appearing in a dialog box. + * + * **Note:** Setting this property updates [member visible_ratio] accordingly. + */ + get visible_characters(): int64 + set visible_characters(value: int64) + + /** Sets the clipping behavior when [member visible_characters] or [member visible_ratio] is set. See [enum TextServer.VisibleCharactersBehavior] for more info. */ + get visible_characters_behavior(): int64 + set visible_characters_behavior(value: int64) + + /** The fraction of characters to display, relative to the total number of characters (see [method get_total_character_count]). If set to `1.0`, all characters are displayed. If set to `0.5`, only half of the characters will be displayed. This can be useful when animating the text appearing in a dialog box. + * + * **Note:** Setting this property updates [member visible_characters] accordingly. + */ + get visible_ratio(): float64 + set visible_ratio(value: float64) + + /** Base text writing direction. */ + get text_direction(): int64 + set text_direction(value: int64) + + /** Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. */ + get language(): string + set language(value: string) + + /** Set BiDi algorithm override for the structured text. */ + get structured_text_bidi_override(): int64 + set structured_text_bidi_override(value: int64) + + /** Set additional options for BiDi override. */ + get structured_text_bidi_override_options(): GArray + set structured_text_bidi_override_options(value: GArray) + + /** Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. [code skip-lint][url={"key": "value"}]Text[/url]`, then the parameter for this signal will always be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. Alternatively, you can convert the [String] input to the desired type based on its contents (such as calling [method JSON.parse] on it). + * For example, the following method can be connected to [signal meta_clicked] to open clicked URLs using the user's default web browser: + * + */ + readonly meta_clicked: Signal1 + + /** Triggers when the mouse enters a meta tag. */ + readonly meta_hover_started: Signal1 + + /** Triggers when the mouse exits a meta tag. */ + readonly meta_hover_ended: Signal1 + + /** Triggered when the document is fully loaded. */ + readonly finished: Signal0 + } + namespace RigidBody2D { + enum FreezeMode { + /** Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. */ + FREEZE_MODE_STATIC = 0, + + /** Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. */ + FREEZE_MODE_KINEMATIC = 1, + } + enum CenterOfMassMode { + /** In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. */ + CENTER_OF_MASS_MODE_AUTO = 0, + + /** In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. */ + CENTER_OF_MASS_MODE_CUSTOM = 1, + } + enum DampMode { + /** In this mode, the body's damping value is added to any value set in areas or the default value. */ + DAMP_MODE_COMBINE = 0, + + /** In this mode, the body's damping value replaces any value set in areas or the default value. */ + DAMP_MODE_REPLACE = 1, + } + enum CCDMode { + /** Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. */ + CCD_MODE_DISABLED = 0, + + /** Continuous collision detection enabled using raycasting. This is faster than shapecasting but less precise. */ + CCD_MODE_CAST_RAY = 1, + + /** Continuous collision detection enabled using shapecasting. This is the slowest CCD method and the most precise. */ + CCD_MODE_CAST_SHAPE = 2, + } + } + /** A 2D physics body that is moved by a physics simulation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rigidbody2d.html + */ + class RigidBody2D extends PhysicsBody2D { + constructor(identifier?: any) + /** Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body. */ + /* gdvirtual */ _integrate_forces(state: PhysicsDirectBodyState2D): void + + /** Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). + * + * **Note:** To retrieve the colliding bodies, use [method get_colliding_bodies]. + */ + get_contact_count(): int64 + + /** 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. */ + set_axis_velocity(axis_velocity: Vector2): void + + /** Applies a directional impulse without affecting rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method apply_impulse] at the body's center of mass. + */ + apply_central_impulse(impulse: Vector2 = Vector2.ZERO): void + + /** Applies a positioned impulse to the body. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + apply_impulse(impulse: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a rotational impulse to the body without affecting the position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * + * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia]. + */ + apply_torque_impulse(torque: float64): void + + /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method apply_force] at the body's center of mass. + */ + apply_central_force(force: Vector2): void + + /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + apply_force(force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + * + * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape2D] must be a child of the node, or you can manually set [member inertia]. + */ + apply_torque(torque: float64): void + + /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + * This is equivalent to using [method add_constant_force] at the body's center of mass. + */ + add_constant_central_force(force: Vector2): void + + /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector2(0, 0)`. + * [param position] is the offset from the body origin in global coordinates. + */ + add_constant_force(force: Vector2, position: Vector2 = Vector2.ZERO): void + + /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = 0`. */ + add_constant_torque(torque: float64): void + + /** Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + */ + get_colliding_bodies(): GArray + + /** The body's mass. */ + get mass(): float64 + set mass(value: float64) + + /** The physics material override for the body. + * If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + */ + get physics_material_override(): PhysicsMaterial + set physics_material_override(value: PhysicsMaterial) + + /** 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 [Area2D]s. */ + get gravity_scale(): float64 + set gravity_scale(value: float64) + + /** Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. */ + get center_of_mass_mode(): int64 + set center_of_mass_mode(value: int64) + + /** The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + * When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + */ + get center_of_mass(): Vector2 + set center_of_mass(value: Vector2) + + /** The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + * If set to `0`, inertia is automatically computed (default value). + * + * **Note:** This value does not change when inertia is automatically computed. Use [PhysicsServer2D] to get the computed inertia. + * + */ + get inertia(): float64 + set inertia(value: float64) + + /** If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods. */ + get sleeping(): boolean + set sleeping(value: boolean) + + /** If `true`, the body can enter sleep mode when there is no movement. See [member sleeping]. */ + get can_sleep(): boolean + set can_sleep(value: boolean) + + /** If `true`, the body cannot rotate. Gravity and forces only apply linear movement. */ + get lock_rotation(): boolean + set lock_rotation(value: boolean) + + /** If `true`, the body is frozen. Gravity and forces are not applied anymore. + * See [member freeze_mode] to set the body's behavior when frozen. + * For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead. + */ + get freeze(): boolean + set freeze(value: boolean) + + /** The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values. + * For a body that is always frozen, use [StaticBody2D] or [AnimatableBody2D] instead. + */ + get freeze_mode(): int64 + set freeze_mode(value: int64) + + /** If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] method, if that virtual method is overridden. + * Setting this property will call the method [method PhysicsServer2D.body_set_omit_force_integration] internally. + */ + get custom_integrator(): boolean + set custom_integrator(value: boolean) + + /** Continuous collision detection mode. + * 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 [enum CCDMode] for details. + */ + get continuous_cd(): int64 + set continuous_cd(value: int64) + + /** If `true`, the RigidBody2D will emit signals when it collides with another body. + * + * **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. + */ + get contact_monitor(): boolean + set contact_monitor(value: boolean) + + /** The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to `true` to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. + * + * **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + */ + get max_contacts_reported(): int64 + set max_contacts_reported(value: int64) + + /** The body's linear velocity in pixels per second. Can be used sporadically, but **don't set this every frame**, 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. */ + get linear_velocity(): Vector2 + set linear_velocity(value: Vector2) + + /** Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. */ + get linear_damp_mode(): int64 + set linear_damp_mode(value: int64) + + /** Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an [Area2D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping. + */ + get linear_damp(): float64 + set linear_damp(value: float64) + + /** The body's rotational velocity in *radians* per second. */ + get angular_velocity(): float64 + set angular_velocity(value: float64) + + /** Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. */ + get angular_damp_mode(): int64 + set angular_damp_mode(value: int64) + + /** Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 2d** or any value override set by an [Area2D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping. + */ + get angular_damp(): float64 + set angular_damp(value: float64) + + /** The body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + get constant_force(): Vector2 + set constant_force(value: Vector2) + + /** The body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + get constant_torque(): float64 + set constant_torque(value: float64) + + /** Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + * [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + * [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + * [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + */ + readonly body_shape_entered: Signal4 + + /** Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + * [param body_rid] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + * [param body_shape_index] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + * [param local_shape_index] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + */ + readonly body_shape_exited: Signal4 + + /** Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + */ + readonly body_entered: Signal1 + + /** Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + */ + readonly body_exited: Signal1 + + /** Emitted when the physics engine changes the body's sleeping state. + * + * **Note:** Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. + */ + readonly sleeping_state_changed: Signal0 + } + namespace RigidBody3D { + enum FreezeMode { + /** Static body freeze mode (default). The body is not affected by gravity and forces. It can be only moved by user code and doesn't collide with other bodies along its path. */ + FREEZE_MODE_STATIC = 0, + + /** Kinematic body freeze mode. Similar to [constant FREEZE_MODE_STATIC], but collides with other bodies along its path when moved. Useful for a frozen body that needs to be animated. */ + FREEZE_MODE_KINEMATIC = 1, + } + enum CenterOfMassMode { + /** In this mode, the body's center of mass is calculated automatically based on its shapes. This assumes that the shapes' origins are also their center of mass. */ + CENTER_OF_MASS_MODE_AUTO = 0, + + /** In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. */ + CENTER_OF_MASS_MODE_CUSTOM = 1, + } + enum DampMode { + /** In this mode, the body's damping value is added to any value set in areas or the default value. */ + DAMP_MODE_COMBINE = 0, + + /** In this mode, the body's damping value replaces any value set in areas or the default value. */ + DAMP_MODE_REPLACE = 1, + } + } + /** A 3D physics body that is moved by a physics simulation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rigidbody3d.html + */ + class RigidBody3D extends PhysicsBody3D { + constructor(identifier?: any) + /** Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it is called before the standard force integration, but the [member custom_integrator] property allows you to disable the standard force integration and do fully custom force integration for a body. */ + /* gdvirtual */ _integrate_forces(state: PhysicsDirectBodyState3D): void + + /** Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. */ + get_inverse_inertia_tensor(): Basis + + /** Returns the number of contacts this body has with other bodies. By default, this returns 0 unless bodies are configured to monitor contacts (see [member contact_monitor]). + * + * **Note:** To retrieve the colliding bodies, use [method get_colliding_bodies]. + */ + get_contact_count(): int64 + + /** 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. */ + set_axis_velocity(axis_velocity: Vector3): void + + /** Applies a directional impulse without affecting rotation. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * This is equivalent to using [method apply_impulse] at the body's center of mass. + */ + apply_central_impulse(impulse: Vector3): void + + /** Applies a positioned impulse to the body. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * [param position] is the offset from the body origin in global coordinates. + */ + apply_impulse(impulse: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational impulse to the body without affecting the position. + * An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). + * + * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia]. + */ + apply_torque_impulse(impulse: Vector3): void + + /** Applies a directional force without affecting rotation. A force is time dependent and meant to be applied every physics update. + * This is equivalent to using [method apply_force] at the body's center of mass. + */ + apply_central_force(force: Vector3): void + + /** Applies a positioned force to the body. A force is time dependent and meant to be applied every physics update. + * [param position] is the offset from the body origin in global coordinates. + */ + apply_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Applies a rotational force without affecting position. A force is time dependent and meant to be applied every physics update. + * + * **Note:** [member inertia] is required for this to work. To have [member inertia], an active [CollisionShape3D] must be a child of the node, or you can manually set [member inertia]. + */ + apply_torque(torque: Vector3): void + + /** Adds a constant directional force without affecting rotation that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + * This is equivalent to using [method add_constant_force] at the body's center of mass. + */ + add_constant_central_force(force: Vector3): void + + /** Adds a constant positioned force to the body that keeps being applied over time until cleared with `constant_force = Vector3(0, 0, 0)`. + * [param position] is the offset from the body origin in global coordinates. + */ + add_constant_force(force: Vector3, position: Vector3 = new Vector3(0, 0, 0)): void + + /** Adds a constant rotational force without affecting position that keeps being applied over time until cleared with `constant_torque = Vector3(0, 0, 0)`. */ + add_constant_torque(torque: Vector3): void + + /** Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. + * + * **Note:** The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + */ + get_colliding_bodies(): GArray + + /** The body's mass. */ + get mass(): float64 + set mass(value: float64) + + /** The physics material override for the body. + * If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. + */ + get physics_material_override(): PhysicsMaterial + set physics_material_override(value: PhysicsMaterial) + + /** This is multiplied by the global 3D gravity setting found in **Project > Project Settings > Physics > 3d** to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. */ + get gravity_scale(): float64 + set gravity_scale(value: float64) + + /** Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. */ + get center_of_mass_mode(): int64 + set center_of_mass_mode(value: int64) + + /** The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + * When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + */ + get center_of_mass(): Vector3 + set center_of_mass(value: Vector3) + + /** The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + * If set to [constant Vector3.ZERO], inertia is automatically computed (default value). + * + * **Note:** This value does not change when inertia is automatically computed. Use [PhysicsServer3D] to get the computed inertia. + * + */ + get inertia(): Vector3 + set inertia(value: Vector3) + + /** If `true`, the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method apply_force] methods. */ + get sleeping(): boolean + set sleeping(value: boolean) + + /** If `true`, the body can enter sleep mode when there is no movement. See [member sleeping]. */ + get can_sleep(): boolean + set can_sleep(value: boolean) + + /** If `true`, the body cannot rotate. Gravity and forces only apply linear movement. */ + get lock_rotation(): boolean + set lock_rotation(value: boolean) + + /** If `true`, the body is frozen. Gravity and forces are not applied anymore. + * See [member freeze_mode] to set the body's behavior when frozen. + * For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead. + */ + get freeze(): boolean + set freeze(value: boolean) + + /** The body's freeze mode. Can be used to set the body's behavior when [member freeze] is enabled. See [enum FreezeMode] for possible values. + * For a body that is always frozen, use [StaticBody3D] or [AnimatableBody3D] instead. + */ + get freeze_mode(): int64 + set freeze_mode(value: int64) + + /** If `true`, the standard force integration (like gravity or damping) will be disabled for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] method, if that virtual method is overridden. + * Setting this property will call the method [method PhysicsServer3D.body_set_omit_force_integration] internally. + */ + get custom_integrator(): boolean + set custom_integrator(value: boolean) + + /** 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 fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. + */ + get continuous_cd(): boolean + set continuous_cd(value: boolean) + + /** If `true`, the RigidBody3D will emit signals when it collides with another body. + * + * **Note:** By default the maximum contacts reported is set to 0, meaning nothing will be recorded, see [member max_contacts_reported]. + */ + get contact_monitor(): boolean + set contact_monitor(value: boolean) + + /** The maximum number of contacts that will be recorded. Requires a value greater than 0 and [member contact_monitor] to be set to `true` to start to register contacts. Use [method get_contact_count] to retrieve the count or [method get_colliding_bodies] to retrieve bodies that have been collided with. + * + * **Note:** The number of contacts is different from the number of collisions. Collisions between parallel edges will result in two contacts (one at each end), and collisions between parallel faces will result in four contacts (one at each corner). + */ + get max_contacts_reported(): int64 + set max_contacts_reported(value: int64) + + /** The body's linear velocity in units per second. Can be used sporadically, but **don't set this every frame**, 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. */ + get linear_velocity(): Vector3 + set linear_velocity(value: Vector3) + + /** Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. */ + get linear_damp_mode(): int64 + set linear_damp_mode(value: int64) + + /** Damps the body's movement. By default, the body will use the **Default Linear Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an [Area3D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. + */ + get linear_damp(): float64 + set linear_damp(value: float64) + + /** The RigidBody3D's rotational velocity in *radians* per second. */ + get angular_velocity(): Vector3 + set angular_velocity(value: Vector3) + + /** Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. */ + get angular_damp_mode(): int64 + set angular_damp_mode(value: int64) + + /** Damps the body's rotation. By default, the body will use the **Default Angular Damp** in **Project > Project Settings > Physics > 3d** or any value override set by an [Area3D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. + * See [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping. + */ + get angular_damp(): float64 + set angular_damp(value: float64) + + /** The body's total constant positional forces applied during each physics update. + * See [method add_constant_force] and [method add_constant_central_force]. + */ + get constant_force(): Vector3 + set constant_force(value: Vector3) + + /** The body's total constant rotational forces applied during each physics update. + * See [method add_constant_torque]. + */ + get constant_torque(): Vector3 + set constant_torque(value: Vector3) + + /** Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + * [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + * [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + * [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + */ + readonly body_shape_entered: Signal4 + + /** Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + * [param body_rid] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + * [param body_shape_index] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))`. + * [param local_shape_index] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with `self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))`. + */ + readonly body_shape_exited: Signal4 + + /** Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + */ + readonly body_entered: Signal1 + + /** Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to `true` and [member max_contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + * [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + */ + readonly body_exited: Signal1 + + /** Emitted when the physics engine changes the body's sleeping state. + * + * **Note:** Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or `emit_signal("sleeping_state_changed")` is used. + */ + readonly sleeping_state_changed: Signal0 + } + /** Editor-only helper for setting up root motion in [AnimationMixer]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_rootmotionview.html + */ + class RootMotionView extends VisualInstance3D { + constructor(identifier?: any) + /** Path to an [AnimationMixer] node to use as a basis for root motion. */ + get animation_path(): NodePath + set animation_path(value: NodePath | string) + + /** The grid's color. */ + get color(): Color + set color(value: Color) + + /** The grid's cell size in 3D units. */ + get cell_size(): float64 + set cell_size(value: float64) + + /** The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached. */ + get radius(): float64 + set radius(value: float64) + + /** If `true`, the grid's points will all be on the same Y coordinate ( *local* Y = 0). If `false`, the points' original Y coordinate is preserved. */ + get zero_y(): boolean + set zero_y(value: boolean) + } + class RunInstancesDialog extends AcceptDialog { + constructor(identifier?: any) + } + class SceneCacheInterface extends RefCounted { + constructor(identifier?: any) + } + class SceneCreateDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + class SceneExporterGLTFPlugin extends EditorPlugin { + constructor(identifier?: any) + } + class SceneImportSettingsData extends Object { + constructor(identifier?: any) + } + class SceneImportSettingsDialog extends ConfirmationDialog { + constructor(identifier?: any) + } + /** High-level multiplayer API implementation. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scenemultiplayer.html + */ + class SceneMultiplayer extends MultiplayerAPI { + constructor(identifier?: any) + /** Clears the current SceneMultiplayer network state (you shouldn't call this unless you know what you are doing). */ + clear(): void + + /** Disconnects the peer identified by [param id], removing it from the list of connected peers, and closing the underlying connection with it. */ + disconnect_peer(id: int64): void + + /** Returns the IDs of the peers currently trying to authenticate with this [MultiplayerAPI]. */ + get_authenticating_peers(): PackedInt32Array + + /** Sends the specified [param data] to the remote peer identified by [param id] as part of an authentication message. This can be used to authenticate peers, and control when [signal MultiplayerAPI.peer_connected] is emitted (and the remote peer accepted as one of the connected peers). */ + send_auth(id: int64, data: PackedByteArray | byte[] | ArrayBuffer): GError + + /** Mark the authentication step as completed for the remote peer identified by [param id]. The [signal MultiplayerAPI.peer_connected] signal will be emitted for this peer once the remote side also completes the authentication. No further authentication messages are expected to be received from this peer. + * If a peer disconnects before completing authentication, either due to a network issue, the [member auth_timeout] expiring, or manually calling [method disconnect_peer], the [signal peer_authentication_failed] signal will be emitted instead of [signal MultiplayerAPI.peer_disconnected]. + */ + complete_auth(id: int64): GError + + /** Sends the given raw [param bytes] to a specific peer identified by [param id] (see [method MultiplayerPeer.set_target_peer]). Default ID is `0`, i.e. broadcast to all peers. */ + send_bytes(bytes: PackedByteArray | byte[] | ArrayBuffer, id: int64 = 0, mode: MultiplayerPeer.TransferMode = 2, channel: int64 = 0): GError + + /** The root path to use for RPCs and replication. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. + * This effectively allows to have different branches of the scene tree to be managed by different MultiplayerAPI, allowing for example to run both client and server in the same scene. + */ + get root_path(): NodePath + set root_path(value: NodePath | string) + + /** The callback to execute when when receiving authentication data sent via [method send_auth]. If the [Callable] is empty (default), peers will be automatically accepted as soon as they connect. */ + get auth_callback(): Callable + set auth_callback(value: Callable) + + /** If set to a value greater than `0.0`, the maximum amount of time peers can stay in the authenticating state, after which the authentication will automatically fail. See the [signal peer_authenticating] and [signal peer_authentication_failed] signals. */ + get auth_timeout(): float64 + set auth_timeout(value: float64) + + /** If `true`, the MultiplayerAPI will allow encoding and decoding of object during RPCs. + * **Warning:** Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threat such as remote code execution. + */ + get allow_object_decoding(): boolean + set allow_object_decoding(value: boolean) + + /** If `true`, the MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] refuses new incoming connections. */ + get refuse_new_connections(): boolean + set refuse_new_connections(value: boolean) + + /** Enable or disable the server feature that notifies clients of other peers' connection/disconnection, and relays messages between them. When this option is `false`, clients won't be automatically notified of other peers and won't be able to send them packets through the server. + * + * **Note:** Changing this option while other peers are connected may lead to unexpected behaviors. + * + * **Note:** Support for this feature may depend on the current [MultiplayerPeer] configuration. See [method MultiplayerPeer.is_server_relay_supported]. + */ + get server_relay(): boolean + set server_relay(value: boolean) + + /** Maximum size of each synchronization packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of packet loss. See [MultiplayerSynchronizer]. */ + get max_sync_packet_size(): int64 + set max_sync_packet_size(value: int64) + + /** Maximum size of each delta packet. Higher values increase the chance of receiving full updates in a single frame, but also the chance of causing networking congestion (higher latency, disconnections). See [MultiplayerSynchronizer]. */ + get max_delta_packet_size(): int64 + set max_delta_packet_size(value: int64) + + /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] connects to a new peer and a valid [member auth_callback] is set. In this case, the [signal MultiplayerAPI.peer_connected] will not be emitted until [method complete_auth] is called with given peer [param id]. While in this state, the peer will not be included in the list returned by [method MultiplayerAPI.get_peers] (but in the one returned by [method get_authenticating_peers]), and only authentication data will be sent or received. See [method send_auth] for sending authentication data. */ + readonly peer_authenticating: Signal1 + + /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] disconnects from a peer for which authentication had not yet completed. See [signal peer_authenticating]. */ + readonly peer_authentication_failed: Signal1 + + /** Emitted when this MultiplayerAPI's [member MultiplayerAPI.multiplayer_peer] receives a [param packet] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. */ + readonly peer_packet: Signal2 + } + class SceneRPCInterface extends RefCounted { + constructor(identifier?: any) + } + namespace SceneReplicationConfig { + enum ReplicationMode { + /** Do not keep the given property synchronized. */ + REPLICATION_MODE_NEVER = 0, + + /** Replicate the given property on process by constantly sending updates using unreliable transfer mode. */ + REPLICATION_MODE_ALWAYS = 1, + + /** Replicate the given property on process by sending updates using reliable transfer mode when its value changes. */ + REPLICATION_MODE_ON_CHANGE = 2, + } + } + /** Configuration for properties to synchronize with a [MultiplayerSynchronizer]. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scenereplicationconfig.html + */ + class SceneReplicationConfig extends Resource { + constructor(identifier?: any) + /** Returns a list of synchronized property [NodePath]s. */ + get_properties(): GArray + + /** Adds the property identified by the given [param path] to the list of the properties being synchronized, optionally passing an [param index]. + * + * **Note:** For details on restrictions and limitations on property synchronization, see [MultiplayerSynchronizer]. + */ + add_property(path: NodePath | string, index: int64 = -1): void + + /** Returns `true` if the given [param path] is configured for synchronization. */ + has_property(path: NodePath | string): boolean + + /** Removes the property identified by the given [param path] from the configuration. */ + remove_property(path: NodePath | string): void + + /** Finds the index of the given [param path]. */ + property_get_index(path: NodePath | string): int64 + + /** Returns `true` if the property identified by the given [param path] is configured to be synchronized on spawn. */ + property_get_spawn(path: NodePath | string): boolean + + /** Sets whether the property identified by the given [param path] is configured to be synchronized on spawn. */ + property_set_spawn(path: NodePath | string, enabled: boolean): void + + /** Returns the replication mode for the property identified by the given [param path]. See [enum ReplicationMode]. */ + property_get_replication_mode(path: NodePath | string): SceneReplicationConfig.ReplicationMode + + /** Sets the synchronization mode for the property identified by the given [param path]. See [enum ReplicationMode]. */ + property_set_replication_mode(path: NodePath | string, mode: SceneReplicationConfig.ReplicationMode): void + + /** Returns `true` if the property identified by the given [param path] is configured to be synchronized on process. */ + property_get_sync(path: NodePath | string): boolean + + /** Sets whether the property identified by the given [param path] is configured to be synchronized on process. */ + property_set_sync(path: NodePath | string, enabled: boolean): void + + /** Returns `true` if the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. */ + property_get_watch(path: NodePath | string): boolean + + /** Sets whether the property identified by the given [param path] is configured to be reliably synchronized when changes are detected on process. */ + property_set_watch(path: NodePath | string, enabled: boolean): void + } + class SceneReplicationInterface extends RefCounted { + constructor(identifier?: any) + } + namespace SceneState { + enum GenEditState { + /** If passed to [method PackedScene.instantiate], blocks edits to the scene state. */ + GEN_EDIT_STATE_DISABLED = 0, + + /** If passed to [method PackedScene.instantiate], provides inherited scene resources to the local scene. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_INSTANCE = 1, + + /** If passed to [method PackedScene.instantiate], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_MAIN = 2, + + /** If passed to [method PackedScene.instantiate], it's similar to [constant GEN_EDIT_STATE_MAIN], but for the case where the scene is being instantiated to be the base of another one. + * + * **Note:** Only available in editor builds. + */ + GEN_EDIT_STATE_MAIN_INHERITED = 3, + } + } + /** Provides access to a scene file's information. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scenestate.html + */ + class SceneState extends RefCounted { + constructor(identifier?: any) + /** Returns the number of nodes in the scene. + * The `idx` argument used to query node data in other `get_node_*` methods in the interval `[0, get_node_count() - 1]`. + */ + get_node_count(): int64 + + /** Returns the type of the node at [param idx]. */ + get_node_type(idx: int64): StringName + + /** Returns the name of the node at [param idx]. */ + get_node_name(idx: int64): StringName + + /** Returns the path to the node at [param idx]. + * If [param for_parent] is `true`, returns the path of the [param idx] node's parent instead. + */ + get_node_path(idx: int64, for_parent: boolean = false): NodePath + + /** Returns the path to the owner of the node at [param idx], relative to the root node. */ + get_node_owner_path(idx: int64): NodePath + + /** Returns `true` if the node at [param idx] is an [InstancePlaceholder]. */ + is_node_instance_placeholder(idx: int64): boolean + + /** Returns the path to the represented scene file if the node at [param idx] is an [InstancePlaceholder]. */ + get_node_instance_placeholder(idx: int64): string + + /** Returns a [PackedScene] for the node at [param idx] (i.e. the whole branch starting at this node, with its child nodes and resources), or `null` if the node is not an instance. */ + get_node_instance(idx: int64): PackedScene + + /** Returns the list of group names associated with the node at [param idx]. */ + get_node_groups(idx: int64): PackedStringArray + + /** Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [param idx] argument used here and in other methods. */ + get_node_index(idx: int64): int64 + + /** Returns the number of exported or overridden properties for the node at [param idx]. + * The `prop_idx` argument used to query node property data in other `get_node_property_*` methods in the interval `[0, get_node_property_count() - 1]`. + */ + get_node_property_count(idx: int64): int64 + + /** Returns the name of the property at [param prop_idx] for the node at [param idx]. */ + get_node_property_name(idx: int64, prop_idx: int64): StringName + + /** Returns the value of the property at [param prop_idx] for the node at [param idx]. */ + get_node_property_value(idx: int64, prop_idx: int64): any + + /** Returns the number of signal connections in the scene. + * The `idx` argument used to query connection metadata in other `get_connection_*` methods in the interval `[0, get_connection_count() - 1]`. + */ + get_connection_count(): int64 + + /** Returns the path to the node that owns the signal at [param idx], relative to the root node. */ + get_connection_source(idx: int64): NodePath + + /** Returns the name of the signal at [param idx]. */ + get_connection_signal(idx: int64): StringName + + /** Returns the path to the node that owns the method connected to the signal at [param idx], relative to the root node. */ + get_connection_target(idx: int64): NodePath + + /** Returns the method connected to the signal at [param idx]. */ + get_connection_method(idx: int64): StringName + + /** Returns the connection flags for the signal at [param idx]. See [enum Object.ConnectFlags] constants. */ + get_connection_flags(idx: int64): int64 + + /** Returns the list of bound parameters for the signal at [param idx]. */ + get_connection_binds(idx: int64): GArray + + /** Returns the number of unbound parameters for the signal at [param idx]. */ + get_connection_unbinds(idx: int64): int64 + } + class SceneTileProxyObject extends Object { + constructor(identifier?: any) + readonly changed: Signal1 + } + namespace SceneTree { + enum GroupCallFlags { + /** Call nodes within a group with no special behavior (default). */ + GROUP_CALL_DEFAULT = 0, + + /** Call nodes within a group in reverse tree hierarchy order (all nested children are called before their respective parent nodes). */ + GROUP_CALL_REVERSE = 1, + + /** Call nodes within a group at the end of the current frame (can be either process or physics frame), similar to [method Object.call_deferred]. */ + GROUP_CALL_DEFERRED = 2, + + /** Call nodes within a group only once, even if the call is executed many times in the same frame. Must be combined with [constant GROUP_CALL_DEFERRED] to work. + * + * **Note:** Different arguments are not taken into account. Therefore, when the same call is executed with different arguments, only the first call will be performed. + */ + GROUP_CALL_UNIQUE = 4, + } + } + /** Manages the game loop via a hierarchy of nodes. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scenetree.html + */ + class SceneTree extends MainLoop { + constructor(identifier?: any) + /** Returns `true` if a node added to the given group [param name] exists in the tree. */ + has_group(name: StringName): boolean + + /** Returns a new [SceneTreeTimer]. After [param time_sec] in seconds have passed, the timer will emit [signal SceneTreeTimer.timeout] and will be automatically freed. + * If [param process_always] is `false`, the timer will be paused when setting [member SceneTree.paused] to `true`. + * If [param process_in_physics] is `true`, the timer will update at the end of the physics frame, instead of the process frame. + * If [param ignore_time_scale] is `true`, the timer will ignore [member Engine.time_scale] and update with the real, elapsed time. + * This method is commonly used to create a one-shot delay timer, as in the following example: + * + * + * **Note:** The timer is always updated *after* all of the nodes in the tree. A node's [method Node._process] method would be called before the timer updates (or [method Node._physics_process] if [param process_in_physics] is set to `true`). + */ + create_timer(time_sec: float64, process_always: boolean = true, process_in_physics: boolean = false, ignore_time_scale: boolean = false): SceneTreeTimer + + /** Creates and returns a new [Tween] processed in this tree. The Tween will start automatically on the next process frame or physics frame (depending on its [enum Tween.TweenProcessMode]). + * + * **Note:** A [Tween] created using this method is not bound to any [Node]. It may keep working until there is nothing left to animate. If you want the [Tween] to be automatically killed when the [Node] is freed, use [method Node.create_tween] or [method Tween.bind_node]. + */ + create_tween(): Tween + + /** Returns an [Array] of currently existing [Tween]s in the tree, including paused tweens. */ + get_processed_tweens(): GArray + + /** Returns the number of nodes inside this tree. */ + get_node_count(): int64 + + /** Returns how many frames have been processed, since the application started. This is *not* a measurement of elapsed time. */ + get_frame(): int64 + + /** Quits the application at the end of the current iteration, with the given [param exit_code]. + * By convention, an exit code of `0` indicates success, whereas any other exit code indicates an error. For portability reasons, it should be between `0` and `125` (inclusive). + * + * **Note:** On iOS this method doesn't work. Instead, as recommended by the [url=https://developer.apple.com/library/archive/qa/qa1561/_index.html]iOS Human Interface Guidelines[/url], the user is expected to close apps via the Home button. + */ + quit(exit_code: int64 = 0): void + + /** Queues the given [param obj] to be deleted, calling its [method Object.free] at the end of the current frame. This method is similar to [method Node.queue_free]. */ + queue_delete(obj: Object): void + + /** Calls the given [param method] on each node inside this tree added to the given [param group]. Use [param flags] to customize this method's behavior (see [enum GroupCallFlags]). Additional arguments for [param method] can be passed at the end of this method. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored. + * + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + call_group_flags(flags: int64, group: StringName, method: StringName, ...vargargs: any[]): void + + /** Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]). */ + notify_group_flags(call_flags: int64, group: StringName, notification: int64): void + + /** Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. Use [param call_flags] to customize this method's behavior (see [enum GroupCallFlags]). + * + * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + set_group_flags(call_flags: int64, group: StringName, property: string, value: any): void + + /** Calls [param method] on each node inside this tree added to the given [param group]. You can pass arguments to [param method] by specifying them at the end of this method call. Nodes that cannot call [param method] (either because the method doesn't exist or the arguments do not match) are ignored. See also [method set_group] and [method notify_group]. + * + * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + * + * **Note:** In C#, [param method] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new [StringName] on each call. + */ + call_group(group: StringName, method: StringName, ...vargargs: any[]): void + + /** Calls [method Object.notification] with the given [param notification] to all nodes inside this tree added to the [param group]. See also [url=https://docs.godotengine.org/en/4.3/tutorials/best_practices/godot_notifications.html]Godot notifications[/url] and [method call_group] and [method set_group]. + * + * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + */ + notify_group(group: StringName, notification: int64): void + + /** Sets the given [param property] to [param value] on all nodes inside this tree added to the given [param group]. Nodes that do not have the [param property] are ignored. See also [method call_group] and [method notify_group]. + * + * **Note:** This method acts immediately on all selected nodes at once, which may cause stuttering in some performance-intensive situations. + * + * **Note:** In C#, [param property] must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new [StringName] on each call. + */ + set_group(group: StringName, property: string, value: any): void + + /** Returns an [Array] containing all nodes inside this tree, that have been added to the given [param group], in scene hierarchy order. */ + get_nodes_in_group(group: StringName): GArray + + /** Returns the first [Node] found inside the tree, that has been added to the given [param group], in scene hierarchy order. Returns `null` if no match is found. See also [method get_nodes_in_group]. */ + get_first_node_in_group(group: StringName): Node + + /** Returns the number of nodes assigned to the given group. */ + get_node_count_in_group(group: StringName): int64 + + /** Changes the running scene to the one at the given [param path], after loading it into a [PackedScene] and creating a new instance. + * Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [param path] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. + * + * **Note:** See [method change_scene_to_packed] for details on the order of operations. + */ + change_scene_to_file(path: string): GError + + /** Changes the running scene to a new instance of the given [PackedScene] (which must be valid). + * Returns [constant OK] on success, [constant ERR_CANT_CREATE] if the scene cannot be instantiated, or [constant ERR_INVALID_PARAMETER] if the scene is invalid. + * + * **Note:** Operations happen in the following order when [method change_scene_to_packed] is called: + * 1. The current scene node is immediately removed from the tree. From that point, [method Node.get_tree] called on the current (outgoing) scene will return `null`. [member current_scene] will be `null`, too, because the new scene is not available yet. + * 2. At the end of the frame, the formerly current scene, already removed from the tree, will be deleted (freed from memory) and then the new scene will be instantiated and added to the tree. [method Node.get_tree] and [member current_scene] will be back to working as usual. + * This ensures that both scenes aren't running at the same time, while still freeing the previous scene in a safe way similar to [method Node.queue_free]. + */ + change_scene_to_packed(packed_scene: PackedScene): GError + + /** Reloads the currently active scene, replacing [member current_scene] with a new instance of its original [PackedScene]. + * Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] is defined, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. + */ + reload_current_scene(): GError + + /** If a current scene is loaded, calling this method will unload it. */ + unload_current_scene(): void + + /** Sets a custom [MultiplayerAPI] with the given [param root_path] (controlling also the relative subpaths), or override the default one if [param root_path] is empty. + * + * **Note:** No [MultiplayerAPI] must be configured for the subpath containing [param root_path], nested custom multiplayers are not allowed. I.e. if one is configured for `"/root/Foo"` setting one for `"/root/Foo/Bar"` will cause an error. + */ + set_multiplayer(multiplayer: MultiplayerAPI, root_path: NodePath | string = ''): void + + /** Searches for the [MultiplayerAPI] configured for the given path, if one does not exist it searches the parent paths until one is found. If the path is empty, or none is found, the default one is returned. See [method set_multiplayer]. */ + get_multiplayer(for_path: NodePath | string = ''): MultiplayerAPI + + /** If `true`, the application automatically accepts quitting requests. + * For mobile platforms, see [member quit_on_go_back]. + */ + get auto_accept_quit(): boolean + set auto_accept_quit(value: boolean) + + /** If `true`, the application quits automatically when navigating back (e.g. using the system "Back" button on Android). + * To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST]. + */ + get quit_on_go_back(): boolean + set quit_on_go_back(value: boolean) + + /** If `true`, collision shapes will be visible when running the game from the editor for debugging purposes. + * + * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_collisions_hint] while the project is running will not have the desired effect. + */ + get debug_collisions_hint(): boolean + set debug_collisions_hint(value: boolean) + + /** If `true`, curves from [Path2D] and [Path3D] nodes will be visible when running the game from the editor for debugging purposes. + * + * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_paths_hint] while the project is running will not have the desired effect. + */ + get debug_paths_hint(): boolean + set debug_paths_hint(value: boolean) + + /** If `true`, navigation polygons will be visible when running the game from the editor for debugging purposes. + * + * **Note:** This property is not designed to be changed at run-time. Changing the value of [member debug_navigation_hint] while the project is running will not have the desired effect. + */ + get debug_navigation_hint(): boolean + set debug_navigation_hint(value: boolean) + + /** If `true`, the scene tree is considered paused. This causes the following behavior: + * - 2D and 3D physics will be stopped, as well as collision detection and related signals. + * - Depending on each node's [member Node.process_mode], their [method Node._process], [method Node._physics_process] and [method Node._input] callback methods may not called anymore. + */ + get paused(): boolean + set paused(value: boolean) + + /** The root of the scene currently being edited in the editor. This is usually a direct child of [member root]. + * + * **Note:** This property does nothing in release builds. + */ + get edited_scene_root(): Node + set edited_scene_root(value: Node) + + /** The root node of the currently loaded main scene, usually as a direct child of [member root]. See also [method change_scene_to_file], [method change_scene_to_packed], and [method reload_current_scene]. + * **Warning:** Setting this property directly may not work as expected, as it does *not* add or remove any nodes from this tree. + */ + get current_scene(): Node + set current_scene(value: Node) + + /** The tree's root [Window]. This is top-most [Node] of the scene tree, and is always present. An absolute [NodePath] always starts from this node. Children of the root node may include the loaded [member current_scene], as well as any [url=https://docs.godotengine.org/en/4.3/tutorials/scripting/singletons_autoload.html]AutoLoad[/url] configured in the Project Settings. + * **Warning:** Do not delete this node. This will result in unstable behavior, followed by a crash. + */ + get root(): Node + + /** If `true` (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame]. + * If `false`, you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. + */ + get multiplayer_poll(): boolean + set multiplayer_poll(value: boolean) + + /** If `true`, the renderer will interpolate the transforms of physics objects between the last two transforms, so that smooth motion is seen even when physics ticks do not coincide with rendered frames. + * The default value of this property is controlled by [member ProjectSettings.physics/common/physics_interpolation]. + */ + get physics_interpolation(): boolean + set physics_interpolation(value: boolean) + + /** Emitted any time the tree's hierarchy changes (nodes being moved, renamed, etc.). */ + readonly tree_changed: Signal0 + + /** Emitted when the [member Node.process_mode] of any node inside the tree is changed. Only emitted in the editor, to update the visibility of disabled nodes. */ + readonly tree_process_mode_changed: Signal0 + + /** Emitted when the [param node] enters this tree. */ + readonly node_added: Signal1 + + /** Emitted when the [param node] exits this tree. */ + readonly node_removed: Signal1 + + /** Emitted when the [param node]'s [member Node.name] is changed. */ + readonly node_renamed: Signal1 + + /** Emitted when the [param node]'s [method Node.update_configuration_warnings] is called. Only emitted in the editor. */ + readonly node_configuration_warning_changed: Signal1 + + /** Emitted immediately before [method Node._process] is called on every node in this tree. */ + readonly process_frame: Signal0 + + /** Emitted immediately before [method Node._physics_process] is called on every node in this tree. */ + readonly physics_frame: Signal0 + } + class SceneTreeDialog extends ConfirmationDialog { + constructor(identifier?: any) + _cancel(): void + readonly selected: Signal1 + } + class SceneTreeDock extends VBoxContainer { + constructor(identifier?: any) + _post_do_create(_unnamed_arg0: Node): void + _set_owners(_unnamed_arg0: Node, _unnamed_arg1: GArray): void + _reparent_nodes_to_root(_unnamed_arg0: Node, _unnamed_arg1: GArray, _unnamed_arg2: Node): void + _reparent_nodes_to_paths_with_transform_and_name(_unnamed_arg0: Node, _unnamed_arg1: GArray, _unnamed_arg2: GArray, _unnamed_arg3: GArray, _unnamed_arg4: GArray, _unnamed_arg5: Node): void + _update_script_button(): void + instantiate(_unnamed_arg0: string): void + get_tree_editor(): SceneTreeEditor + replace_node(_unnamed_arg0: Node, _unnamed_arg1: Node, _unnamed_arg2: boolean, _unnamed_arg3: boolean): void + readonly remote_tree_selected: Signal0 + readonly add_node_used: Signal0 + readonly node_created: Signal1 + } + class SceneTreeEditor extends Control { + constructor(identifier?: any) + _update_tree(_unnamed_arg0: boolean = false): void + update_tree(): void + readonly node_selected: Signal0 + readonly node_renamed: Signal0 + readonly node_prerename: Signal0 + readonly node_changed: Signal0 + readonly nodes_dragged: Signal0 + readonly nodes_rearranged: Signal3 + readonly files_dropped: Signal3 + readonly script_dropped: Signal2 + readonly rmb_pressed: Signal1 + readonly open: Signal0 + readonly open_script: Signal0 + } + /** One-shot timer. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scenetreetimer.html + */ + class SceneTreeTimer extends RefCounted { + constructor(identifier?: any) + /** The time remaining (in seconds). */ + get time_left(): float64 + set time_left(value: float64) + + /** Emitted when the timer reaches 0. */ + readonly timeout: Signal0 + } + class ScreenSelect extends Button { + constructor(identifier?: any) + readonly request_open_in_screen: Signal1 + } + /** A class stored as a resource. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_script.html + */ + class Script extends Resource { + constructor(identifier?: any) + /** Returns `true` if the script can be instantiated. */ + can_instantiate(): boolean + + /** Returns `true` if [param base_object] is an instance of this script. */ + instance_has(base_object: Object): boolean + + /** Returns `true` if the script contains non-empty source code. + * + * **Note:** If a script does not have source code, this does not mean that it is invalid or unusable. For example, a [GDScript] that was exported with binary tokenization has no source code, but still behaves as expected and could be instantiated. This can be checked with [method can_instantiate]. + */ + has_source_code(): boolean + + /** Reloads the script's class implementation. Returns an error code. */ + reload(keep_state: boolean = false): GError + + /** Returns the script directly inherited by this script. */ + get_base_script(): Script + + /** Returns the script's base type. */ + get_instance_base_type(): StringName + + /** Returns the class name associated with the script, if there is one. Returns an empty string otherwise. + * To give the script a global name, you can use the `class_name` keyword in GDScript and the `[GlobalClass]` attribute in C#. + * + */ + get_global_name(): StringName + + /** Returns `true` if the script, or a base class, defines a signal with the given name. */ + has_script_signal(signal_name: StringName): boolean + + /** Returns the list of properties in this [Script]. */ + get_script_property_list(): GArray + + /** Returns the list of methods in this [Script]. */ + get_script_method_list(): GArray + + /** Returns the list of user signals defined in this [Script]. */ + get_script_signal_list(): GArray + + /** Returns a dictionary containing constant names and their values. */ + get_script_constant_map(): GDictionary + + /** Returns the default value of the specified property. */ + get_property_default_value(property: StringName): any + + /** Returns `true` if the script is a tool script. A tool script can run in the editor. */ + is_tool(): boolean + + /** Returns `true` if the script is an abstract script. An abstract script does not have a constructor and cannot be instantiated. */ + is_abstract(): boolean + + /** The script source code or an empty string if source code is not available. When set, does not reload the class implementation automatically. */ + get source_code(): string + set source_code(value: string) + } + /** Godot editor's popup dialog for creating new [Script] files. + * + * @link https://docs.godotengine.org/en/4.3/classes/class_scriptcreatedialog.html + */ + class ScriptCreateDialog extends ConfirmationDialog { + constructor(identifier?: any) + /** Prefills required fields to configure the ScriptCreateDialog for use. */ + config(inherits: string, path: string, built_in_enabled: boolean = true, load_enabled: boolean = true): void + + /** Emitted when the user clicks the OK button. */ + readonly script_created: Signal1