From 2950ba7e6f33cc244904bafd72411c67b0c74308 Mon Sep 17 00:00:00 2001 From: Pierre-Thomas Meisels Date: Tue, 7 Nov 2023 19:39:52 +0100 Subject: [PATCH] enh(api-gen): generate kdoc from api json --- .../codegen/constants/JvmReservedMethods.kt | 3 +- .../kotlin/godot/codegen/generationEntry.kt | 5 +- .../godot/codegen/models/BuiltinClass.kt | 3 +- .../main/kotlin/godot/codegen/models/Class.kt | 6 +- .../kotlin/godot/codegen/models/Constant.kt | 3 +- .../godot/codegen/models/Constructor.kt | 3 +- .../kotlin/godot/codegen/models/EnumValue.kt | 6 +- .../kotlin/godot/codegen/models/Member.kt | 3 +- .../kotlin/godot/codegen/models/Method.kt | 3 +- .../kotlin/godot/codegen/models/Operator.kt | 4 +- .../kotlin/godot/codegen/models/Property.kt | 3 +- .../kotlin/godot/codegen/models/Signal.kt | 3 +- .../godot/codegen/models/UtilityFunction.kt | 4 +- .../codegen/models/enriched/EnrichedClass.kt | 4 +- .../models/enriched/EnrichedConstant.kt | 4 +- .../codegen/models/enriched/EnrichedMethod.kt | 4 +- .../models/enriched/EnrichedProperty.kt | 4 +- .../codegen/models/enriched/EnrichedSignal.kt | 4 +- .../codegen/repositories/IDocRepository.kt | 7 - .../repositories/impl/DocRepository.kt | 8 - .../codegen/services/impl/ClassService.kt | 3 +- .../services/impl/GenerationService.kt | 62 +- .../godot/codegen/traits/IDocumented.kt | 103 + .../src/main/kotlin/godot/docgen/DocGen.kt | 124 - .../main/kotlin/godot/docgen/docClasses.kt | 33 - .../main/kotlin/godot/docgen/rawXmlPojos.kt | 341 - kt/api-generator/src/main/resources/api.json | 55843 ++++++++++------ .../main/kotlin/godot/gen/godot/AESContext.kt | 109 +- .../main/kotlin/godot/gen/godot/AStar2D.kt | 239 +- .../main/kotlin/godot/gen/godot/AStar3D.kt | 303 +- .../kotlin/godot/gen/godot/AStarGrid2D.kt | 212 +- .../kotlin/godot/gen/godot/AcceptDialog.kt | 48 +- .../godot/gen/godot/AnimatableBody2D.kt | 15 +- .../godot/gen/godot/AnimatableBody3D.kt | 18 +- .../godot/gen/godot/AnimatedSprite2D.kt | 82 +- .../godot/gen/godot/AnimatedSprite3D.kt | 83 +- .../kotlin/godot/gen/godot/AnimatedTexture.kt | 55 +- .../main/kotlin/godot/gen/godot/Animation.kt | 217 +- .../godot/gen/godot/AnimationLibrary.kt | 33 +- .../kotlin/godot/gen/godot/AnimationMixer.kt | 338 +- .../kotlin/godot/gen/godot/AnimationNode.kt | 98 +- .../godot/gen/godot/AnimationNodeAdd2.kt | 16 +- .../godot/gen/godot/AnimationNodeAdd3.kt | 16 +- .../godot/gen/godot/AnimationNodeAnimation.kt | 11 +- .../godot/gen/godot/AnimationNodeBlend2.kt | 12 +- .../godot/gen/godot/AnimationNodeBlend3.kt | 16 +- .../gen/godot/AnimationNodeBlendSpace1D.kt | 35 +- .../gen/godot/AnimationNodeBlendSpace2D.kt | 55 +- .../godot/gen/godot/AnimationNodeBlendTree.kt | 24 +- .../godot/gen/godot/AnimationNodeOneShot.kt | 99 +- .../godot/gen/godot/AnimationNodeOutput.kt | 7 +- .../gen/godot/AnimationNodeStateMachine.kt | 63 +- .../AnimationNodeStateMachinePlayback.kt | 57 +- .../AnimationNodeStateMachineTransition.kt | 63 +- .../godot/gen/godot/AnimationNodeSub2.kt | 22 +- .../godot/gen/godot/AnimationNodeSync.kt | 9 +- .../godot/gen/godot/AnimationNodeTimeScale.kt | 8 +- .../godot/gen/godot/AnimationNodeTimeSeek.kt | 46 +- .../gen/godot/AnimationNodeTransition.kt | 69 +- .../kotlin/godot/gen/godot/AnimationPlayer.kt | 140 +- .../godot/gen/godot/AnimationRootNode.kt | 17 +- .../kotlin/godot/gen/godot/AnimationTree.kt | 29 +- .../src/main/kotlin/godot/gen/godot/Area2D.kt | 202 +- .../src/main/kotlin/godot/gen/godot/Area3D.kt | 215 +- .../main/kotlin/godot/gen/godot/ArrayMesh.kt | 146 +- .../kotlin/godot/gen/godot/ArrayOccluder3D.kt | 27 +- .../godot/gen/godot/AspectRatioContainer.kt | 23 +- .../kotlin/godot/gen/godot/AtlasTexture.kt | 27 +- .../kotlin/godot/gen/godot/AudioBusLayout.kt | 5 +- .../kotlin/godot/gen/godot/AudioEffect.kt | 8 - .../godot/gen/godot/AudioEffectAmplify.kt | 8 +- .../gen/godot/AudioEffectBandLimitFilter.kt | 8 +- .../gen/godot/AudioEffectBandPassFilter.kt | 8 +- .../godot/gen/godot/AudioEffectCapture.kt | 31 +- .../godot/gen/godot/AudioEffectChorus.kt | 44 +- .../godot/gen/godot/AudioEffectCompressor.kt | 35 +- .../godot/gen/godot/AudioEffectDelay.kt | 17 +- .../godot/gen/godot/AudioEffectDistortion.kt | 33 +- .../kotlin/godot/gen/godot/AudioEffectEQ.kt | 12 +- .../kotlin/godot/gen/godot/AudioEffectEQ10.kt | 20 +- .../kotlin/godot/gen/godot/AudioEffectEQ21.kt | 31 +- .../kotlin/godot/gen/godot/AudioEffectEQ6.kt | 16 +- .../godot/gen/godot/AudioEffectFilter.kt | 20 - .../gen/godot/AudioEffectHighPassFilter.kt | 8 +- .../gen/godot/AudioEffectHighShelfFilter.kt | 7 +- .../godot/gen/godot/AudioEffectInstance.kt | 6 - .../godot/gen/godot/AudioEffectLimiter.kt | 19 +- .../gen/godot/AudioEffectLowPassFilter.kt | 8 +- .../gen/godot/AudioEffectLowShelfFilter.kt | 7 +- .../godot/gen/godot/AudioEffectNotchFilter.kt | 8 +- .../godot/gen/godot/AudioEffectPanner.kt | 5 - .../godot/gen/godot/AudioEffectPhaser.kt | 19 +- .../godot/gen/godot/AudioEffectPitchShift.kt | 37 +- .../godot/gen/godot/AudioEffectRecord.kt | 22 +- .../godot/gen/godot/AudioEffectReverb.kt | 23 +- .../gen/godot/AudioEffectSpectrumAnalyzer.kt | 37 +- .../AudioEffectSpectrumAnalyzerInstance.kt | 6 - .../gen/godot/AudioEffectStereoEnhance.kt | 15 +- .../kotlin/godot/gen/godot/AudioListener2D.kt | 20 +- .../kotlin/godot/gen/godot/AudioListener3D.kt | 12 +- .../kotlin/godot/gen/godot/AudioServer.kt | 91 +- .../kotlin/godot/gen/godot/AudioStream.kt | 33 +- .../godot/gen/godot/AudioStreamGenerator.kt | 73 +- .../gen/godot/AudioStreamGeneratorPlayback.kt | 25 +- .../kotlin/godot/gen/godot/AudioStreamMP3.kt | 34 + .../godot/gen/godot/AudioStreamMicrophone.kt | 14 +- .../godot/gen/godot/AudioStreamOggVorbis.kt | 24 + .../godot/gen/godot/AudioStreamPlayback.kt | 29 +- .../godot/AudioStreamPlaybackPolyphonic.kt | 34 +- .../gen/godot/AudioStreamPlaybackResampled.kt | 9 - .../godot/gen/godot/AudioStreamPlayer.kt | 31 +- .../godot/gen/godot/AudioStreamPlayer2D.kt | 46 +- .../godot/gen/godot/AudioStreamPlayer3D.kt | 81 +- .../godot/gen/godot/AudioStreamPolyphonic.kt | 12 +- .../godot/gen/godot/AudioStreamRandomizer.kt | 21 +- .../kotlin/godot/gen/godot/AudioStreamWAV.kt | 44 +- .../kotlin/godot/gen/godot/BackBufferCopy.kt | 24 +- .../main/kotlin/godot/gen/godot/BaseButton.kt | 57 +- .../kotlin/godot/gen/godot/BaseMaterial3D.kt | 596 +- .../src/main/kotlin/godot/gen/godot/BitMap.kt | 36 +- .../src/main/kotlin/godot/gen/godot/Bone2D.kt | 53 +- .../godot/gen/godot/BoneAttachment3D.kt | 26 +- .../main/kotlin/godot/gen/godot/BoneMap.kt | 30 +- .../kotlin/godot/gen/godot/BoxContainer.kt | 25 +- .../main/kotlin/godot/gen/godot/BoxMesh.kt | 14 +- .../kotlin/godot/gen/godot/BoxOccluder3D.kt | 10 +- .../main/kotlin/godot/gen/godot/BoxShape3D.kt | 12 +- .../src/main/kotlin/godot/gen/godot/Button.kt | 80 +- .../kotlin/godot/gen/godot/ButtonGroup.kt | 14 +- .../kotlin/godot/gen/godot/CPUParticles2D.kt | 148 +- .../kotlin/godot/gen/godot/CPUParticles3D.kt | 164 +- .../main/kotlin/godot/gen/godot/CSGBox3D.kt | 15 + .../kotlin/godot/gen/godot/CSGCombiner3D.kt | 12 + .../kotlin/godot/gen/godot/CSGCylinder3D.kt | 27 + .../main/kotlin/godot/gen/godot/CSGMesh3D.kt | 22 + .../kotlin/godot/gen/godot/CSGPolygon3D.kt | 100 + .../kotlin/godot/gen/godot/CSGPrimitive3D.kt | 13 + .../main/kotlin/godot/gen/godot/CSGShape3D.kt | 78 + .../kotlin/godot/gen/godot/CSGSphere3D.kt | 23 + .../main/kotlin/godot/gen/godot/CSGTorus3D.kt | 26 + .../kotlin/godot/gen/godot/CallbackTweener.kt | 20 +- .../main/kotlin/godot/gen/godot/Camera2D.kt | 153 +- .../main/kotlin/godot/gen/godot/Camera3D.kt | 196 +- .../godot/gen/godot/CameraAttributes.kt | 27 +- .../gen/godot/CameraAttributesPhysical.kt | 74 +- .../gen/godot/CameraAttributesPractical.kt | 52 +- .../main/kotlin/godot/gen/godot/CameraFeed.kt | 10 +- .../kotlin/godot/gen/godot/CameraServer.kt | 26 +- .../kotlin/godot/gen/godot/CameraTexture.kt | 12 +- .../kotlin/godot/gen/godot/CanvasGroup.kt | 58 +- .../main/kotlin/godot/gen/godot/CanvasItem.kt | 474 +- .../godot/gen/godot/CanvasItemMaterial.kt | 32 +- .../kotlin/godot/gen/godot/CanvasLayer.kt | 56 +- .../kotlin/godot/gen/godot/CanvasModulate.kt | 5 +- .../kotlin/godot/gen/godot/CanvasTexture.kt | 44 +- .../kotlin/godot/gen/godot/CapsuleMesh.kt | 4 +- .../kotlin/godot/gen/godot/CapsuleShape2D.kt | 9 +- .../kotlin/godot/gen/godot/CapsuleShape3D.kt | 12 +- .../kotlin/godot/gen/godot/CenterContainer.kt | 10 +- .../kotlin/godot/gen/godot/CharFXTransform.kt | 62 +- .../kotlin/godot/gen/godot/CharacterBody2D.kt | 206 +- .../kotlin/godot/gen/godot/CharacterBody3D.kt | 188 +- .../main/kotlin/godot/gen/godot/CheckBox.kt | 15 +- .../kotlin/godot/gen/godot/CheckButton.kt | 11 +- .../kotlin/godot/gen/godot/CircleShape2D.kt | 9 +- .../main/kotlin/godot/gen/godot/ClassDB.kt | 63 +- .../kotlin/godot/gen/godot/ClockDirection.kt | 6 + .../main/kotlin/godot/gen/godot/CodeEdit.kt | 157 +- .../kotlin/godot/gen/godot/CodeHighlighter.kt | 28 +- .../godot/gen/godot/CollisionObject2D.kt | 150 +- .../godot/gen/godot/CollisionObject3D.kt | 126 +- .../godot/gen/godot/CollisionPolygon2D.kt | 35 +- .../godot/gen/godot/CollisionPolygon3D.kt | 20 +- .../godot/gen/godot/CollisionShape2D.kt | 28 +- .../godot/gen/godot/CollisionShape3D.kt | 17 +- .../kotlin/godot/gen/godot/ColorPicker.kt | 41 +- .../godot/gen/godot/ColorPickerButton.kt | 35 +- .../main/kotlin/godot/gen/godot/ColorRect.kt | 8 +- .../godot/gen/godot/CompressedCubemap.kt | 27 +- .../godot/gen/godot/CompressedCubemapArray.kt | 27 +- .../godot/gen/godot/CompressedTexture2D.kt | 28 +- .../gen/godot/CompressedTexture2DArray.kt | 27 +- .../godot/gen/godot/CompressedTexture3D.kt | 19 +- .../gen/godot/CompressedTextureLayered.kt | 8 +- .../godot/gen/godot/ConcavePolygonShape2D.kt | 33 +- .../godot/gen/godot/ConcavePolygonShape3D.kt | 35 +- .../godot/gen/godot/ConeTwistJoint3D.kt | 27 +- .../main/kotlin/godot/gen/godot/ConfigFile.kt | 209 +- .../godot/gen/godot/ConfirmationDialog.kt | 30 +- .../main/kotlin/godot/gen/godot/Container.kt | 33 +- .../main/kotlin/godot/gen/godot/Control.kt | 1267 +- .../godot/gen/godot/ConvexPolygonShape2D.kt | 34 +- .../godot/gen/godot/ConvexPolygonShape3D.kt | 28 +- .../src/main/kotlin/godot/gen/godot/Corner.kt | 12 + .../src/main/kotlin/godot/gen/godot/Crypto.kt | 163 +- .../main/kotlin/godot/gen/godot/CryptoKey.kt | 33 +- .../main/kotlin/godot/gen/godot/Cubemap.kt | 22 +- .../kotlin/godot/gen/godot/CubemapArray.kt | 25 +- .../src/main/kotlin/godot/gen/godot/Curve.kt | 47 +- .../main/kotlin/godot/gen/godot/Curve2D.kt | 133 +- .../main/kotlin/godot/gen/godot/Curve3D.kt | 137 +- .../kotlin/godot/gen/godot/CurveTexture.kt | 24 +- .../kotlin/godot/gen/godot/CurveXYZTexture.kt | 20 +- .../kotlin/godot/gen/godot/CylinderMesh.kt | 31 +- .../kotlin/godot/gen/godot/CylinderShape3D.kt | 16 +- .../main/kotlin/godot/gen/godot/DTLSServer.kt | 197 +- .../godot/gen/godot/DampedSpringJoint2D.kt | 16 +- .../src/main/kotlin/godot/gen/godot/Decal.kt | 157 +- .../main/kotlin/godot/gen/godot/DirAccess.kt | 225 +- .../godot/gen/godot/DirectionalLight2D.kt | 22 +- .../godot/gen/godot/DirectionalLight3D.kt | 35 +- .../kotlin/godot/gen/godot/DisplayServer.kt | 1326 +- .../kotlin/godot/gen/godot/ENetConnection.kt | 153 + .../godot/gen/godot/ENetMultiplayerPeer.kt | 60 + .../kotlin/godot/gen/godot/ENetPacketPeer.kt | 188 + .../godot/gen/godot/EditorCommandPalette.kt | 54 +- .../godot/gen/godot/EditorDebuggerPlugin.kt | 77 +- .../godot/gen/godot/EditorDebuggerSession.kt | 24 +- .../godot/gen/godot/EditorExportPlatform.kt | 19 +- .../godot/gen/godot/EditorExportPlatformPC.kt | 3 - .../godot/gen/godot/EditorExportPlugin.kt | 169 +- .../godot/gen/godot/EditorFeatureProfile.kt | 70 +- .../godot/gen/godot/EditorFileDialog.kt | 69 +- .../godot/gen/godot/EditorFileSystem.kt | 24 +- .../gen/godot/EditorFileSystemDirectory.kt | 27 +- ...ditorFileSystemImportFormatSupportQuery.kt | 5 +- .../godot/gen/godot/EditorImportPlugin.kt | 228 +- .../kotlin/godot/gen/godot/EditorInspector.kt | 50 +- .../godot/gen/godot/EditorInspectorPlugin.kt | 45 +- .../kotlin/godot/gen/godot/EditorInterface.kt | 200 +- .../godot/gen/godot/EditorNode3DGizmo.kt | 123 +- .../gen/godot/EditorNode3DGizmoPlugin.kt | 127 +- .../kotlin/godot/gen/godot/EditorPaths.kt | 96 +- .../kotlin/godot/gen/godot/EditorPlugin.kt | 713 +- .../kotlin/godot/gen/godot/EditorProperty.kt | 40 +- .../godot/EditorResourceConversionPlugin.kt | 49 +- .../godot/gen/godot/EditorResourcePicker.kt | 27 +- .../godot/gen/godot/EditorResourcePreview.kt | 32 +- .../godot/EditorResourcePreviewGenerator.kt | 33 +- .../gen/godot/EditorResourceTooltipPlugin.kt | 52 +- .../gen/godot/EditorSceneFormatImporter.kt | 44 +- .../godot/EditorSceneFormatImporterBlend.kt | 12 + .../gen/godot/EditorSceneFormatImporterFBX.kt | 8 + .../godot/gen/godot/EditorScenePostImport.kt | 72 +- .../gen/godot/EditorScenePostImportPlugin.kt | 50 +- .../kotlin/godot/gen/godot/EditorScript.kt | 58 +- .../godot/gen/godot/EditorScriptPicker.kt | 10 +- .../kotlin/godot/gen/godot/EditorSelection.kt | 13 +- .../kotlin/godot/gen/godot/EditorSettings.kt | 131 +- .../godot/gen/godot/EditorSpinSlider.kt | 8 +- .../gen/godot/EditorSyntaxHighlighter.kt | 9 +- .../godot/EditorTranslationParserPlugin.kt | 171 +- .../godot/gen/godot/EditorUndoRedoManager.kt | 88 +- .../godot/gen/godot/EditorVCSInterface.kt | 92 +- .../godot/gen/godot/EncodedObjectAsID.kt | 13 +- .../src/main/kotlin/godot/gen/godot/Engine.kt | 268 +- .../kotlin/godot/gen/godot/EngineDebugger.kt | 25 +- .../kotlin/godot/gen/godot/EngineProfiler.kt | 16 +- .../kotlin/godot/gen/godot/Environment.kt | 466 +- .../src/main/kotlin/godot/gen/godot/Error.kt | 163 + .../main/kotlin/godot/gen/godot/EulerOrder.kt | 24 + .../main/kotlin/godot/gen/godot/Expression.kt | 79 +- .../kotlin/godot/gen/godot/FastNoiseLite.kt | 176 + .../main/kotlin/godot/gen/godot/FileAccess.kt | 403 +- .../main/kotlin/godot/gen/godot/FileDialog.kt | 47 +- .../kotlin/godot/gen/godot/FileSystemDock.kt | 28 +- .../kotlin/godot/gen/godot/FlowContainer.kt | 23 +- .../kotlin/godot/gen/godot/FogMaterial.kt | 44 +- .../main/kotlin/godot/gen/godot/FogVolume.kt | 63 +- .../src/main/kotlin/godot/gen/godot/Font.kt | 197 +- .../main/kotlin/godot/gen/godot/FontFile.kt | 175 +- .../kotlin/godot/gen/godot/FontVariation.kt | 87 +- .../kotlin/godot/gen/godot/GDExtension.kt | 30 - .../godot/gen/godot/GDExtensionManager.kt | 36 - .../main/kotlin/godot/gen/godot/GDScript.kt | 16 + .../main/kotlin/godot/gen/godot/GLTFCamera.kt | 38 + .../kotlin/godot/gen/godot/GLTFDocument.kt | 85 + .../godot/gen/godot/GLTFDocumentExtension.kt | 139 + .../main/kotlin/godot/gen/godot/GLTFLight.kt | 48 + .../main/kotlin/godot/gen/godot/GLTFNode.kt | 73 + .../kotlin/godot/gen/godot/GLTFPhysicsBody.kt | 58 + .../godot/gen/godot/GLTFPhysicsShape.kt | 51 + .../kotlin/godot/gen/godot/GLTFSpecGloss.kt | 23 + .../main/kotlin/godot/gen/godot/GLTFState.kt | 87 + .../kotlin/godot/gen/godot/GLTFTexture.kt | 8 + .../godot/gen/godot/GLTFTextureSampler.kt | 18 + .../kotlin/godot/gen/godot/GPUParticles2D.kt | 115 +- .../kotlin/godot/gen/godot/GPUParticles3D.kt | 140 +- .../gen/godot/GPUParticlesAttractor3D.kt | 42 +- .../gen/godot/GPUParticlesAttractorBox3D.kt | 12 +- .../godot/GPUParticlesAttractorSphere3D.kt | 16 +- .../GPUParticlesAttractorVectorField3D.kt | 23 +- .../gen/godot/GPUParticlesCollision3D.kt | 36 +- .../gen/godot/GPUParticlesCollisionBox3D.kt | 17 +- .../GPUParticlesCollisionHeightField3D.kt | 56 +- .../gen/godot/GPUParticlesCollisionSDF3D.kt | 63 +- .../godot/GPUParticlesCollisionSphere3D.kt | 17 +- .../godot/gen/godot/Generic6DOFJoint3D.kt | 72 +- .../main/kotlin/godot/gen/godot/Geometry2D.kt | 181 +- .../main/kotlin/godot/gen/godot/Geometry3D.kt | 70 +- .../godot/gen/godot/GeometryInstance3D.kt | 175 +- .../main/kotlin/godot/gen/godot/Gradient.kt | 54 +- .../godot/gen/godot/GradientTexture1D.kt | 16 +- .../godot/gen/godot/GradientTexture2D.kt | 34 +- .../main/kotlin/godot/gen/godot/GraphEdit.kt | 204 +- .../kotlin/godot/gen/godot/GraphElement.kt | 20 +- .../main/kotlin/godot/gen/godot/GraphNode.kt | 118 +- .../kotlin/godot/gen/godot/GridContainer.kt | 16 +- .../main/kotlin/godot/gen/godot/GridMap.kt | 165 + .../kotlin/godot/gen/godot/GrooveJoint2D.kt | 12 +- .../kotlin/godot/gen/godot/HBoxContainer.kt | 8 +- .../kotlin/godot/gen/godot/HFlowContainer.kt | 9 +- .../kotlin/godot/gen/godot/HMACContext.kt | 68 +- .../main/kotlin/godot/gen/godot/HScrollBar.kt | 5 +- .../main/kotlin/godot/gen/godot/HSeparator.kt | 5 +- .../main/kotlin/godot/gen/godot/HSlider.kt | 5 +- .../kotlin/godot/gen/godot/HSplitContainer.kt | 9 +- .../main/kotlin/godot/gen/godot/HTTPClient.kt | 460 +- .../kotlin/godot/gen/godot/HTTPRequest.kt | 282 +- .../kotlin/godot/gen/godot/HashingContext.kt | 71 +- .../godot/gen/godot/HeightMapShape3D.kt | 11 +- .../kotlin/godot/gen/godot/HingeJoint3D.kt | 15 +- .../godot/gen/godot/HorizontalAlignment.kt | 12 + .../src/main/kotlin/godot/gen/godot/IP.kt | 54 +- .../src/main/kotlin/godot/gen/godot/Image.kt | 493 +- .../godot/gen/godot/ImageFormatLoader.kt | 6 +- .../gen/godot/ImageFormatLoaderExtension.kt | 17 +- .../kotlin/godot/gen/godot/ImageTexture.kt | 82 +- .../kotlin/godot/gen/godot/ImageTexture3D.kt | 18 +- .../godot/gen/godot/ImageTextureLayered.kt | 23 +- .../kotlin/godot/gen/godot/ImmediateMesh.kt | 28 +- .../kotlin/godot/gen/godot/ImporterMesh.kt | 85 +- .../godot/gen/godot/ImporterMeshInstance3D.kt | 33 - .../kotlin/godot/gen/godot/InlineAlignment.kt | 49 + .../src/main/kotlin/godot/gen/godot/Input.kt | 402 +- .../main/kotlin/godot/gen/godot/InputEvent.kt | 79 +- .../godot/gen/godot/InputEventAction.kt | 21 +- .../godot/gen/godot/InputEventFromWindow.kt | 7 +- .../godot/gen/godot/InputEventGesture.kt | 14 +- .../godot/gen/godot/InputEventJoypadButton.kt | 11 +- .../godot/gen/godot/InputEventJoypadMotion.kt | 11 +- .../kotlin/godot/gen/godot/InputEventKey.kt | 100 +- .../kotlin/godot/gen/godot/InputEventMIDI.kt | 135 +- .../gen/godot/InputEventMagnifyGesture.kt | 11 +- .../kotlin/godot/gen/godot/InputEventMouse.kt | 36 +- .../godot/gen/godot/InputEventMouseButton.kt | 14 +- .../godot/gen/godot/InputEventMouseMotion.kt | 32 +- .../godot/gen/godot/InputEventPanGesture.kt | 8 +- .../godot/gen/godot/InputEventScreenDrag.kt | 15 +- .../godot/gen/godot/InputEventScreenTouch.kt | 8 +- .../godot/gen/godot/InputEventShortcut.kt | 9 +- .../gen/godot/InputEventWithModifiers.kt | 16 +- .../main/kotlin/godot/gen/godot/InputMap.kt | 43 +- .../godot/gen/godot/InstancePlaceholder.kt | 33 +- .../kotlin/godot/gen/godot/IntervalTweener.kt | 9 +- .../main/kotlin/godot/gen/godot/ItemList.kt | 117 +- .../kotlin/godot/gen/godot/JNISingleton.kt | 11 +- .../src/main/kotlin/godot/gen/godot/JSON.kt | 184 +- .../main/kotlin/godot/gen/godot/JSONRPC.kt | 80 +- .../main/kotlin/godot/gen/godot/JavaClass.kt | 3 - .../godot/gen/godot/JavaClassWrapper.kt | 6 - .../godot/gen/godot/JavaScriptBridge.kt | 67 +- .../godot/gen/godot/JavaScriptObject.kt | 60 +- .../main/kotlin/godot/gen/godot/Joint2D.kt | 17 +- .../main/kotlin/godot/gen/godot/Joint3D.kt | 11 +- .../main/kotlin/godot/gen/godot/JoyAxis.kt | 28 + .../main/kotlin/godot/gen/godot/JoyButton.kt | 82 + .../src/main/kotlin/godot/gen/godot/Key.kt | 580 + .../godot/gen/godot/KinematicCollision2D.kt | 22 +- .../godot/gen/godot/KinematicCollision3D.kt | 37 +- .../src/main/kotlin/godot/gen/godot/Label.kt | 53 +- .../main/kotlin/godot/gen/godot/Label3D.kt | 107 +- .../kotlin/godot/gen/godot/LabelSettings.kt | 9 +- .../main/kotlin/godot/gen/godot/Light2D.kt | 55 +- .../main/kotlin/godot/gen/godot/Light3D.kt | 220 +- .../kotlin/godot/gen/godot/LightOccluder2D.kt | 16 +- .../main/kotlin/godot/gen/godot/LightmapGI.kt | 149 +- .../kotlin/godot/gen/godot/LightmapGIData.kt | 13 +- .../kotlin/godot/gen/godot/LightmapProbe.kt | 12 +- .../kotlin/godot/gen/godot/Lightmapper.kt | 9 +- .../kotlin/godot/gen/godot/LightmapperRD.kt | 8 +- .../src/main/kotlin/godot/gen/godot/Line2D.kt | 87 +- .../main/kotlin/godot/gen/godot/LineEdit.kt | 231 +- .../main/kotlin/godot/gen/godot/LinkButton.kt | 46 +- .../kotlin/godot/gen/godot/MIDIMessage.kt | 75 + .../main/kotlin/godot/gen/godot/MainLoop.kt | 115 +- .../kotlin/godot/gen/godot/MarginContainer.kt | 44 +- .../main/kotlin/godot/gen/godot/Marker2D.kt | 6 +- .../main/kotlin/godot/gen/godot/Marker3D.kt | 5 +- .../main/kotlin/godot/gen/godot/Marshalls.kt | 24 +- .../main/kotlin/godot/gen/godot/Material.kt | 43 +- .../main/kotlin/godot/gen/godot/MenuBar.kt | 21 +- .../main/kotlin/godot/gen/godot/MenuButton.kt | 23 +- .../src/main/kotlin/godot/gen/godot/Mesh.kt | 163 +- .../godot/MeshConvexDecompositionSettings.kt | 10 +- .../kotlin/godot/gen/godot/MeshDataTool.kt | 129 +- .../kotlin/godot/gen/godot/MeshInstance2D.kt | 14 +- .../kotlin/godot/gen/godot/MeshInstance3D.kt | 72 +- .../kotlin/godot/gen/godot/MeshLibrary.kt | 25 +- .../kotlin/godot/gen/godot/MeshTexture.kt | 5 +- .../kotlin/godot/gen/godot/MethodTweener.kt | 20 +- .../kotlin/godot/gen/godot/MissingNode.kt | 9 +- .../kotlin/godot/gen/godot/MissingResource.kt | 9 +- .../godot/gen/godot/MobileVRInterface.kt | 38 + .../kotlin/godot/gen/godot/MouseButton.kt | 31 + .../kotlin/godot/gen/godot/MovieWriter.kt | 91 +- .../main/kotlin/godot/gen/godot/MultiMesh.kt | 72 +- .../godot/gen/godot/MultiMeshInstance2D.kt | 12 +- .../godot/gen/godot/MultiMeshInstance3D.kt | 15 +- .../kotlin/godot/gen/godot/MultiplayerAPI.kt | 98 +- .../gen/godot/MultiplayerAPIExtension.kt | 128 +- .../kotlin/godot/gen/godot/MultiplayerPeer.kt | 79 +- .../gen/godot/MultiplayerPeerExtension.kt | 65 +- .../godot/gen/godot/MultiplayerSpawner.kt | 49 + .../gen/godot/MultiplayerSynchronizer.kt | 78 + .../src/main/kotlin/godot/gen/godot/Mutex.kt | 45 +- .../godot/gen/godot/NavigationAgent2D.kt | 198 +- .../godot/gen/godot/NavigationAgent3D.kt | 216 +- .../godot/gen/godot/NavigationLink2D.kt | 55 +- .../godot/gen/godot/NavigationLink3D.kt | 55 +- .../kotlin/godot/gen/godot/NavigationMesh.kt | 99 +- .../gen/godot/NavigationMeshGenerator.kt | 69 +- .../NavigationMeshSourceGeometryData2D.kt | 2 - .../NavigationMeshSourceGeometryData3D.kt | 17 +- .../godot/gen/godot/NavigationObstacle2D.kt | 54 +- .../godot/gen/godot/NavigationObstacle3D.kt | 61 +- .../godot/NavigationPathQueryParameters2D.kt | 18 +- .../godot/NavigationPathQueryParameters3D.kt | 18 +- .../gen/godot/NavigationPathQueryResult2D.kt | 17 +- .../gen/godot/NavigationPathQueryResult3D.kt | 17 +- .../godot/gen/godot/NavigationPolygon.kt | 149 +- .../godot/gen/godot/NavigationRegion2D.kt | 84 +- .../godot/gen/godot/NavigationRegion3D.kt | 73 +- .../godot/gen/godot/NavigationServer2D.kt | 285 +- .../godot/gen/godot/NavigationServer3D.kt | 340 +- .../kotlin/godot/gen/godot/NinePatchRect.kt | 48 +- .../src/main/kotlin/godot/gen/godot/Node.kt | 1233 +- .../src/main/kotlin/godot/gen/godot/Node2D.kt | 66 +- .../src/main/kotlin/godot/gen/godot/Node3D.kt | 254 +- .../kotlin/godot/gen/godot/Node3DGizmo.kt | 9 +- .../src/main/kotlin/godot/gen/godot/Noise.kt | 44 + .../kotlin/godot/gen/godot/NoiseTexture2D.kt | 69 + .../kotlin/godot/gen/godot/NoiseTexture3D.kt | 53 + .../kotlin/godot/gen/godot/ORMMaterial3D.kt | 9 +- .../src/main/kotlin/godot/gen/godot/OS.kt | 741 +- .../src/main/kotlin/godot/gen/godot/Object.kt | 977 +- .../main/kotlin/godot/gen/godot/Occluder3D.kt | 10 +- .../godot/gen/godot/OccluderInstance3D.kt | 90 +- .../godot/gen/godot/OccluderPolygon2D.kt | 10 +- .../godot/gen/godot/OfflineMultiplayerPeer.kt | 10 +- .../godot/gen/godot/OggPacketSequence.kt | 16 + .../kotlin/godot/gen/godot/OmniLight3D.kt | 28 +- .../godot/gen/godot/OpenXRAPIExtension.kt | 63 + .../kotlin/godot/gen/godot/OpenXRAction.kt | 34 + .../kotlin/godot/gen/godot/OpenXRActionMap.kt | 49 + .../kotlin/godot/gen/godot/OpenXRActionSet.kt | 27 + .../godot/OpenXRExtensionWrapperExtension.kt | 75 + .../main/kotlin/godot/gen/godot/OpenXRHand.kt | 33 + .../kotlin/godot/gen/godot/OpenXRIPBinding.kt | 24 + .../gen/godot/OpenXRInteractionProfile.kt | 19 + .../godot/OpenXRInteractionProfileMetadata.kt | 40 + .../kotlin/godot/gen/godot/OpenXRInterface.kt | 188 + .../godot/gen/godot/OptimizedTranslation.kt | 7 +- .../kotlin/godot/gen/godot/OptionButton.kt | 100 +- .../kotlin/godot/gen/godot/Orientation.kt | 6 + .../main/kotlin/godot/gen/godot/PCKPacker.kt | 42 +- .../godot/gen/godot/PackedDataContainer.kt | 53 +- .../godot/gen/godot/PackedDataContainerRef.kt | 47 +- .../kotlin/godot/gen/godot/PackedScene.kt | 119 +- .../main/kotlin/godot/gen/godot/PacketPeer.kt | 32 +- .../kotlin/godot/gen/godot/PacketPeerDTLS.kt | 35 +- .../godot/gen/godot/PacketPeerExtension.kt | 9 - .../godot/gen/godot/PacketPeerStream.kt | 19 +- .../kotlin/godot/gen/godot/PacketPeerUDP.kt | 121 +- .../src/main/kotlin/godot/gen/godot/Panel.kt | 7 +- .../kotlin/godot/gen/godot/PanelContainer.kt | 8 +- .../godot/gen/godot/PanoramaSkyMaterial.kt | 17 +- .../godot/gen/godot/ParallaxBackground.kt | 41 +- .../kotlin/godot/gen/godot/ParallaxLayer.kt | 33 +- .../gen/godot/ParticleProcessMaterial.kt | 375 +- .../src/main/kotlin/godot/gen/godot/Path2D.kt | 11 +- .../src/main/kotlin/godot/gen/godot/Path3D.kt | 11 +- .../kotlin/godot/gen/godot/PathFollow2D.kt | 37 +- .../kotlin/godot/gen/godot/PathFollow3D.kt | 48 +- .../kotlin/godot/gen/godot/Performance.kt | 202 +- .../kotlin/godot/gen/godot/PhysicalBone2D.kt | 40 +- .../kotlin/godot/gen/godot/PhysicalBone3D.kt | 81 +- .../godot/gen/godot/PhysicalSkyMaterial.kt | 58 +- .../kotlin/godot/gen/godot/PhysicsBody2D.kt | 50 +- .../kotlin/godot/gen/godot/PhysicsBody3D.kt | 60 +- .../gen/godot/PhysicsDirectBodyState2D.kt | 79 +- .../PhysicsDirectBodyState2DExtension.kt | 141 +- .../gen/godot/PhysicsDirectBodyState3D.kt | 79 +- .../PhysicsDirectBodyState3DExtension.kt | 147 +- .../gen/godot/PhysicsDirectSpaceState2D.kt | 89 +- .../PhysicsDirectSpaceState2DExtension.kt | 13 +- .../gen/godot/PhysicsDirectSpaceState3D.kt | 90 +- .../PhysicsDirectSpaceState3DExtension.kt | 16 +- .../kotlin/godot/gen/godot/PhysicsMaterial.kt | 13 +- .../godot/PhysicsPointQueryParameters2D.kt | 21 +- .../godot/PhysicsPointQueryParameters3D.kt | 17 +- .../gen/godot/PhysicsRayQueryParameters2D.kt | 33 +- .../gen/godot/PhysicsRayQueryParameters3D.kt | 35 +- .../kotlin/godot/gen/godot/PhysicsServer2D.kt | 672 +- .../godot/gen/godot/PhysicsServer2DManager.kt | 15 +- .../kotlin/godot/gen/godot/PhysicsServer3D.kt | 487 +- .../godot/gen/godot/PhysicsServer3DManager.kt | 15 +- .../PhysicsServer3DRenderingServerHandler.kt | 23 +- .../godot/PhysicsShapeQueryParameters2D.kt | 63 +- .../godot/PhysicsShapeQueryParameters3D.kt | 63 +- .../godot/PhysicsTestMotionParameters2D.kt | 31 +- .../godot/PhysicsTestMotionParameters3D.kt | 34 +- .../gen/godot/PhysicsTestMotionResult2D.kt | 19 +- .../gen/godot/PhysicsTestMotionResult3D.kt | 37 +- .../main/kotlin/godot/gen/godot/PinJoint2D.kt | 9 +- .../main/kotlin/godot/gen/godot/PinJoint3D.kt | 12 +- .../godot/gen/godot/PlaceholderCubemap.kt | 15 +- .../gen/godot/PlaceholderCubemapArray.kt | 16 +- .../godot/gen/godot/PlaceholderMaterial.kt | 13 +- .../kotlin/godot/gen/godot/PlaceholderMesh.kt | 13 +- .../godot/gen/godot/PlaceholderTexture2D.kt | 17 +- .../gen/godot/PlaceholderTexture2DArray.kt | 17 +- .../godot/gen/godot/PlaceholderTexture3D.kt | 17 +- .../gen/godot/PlaceholderTextureLayered.kt | 17 +- .../main/kotlin/godot/gen/godot/PlaneMesh.kt | 21 +- .../kotlin/godot/gen/godot/PointLight2D.kt | 10 +- .../main/kotlin/godot/gen/godot/PointMesh.kt | 16 +- .../main/kotlin/godot/gen/godot/Polygon2D.kt | 55 +- .../godot/gen/godot/PolygonOccluder3D.kt | 22 +- .../godot/gen/godot/PolygonPathFinder.kt | 27 - .../src/main/kotlin/godot/gen/godot/Popup.kt | 5 +- .../main/kotlin/godot/gen/godot/PopupMenu.kt | 331 +- .../main/kotlin/godot/gen/godot/PopupPanel.kt | 6 +- .../gen/godot/PortableCompressedTexture2D.kt | 51 +- .../kotlin/godot/gen/godot/PrimitiveMesh.kt | 60 +- .../main/kotlin/godot/gen/godot/PrismMesh.kt | 7 +- .../godot/gen/godot/ProceduralSkyMaterial.kt | 36 +- .../kotlin/godot/gen/godot/ProgressBar.kt | 13 +- .../kotlin/godot/gen/godot/ProjectSettings.kt | 243 +- .../kotlin/godot/gen/godot/PropertyHint.kt | 207 + .../kotlin/godot/gen/godot/PropertyTweener.kt | 55 +- .../main/kotlin/godot/gen/godot/QuadMesh.kt | 10 +- .../kotlin/godot/gen/godot/QuadOccluder3D.kt | 11 +- .../godot/gen/godot/RDAttachmentFormat.kt | 4 +- .../godot/gen/godot/RDFramebufferPass.kt | 24 +- .../gen/godot/RDPipelineColorBlendState.kt | 8 +- .../RDPipelineColorBlendStateAttachment.kt | 140 +- .../gen/godot/RDPipelineDepthStencilState.kt | 69 +- .../gen/godot/RDPipelineMultisampleState.kt | 30 +- .../gen/godot/RDPipelineRasterizationState.kt | 28 +- .../godot/RDPipelineSpecializationConstant.kt | 16 +- .../kotlin/godot/gen/godot/RDSamplerState.kt | 44 +- .../kotlin/godot/gen/godot/RDShaderFile.kt | 15 +- .../kotlin/godot/gen/godot/RDShaderSPIRV.kt | 26 +- .../kotlin/godot/gen/godot/RDShaderSource.kt | 7 +- .../kotlin/godot/gen/godot/RDTextureFormat.kt | 10 +- .../kotlin/godot/gen/godot/RDTextureView.kt | 7 +- .../main/kotlin/godot/gen/godot/RDUniform.kt | 13 +- .../godot/gen/godot/RDVertexAttribute.kt | 19 +- .../godot/gen/godot/RandomNumberGenerator.kt | 90 +- .../src/main/kotlin/godot/gen/godot/Range.kt | 40 +- .../main/kotlin/godot/gen/godot/RayCast2D.kt | 68 +- .../main/kotlin/godot/gen/godot/RayCast3D.kt | 95 +- .../godot/gen/godot/RectangleShape2D.kt | 12 +- .../main/kotlin/godot/gen/godot/RefCounted.kt | 30 +- .../kotlin/godot/gen/godot/ReferenceRect.kt | 15 +- .../kotlin/godot/gen/godot/ReflectionProbe.kt | 129 +- .../src/main/kotlin/godot/gen/godot/RegEx.kt | 112 + .../main/kotlin/godot/gen/godot/RegExMatch.kt | 37 + .../godot/gen/godot/RemoteTransform2D.kt | 14 +- .../godot/gen/godot/RemoteTransform3D.kt | 14 +- .../godot/gen/godot/RenderSceneBuffers.kt | 10 +- .../godot/RenderSceneBuffersConfiguration.kt | 8 +- .../gen/godot/RenderSceneBuffersExtension.kt | 2 - .../godot/gen/godot/RenderSceneBuffersRD.kt | 34 +- .../kotlin/godot/gen/godot/RenderingDevice.kt | 1613 +- .../kotlin/godot/gen/godot/RenderingServer.kt | 2619 +- .../main/kotlin/godot/gen/godot/Resource.kt | 130 +- .../godot/gen/godot/ResourceFormatLoader.kt | 80 +- .../godot/gen/godot/ResourceFormatSaver.kt | 29 +- .../godot/gen/godot/ResourceImporter.kt | 12 +- .../godot/gen/godot/ResourceImporterBMFont.kt | 16 +- .../godot/gen/godot/ResourceImporterBitMap.kt | 7 +- .../godot/ResourceImporterCSVTranslation.kt | 25 +- .../gen/godot/ResourceImporterDynamicFont.kt | 17 +- .../godot/gen/godot/ResourceImporterImage.kt | 8 +- .../gen/godot/ResourceImporterImageFont.kt | 12 +- .../godot/ResourceImporterLayeredTexture.kt | 9 +- .../godot/gen/godot/ResourceImporterMP3.kt | 10 + .../godot/gen/godot/ResourceImporterOBJ.kt | 14 +- .../gen/godot/ResourceImporterOggVorbis.kt | 18 + .../godot/gen/godot/ResourceImporterScene.kt | 18 +- .../gen/godot/ResourceImporterShaderFile.kt | 5 +- .../gen/godot/ResourceImporterTexture.kt | 9 +- .../gen/godot/ResourceImporterTextureAtlas.kt | 11 +- .../godot/gen/godot/ResourceImporterWAV.kt | 9 +- .../kotlin/godot/gen/godot/ResourceLoader.kt | 112 +- .../godot/gen/godot/ResourcePreloader.kt | 22 +- .../kotlin/godot/gen/godot/ResourceSaver.kt | 27 +- .../kotlin/godot/gen/godot/ResourceUID.kt | 24 +- .../kotlin/godot/gen/godot/RibbonTrailMesh.kt | 21 +- .../kotlin/godot/gen/godot/RichTextEffect.kt | 34 +- .../kotlin/godot/gen/godot/RichTextLabel.kt | 335 +- .../kotlin/godot/gen/godot/RigidBody2D.kt | 320 +- .../kotlin/godot/gen/godot/RigidBody3D.kt | 360 +- .../kotlin/godot/gen/godot/RootMotionView.kt | 23 +- .../godot/gen/godot/SceneMultiplayer.kt | 104 + .../godot/gen/godot/SceneReplicationConfig.kt | 66 + .../main/kotlin/godot/gen/godot/SceneState.kt | 84 +- .../main/kotlin/godot/gen/godot/SceneTree.kt | 266 +- .../kotlin/godot/gen/godot/SceneTreeTimer.kt | 44 +- .../src/main/kotlin/godot/gen/godot/Script.kt | 30 +- .../godot/gen/godot/ScriptCreateDialog.kt | 35 +- .../kotlin/godot/gen/godot/ScriptEditor.kt | 32 +- .../godot/gen/godot/ScriptEditorBase.kt | 15 +- .../kotlin/godot/gen/godot/ScriptExtension.kt | 99 +- .../kotlin/godot/gen/godot/ScriptLanguage.kt | 3 - .../gen/godot/ScriptLanguageExtension.kt | 234 +- .../main/kotlin/godot/gen/godot/ScrollBar.kt | 8 +- .../kotlin/godot/gen/godot/ScrollContainer.kt | 99 +- .../kotlin/godot/gen/godot/SegmentShape2D.kt | 5 +- .../main/kotlin/godot/gen/godot/Semaphore.kt | 28 +- .../godot/gen/godot/SeparationRayShape2D.kt | 11 +- .../godot/gen/godot/SeparationRayShape3D.kt | 11 +- .../main/kotlin/godot/gen/godot/Separator.kt | 5 +- .../src/main/kotlin/godot/gen/godot/Shader.kt | 41 +- .../godot/gen/godot/ShaderGlobalsOverride.kt | 21 +- .../kotlin/godot/gen/godot/ShaderInclude.kt | 13 +- .../kotlin/godot/gen/godot/ShaderMaterial.kt | 31 +- .../main/kotlin/godot/gen/godot/Shape2D.kt | 67 +- .../main/kotlin/godot/gen/godot/Shape3D.kt | 25 +- .../kotlin/godot/gen/godot/ShapeCast2D.kt | 71 +- .../kotlin/godot/gen/godot/ShapeCast3D.kt | 93 +- .../main/kotlin/godot/gen/godot/Shortcut.kt | 21 +- .../src/main/kotlin/godot/gen/godot/Side.kt | 12 + .../main/kotlin/godot/gen/godot/Skeleton2D.kt | 41 +- .../main/kotlin/godot/gen/godot/Skeleton3D.kt | 153 +- .../kotlin/godot/gen/godot/SkeletonIK3D.kt | 101 +- .../godot/gen/godot/SkeletonModification2D.kt | 42 +- .../gen/godot/SkeletonModification2DCCDIK.kt | 66 +- .../gen/godot/SkeletonModification2DFABRIK.kt | 55 +- .../gen/godot/SkeletonModification2DJiggle.kt | 78 +- .../gen/godot/SkeletonModification2DLookAt.kt | 27 +- .../SkeletonModification2DPhysicalBones.kt | 35 +- .../SkeletonModification2DStackHolder.kt | 14 +- .../godot/SkeletonModification2DTwoBoneIK.kt | 47 +- .../gen/godot/SkeletonModificationStack2D.kt | 44 +- .../kotlin/godot/gen/godot/SkeletonProfile.kt | 91 +- .../gen/godot/SkeletonProfileHumanoid.kt | 8 +- .../src/main/kotlin/godot/gen/godot/Skin.kt | 36 - .../kotlin/godot/gen/godot/SkinReference.kt | 9 - .../src/main/kotlin/godot/gen/godot/Sky.kt | 46 +- .../src/main/kotlin/godot/gen/godot/Slider.kt | 14 +- .../kotlin/godot/gen/godot/SliderJoint3D.kt | 21 +- .../main/kotlin/godot/gen/godot/SoftBody3D.kt | 79 +- .../main/kotlin/godot/gen/godot/SphereMesh.kt | 5 +- .../godot/gen/godot/SphereOccluder3D.kt | 11 +- .../kotlin/godot/gen/godot/SphereShape3D.kt | 12 +- .../main/kotlin/godot/gen/godot/SpinBox.kt | 75 +- .../kotlin/godot/gen/godot/SplitContainer.kt | 22 +- .../kotlin/godot/gen/godot/SpotLight3D.kt | 22 +- .../kotlin/godot/gen/godot/SpringArm3D.kt | 41 +- .../main/kotlin/godot/gen/godot/Sprite2D.kt | 61 +- .../main/kotlin/godot/gen/godot/Sprite3D.kt | 15 +- .../kotlin/godot/gen/godot/SpriteBase3D.kt | 76 +- .../kotlin/godot/gen/godot/SpriteFrames.kt | 56 +- .../godot/gen/godot/StandardMaterial3D.kt | 9 +- .../kotlin/godot/gen/godot/StaticBody2D.kt | 28 +- .../kotlin/godot/gen/godot/StaticBody3D.kt | 34 +- .../main/kotlin/godot/gen/godot/StreamPeer.kt | 98 +- .../godot/gen/godot/StreamPeerBuffer.kt | 16 +- .../godot/gen/godot/StreamPeerExtension.kt | 6 - .../kotlin/godot/gen/godot/StreamPeerGZIP.kt | 21 +- .../kotlin/godot/gen/godot/StreamPeerTCP.kt | 34 +- .../kotlin/godot/gen/godot/StreamPeerTLS.kt | 37 +- .../main/kotlin/godot/gen/godot/StyleBox.kt | 69 +- .../kotlin/godot/gen/godot/StyleBoxEmpty.kt | 5 +- .../kotlin/godot/gen/godot/StyleBoxFlat.kt | 122 +- .../kotlin/godot/gen/godot/StyleBoxLine.kt | 11 +- .../kotlin/godot/gen/godot/StyleBoxTexture.kt | 74 +- .../kotlin/godot/gen/godot/SubViewport.kt | 38 +- .../godot/gen/godot/SubViewportContainer.kt | 29 +- .../kotlin/godot/gen/godot/SurfaceTool.kt | 213 +- .../godot/gen/godot/SyntaxHighlighter.kt | 49 +- .../main/kotlin/godot/gen/godot/SystemFont.kt | 38 +- .../main/kotlin/godot/gen/godot/TCPServer.kt | 25 +- .../main/kotlin/godot/gen/godot/TLSOptions.kt | 54 +- .../src/main/kotlin/godot/gen/godot/TabBar.kt | 98 +- .../kotlin/godot/gen/godot/TabContainer.kt | 97 +- .../main/kotlin/godot/gen/godot/TextEdit.kt | 339 +- .../main/kotlin/godot/gen/godot/TextLine.kt | 31 +- .../main/kotlin/godot/gen/godot/TextMesh.kt | 33 +- .../kotlin/godot/gen/godot/TextParagraph.kt | 49 +- .../main/kotlin/godot/gen/godot/TextServer.kt | 431 +- .../godot/gen/godot/TextServerAdvanced.kt | 5 + .../kotlin/godot/gen/godot/TextServerDummy.kt | 32 +- .../godot/gen/godot/TextServerExtension.kt | 601 +- .../godot/gen/godot/TextServerManager.kt | 19 +- .../main/kotlin/godot/gen/godot/Texture.kt | 5 +- .../main/kotlin/godot/gen/godot/Texture2D.kt | 58 +- .../kotlin/godot/gen/godot/Texture2DArray.kt | 19 +- .../godot/gen/godot/Texture2DArrayRD.kt | 5 +- .../kotlin/godot/gen/godot/Texture2DRD.kt | 7 +- .../main/kotlin/godot/gen/godot/Texture3D.kt | 37 +- .../kotlin/godot/gen/godot/Texture3DRD.kt | 7 +- .../kotlin/godot/gen/godot/TextureButton.kt | 46 +- .../godot/gen/godot/TextureCubemapArrayRD.kt | 5 +- .../godot/gen/godot/TextureCubemapRD.kt | 5 +- .../kotlin/godot/gen/godot/TextureLayered.kt | 43 +- .../godot/gen/godot/TextureLayeredRD.kt | 7 +- .../godot/gen/godot/TextureProgressBar.kt | 67 +- .../kotlin/godot/gen/godot/TextureRect.kt | 48 +- .../src/main/kotlin/godot/gen/godot/Theme.kt | 330 +- .../main/kotlin/godot/gen/godot/ThemeDB.kt | 21 +- .../src/main/kotlin/godot/gen/godot/Thread.kt | 86 +- .../main/kotlin/godot/gen/godot/TileData.kt | 68 +- .../main/kotlin/godot/gen/godot/TileMap.kt | 367 +- .../kotlin/godot/gen/godot/TileMapPattern.kt | 16 +- .../main/kotlin/godot/gen/godot/TileSet.kt | 224 +- .../godot/gen/godot/TileSetAtlasSource.kt | 162 +- .../godot/TileSetScenesCollectionSource.kt | 31 +- .../kotlin/godot/gen/godot/TileSetSource.kt | 38 +- .../src/main/kotlin/godot/gen/godot/Time.kt | 137 +- .../src/main/kotlin/godot/gen/godot/Timer.kt | 43 +- .../main/kotlin/godot/gen/godot/TorusMesh.kt | 4 +- .../godot/gen/godot/TouchScreenButton.kt | 26 +- .../kotlin/godot/gen/godot/Translation.kt | 21 +- .../godot/gen/godot/TranslationServer.kt | 47 +- .../src/main/kotlin/godot/gen/godot/Tree.kt | 249 +- .../main/kotlin/godot/gen/godot/TreeItem.kt | 249 +- .../kotlin/godot/gen/godot/TriangleMesh.kt | 2 - .../kotlin/godot/gen/godot/TubeTrailMesh.kt | 30 +- .../src/main/kotlin/godot/gen/godot/Tween.kt | 668 +- .../main/kotlin/godot/gen/godot/Tweener.kt | 8 +- .../main/kotlin/godot/gen/godot/UDPServer.kt | 174 +- .../src/main/kotlin/godot/gen/godot/UPNP.kt | 250 + .../main/kotlin/godot/gen/godot/UPNPDevice.kt | 69 + .../main/kotlin/godot/gen/godot/UndoRedo.kt | 217 +- .../kotlin/godot/gen/godot/VBoxContainer.kt | 8 +- .../kotlin/godot/gen/godot/VFlowContainer.kt | 9 +- .../main/kotlin/godot/gen/godot/VScrollBar.kt | 6 +- .../main/kotlin/godot/gen/godot/VSeparator.kt | 5 +- .../main/kotlin/godot/gen/godot/VSlider.kt | 6 +- .../kotlin/godot/gen/godot/VSplitContainer.kt | 9 +- .../kotlin/godot/gen/godot/VariantOperator.kt | 78 + .../kotlin/godot/gen/godot/VariantType.kt | 117 + .../kotlin/godot/gen/godot/VehicleBody3D.kt | 45 +- .../kotlin/godot/gen/godot/VehicleWheel3D.kt | 82 +- .../godot/gen/godot/VerticalAlignment.kt | 12 + .../kotlin/godot/gen/godot/VideoStream.kt | 17 +- .../godot/gen/godot/VideoStreamPlayback.kt | 33 +- .../godot/gen/godot/VideoStreamPlayer.kt | 38 +- .../godot/gen/godot/VideoStreamTheora.kt | 6 + .../main/kotlin/godot/gen/godot/Viewport.kt | 591 +- .../kotlin/godot/gen/godot/ViewportTexture.kt | 24 +- .../gen/godot/VisibleOnScreenEnabler2D.kt | 22 +- .../gen/godot/VisibleOnScreenEnabler3D.kt | 31 +- .../gen/godot/VisibleOnScreenNotifier2D.kt | 21 +- .../gen/godot/VisibleOnScreenNotifier3D.kt | 18 +- .../godot/gen/godot/VisualInstance3D.kt | 63 +- .../kotlin/godot/gen/godot/VisualShader.kt | 34 +- .../godot/gen/godot/VisualShaderNode.kt | 43 +- .../gen/godot/VisualShaderNodeBillboard.kt | 8 +- .../godot/VisualShaderNodeBooleanConstant.kt | 5 +- .../godot/VisualShaderNodeBooleanParameter.kt | 2 - .../godot/gen/godot/VisualShaderNodeClamp.kt | 2 - .../godot/VisualShaderNodeColorConstant.kt | 9 +- .../gen/godot/VisualShaderNodeColorFunc.kt | 34 +- .../gen/godot/VisualShaderNodeColorOp.kt | 113 +- .../godot/VisualShaderNodeColorParameter.kt | 2 - .../gen/godot/VisualShaderNodeComment.kt | 5 +- .../gen/godot/VisualShaderNodeCompare.kt | 19 +- .../gen/godot/VisualShaderNodeConstant.kt | 2 - .../gen/godot/VisualShaderNodeCubemap.kt | 16 +- .../godot/VisualShaderNodeCubemapParameter.kt | 5 +- .../gen/godot/VisualShaderNodeCurveTexture.kt | 2 - .../godot/VisualShaderNodeCurveXYZTexture.kt | 2 - .../godot/gen/godot/VisualShaderNodeCustom.kt | 152 +- .../godot/VisualShaderNodeDerivativeFunc.kt | 18 +- .../gen/godot/VisualShaderNodeDeterminant.kt | 2 - .../gen/godot/VisualShaderNodeDistanceFade.kt | 2 - .../gen/godot/VisualShaderNodeDotProduct.kt | 2 - .../gen/godot/VisualShaderNodeExpression.kt | 11 +- .../gen/godot/VisualShaderNodeFaceForward.kt | 7 +- .../godot/VisualShaderNodeFloatConstant.kt | 4 +- .../gen/godot/VisualShaderNodeFloatFunc.kt | 71 +- .../gen/godot/VisualShaderNodeFloatOp.kt | 11 +- .../godot/VisualShaderNodeFloatParameter.kt | 21 +- .../gen/godot/VisualShaderNodeFresnel.kt | 5 +- .../godot/VisualShaderNodeGlobalExpression.kt | 7 +- .../gen/godot/VisualShaderNodeGroupBase.kt | 23 +- .../godot/gen/godot/VisualShaderNodeIf.kt | 7 +- .../godot/gen/godot/VisualShaderNodeInput.kt | 14 +- .../gen/godot/VisualShaderNodeIntConstant.kt | 4 +- .../gen/godot/VisualShaderNodeIntFunc.kt | 8 +- .../godot/gen/godot/VisualShaderNodeIntOp.kt | 19 +- .../gen/godot/VisualShaderNodeIntParameter.kt | 20 +- .../godot/gen/godot/VisualShaderNodeIs.kt | 2 - .../godot/VisualShaderNodeLinearSceneDepth.kt | 2 - .../godot/gen/godot/VisualShaderNodeMix.kt | 2 - .../gen/godot/VisualShaderNodeMultiplyAdd.kt | 2 - .../gen/godot/VisualShaderNodeOuterProduct.kt | 7 +- .../godot/gen/godot/VisualShaderNodeOutput.kt | 5 +- .../gen/godot/VisualShaderNodeParameter.kt | 12 +- .../gen/godot/VisualShaderNodeParameterRef.kt | 5 +- .../VisualShaderNodeParticleAccelerator.kt | 8 +- .../VisualShaderNodeParticleBoxEmitter.kt | 5 +- .../VisualShaderNodeParticleConeVelocity.kt | 5 +- .../gen/godot/VisualShaderNodeParticleEmit.kt | 6 +- .../godot/VisualShaderNodeParticleEmitter.kt | 8 +- .../VisualShaderNodeParticleMeshEmitter.kt | 10 +- ...alShaderNodeParticleMultiplyByAxisAngle.kt | 5 +- .../godot/VisualShaderNodeParticleOutput.kt | 6 +- .../VisualShaderNodeParticleRandomness.kt | 5 +- .../VisualShaderNodeParticleRingEmitter.kt | 5 +- .../VisualShaderNodeParticleSphereEmitter.kt | 5 +- .../godot/VisualShaderNodeProximityFade.kt | 2 - .../gen/godot/VisualShaderNodeRandomRange.kt | 6 +- .../godot/gen/godot/VisualShaderNodeRemap.kt | 5 +- .../godot/VisualShaderNodeResizableBase.kt | 2 - .../godot/VisualShaderNodeRotationByAxis.kt | 5 +- .../gen/godot/VisualShaderNodeSDFRaymarch.kt | 2 - .../godot/VisualShaderNodeSDFToScreenUV.kt | 2 - .../gen/godot/VisualShaderNodeSample3D.kt | 2 - .../VisualShaderNodeScreenNormalWorldSpace.kt | 2 - .../godot/VisualShaderNodeScreenUVToSDF.kt | 5 +- .../gen/godot/VisualShaderNodeSmoothStep.kt | 6 +- .../godot/gen/godot/VisualShaderNodeStep.kt | 3 - .../godot/gen/godot/VisualShaderNodeSwitch.kt | 5 +- .../gen/godot/VisualShaderNodeTexture.kt | 22 +- .../godot/VisualShaderNodeTexture2DArray.kt | 5 +- ...VisualShaderNodeTexture2DArrayParameter.kt | 5 +- .../VisualShaderNodeTexture2DParameter.kt | 2 - .../gen/godot/VisualShaderNodeTexture3D.kt | 8 +- .../VisualShaderNodeTexture3DParameter.kt | 2 - .../godot/VisualShaderNodeTextureParameter.kt | 40 +- ...sualShaderNodeTextureParameterTriplanar.kt | 5 +- .../gen/godot/VisualShaderNodeTextureSDF.kt | 2 - .../godot/VisualShaderNodeTextureSDFNormal.kt | 2 - .../godot/VisualShaderNodeTransformCompose.kt | 5 +- .../VisualShaderNodeTransformConstant.kt | 8 +- .../VisualShaderNodeTransformDecompose.kt | 5 +- .../godot/VisualShaderNodeTransformFunc.kt | 8 +- .../gen/godot/VisualShaderNodeTransformOp.kt | 2 - .../VisualShaderNodeTransformParameter.kt | 2 - .../godot/VisualShaderNodeTransformVecMult.kt | 11 +- .../gen/godot/VisualShaderNodeUIntConstant.kt | 2 - .../gen/godot/VisualShaderNodeUIntFunc.kt | 8 +- .../godot/gen/godot/VisualShaderNodeUIntOp.kt | 19 +- .../godot/VisualShaderNodeUIntParameter.kt | 8 +- .../godot/gen/godot/VisualShaderNodeUVFunc.kt | 11 +- .../gen/godot/VisualShaderNodeUVPolarCoord.kt | 5 +- .../gen/godot/VisualShaderNodeVarying.kt | 5 +- .../godot/VisualShaderNodeVaryingGetter.kt | 6 +- .../godot/VisualShaderNodeVaryingSetter.kt | 6 +- .../gen/godot/VisualShaderNodeVec2Constant.kt | 8 +- .../godot/VisualShaderNodeVec2Parameter.kt | 2 - .../gen/godot/VisualShaderNodeVec3Constant.kt | 8 +- .../godot/VisualShaderNodeVec3Parameter.kt | 2 - .../gen/godot/VisualShaderNodeVec4Constant.kt | 6 +- .../godot/VisualShaderNodeVec4Parameter.kt | 2 - .../gen/godot/VisualShaderNodeVectorBase.kt | 2 - .../godot/VisualShaderNodeVectorCompose.kt | 2 - .../godot/VisualShaderNodeVectorDecompose.kt | 5 +- .../godot/VisualShaderNodeVectorDistance.kt | 3 - .../gen/godot/VisualShaderNodeVectorFunc.kt | 8 +- .../gen/godot/VisualShaderNodeVectorLen.kt | 2 - .../gen/godot/VisualShaderNodeVectorOp.kt | 8 +- .../godot/VisualShaderNodeVectorRefract.kt | 5 +- .../VisualShaderNodeWorldPositionFromDepth.kt | 5 +- .../main/kotlin/godot/gen/godot/VoxelGI.kt | 80 +- .../kotlin/godot/gen/godot/VoxelGIData.kt | 75 +- .../main/kotlin/godot/gen/godot/WeakRef.kt | 13 +- .../godot/gen/godot/WebRTCDataChannel.kt | 65 + .../godot/gen/godot/WebRTCMultiplayerPeer.kt | 61 + .../godot/gen/godot/WebRTCPeerConnection.kt | 179 + .../gen/godot/WebSocketMultiplayerPeer.kt | 51 + .../kotlin/godot/gen/godot/WebSocketPeer.kt | 155 + .../kotlin/godot/gen/godot/WebXRInterface.kt | 273 + .../src/main/kotlin/godot/gen/godot/Window.kt | 626 +- .../godot/gen/godot/WorkerThreadPool.kt | 105 +- .../main/kotlin/godot/gen/godot/World2D.kt | 19 +- .../main/kotlin/godot/gen/godot/World3D.kt | 18 +- .../godot/gen/godot/WorldBoundaryShape2D.kt | 21 +- .../godot/gen/godot/WorldBoundaryShape3D.kt | 11 +- .../godot/gen/godot/WorldEnvironment.kt | 22 +- .../kotlin/godot/gen/godot/X509Certificate.kt | 22 +- .../main/kotlin/godot/gen/godot/XMLParser.kt | 98 +- .../main/kotlin/godot/gen/godot/XRAnchor3D.kt | 23 +- .../main/kotlin/godot/gen/godot/XRCamera3D.kt | 16 +- .../kotlin/godot/gen/godot/XRController3D.kt | 31 +- .../kotlin/godot/gen/godot/XRInterface.kt | 149 +- .../godot/gen/godot/XRInterfaceExtension.kt | 57 +- .../main/kotlin/godot/gen/godot/XRNode3D.kt | 33 +- .../main/kotlin/godot/gen/godot/XROrigin3D.kt | 31 +- .../src/main/kotlin/godot/gen/godot/XRPose.kt | 40 +- .../godot/gen/godot/XRPositionalTracker.kt | 47 +- .../main/kotlin/godot/gen/godot/XRServer.kt | 81 +- .../main/kotlin/godot/gen/godot/ZIPPacker.kt | 44 + .../main/kotlin/godot/gen/godot/ZIPReader.kt | 32 + 900 files changed, 70821 insertions(+), 46658 deletions(-) delete mode 100644 kt/api-generator/src/main/kotlin/godot/codegen/repositories/IDocRepository.kt delete mode 100644 kt/api-generator/src/main/kotlin/godot/codegen/repositories/impl/DocRepository.kt create mode 100644 kt/api-generator/src/main/kotlin/godot/codegen/traits/IDocumented.kt delete mode 100644 kt/api-generator/src/main/kotlin/godot/docgen/DocGen.kt delete mode 100644 kt/api-generator/src/main/kotlin/godot/docgen/docClasses.kt delete mode 100644 kt/api-generator/src/main/kotlin/godot/docgen/rawXmlPojos.kt diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/constants/JvmReservedMethods.kt b/kt/api-generator/src/main/kotlin/godot/codegen/constants/JvmReservedMethods.kt index f0d5900746..5867c66aca 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/constants/JvmReservedMethods.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/constants/JvmReservedMethods.kt @@ -14,7 +14,8 @@ val jvmReservedMethods = listOf( hashCompatibility = listOf(), returnValue = null, returnType = null, - arguments = null + arguments = null, + documentation = null ), "" ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/generationEntry.kt b/kt/api-generator/src/main/kotlin/godot/codegen/generationEntry.kt index f0561a8d42..89e112cec2 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/generationEntry.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/generationEntry.kt @@ -11,19 +11,16 @@ import godot.codegen.repositories.* import godot.codegen.repositories.impl.* import godot.codegen.services.* import godot.codegen.services.impl.* -import godot.docgen.DocGen import godot.tools.common.constants.GENERATED_COMMENT import java.io.File fun File.generateApiFrom(jsonSource: File, docsDir: File? = null) { - val classDocs = docsDir?.let { DocGen.deserializeDoc(it) } ?: mapOf() val apiDescription = ObjectMapper().readValue(jsonSource, object : TypeReference() {}) val classRepository: ClassRepository = JsonClassRepository(apiDescription.classes.toEnriched()) val singletonRepository: SingletonRepository = JsonSingletonRepository(apiDescription.singletons.toEnriched()) val globalEnumRepository: GlobalEnumRepository = JsonGlobalEnumRepository(apiDescription.globalEnums.toEnriched()) val coreTypeEnumRepository: CoreTypeEnumRepository = KnownCoreTypeEnumRepository() - val docRepository: IDocRepository = DocRepository(classDocs) val nativeStructureRepository = NativeStructureRepository(apiDescription.nativeStructures.toEnriched()) val classGraphService: IClassGraphService = ClassGraphService(classRepository) @@ -33,7 +30,7 @@ fun File.generateApiFrom(jsonSource: File, docsDir: File? = null) { classGraphService ) val enumService: IEnumService = EnumService(globalEnumRepository, coreTypeEnumRepository, classService) - val generationService: IGenerationService = GenerationService(docRepository, classGraphService, enumService, nativeStructureRepository) + val generationService: IGenerationService = GenerationService(classGraphService, enumService, nativeStructureRepository) classService.findGetSetMethodsAndUpdateProperties() diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/BuiltinClass.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/BuiltinClass.kt index e445c8fd66..a501e8e88d 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/BuiltinClass.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/BuiltinClass.kt @@ -13,5 +13,6 @@ data class BuiltinClass @JsonCreator constructor ( @JsonProperty("members") val members: List?, @JsonProperty("constants") val constants: List?, @JsonProperty("enums") val enums: List?, - @JsonProperty("indexing_return_type") val indexingReturnType: String? + @JsonProperty("indexing_return_type") val indexingReturnType: String?, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Class.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Class.kt index cb7051e3d1..dec94ce4c4 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Class.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Class.kt @@ -13,7 +13,8 @@ data class Class @JsonCreator constructor ( @JsonProperty("methods") val methods : List?, @JsonProperty("properties") val properties: List?, @JsonProperty("constants") val constants: List?, - @JsonProperty("signals") val signals : List? + @JsonProperty("signals") val signals : List?, + @JsonProperty("documentation") val documentation: String? ) { fun copy(newName: String) = Class( newName, @@ -25,6 +26,7 @@ data class Class @JsonCreator constructor ( methods, properties, constants, - signals + signals, + documentation ) } \ No newline at end of file diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Constant.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Constant.kt index 8ee95856be..0ac3fc994c 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Constant.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Constant.kt @@ -7,5 +7,6 @@ import godot.codegen.traits.TypedTrait data class Constant @JsonCreator constructor( @JsonProperty("name") val name: String, @JsonProperty("type") val type: String?, - @JsonProperty("value") val value: String + @JsonProperty("value") val value: String, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Constructor.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Constructor.kt index c838179628..aaa8adaf6e 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Constructor.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Constructor.kt @@ -5,5 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty data class Constructor @JsonCreator constructor ( @JsonProperty("index") val index : Int, - @JsonProperty("arguments") val arguments: List? + @JsonProperty("arguments") val arguments: List?, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/EnumValue.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/EnumValue.kt index b2ae85db39..bd73cf4277 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/EnumValue.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/EnumValue.kt @@ -2,8 +2,10 @@ package godot.codegen.models import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty +import godot.codegen.traits.IDocumented data class EnumValue @JsonCreator constructor( @JsonProperty("name") val name : String, - @JsonProperty("value") val value : Long -) + @JsonProperty("value") val value : Long, + @JsonProperty("documentation") override val documentation: String? = null +) : IDocumented diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Member.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Member.kt index 0f04f0b3dc..c82870fdc4 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Member.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Member.kt @@ -6,5 +6,6 @@ import godot.codegen.traits.TypedTrait data class Member @JsonCreator constructor( @JsonProperty("name") val name: String, - @JsonProperty("type") override val type: String + @JsonProperty("type") override val type: String, + @JsonProperty("documentation") val documentation: String? ) : TypedTrait diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Method.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Method.kt index ec28d6f1d9..6e830f9f5e 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Method.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Method.kt @@ -13,5 +13,6 @@ data class Method @JsonCreator constructor( @JsonProperty("hash_compatibility") val hashCompatibility: List?, @JsonProperty("return_value") val returnValue : ReturnValue?, @JsonProperty("return_type") val returnType: String?, - @JsonProperty("arguments") val arguments : List? + @JsonProperty("arguments") val arguments : List?, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Operator.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Operator.kt index 537ae7e111..20acc9fd64 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Operator.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Operator.kt @@ -2,9 +2,11 @@ package godot.codegen.models import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty +import godot.codegen.traits.IDocumented data class Operator @JsonCreator constructor( @JsonProperty("name") val name : String, @JsonProperty("right_type") val rightType : String?, - @JsonProperty("return_type") val returnType : String + @JsonProperty("return_type") val returnType : String, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Property.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Property.kt index 941b9855ee..3050863277 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Property.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Property.kt @@ -9,5 +9,6 @@ data class Property @JsonCreator constructor( @JsonProperty("name") val name: String, @JsonProperty("setter") val setter: String?, @JsonProperty("getter") val getter: String, - @JsonProperty("index") val index: Int? + @JsonProperty("index") val index: Int?, + @JsonProperty("documentation") val documentation: String? ) : TypedTrait diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/Signal.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/Signal.kt index 35a3bab11b..72114f66af 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/Signal.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/Signal.kt @@ -5,5 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty data class Signal @JsonCreator constructor( @JsonProperty("name") val name: String, - @JsonProperty("arguments") val arguments: List? + @JsonProperty("arguments") val arguments: List?, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/UtilityFunction.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/UtilityFunction.kt index 21d5024231..5e89202ed0 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/UtilityFunction.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/UtilityFunction.kt @@ -2,6 +2,7 @@ package godot.codegen.models import com.fasterxml.jackson.annotation.JsonCreator import com.fasterxml.jackson.annotation.JsonProperty +import godot.codegen.traits.IDocumented data class UtilityFunction @JsonCreator constructor ( @JsonProperty("name") val name : String, @@ -9,5 +10,6 @@ data class UtilityFunction @JsonCreator constructor ( @JsonProperty("category") val category : String, @JsonProperty("is_vararg") val isVararg : Boolean, @JsonProperty("hash") val hash : Long, - @JsonProperty("arguments") val arguments : List? + @JsonProperty("arguments") val arguments : List?, + @JsonProperty("documentation") val documentation: String? ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedClass.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedClass.kt index 5d84ff026d..531c35e122 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedClass.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedClass.kt @@ -2,11 +2,12 @@ package godot.codegen.models.enriched import godot.codegen.models.Class import godot.codegen.models.custom.AdditionalImport +import godot.codegen.traits.IDocumented import godot.codegen.traits.TypedTrait import godot.tools.common.extensions.escapeUnderscore import java.util.* -class EnrichedClass(val internal: Class) : TypedTrait { +class EnrichedClass(val internal: Class) : TypedTrait, IDocumented { val constants= internal.constants?.toEnriched() ?: listOf() val signals = internal.signals?.toEnriched() ?: listOf() val name = internal.name.escapeUnderscore() @@ -14,6 +15,7 @@ class EnrichedClass(val internal: Class) : TypedTrait { val engineClassDBIndexName = "ENGINECLASS_${internal.name.uppercase(Locale.US)}" val properties= internal.properties?.toEnriched() ?: listOf() val methods = internal.methods?.toEnriched(engineClassDBIndexName) ?: listOf() + override val documentation = internal.documentation override val type = name diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedConstant.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedConstant.kt index 5c78a6c94a..c7dea3b08a 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedConstant.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedConstant.kt @@ -2,10 +2,12 @@ package godot.codegen.models.enriched import godot.codegen.workarounds.sanitizeApiType import godot.codegen.models.Constant +import godot.codegen.traits.IDocumented import godot.codegen.traits.TypedTrait -class EnrichedConstant(val internal: Constant) : TypedTrait { +class EnrichedConstant(val internal: Constant) : TypedTrait, IDocumented { override val type = internal.type?.sanitizeApiType() ?: "int" + override val documentation = internal.documentation } fun List.toEnriched() = map { EnrichedConstant(it) } \ No newline at end of file diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedMethod.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedMethod.kt index cb0223e53e..82bf86d1f2 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedMethod.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedMethod.kt @@ -5,13 +5,14 @@ import godot.codegen.extensions.isObjectSubClass import godot.codegen.models.Argument import godot.codegen.models.Method import godot.codegen.traits.CallableTrait +import godot.codegen.traits.IDocumented import godot.codegen.workarounds.sanitizeApiType import godot.tools.common.constants.Constraints import godot.tools.common.constants.GodotTypes import godot.tools.common.extensions.convertToCamelCase import java.util.* -class EnrichedMethod(val internal: Method, engineClassIndexName: String) : CallableTrait { +class EnrichedMethod(val internal: Method, engineClassIndexName: String) : CallableTrait, IDocumented { override val arguments = internal.arguments?.toEnriched() ?: listOf() override val isVararg = internal.isVararg val name: String @@ -34,6 +35,7 @@ class EnrichedMethod(val internal: Method, engineClassIndexName: String) : Calla override val type = internal.returnValue?.type?.sanitizeApiType() override val meta: String? = internal.returnValue?.meta override val nullable = isObjectSubClass() || type == GodotTypes.variant + override val documentation = internal.documentation } fun List.toEnriched(engineClassIndexName: String) = map { EnrichedMethod(it, engineClassIndexName) } diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedProperty.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedProperty.kt index 49d82e7768..d9a68ae4a7 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedProperty.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedProperty.kt @@ -10,9 +10,10 @@ import godot.codegen.models.Argument import godot.codegen.models.Property import godot.codegen.traits.CallableTrait import godot.codegen.traits.CastableTrait +import godot.codegen.traits.IDocumented import godot.codegen.traits.NullableTrait -class EnrichedProperty(val internal: Property) : CastableTrait, NullableTrait { +class EnrichedProperty(val internal: Property) : CastableTrait, NullableTrait, IDocumented { val name = internal.name.replace("/", "_").convertToCamelCase() val getter = internal.getter.convertToCamelCase() val setter = internal.setter?.convertToCamelCase() @@ -48,6 +49,7 @@ class EnrichedProperty(val internal: Property) : CastableTrait, NullableTrait { override val nullable = isObjectSubClass() || type == GodotTypes.variant override val meta: String? get() = getterMethod?.meta + override val documentation = internal.documentation } fun List.toEnriched() = map { diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedSignal.kt b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedSignal.kt index 1c98a2d15b..a8005153a1 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedSignal.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/models/enriched/EnrichedSignal.kt @@ -4,13 +4,15 @@ import godot.codegen.exceptions.TooManySignalArgument import godot.tools.common.extensions.convertToCamelCase import godot.tools.common.extensions.escapeKotlinReservedNames import godot.codegen.models.Signal +import godot.codegen.traits.IDocumented import godot.codegen.traits.TypedTrait import godot.tools.common.constants.Constraints -class EnrichedSignal(val internal: Signal) : TypedTrait { +class EnrichedSignal(val internal: Signal) : TypedTrait, IDocumented { val name = internal.name.convertToCamelCase().escapeKotlinReservedNames() val arguments = internal.arguments?.toEnriched() ?: listOf() override val type = "Signal${arguments.size}" + override val documentation = internal.documentation init{ if (arguments.size > Constraints.MAX_SIGNAL_ARG_COUNT) { diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/repositories/IDocRepository.kt b/kt/api-generator/src/main/kotlin/godot/codegen/repositories/IDocRepository.kt deleted file mode 100644 index 1bd9ed6928..0000000000 --- a/kt/api-generator/src/main/kotlin/godot/codegen/repositories/IDocRepository.kt +++ /dev/null @@ -1,7 +0,0 @@ -package godot.codegen.repositories - -import godot.docgen.ClassDoc - -interface IDocRepository { - fun findByClassName(className: String): ClassDoc? -} \ No newline at end of file diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/repositories/impl/DocRepository.kt b/kt/api-generator/src/main/kotlin/godot/codegen/repositories/impl/DocRepository.kt deleted file mode 100644 index 94e16a0aa2..0000000000 --- a/kt/api-generator/src/main/kotlin/godot/codegen/repositories/impl/DocRepository.kt +++ /dev/null @@ -1,8 +0,0 @@ -package godot.codegen.repositories.impl - -import godot.codegen.repositories.IDocRepository -import godot.docgen.ClassDoc - -class DocRepository(val rawData: Map) : IDocRepository { - override fun findByClassName(className: String) = rawData[className] -} \ No newline at end of file diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/ClassService.kt b/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/ClassService.kt index 225a32fbd2..18127e158b 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/ClassService.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/ClassService.kt @@ -58,7 +58,8 @@ class ClassService( hashCompatibility = listOf(), returnValue = ReturnValue(returnType, null), returnType = null, - arguments = arguments + arguments = arguments, + documentation = null ), clazz.engineClassDBIndexName ) diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/GenerationService.kt b/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/GenerationService.kt index 184c247166..72564050f4 100644 --- a/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/GenerationService.kt +++ b/kt/api-generator/src/main/kotlin/godot/codegen/services/impl/GenerationService.kt @@ -18,13 +18,13 @@ import godot.codegen.models.enriched.isSameSignature import godot.codegen.models.enriched.toGetterCallable import godot.codegen.models.enriched.toSetterCallable import godot.codegen.poet.RegistrationFileSpec -import godot.codegen.repositories.IDocRepository import godot.codegen.repositories.INativeStructureRepository import godot.codegen.rpc.RpcFunctionMode import godot.codegen.services.IClassGraphService import godot.codegen.services.IEnumService import godot.codegen.services.IGenerationService import godot.codegen.traits.CallableTrait +import godot.codegen.traits.addKdoc import godot.tools.common.constants.CORE_TYPE_LOCAL_COPY import godot.tools.common.constants.CORE_TYPE_HELPER import godot.tools.common.constants.GENERATED_COMMENT @@ -43,7 +43,6 @@ import godot.tools.common.constants.signalPackage import java.util.* class GenerationService( - private val docRepository: IDocRepository, private val classGraphService: IClassGraphService, private val enumService: IEnumService, private val nativeStructureRepository: INativeStructureRepository @@ -92,26 +91,9 @@ class GenerationService( ): FileSpec { val name = enrichedClass.name - docRepository.findByClassName(name)?.let { classDoc -> - classTypeBuilder.addKdoc( - "%L", - buildString { - appendLine(classDoc.briefDescription) - appendLine() - if (classDoc.tutorialLinks.isNotEmpty()) { - appendLine("Tutorials:") - classDoc.tutorialLinks.forEach { - appendLine("[$it]($it)") - } - appendLine() - } - appendLine(classDoc.description) - }.replace(System.lineSeparator(), "\n") - .replace("/*", "/*") - ) - } - - classTypeBuilder.addAnnotation(GODOT_BASE_TYPE) + classTypeBuilder + .addKdoc(enrichedClass) + .addAnnotation(GODOT_BASE_TYPE) if (name == GodotKotlinJvmTypes.obj) { classTypeBuilder.superclass(KT_OBJECT) @@ -321,14 +303,7 @@ class GenerationService( TypeSpec.anonymousClassBuilder() .addSuperclassConstructorParameter("%L", value.value) .also { - val kDoc = if (containingClassName != null) { - docRepository.findByClassName(containingClassName)?.constants?.get(valueName)?.description - } else { - docRepository.findByClassName(enum.name)?.constants?.get(valueName)?.description - } - if (kDoc != null) { - it.addKdoc("%L", kDoc.replace("/*", "/*")) - } + it.addKdoc(value) } .build() ) @@ -354,14 +329,7 @@ class GenerationService( .addModifiers(KModifier.CONST, KModifier.FINAL) .initializer("%L", constant.internal.value) .also { - val kDoc = if (containingClassName != null) { - docRepository.findByClassName(containingClassName)?.constants?.get(constantName)?.description - } else { - docRepository.findByClassName("@GlobalScope")?.constants?.get(constantName)?.description - } - if (kDoc != null) { - it.addKdoc("%L", kDoc.replace("/*", "/*")) - } + it.addKdoc(constant) } .build() } @@ -398,6 +366,7 @@ class GenerationService( signal.name, signalClass.typeName ) + .addKdoc(signal) if (arguments.isEmpty()) { builder.delegate( @@ -413,10 +382,6 @@ class GenerationService( MemberName(signalPackage, "signal") ) } - val kDoc = docRepository.findByClassName(containingClassName)?.signals?.get(signal.internal.name)?.description - if (kDoc != null) { - builder.addKdoc("%L", kDoc.replace("/*", "/*")) - } return builder.build() } @@ -570,11 +535,7 @@ class GenerationService( propertySpecBuilder.addAnnotation(CORE_TYPE_LOCAL_COPY) } - val kDoc = - docRepository.findByClassName(enrichedClass.name)?.properties?.get(property.internal.name)?.description - if (kDoc != null) { - propertySpecBuilder.addKdoc("%L", kDoc.replace("/*", "/*")) - } + propertySpecBuilder.addKdoc(property) return propertySpecBuilder.build() } @@ -611,7 +572,7 @@ class GenerationService( ).apply { val kDoc = buildString { val propertyKdoc = - docRepository.findByClassName(enrichedClass.name)?.properties?.get(property.internal.name)?.description + property.sanitizedDocumentation if (propertyKdoc != null) { appendLine(propertyKdoc.replace("/*", "/*")) appendLine() @@ -691,10 +652,7 @@ class GenerationService( generatedFunBuilder.generateCodeBlock(enrichedClass, method, callArgumentsAsString, isStatic) - val kDoc = docRepository.findByClassName(enrichedClass.name)?.functions?.get(method.internal.name)?.description - if (kDoc != null) { - generatedFunBuilder.addKdoc("%L", kDoc.replace("/*", "/*")) - } + generatedFunBuilder.addKdoc(method) for (jvmReservedMethod in jvmReservedMethods) { if (method.isSameSignature(jvmReservedMethod) && !method.internal.isVirtual) { diff --git a/kt/api-generator/src/main/kotlin/godot/codegen/traits/IDocumented.kt b/kt/api-generator/src/main/kotlin/godot/codegen/traits/IDocumented.kt new file mode 100644 index 0000000000..f54c52e5e6 --- /dev/null +++ b/kt/api-generator/src/main/kotlin/godot/codegen/traits/IDocumented.kt @@ -0,0 +1,103 @@ +package godot.codegen.traits + +import com.squareup.kotlinpoet.FunSpec +import com.squareup.kotlinpoet.PropertySpec +import com.squareup.kotlinpoet.TypeSpec +import godot.tools.common.extensions.convertToCamelCase + +private val titlesToSanitize = arrayOf( + "member", + "method" +) + +private val tagsToSanitize = arrayOf( + "code" to "`", + "i" to "*", + "b" to "**" +) + +private val languages = arrayOf( + "gdscript", + "csharp" +) + +interface IDocumented { + val documentation: String? + + val sanitizedDocumentation: String? + get() { + var unicodeString = documentation + ?.replace("/*", "/*") + ?.replace("%", "%") + ?.replace("*/", "*\") + ?.replace(System.lineSeparator(), "\n") + + for (title in titlesToSanitize) { + val regex = Regex("\\[($title\\s)(\\S+)(\\])") + + var matchResult = unicodeString?.let { regex.find(it) } + while (matchResult != null) { + val titleRange = matchResult.groups[1]!!.range + val contentRange = matchResult.groups[2]!!.range + val content = unicodeString!!.substring(contentRange).convertToCamelCase() + unicodeString = unicodeString + .replaceRange(contentRange, content) + .removeRange(titleRange) + matchResult = unicodeString.let { regex.find(it) } + } + } + + for (tag in tagsToSanitize) { + val regex = Regex("(\\[${tag.first}\\])((?:(?!\\[\\/${tag.first}\\]|\\[${tag.first}\\]).)*)(\\[\\/${tag.first}\\])") + + var matchResult = unicodeString?.let { regex.find(it) } + while (matchResult != null) { + val endTagRange = matchResult.groups[3]!!.range + val beginTagRange = matchResult.groups[1]!!.range + unicodeString = unicodeString!! + .replaceRange(endTagRange, tag.second) + .replaceRange(beginTagRange, tag.second) + matchResult = unicodeString.let { regex.find(it) } + } + } + + unicodeString = unicodeString + ?.replace("[codeblocks]", "") + ?.replace("[/codeblocks]", "") + + for (language in languages) { + unicodeString = unicodeString + ?.replace("[$language]", "$language:\n```$language") + ?.replace("[/$language]", "```") + } + + return unicodeString + } +} + +fun TypeSpec.Builder.addKdoc(documented: IDocumented): TypeSpec.Builder { + val documentation = documented.sanitizedDocumentation + return if (documentation.isNullOrEmpty()) { + this + } else { + this.addKdoc(documentation) + } +} + +fun PropertySpec.Builder.addKdoc(documented: IDocumented): PropertySpec.Builder { + val documentation = documented.sanitizedDocumentation + return if (documentation.isNullOrEmpty()) { + this + } else { + this.addKdoc(documentation) + } +} + +fun FunSpec.Builder.addKdoc(documented: IDocumented): FunSpec.Builder { + val documentation = documented.sanitizedDocumentation + return if (documentation.isNullOrEmpty()) { + this + } else { + this.addKdoc(documentation) + } +} \ No newline at end of file diff --git a/kt/api-generator/src/main/kotlin/godot/docgen/DocGen.kt b/kt/api-generator/src/main/kotlin/godot/docgen/DocGen.kt deleted file mode 100644 index 8180f37036..0000000000 --- a/kt/api-generator/src/main/kotlin/godot/docgen/DocGen.kt +++ /dev/null @@ -1,124 +0,0 @@ -package godot.docgen - -import com.fasterxml.jackson.core.JsonParser -import com.fasterxml.jackson.databind.DeserializationContext -import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler -import com.fasterxml.jackson.databind.deser.ValueInstantiator -import com.fasterxml.jackson.dataformat.xml.XmlMapper -import java.io.File - - -object DocGen { - fun deserializeDoc(docsDir: File): Map { - val xmlMapper: ObjectMapper = XmlMapper().apply { - addHandler(object : DeserializationProblemHandler() { - /** - * Needed for empty tags with tabs and new lines as they are not considered empty by jackson - * and throw an error when trying to parse them - * - * Example: - * ```xml - * - * - * ``` - */ - override fun handleMissingInstantiator( - ctxt: DeserializationContext?, - instClass: Class<*>?, - valueInsta: ValueInstantiator?, - p: JsonParser?, - msg: String? - ): Any? { - val value = p?.valueAsString?.trim() - // ignore "empty" elements - if (value?.isEmpty() == true) { - return null - } - return super.handleMissingInstantiator(ctxt, instClass, valueInsta, p, msg) - } - }) - } - - return docsDir - .walkTopDown() - .filter { it.isFile && it.extension == "xml" } - .map { - //better have no doc for one class that to have a crash an no classes at all - try { - xmlMapper.readValue(it.readText(), RawClassDoc::class.java) - } catch (e: Throwable) { - System.err.println("Could not parse doc: ${it.absolutePath}! Please submit a bugreport with this error and the following stacktrace to: https://github.com/utopia-rise/godot-kotlin-jvm/issues") - e.printStackTrace() - null - } - } - .toList() - .filterNotNull() - .map(::mapClass) - .map { it.name to it } - .toMap() - } - - private fun mapClass(rawClassDoc: RawClassDoc): ClassDoc { - return ClassDoc( - rawClassDoc.name, - rawClassDoc.briefDescription, - rawClassDoc.description, - rawClassDoc.tutorials?.links ?: listOf(), - rawClassDoc - .methods - ?.methods - ?.map(::mapMethod) - ?.map { it.name to it } - ?.toMap() ?: mapOf(), - rawClassDoc - .members - ?.members - ?.map(::mapMember) - ?.map { it.name to it } - ?.toMap() ?: mapOf(), - rawClassDoc - .signals - ?.signals - ?.map(::mapSignal) - ?.map { it.name to it } - ?.toMap() ?: mapOf(), - rawClassDoc - .constants - ?.constants - ?.map(::mapConstant) - ?.map { it.name to it } - ?.toMap() ?: mapOf() - ) - } - - private fun mapMethod(rawMethodDoc: RawMethodDoc): FunctionDoc { - return FunctionDoc( - rawMethodDoc.name, - rawMethodDoc.description - ) - } - - private fun mapMember(rawMemberDoc: RawMemberDoc): PropertyDoc { - return PropertyDoc( - rawMemberDoc.name, - rawMemberDoc.description - ) - } - - private fun mapSignal(rawSignalDoc: RawSignalDoc): SignalDoc { - return SignalDoc( - rawSignalDoc.name, - rawSignalDoc.description - ) - } - - private fun mapConstant(rawConstantDoc: RawConstantDoc): ConstantDoc { - return ConstantDoc( - rawConstantDoc.name, - rawConstantDoc.enum, - rawConstantDoc.description - ) - } -} diff --git a/kt/api-generator/src/main/kotlin/godot/docgen/docClasses.kt b/kt/api-generator/src/main/kotlin/godot/docgen/docClasses.kt deleted file mode 100644 index 910e66ab5c..0000000000 --- a/kt/api-generator/src/main/kotlin/godot/docgen/docClasses.kt +++ /dev/null @@ -1,33 +0,0 @@ -package godot.docgen - -data class ClassDoc( - val name: String, - val briefDescription: String, - val description: String, - val tutorialLinks: List, - val functions: Map, - val properties: Map, - val signals: Map, - val constants: Map -) - -data class FunctionDoc( - val name: String, - val description: String -) - -data class PropertyDoc( - val name: String, - val description: String -) - -data class SignalDoc( - val name: String, - val description: String -) - -data class ConstantDoc( - val name: String, - val enum: String, - val description: String -) diff --git a/kt/api-generator/src/main/kotlin/godot/docgen/rawXmlPojos.kt b/kt/api-generator/src/main/kotlin/godot/docgen/rawXmlPojos.kt deleted file mode 100644 index 030e429814..0000000000 --- a/kt/api-generator/src/main/kotlin/godot/docgen/rawXmlPojos.kt +++ /dev/null @@ -1,341 +0,0 @@ -package godot.docgen - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty -import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText -import godot.tools.common.extensions.convertToCamelCase - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawClassDoc { - var name: String = "" - var inherits: String = "" - - @JacksonXmlProperty(localName = "brief_description") - var briefDescription: String = "" - get() = field.getFormattedDescription() - var description: String = "" - get() = field.getFormattedDescription() - - @JacksonXmlProperty(localName = "tutorials") - var tutorials: TutorialContainer? = null - var methods: MethodContainer? = null - var members: MemberContainer? = null - var signals: SignalsContainer? = null - var constants: ConstantsContainer? = null -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class TutorialContainer { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "link") - var links: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class MethodContainer { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "method") - var methods: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawMethodDoc { - var name: String = "" - - @JacksonXmlProperty(localName = "return") - var returnType: ReturnContainer? = null - - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "argument") - var arguments: List = listOf() - var description: String = "" - get() = field.getFormattedDescription() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class ReturnContainer { - var type: String = "" -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawArgumentDoc { - var index: String = "" - var name: String = "" - var type: String = "" -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class MemberContainer { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "member") - var members: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawMemberDoc { - var name: String = "" - var type: String = "" - var setter = "" - var getter = "" - var default = "" - - @JacksonXmlText - var description: String = "" - get() = field.getFormattedDescription() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class SignalsContainer { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "signal") - var signals: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawSignalDoc { - var name: String = "" - var description: String = "" - get() = field.getFormattedDescription() - - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "argument") - var arguments: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class ConstantsContainer { - @JacksonXmlElementWrapper(useWrapping = false) - @JacksonXmlProperty(localName = "constant") - var constants: List = listOf() -} - -@JsonIgnoreProperties(ignoreUnknown = true) -open class RawConstantDoc { - var name: String = "" - var value: String = "" - var enum: String = "" - - @JacksonXmlText - var description: String = "" - get() = field.getFormattedDescription() -} - -//order important! As we expect some things already replaced in the regexes at the bottom to keep them simpler -private fun String.getFormattedDescription(): String = trim() - .replace("[i]", "*") - .replace("[/i]", "*") - .replace("[b]", "**") - .replace("[/b]", "**") - .replace("[u]", "") - .replace("[/u]", "") - .replace("[s]", "~~") - .replace("[/s]", "~~") - .replace("[code]", "`") - .replace("[/code]", "`") - .replace("[codeblock]", "```") - .replace("[/codeblock]", "```") - .replaceUrls() - .replaceCodeReferences() - .replaceClassReferences() - .replaceNewLines() - .replaceInvalidCommentSequences() - .replace(" ", "·") //so kotlin poet does not break where we don't want it - - -/** - * Replaces wrong comment characters sequence to avoid invalid comment syntax. - */ -fun String.replaceInvalidCommentSequences(): String = this.replace("*/", "* / ").replace("/*", "/ *") - -/** - * Replaces new line chars with two new line chars so they are rendered on an new line in kdoc - * - * Does not replace newLines in codeblocks - */ -private fun String.replaceNewLines(): String { - var tmpString = this - val originalCodeBlocks = "```(.|\\n)+?(?=```)```".toRegex(RegexOption.DOT_MATCHES_ALL) - .findAll(this) - .map { it.value } - .toList() - - tmpString = tmpString.replace("\n", "\n\n").replace("\t", "") - "```(.|\\n)+?(?=```)```".toRegex(RegexOption.DOT_MATCHES_ALL) - .findAll(tmpString) - .map { it.value } - .forEachIndexed { index, blockToReplace -> - tmpString = tmpString.replace(blockToReplace, originalCodeBlocks[index]) - } - return tmpString -} - -fun String.replaceUrls(): String { - var tmpString = this - //example: [url=http://www.pcg-random.org/]PCG32[/url] - "\\[url=.+?(?=])].+?(?=\\[/url])\\[/url]".toRegex() - .findAll(tmpString) //extract all urls with the pattern of the above example from the string - .map { it.value } - .map { oldBBCodeUrl -> - //extract actual url from the match: http://www.pcg-random.org/ in the case of [url=http://www.pcg-random.org/]PCG32[/url] - val url = "(?<=\\[url=).+?(?=])".toRegex().find(oldBBCodeUrl)?.value - //extract text from the match: PCG32 in the case of [url=http://www.pcg-random.org/]PCG32[/url] - val text = "(?<=]).+?(?=\\[/)".toRegex().find(oldBBCodeUrl)?.value - oldBBCodeUrl to "[$text]($url)" - } - .forEach { (oldUrlFormat, newUrlFormat) -> - tmpString = tmpString.replace(oldUrlFormat, newUrlFormat) - } - - return tmpString -} - -private fun String.replaceCodeReferences(): String { - var tmpString = this - //properties - //example: [member size] - "\\[member .+?(?=])]".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldPropertyReference -> - //extracts property name from match. example: size in the case of [member size] - val propertyName = "(?<=\\[member ).+?(?=])".toRegex().find(oldPropertyReference)?.value - oldPropertyReference to propertyName?.convertToCamelCase() - } - .filter { it.second != null } - .forEach { (oldPropertyReference, newPropertyReference) -> - tmpString = tmpString.replace(oldPropertyReference, "[$newPropertyReference]") //nulls already filtered - } - - //signals - //example: [signal pressed] - "\\[signal .+?(?=])]".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldSignalReference -> - //extracts signal name from match. example: pressed in the case of [signal pressed] - val signalName = "(?<=\\[signal ).+?(?=])".toRegex().find(oldSignalReference)?.value - oldSignalReference to signalName?.convertToCamelCase() - } - .filter { it.second != null } - .forEach { (oldSignalReference, newSignalReference) -> - tmpString = tmpString.replace(oldSignalReference, "[$newSignalReference]") //nulls already filtered - } - - //signals - //example: [constant MODE_OPEN_FILE] - "\\[constant .+?(?=])]".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldConstantReference -> - //extracts constant name from match. example: MODE_OPEN_FILE in the case of [constant MODE_OPEN_FILE] - val constantName = "(?<=\\[constant ).+?(?=])".toRegex().find(oldConstantReference)?.value - oldConstantReference to constantName - } - .filter { it.second != null } - .forEach { (oldConstantReference, newConstantReference) -> - tmpString = tmpString.replace(oldConstantReference, "[$newConstantReference]") //nulls already filtered - } - - //functions - //example: [method get_node] - "\\[method .+?(?=])]".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldFunctionReference -> - //extracts function name from match. example: get_node in the case of [method get_node] - val functionName = "(?<=\\[method ).+?(?=])".toRegex().find(oldFunctionReference)?.value - oldFunctionReference to functionName?.convertToCamelCase() - } - .filter { it.second != null } - .forEach { (oldFunctionReference, newFunctionReference) -> - tmpString = tmpString.replace(oldFunctionReference, "[$newFunctionReference]") //nulls already filtered - } - - //parameters - //example: [param right] - "\\[param .+?(?=])]".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldParameterReference -> - //extracts parameter name from match. example: right in the case of [param right] - val parameterName = "(?<=\\[param ).+?(?=])".toRegex().find(oldParameterReference)?.value - oldParameterReference to parameterName?.convertToCamelCase() - } - .filter { it.second != null } - .forEach { (oldParameterReference, newParameterReference) -> - tmpString = tmpString.replace(oldParameterReference, "[$newParameterReference]") //nulls already filtered - } - - return tmpString -} - -private fun String.replaceClassReferences(): String { - var tmpString = this - //examples: [Object], [Object.get] - //matches capitalized string in [] - "(?<=\\[)[A-Z].+?(?=])".toRegex() - .findAll(tmpString) - .map { it.value } - .map { oldClassReference -> - oldClassReference to if (oldClassReference.matches("^[A-Z]+(?:_[A-Z]+)*\$".toRegex())) { - oldClassReference //no class ref. its a constant. Not handled in regex to keep it simpler - } else { - oldClassReference.setPackagePath() - } - } - .forEach { (oldClassReference, newClassReference) -> - tmpString = tmpString.replace("[$oldClassReference]", "[$newClassReference]") - } - return tmpString -} - -private fun String.setPackagePath(): String { - return if (this.matches("^[A-Z]+(?:_[A-Z]+)*\$".toRegex())) { - this //no class ref. its a constant. Not handled in regex to keep it simpler - } else { - when(this) { - "Vector2", - "Rect2", - "Vector3", - "Transform2D", - "Plane", - "Quat", - "AABB", - "Basis", - "Transform", - "Color", - "NodePath", - "RID", - "Dictionary", - "PoolByteArray", - "PoolIntArray", - "PoolRealArray", - "PoolStringArray", - "PoolColorArray", - "PoolVector2Array", - "PoolVector3Array", - "VariantArray", - "ObjectArray", - "EnumArray", - "BoolVariantArray", - "IntVariantArray", - "RealVariantArray", - "StringVariantArray", - "AABBArray", - "BasisArray", - "ColorArray", - "NodePathArray", - "PlaneArray", - "QuatArray", - "Rect2Array", - "RIDArray", - "Transform2DArray", - "TransformArray", - "Vector2Array", - "Vector3Array" -> "godot.core.$this" - "Variant" -> this // we don't have a variant class anymore - else -> "godot.${this.replace("@GDScript", "GD")}" - } - } -} diff --git a/kt/api-generator/src/main/resources/api.json b/kt/api-generator/src/main/resources/api.json index 71ea9252d3..84ccf57672 100644 --- a/kt/api-generator/src/main/resources/api.json +++ b/kt/api-generator/src/main/resources/api.json @@ -1923,19 +1923,23 @@ "values": [ { "name": "SIDE_LEFT", - "value": 0 + "value": 0, + "documentation": "Left side, usually used for [Control] or [StyleBox]-derived classes." }, { "name": "SIDE_TOP", - "value": 1 + "value": 1, + "documentation": "Top side, usually used for [Control] or [StyleBox]-derived classes." }, { "name": "SIDE_RIGHT", - "value": 2 + "value": 2, + "documentation": "Right side, usually used for [Control] or [StyleBox]-derived classes." }, { "name": "SIDE_BOTTOM", - "value": 3 + "value": 3, + "documentation": "Bottom side, usually used for [Control] or [StyleBox]-derived classes." } ] }, @@ -1945,19 +1949,23 @@ "values": [ { "name": "CORNER_TOP_LEFT", - "value": 0 + "value": 0, + "documentation": "Top-left corner." }, { "name": "CORNER_TOP_RIGHT", - "value": 1 + "value": 1, + "documentation": "Top-right corner." }, { "name": "CORNER_BOTTOM_RIGHT", - "value": 2 + "value": 2, + "documentation": "Bottom-right corner." }, { "name": "CORNER_BOTTOM_LEFT", - "value": 3 + "value": 3, + "documentation": "Bottom-left corner." } ] }, @@ -1967,11 +1975,13 @@ "values": [ { "name": "VERTICAL", - "value": 1 + "value": 1, + "documentation": "General vertical alignment, usually used for [Separator], [ScrollBar], [Slider], etc." }, { "name": "HORIZONTAL", - "value": 0 + "value": 0, + "documentation": "General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc." } ] }, @@ -1981,11 +1991,13 @@ "values": [ { "name": "CLOCKWISE", - "value": 0 + "value": 0, + "documentation": "Clockwise rotation. Used by some methods (e.g. [method Image.rotate_90])." }, { "name": "COUNTERCLOCKWISE", - "value": 1 + "value": 1, + "documentation": "Counter-clockwise rotation. Used by some methods (e.g. [method Image.rotate_90])." } ] }, @@ -1995,19 +2007,23 @@ "values": [ { "name": "HORIZONTAL_ALIGNMENT_LEFT", - "value": 0 + "value": 0, + "documentation": "Horizontal left alignment, usually for text-derived classes." }, { "name": "HORIZONTAL_ALIGNMENT_CENTER", - "value": 1 + "value": 1, + "documentation": "Horizontal center alignment, usually for text-derived classes." }, { "name": "HORIZONTAL_ALIGNMENT_RIGHT", - "value": 2 + "value": 2, + "documentation": "Horizontal right alignment, usually for text-derived classes." }, { "name": "HORIZONTAL_ALIGNMENT_FILL", - "value": 3 + "value": 3, + "documentation": "Expand row to fit width, usually for text-derived classes." } ] }, @@ -2017,19 +2033,23 @@ "values": [ { "name": "VERTICAL_ALIGNMENT_TOP", - "value": 0 + "value": 0, + "documentation": "Vertical top alignment, usually for text-derived classes." }, { "name": "VERTICAL_ALIGNMENT_CENTER", - "value": 1 + "value": 1, + "documentation": "Vertical center alignment, usually for text-derived classes." }, { "name": "VERTICAL_ALIGNMENT_BOTTOM", - "value": 2 + "value": 2, + "documentation": "Vertical bottom alignment, usually for text-derived classes." }, { "name": "VERTICAL_ALIGNMENT_FILL", - "value": 3 + "value": 3, + "documentation": "Expand rows to fit height, usually for text-derived classes." } ] }, @@ -2039,55 +2059,68 @@ "values": [ { "name": "INLINE_ALIGNMENT_TOP_TO", - "value": 0 + "value": 0, + "documentation": "Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." }, { "name": "INLINE_ALIGNMENT_CENTER_TO", - "value": 1 + "value": 1, + "documentation": "Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." }, { "name": "INLINE_ALIGNMENT_BASELINE_TO", - "value": 3 + "value": 3, + "documentation": "Aligns the baseline (user defined) of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." }, { "name": "INLINE_ALIGNMENT_BOTTOM_TO", - "value": 2 + "value": 2, + "documentation": "Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGNMENT_TO_*[/code] constant." }, { "name": "INLINE_ALIGNMENT_TO_TOP", - "value": 0 + "value": 0, + "documentation": "Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the top of the text." }, { "name": "INLINE_ALIGNMENT_TO_CENTER", - "value": 4 + "value": 4, + "documentation": "Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the center of the text." }, { "name": "INLINE_ALIGNMENT_TO_BASELINE", - "value": 8 + "value": 8, + "documentation": "Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGNMENT_*_TO[/code] constant to the baseline of the text." }, { "name": "INLINE_ALIGNMENT_TO_BOTTOM", - "value": 12 + "value": 12, + "documentation": "Aligns inline object (e.g. image, table) to the bottom of the text." }, { "name": "INLINE_ALIGNMENT_TOP", - "value": 0 + "value": 0, + "documentation": "Aligns top of the inline object (e.g. image, table) to the top of the text. Equivalent to [code]INLINE_ALIGNMENT_TOP_TO | INLINE_ALIGNMENT_TO_TOP[/code]." }, { "name": "INLINE_ALIGNMENT_CENTER", - "value": 5 + "value": 5, + "documentation": "Aligns center of the inline object (e.g. image, table) to the center of the text. Equivalent to [code]INLINE_ALIGNMENT_CENTER_TO | INLINE_ALIGNMENT_TO_CENTER[/code]." }, { "name": "INLINE_ALIGNMENT_BOTTOM", - "value": 14 + "value": 14, + "documentation": "Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equivalent to [code]INLINE_ALIGNMENT_BOTTOM_TO | INLINE_ALIGNMENT_TO_BOTTOM[/code]." }, { "name": "INLINE_ALIGNMENT_IMAGE_MASK", - "value": 3 + "value": 3, + "documentation": "A bit mask for [code]INLINE_ALIGNMENT_*_TO[/code] alignment constants." }, { "name": "INLINE_ALIGNMENT_TEXT_MASK", - "value": 12 + "value": 12, + "documentation": "A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants." } ] }, @@ -2097,27 +2130,33 @@ "values": [ { "name": "EULER_ORDER_XYZ", - "value": 0 + "value": 0, + "documentation": "Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last." }, { "name": "EULER_ORDER_XZY", - "value": 1 + "value": 1, + "documentation": "Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last." }, { "name": "EULER_ORDER_YXZ", - "value": 2 + "value": 2, + "documentation": "Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last." }, { "name": "EULER_ORDER_YZX", - "value": 3 + "value": 3, + "documentation": "Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last." }, { "name": "EULER_ORDER_ZXY", - "value": 4 + "value": 4, + "documentation": "Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last." }, { "name": "EULER_ORDER_ZYX", - "value": 5 + "value": 5, + "documentation": "Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last." } ] }, @@ -2127,775 +2166,968 @@ "values": [ { "name": "KEY_NONE", - "value": 0 + "value": 0, + "documentation": "Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state." }, { "name": "KEY_SPECIAL", - "value": 4194304 + "value": 4194304, + "documentation": "Keycodes with this bit applied are non-printable." }, { "name": "KEY_ESCAPE", - "value": 4194305 + "value": 4194305, + "documentation": "Escape key." }, { "name": "KEY_TAB", - "value": 4194306 + "value": 4194306, + "documentation": "Tab key." }, { "name": "KEY_BACKTAB", - "value": 4194307 + "value": 4194307, + "documentation": "Shift + Tab key." }, { "name": "KEY_BACKSPACE", - "value": 4194308 + "value": 4194308, + "documentation": "Backspace key." }, { "name": "KEY_ENTER", - "value": 4194309 + "value": 4194309, + "documentation": "Return key (on the main keyboard)." }, { "name": "KEY_KP_ENTER", - "value": 4194310 + "value": 4194310, + "documentation": "Enter key on the numeric keypad." }, { "name": "KEY_INSERT", - "value": 4194311 + "value": 4194311, + "documentation": "Insert key." }, { "name": "KEY_DELETE", - "value": 4194312 + "value": 4194312, + "documentation": "Delete key." }, { "name": "KEY_PAUSE", - "value": 4194313 + "value": 4194313, + "documentation": "Pause key." }, { "name": "KEY_PRINT", - "value": 4194314 + "value": 4194314, + "documentation": "Print Screen key." }, { "name": "KEY_SYSREQ", - "value": 4194315 + "value": 4194315, + "documentation": "System Request key." }, { "name": "KEY_CLEAR", - "value": 4194316 + "value": 4194316, + "documentation": "Clear key." }, { "name": "KEY_HOME", - "value": 4194317 + "value": 4194317, + "documentation": "Home key." }, { "name": "KEY_END", - "value": 4194318 + "value": 4194318, + "documentation": "End key." }, { "name": "KEY_LEFT", - "value": 4194319 + "value": 4194319, + "documentation": "Left arrow key." }, { "name": "KEY_UP", - "value": 4194320 + "value": 4194320, + "documentation": "Up arrow key." }, { "name": "KEY_RIGHT", - "value": 4194321 + "value": 4194321, + "documentation": "Right arrow key." }, { "name": "KEY_DOWN", - "value": 4194322 + "value": 4194322, + "documentation": "Down arrow key." }, { "name": "KEY_PAGEUP", - "value": 4194323 + "value": 4194323, + "documentation": "Page Up key." }, { "name": "KEY_PAGEDOWN", - "value": 4194324 + "value": 4194324, + "documentation": "Page Down key." }, { "name": "KEY_SHIFT", - "value": 4194325 + "value": 4194325, + "documentation": "Shift key." }, { "name": "KEY_CTRL", - "value": 4194326 + "value": 4194326, + "documentation": "Control key." }, { "name": "KEY_META", - "value": 4194327 + "value": 4194327, + "documentation": "Meta key." }, { "name": "KEY_ALT", - "value": 4194328 + "value": 4194328, + "documentation": "Alt key." }, { "name": "KEY_CAPSLOCK", - "value": 4194329 + "value": 4194329, + "documentation": "Caps Lock key." }, { "name": "KEY_NUMLOCK", - "value": 4194330 + "value": 4194330, + "documentation": "Num Lock key." }, { "name": "KEY_SCROLLLOCK", - "value": 4194331 + "value": 4194331, + "documentation": "Scroll Lock key." }, { "name": "KEY_F1", - "value": 4194332 + "value": 4194332, + "documentation": "F1 key." }, { "name": "KEY_F2", - "value": 4194333 + "value": 4194333, + "documentation": "F2 key." }, { "name": "KEY_F3", - "value": 4194334 + "value": 4194334, + "documentation": "F3 key." }, { "name": "KEY_F4", - "value": 4194335 + "value": 4194335, + "documentation": "F4 key." }, { "name": "KEY_F5", - "value": 4194336 + "value": 4194336, + "documentation": "F5 key." }, { "name": "KEY_F6", - "value": 4194337 + "value": 4194337, + "documentation": "F6 key." }, { "name": "KEY_F7", - "value": 4194338 + "value": 4194338, + "documentation": "F7 key." }, { "name": "KEY_F8", - "value": 4194339 + "value": 4194339, + "documentation": "F8 key." }, { "name": "KEY_F9", - "value": 4194340 + "value": 4194340, + "documentation": "F9 key." }, { "name": "KEY_F10", - "value": 4194341 + "value": 4194341, + "documentation": "F10 key." }, { "name": "KEY_F11", - "value": 4194342 + "value": 4194342, + "documentation": "F11 key." }, { "name": "KEY_F12", - "value": 4194343 + "value": 4194343, + "documentation": "F12 key." }, { "name": "KEY_F13", - "value": 4194344 + "value": 4194344, + "documentation": "F13 key." }, { "name": "KEY_F14", - "value": 4194345 + "value": 4194345, + "documentation": "F14 key." }, { "name": "KEY_F15", - "value": 4194346 + "value": 4194346, + "documentation": "F15 key." }, { "name": "KEY_F16", - "value": 4194347 + "value": 4194347, + "documentation": "F16 key." }, { "name": "KEY_F17", - "value": 4194348 + "value": 4194348, + "documentation": "F17 key." }, { "name": "KEY_F18", - "value": 4194349 + "value": 4194349, + "documentation": "F18 key." }, { "name": "KEY_F19", - "value": 4194350 + "value": 4194350, + "documentation": "F19 key." }, { "name": "KEY_F20", - "value": 4194351 + "value": 4194351, + "documentation": "F20 key." }, { "name": "KEY_F21", - "value": 4194352 + "value": 4194352, + "documentation": "F21 key." }, { "name": "KEY_F22", - "value": 4194353 + "value": 4194353, + "documentation": "F22 key." }, { "name": "KEY_F23", - "value": 4194354 + "value": 4194354, + "documentation": "F23 key." }, { "name": "KEY_F24", - "value": 4194355 + "value": 4194355, + "documentation": "F24 key." }, { "name": "KEY_F25", - "value": 4194356 + "value": 4194356, + "documentation": "F25 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F26", - "value": 4194357 + "value": 4194357, + "documentation": "F26 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F27", - "value": 4194358 + "value": 4194358, + "documentation": "F27 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F28", - "value": 4194359 + "value": 4194359, + "documentation": "F28 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F29", - "value": 4194360 + "value": 4194360, + "documentation": "F29 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F30", - "value": 4194361 + "value": 4194361, + "documentation": "F30 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F31", - "value": 4194362 + "value": 4194362, + "documentation": "F31 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F32", - "value": 4194363 + "value": 4194363, + "documentation": "F32 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F33", - "value": 4194364 + "value": 4194364, + "documentation": "F33 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F34", - "value": 4194365 + "value": 4194365, + "documentation": "F34 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_F35", - "value": 4194366 + "value": 4194366, + "documentation": "F35 key. Only supported on macOS and Linux due to a Windows limitation." }, { "name": "KEY_KP_MULTIPLY", - "value": 4194433 + "value": 4194433, + "documentation": "Multiply (*) key on the numeric keypad." }, { "name": "KEY_KP_DIVIDE", - "value": 4194434 + "value": 4194434, + "documentation": "Divide (/) key on the numeric keypad." }, { "name": "KEY_KP_SUBTRACT", - "value": 4194435 + "value": 4194435, + "documentation": "Subtract (-) key on the numeric keypad." }, { "name": "KEY_KP_PERIOD", - "value": 4194436 + "value": 4194436, + "documentation": "Period (.) key on the numeric keypad." }, { "name": "KEY_KP_ADD", - "value": 4194437 + "value": 4194437, + "documentation": "Add (+) key on the numeric keypad." }, { "name": "KEY_KP_0", - "value": 4194438 + "value": 4194438, + "documentation": "Number 0 on the numeric keypad." }, { "name": "KEY_KP_1", - "value": 4194439 + "value": 4194439, + "documentation": "Number 1 on the numeric keypad." }, { "name": "KEY_KP_2", - "value": 4194440 + "value": 4194440, + "documentation": "Number 2 on the numeric keypad." }, { "name": "KEY_KP_3", - "value": 4194441 + "value": 4194441, + "documentation": "Number 3 on the numeric keypad." }, { "name": "KEY_KP_4", - "value": 4194442 + "value": 4194442, + "documentation": "Number 4 on the numeric keypad." }, { "name": "KEY_KP_5", - "value": 4194443 + "value": 4194443, + "documentation": "Number 5 on the numeric keypad." }, { "name": "KEY_KP_6", - "value": 4194444 + "value": 4194444, + "documentation": "Number 6 on the numeric keypad." }, { "name": "KEY_KP_7", - "value": 4194445 + "value": 4194445, + "documentation": "Number 7 on the numeric keypad." }, { "name": "KEY_KP_8", - "value": 4194446 + "value": 4194446, + "documentation": "Number 8 on the numeric keypad." }, { "name": "KEY_KP_9", - "value": 4194447 + "value": 4194447, + "documentation": "Number 9 on the numeric keypad." }, { "name": "KEY_MENU", - "value": 4194370 + "value": 4194370, + "documentation": "Context menu key." }, { "name": "KEY_HYPER", - "value": 4194371 + "value": 4194371, + "documentation": "Hyper key. (On Linux/X11 only)." }, { "name": "KEY_HELP", - "value": 4194373 + "value": 4194373, + "documentation": "Help key." }, { "name": "KEY_BACK", - "value": 4194376 + "value": 4194376, + "documentation": "Media back key. Not to be confused with the Back button on an Android device." }, { "name": "KEY_FORWARD", - "value": 4194377 + "value": 4194377, + "documentation": "Media forward key." }, { "name": "KEY_STOP", - "value": 4194378 + "value": 4194378, + "documentation": "Media stop key." }, { "name": "KEY_REFRESH", - "value": 4194379 + "value": 4194379, + "documentation": "Media refresh key." }, { "name": "KEY_VOLUMEDOWN", - "value": 4194380 + "value": 4194380, + "documentation": "Volume down key." }, { "name": "KEY_VOLUMEMUTE", - "value": 4194381 + "value": 4194381, + "documentation": "Mute volume key." }, { "name": "KEY_VOLUMEUP", - "value": 4194382 + "value": 4194382, + "documentation": "Volume up key." }, { "name": "KEY_MEDIAPLAY", - "value": 4194388 + "value": 4194388, + "documentation": "Media play key." }, { "name": "KEY_MEDIASTOP", - "value": 4194389 + "value": 4194389, + "documentation": "Media stop key." }, { "name": "KEY_MEDIAPREVIOUS", - "value": 4194390 + "value": 4194390, + "documentation": "Previous song key." }, { "name": "KEY_MEDIANEXT", - "value": 4194391 + "value": 4194391, + "documentation": "Next song key." }, { "name": "KEY_MEDIARECORD", - "value": 4194392 + "value": 4194392, + "documentation": "Media record key." }, { "name": "KEY_HOMEPAGE", - "value": 4194393 + "value": 4194393, + "documentation": "Home page key." }, { "name": "KEY_FAVORITES", - "value": 4194394 + "value": 4194394, + "documentation": "Favorites key." }, { "name": "KEY_SEARCH", - "value": 4194395 + "value": 4194395, + "documentation": "Search key." }, { "name": "KEY_STANDBY", - "value": 4194396 + "value": 4194396, + "documentation": "Standby key." }, { "name": "KEY_OPENURL", - "value": 4194397 + "value": 4194397, + "documentation": "Open URL / Launch Browser key." }, { "name": "KEY_LAUNCHMAIL", - "value": 4194398 + "value": 4194398, + "documentation": "Launch Mail key." }, { "name": "KEY_LAUNCHMEDIA", - "value": 4194399 + "value": 4194399, + "documentation": "Launch Media key." }, { "name": "KEY_LAUNCH0", - "value": 4194400 + "value": 4194400, + "documentation": "Launch Shortcut 0 key." }, { "name": "KEY_LAUNCH1", - "value": 4194401 + "value": 4194401, + "documentation": "Launch Shortcut 1 key." }, { "name": "KEY_LAUNCH2", - "value": 4194402 + "value": 4194402, + "documentation": "Launch Shortcut 2 key." }, { "name": "KEY_LAUNCH3", - "value": 4194403 + "value": 4194403, + "documentation": "Launch Shortcut 3 key." }, { "name": "KEY_LAUNCH4", - "value": 4194404 + "value": 4194404, + "documentation": "Launch Shortcut 4 key." }, { "name": "KEY_LAUNCH5", - "value": 4194405 + "value": 4194405, + "documentation": "Launch Shortcut 5 key." }, { "name": "KEY_LAUNCH6", - "value": 4194406 + "value": 4194406, + "documentation": "Launch Shortcut 6 key." }, { "name": "KEY_LAUNCH7", - "value": 4194407 + "value": 4194407, + "documentation": "Launch Shortcut 7 key." }, { "name": "KEY_LAUNCH8", - "value": 4194408 + "value": 4194408, + "documentation": "Launch Shortcut 8 key." }, { "name": "KEY_LAUNCH9", - "value": 4194409 + "value": 4194409, + "documentation": "Launch Shortcut 9 key." }, { "name": "KEY_LAUNCHA", - "value": 4194410 + "value": 4194410, + "documentation": "Launch Shortcut A key." }, { "name": "KEY_LAUNCHB", - "value": 4194411 + "value": 4194411, + "documentation": "Launch Shortcut B key." }, { "name": "KEY_LAUNCHC", - "value": 4194412 + "value": 4194412, + "documentation": "Launch Shortcut C key." }, { "name": "KEY_LAUNCHD", - "value": 4194413 + "value": 4194413, + "documentation": "Launch Shortcut D key." }, { "name": "KEY_LAUNCHE", - "value": 4194414 + "value": 4194414, + "documentation": "Launch Shortcut E key." }, { "name": "KEY_LAUNCHF", - "value": 4194415 + "value": 4194415, + "documentation": "Launch Shortcut F key." }, { "name": "KEY_GLOBE", - "value": 4194416 + "value": 4194416, + "documentation": "\"Globe\" key on Mac / iPad keyboard." }, { "name": "KEY_KEYBOARD", - "value": 4194417 + "value": 4194417, + "documentation": "\"On-screen keyboard\" key on iPad keyboard." }, { "name": "KEY_JIS_EISU", - "value": 4194418 + "value": 4194418, + "documentation": "英数 key on Mac keyboard." }, { "name": "KEY_JIS_KANA", - "value": 4194419 + "value": 4194419, + "documentation": "かな key on Mac keyboard." }, { "name": "KEY_UNKNOWN", - "value": 8388607 + "value": 8388607, + "documentation": "Unknown key." }, { "name": "KEY_SPACE", - "value": 32 + "value": 32, + "documentation": "Space key." }, { "name": "KEY_EXCLAM", - "value": 33 + "value": 33, + "documentation": "! key." }, { "name": "KEY_QUOTEDBL", - "value": 34 + "value": 34, + "documentation": "\" key." }, { "name": "KEY_NUMBERSIGN", - "value": 35 + "value": 35, + "documentation": "# key." }, { "name": "KEY_DOLLAR", - "value": 36 + "value": 36, + "documentation": "$ key." }, { "name": "KEY_PERCENT", - "value": 37 + "value": 37, + "documentation": "% key." }, { "name": "KEY_AMPERSAND", - "value": 38 + "value": 38, + "documentation": "& key." }, { "name": "KEY_APOSTROPHE", - "value": 39 + "value": 39, + "documentation": "' key." }, { "name": "KEY_PARENLEFT", - "value": 40 + "value": 40, + "documentation": "( key." }, { "name": "KEY_PARENRIGHT", - "value": 41 + "value": 41, + "documentation": ") key." }, { "name": "KEY_ASTERISK", - "value": 42 + "value": 42, + "documentation": "* key." }, { "name": "KEY_PLUS", - "value": 43 + "value": 43, + "documentation": "+ key." }, { "name": "KEY_COMMA", - "value": 44 + "value": 44, + "documentation": ", key." }, { "name": "KEY_MINUS", - "value": 45 + "value": 45, + "documentation": "- key." }, { "name": "KEY_PERIOD", - "value": 46 + "value": 46, + "documentation": ". key." }, { "name": "KEY_SLASH", - "value": 47 + "value": 47, + "documentation": "/ key." }, { "name": "KEY_0", - "value": 48 + "value": 48, + "documentation": "Number 0 key." }, { "name": "KEY_1", - "value": 49 + "value": 49, + "documentation": "Number 1 key." }, { "name": "KEY_2", - "value": 50 + "value": 50, + "documentation": "Number 2 key." }, { "name": "KEY_3", - "value": 51 + "value": 51, + "documentation": "Number 3 key." }, { "name": "KEY_4", - "value": 52 + "value": 52, + "documentation": "Number 4 key." }, { "name": "KEY_5", - "value": 53 + "value": 53, + "documentation": "Number 5 key." }, { "name": "KEY_6", - "value": 54 + "value": 54, + "documentation": "Number 6 key." }, { "name": "KEY_7", - "value": 55 + "value": 55, + "documentation": "Number 7 key." }, { "name": "KEY_8", - "value": 56 + "value": 56, + "documentation": "Number 8 key." }, { "name": "KEY_9", - "value": 57 + "value": 57, + "documentation": "Number 9 key." }, { "name": "KEY_COLON", - "value": 58 + "value": 58, + "documentation": ": key." }, { "name": "KEY_SEMICOLON", - "value": 59 + "value": 59, + "documentation": "; key." }, { "name": "KEY_LESS", - "value": 60 + "value": 60, + "documentation": "< key." }, { "name": "KEY_EQUAL", - "value": 61 + "value": 61, + "documentation": "= key." }, { "name": "KEY_GREATER", - "value": 62 + "value": 62, + "documentation": "> key." }, { "name": "KEY_QUESTION", - "value": 63 + "value": 63, + "documentation": "? key." }, { "name": "KEY_AT", - "value": 64 + "value": 64, + "documentation": "@ key." }, { "name": "KEY_A", - "value": 65 + "value": 65, + "documentation": "A key." }, { "name": "KEY_B", - "value": 66 + "value": 66, + "documentation": "B key." }, { "name": "KEY_C", - "value": 67 + "value": 67, + "documentation": "C key." }, { "name": "KEY_D", - "value": 68 + "value": 68, + "documentation": "D key." }, { "name": "KEY_E", - "value": 69 + "value": 69, + "documentation": "E key." }, { "name": "KEY_F", - "value": 70 + "value": 70, + "documentation": "F key." }, { "name": "KEY_G", - "value": 71 + "value": 71, + "documentation": "G key." }, { "name": "KEY_H", - "value": 72 + "value": 72, + "documentation": "H key." }, { "name": "KEY_I", - "value": 73 + "value": 73, + "documentation": "I key." }, { "name": "KEY_J", - "value": 74 + "value": 74, + "documentation": "J key." }, { "name": "KEY_K", - "value": 75 + "value": 75, + "documentation": "K key." }, { "name": "KEY_L", - "value": 76 + "value": 76, + "documentation": "L key." }, { "name": "KEY_M", - "value": 77 + "value": 77, + "documentation": "M key." }, { "name": "KEY_N", - "value": 78 + "value": 78, + "documentation": "N key." }, { "name": "KEY_O", - "value": 79 + "value": 79, + "documentation": "O key." }, { "name": "KEY_P", - "value": 80 + "value": 80, + "documentation": "P key." }, { "name": "KEY_Q", - "value": 81 + "value": 81, + "documentation": "Q key." }, { "name": "KEY_R", - "value": 82 + "value": 82, + "documentation": "R key." }, { "name": "KEY_S", - "value": 83 + "value": 83, + "documentation": "S key." }, { "name": "KEY_T", - "value": 84 + "value": 84, + "documentation": "T key." }, { "name": "KEY_U", - "value": 85 + "value": 85, + "documentation": "U key." }, { "name": "KEY_V", - "value": 86 + "value": 86, + "documentation": "V key." }, { "name": "KEY_W", - "value": 87 + "value": 87, + "documentation": "W key." }, { "name": "KEY_X", - "value": 88 + "value": 88, + "documentation": "X key." }, { "name": "KEY_Y", - "value": 89 + "value": 89, + "documentation": "Y key." }, { "name": "KEY_Z", - "value": 90 + "value": 90, + "documentation": "Z key." }, { "name": "KEY_BRACKETLEFT", - "value": 91 + "value": 91, + "documentation": "[ key." }, { "name": "KEY_BACKSLASH", - "value": 92 + "value": 92, + "documentation": "\\ key." }, { "name": "KEY_BRACKETRIGHT", - "value": 93 + "value": 93, + "documentation": "] key." }, { "name": "KEY_ASCIICIRCUM", - "value": 94 + "value": 94, + "documentation": "^ key." }, { "name": "KEY_UNDERSCORE", - "value": 95 + "value": 95, + "documentation": "_ key." }, { "name": "KEY_QUOTELEFT", - "value": 96 + "value": 96, + "documentation": "` key." }, { "name": "KEY_BRACELEFT", - "value": 123 + "value": 123, + "documentation": "{ key." }, { "name": "KEY_BAR", - "value": 124 + "value": 124, + "documentation": "| key." }, { "name": "KEY_BRACERIGHT", - "value": 125 + "value": 125, + "documentation": "} key." }, { "name": "KEY_ASCIITILDE", - "value": 126 + "value": 126, + "documentation": "~ key." }, { "name": "KEY_YEN", - "value": 165 + "value": 165, + "documentation": "¥ key." }, { "name": "KEY_SECTION", - "value": 167 + "value": 167, + "documentation": "§ key." } ] }, @@ -2905,39 +3137,48 @@ "values": [ { "name": "KEY_CODE_MASK", - "value": 8388607 + "value": 8388607, + "documentation": "Key Code mask." }, { "name": "KEY_MODIFIER_MASK", - "value": 532676608 + "value": 532676608, + "documentation": "Modifier key mask." }, { "name": "KEY_MASK_CMD_OR_CTRL", - "value": 16777216 + "value": 16777216, + "documentation": "Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only." }, { "name": "KEY_MASK_SHIFT", - "value": 33554432 + "value": 33554432, + "documentation": "Shift key mask." }, { "name": "KEY_MASK_ALT", - "value": 67108864 + "value": 67108864, + "documentation": "Alt or Option (on macOS) key mask." }, { "name": "KEY_MASK_META", - "value": 134217728 + "value": 134217728, + "documentation": "Command (on macOS) or Meta/Windows key mask." }, { "name": "KEY_MASK_CTRL", - "value": 268435456 + "value": 268435456, + "documentation": "Control key mask." }, { "name": "KEY_MASK_KPAD", - "value": 536870912 + "value": 536870912, + "documentation": "Keypad key mask." }, { "name": "KEY_MASK_GROUP_SWITCH", - "value": 1073741824 + "value": 1073741824, + "documentation": "Group Switch key mask." } ] }, @@ -2947,43 +3188,53 @@ "values": [ { "name": "MOUSE_BUTTON_NONE", - "value": 0 + "value": 0, + "documentation": "Enum value which doesn't correspond to any mouse button. This is used to initialize [enum MouseButton] properties with a generic state." }, { "name": "MOUSE_BUTTON_LEFT", - "value": 1 + "value": 1, + "documentation": "Primary mouse button, usually assigned to the left button." }, { "name": "MOUSE_BUTTON_RIGHT", - "value": 2 + "value": 2, + "documentation": "Secondary mouse button, usually assigned to the right button." }, { "name": "MOUSE_BUTTON_MIDDLE", - "value": 3 + "value": 3, + "documentation": "Middle mouse button." }, { "name": "MOUSE_BUTTON_WHEEL_UP", - "value": 4 + "value": 4, + "documentation": "Mouse wheel scrolling up." }, { "name": "MOUSE_BUTTON_WHEEL_DOWN", - "value": 5 + "value": 5, + "documentation": "Mouse wheel scrolling down." }, { "name": "MOUSE_BUTTON_WHEEL_LEFT", - "value": 6 + "value": 6, + "documentation": "Mouse wheel left button (only present on some mice)." }, { "name": "MOUSE_BUTTON_WHEEL_RIGHT", - "value": 7 + "value": 7, + "documentation": "Mouse wheel right button (only present on some mice)." }, { "name": "MOUSE_BUTTON_XBUTTON1", - "value": 8 + "value": 8, + "documentation": "Extra mouse button 1. This is sometimes present, usually to the sides of the mouse." }, { "name": "MOUSE_BUTTON_XBUTTON2", - "value": 9 + "value": 9, + "documentation": "Extra mouse button 2. This is sometimes present, usually to the sides of the mouse." } ] }, @@ -2993,23 +3244,28 @@ "values": [ { "name": "MOUSE_BUTTON_MASK_LEFT", - "value": 1 + "value": 1, + "documentation": "Primary mouse button mask, usually for the left button." }, { "name": "MOUSE_BUTTON_MASK_RIGHT", - "value": 2 + "value": 2, + "documentation": "Secondary mouse button mask, usually for the right button." }, { "name": "MOUSE_BUTTON_MASK_MIDDLE", - "value": 4 + "value": 4, + "documentation": "Middle mouse button mask." }, { "name": "MOUSE_BUTTON_MASK_MB_XBUTTON1", - "value": 128 + "value": 128, + "documentation": "Extra mouse button 1 mask." }, { "name": "MOUSE_BUTTON_MASK_MB_XBUTTON2", - "value": 256 + "value": 256, + "documentation": "Extra mouse button 2 mask." } ] }, @@ -3019,99 +3275,123 @@ "values": [ { "name": "JOY_BUTTON_INVALID", - "value": -1 + "value": -1, + "documentation": "An invalid game controller button." }, { "name": "JOY_BUTTON_A", - "value": 0 + "value": 0, + "documentation": "Game controller SDL button A. Corresponds to the bottom action button: Sony Cross, Xbox A, Nintendo B." }, { "name": "JOY_BUTTON_B", - "value": 1 + "value": 1, + "documentation": "Game controller SDL button B. Corresponds to the right action button: Sony Circle, Xbox B, Nintendo A." }, { "name": "JOY_BUTTON_X", - "value": 2 + "value": 2, + "documentation": "Game controller SDL button X. Corresponds to the left action button: Sony Square, Xbox X, Nintendo Y." }, { "name": "JOY_BUTTON_Y", - "value": 3 + "value": 3, + "documentation": "Game controller SDL button Y. Corresponds to the top action button: Sony Triangle, Xbox Y, Nintendo X." }, { "name": "JOY_BUTTON_BACK", - "value": 4 + "value": 4, + "documentation": "Game controller SDL back button. Corresponds to the Sony Select, Xbox Back, Nintendo - button." }, { "name": "JOY_BUTTON_GUIDE", - "value": 5 + "value": 5, + "documentation": "Game controller SDL guide button. Corresponds to the Sony PS, Xbox Home button." }, { "name": "JOY_BUTTON_START", - "value": 6 + "value": 6, + "documentation": "Game controller SDL start button. Corresponds to the Sony Options, Xbox Menu, Nintendo + button." }, { "name": "JOY_BUTTON_LEFT_STICK", - "value": 7 + "value": 7, + "documentation": "Game controller SDL left stick button. Corresponds to the Sony L3, Xbox L/LS button." }, { "name": "JOY_BUTTON_RIGHT_STICK", - "value": 8 + "value": 8, + "documentation": "Game controller SDL right stick button. Corresponds to the Sony R3, Xbox R/RS button." }, { "name": "JOY_BUTTON_LEFT_SHOULDER", - "value": 9 + "value": 9, + "documentation": "Game controller SDL left shoulder button. Corresponds to the Sony L1, Xbox LB button." }, { "name": "JOY_BUTTON_RIGHT_SHOULDER", - "value": 10 + "value": 10, + "documentation": "Game controller SDL right shoulder button. Corresponds to the Sony R1, Xbox RB button." }, { "name": "JOY_BUTTON_DPAD_UP", - "value": 11 + "value": 11, + "documentation": "Game controller D-pad up button." }, { "name": "JOY_BUTTON_DPAD_DOWN", - "value": 12 + "value": 12, + "documentation": "Game controller D-pad down button." }, { "name": "JOY_BUTTON_DPAD_LEFT", - "value": 13 + "value": 13, + "documentation": "Game controller D-pad left button." }, { "name": "JOY_BUTTON_DPAD_RIGHT", - "value": 14 + "value": 14, + "documentation": "Game controller D-pad right button." }, { "name": "JOY_BUTTON_MISC1", - "value": 15 + "value": 15, + "documentation": "Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo Switch capture button." }, { "name": "JOY_BUTTON_PADDLE1", - "value": 16 + "value": 16, + "documentation": "Game controller SDL paddle 1 button." }, { "name": "JOY_BUTTON_PADDLE2", - "value": 17 + "value": 17, + "documentation": "Game controller SDL paddle 2 button." }, { "name": "JOY_BUTTON_PADDLE3", - "value": 18 + "value": 18, + "documentation": "Game controller SDL paddle 3 button." }, { "name": "JOY_BUTTON_PADDLE4", - "value": 19 + "value": 19, + "documentation": "Game controller SDL paddle 4 button." }, { "name": "JOY_BUTTON_TOUCHPAD", - "value": 20 + "value": 20, + "documentation": "Game controller SDL touchpad button." }, { "name": "JOY_BUTTON_SDL_MAX", - "value": 21 + "value": 21, + "documentation": "The number of SDL game controller buttons." }, { "name": "JOY_BUTTON_MAX", - "value": 128 + "value": 128, + "documentation": "The maximum number of game controller buttons supported by the engine. The actual limit may be lower on specific platforms:\n- [b]Android:[/b] Up to 36 buttons.\n- [b]Linux:[/b] Up to 80 buttons.\n- [b]Windows[/b] and [b]macOS:[/b] Up to 128 buttons." } ] }, @@ -3121,39 +3401,48 @@ "values": [ { "name": "JOY_AXIS_INVALID", - "value": -1 + "value": -1, + "documentation": "An invalid game controller axis." }, { "name": "JOY_AXIS_LEFT_X", - "value": 0 + "value": 0, + "documentation": "Game controller left joystick x-axis." }, { "name": "JOY_AXIS_LEFT_Y", - "value": 1 + "value": 1, + "documentation": "Game controller left joystick y-axis." }, { "name": "JOY_AXIS_RIGHT_X", - "value": 2 + "value": 2, + "documentation": "Game controller right joystick x-axis." }, { "name": "JOY_AXIS_RIGHT_Y", - "value": 3 + "value": 3, + "documentation": "Game controller right joystick y-axis." }, { "name": "JOY_AXIS_TRIGGER_LEFT", - "value": 4 + "value": 4, + "documentation": "Game controller left trigger axis." }, { "name": "JOY_AXIS_TRIGGER_RIGHT", - "value": 5 + "value": 5, + "documentation": "Game controller right trigger axis." }, { "name": "JOY_AXIS_SDL_MAX", - "value": 6 + "value": 6, + "documentation": "The number of SDL game controller axes." }, { "name": "JOY_AXIS_MAX", - "value": 10 + "value": 10, + "documentation": "The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes." } ] }, @@ -3163,79 +3452,98 @@ "values": [ { "name": "MIDI_MESSAGE_NONE", - "value": 0 + "value": 0, + "documentation": "Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state." }, { "name": "MIDI_MESSAGE_NOTE_OFF", - "value": 8 + "value": 8, + "documentation": "MIDI note OFF message. Not all MIDI devices send this event; some send [constant MIDI_MESSAGE_NOTE_ON] with zero velocity instead. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs." }, { "name": "MIDI_MESSAGE_NOTE_ON", - "value": 9 + "value": 9, + "documentation": "MIDI note ON message. Some MIDI devices send this event with velocity zero instead of [constant MIDI_MESSAGE_NOTE_OFF], but implementations vary. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs." }, { "name": "MIDI_MESSAGE_AFTERTOUCH", - "value": 10 + "value": 10, + "documentation": "MIDI aftertouch message. This message is most often sent by pressing down on the key after it \"bottoms out\"." }, { "name": "MIDI_MESSAGE_CONTROL_CHANGE", - "value": 11 + "value": 11, + "documentation": "MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers." }, { "name": "MIDI_MESSAGE_PROGRAM_CHANGE", - "value": 12 + "value": 12, + "documentation": "MIDI program change message. This message sent when the program patch number changes." }, { "name": "MIDI_MESSAGE_CHANNEL_PRESSURE", - "value": 13 + "value": 13, + "documentation": "MIDI channel pressure message. This message is most often sent by pressing down on the key after it \"bottoms out\". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys." }, { "name": "MIDI_MESSAGE_PITCH_BEND", - "value": 14 + "value": 14, + "documentation": "MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically)." }, { "name": "MIDI_MESSAGE_SYSTEM_EXCLUSIVE", - "value": 240 + "value": 240, + "documentation": "MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot." }, { "name": "MIDI_MESSAGE_QUARTER_FRAME", - "value": 241 + "value": 241, + "documentation": "MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot." }, { "name": "MIDI_MESSAGE_SONG_POSITION_POINTER", - "value": 242 + "value": 242, + "documentation": "MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot." }, { "name": "MIDI_MESSAGE_SONG_SELECT", - "value": 243 + "value": 243, + "documentation": "MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot." }, { "name": "MIDI_MESSAGE_TUNE_REQUEST", - "value": 246 + "value": 246, + "documentation": "MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators." }, { "name": "MIDI_MESSAGE_TIMING_CLOCK", - "value": 248 + "value": 248, + "documentation": "MIDI timing clock message. Sent 24 times per quarter note when synchronization is required." }, { "name": "MIDI_MESSAGE_START", - "value": 250 + "value": 250, + "documentation": "MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks." }, { "name": "MIDI_MESSAGE_CONTINUE", - "value": 251 + "value": 251, + "documentation": "MIDI continue message. Continue at the point the sequence was stopped." }, { "name": "MIDI_MESSAGE_STOP", - "value": 252 + "value": 252, + "documentation": "MIDI stop message. Stop the current sequence." }, { "name": "MIDI_MESSAGE_ACTIVE_SENSING", - "value": 254 + "value": 254, + "documentation": "MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive." }, { "name": "MIDI_MESSAGE_SYSTEM_RESET", - "value": 255 + "value": 255, + "documentation": "MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself." } ] }, @@ -3245,199 +3553,248 @@ "values": [ { "name": "OK", - "value": 0 + "value": 0, + "documentation": "Methods that return [enum Error] return [constant OK] when no error occurred.\nSince [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks.\n[b]Example:[/b]\n[codeblock]\nvar error = method_that_returns_error()\nif error != OK:\n printerr(\"Failure!\")\n\n# Or, alternatively:\nif error:\n printerr(\"Still failing!\")\n[/codeblock]\n[b]Note:[/b] Many functions do not return an error code, but will print error messages to standard output." }, { "name": "FAILED", - "value": 1 + "value": 1, + "documentation": "Generic error." }, { "name": "ERR_UNAVAILABLE", - "value": 2 + "value": 2, + "documentation": "Unavailable error." }, { "name": "ERR_UNCONFIGURED", - "value": 3 + "value": 3, + "documentation": "Unconfigured error." }, { "name": "ERR_UNAUTHORIZED", - "value": 4 + "value": 4, + "documentation": "Unauthorized error." }, { "name": "ERR_PARAMETER_RANGE_ERROR", - "value": 5 + "value": 5, + "documentation": "Parameter range error." }, { "name": "ERR_OUT_OF_MEMORY", - "value": 6 + "value": 6, + "documentation": "Out of memory (OOM) error." }, { "name": "ERR_FILE_NOT_FOUND", - "value": 7 + "value": 7, + "documentation": "File: Not found error." }, { "name": "ERR_FILE_BAD_DRIVE", - "value": 8 + "value": 8, + "documentation": "File: Bad drive error." }, { "name": "ERR_FILE_BAD_PATH", - "value": 9 + "value": 9, + "documentation": "File: Bad path error." }, { "name": "ERR_FILE_NO_PERMISSION", - "value": 10 + "value": 10, + "documentation": "File: No permission error." }, { "name": "ERR_FILE_ALREADY_IN_USE", - "value": 11 + "value": 11, + "documentation": "File: Already in use error." }, { "name": "ERR_FILE_CANT_OPEN", - "value": 12 + "value": 12, + "documentation": "File: Can't open error." }, { "name": "ERR_FILE_CANT_WRITE", - "value": 13 + "value": 13, + "documentation": "File: Can't write error." }, { "name": "ERR_FILE_CANT_READ", - "value": 14 + "value": 14, + "documentation": "File: Can't read error." }, { "name": "ERR_FILE_UNRECOGNIZED", - "value": 15 + "value": 15, + "documentation": "File: Unrecognized error." }, { "name": "ERR_FILE_CORRUPT", - "value": 16 + "value": 16, + "documentation": "File: Corrupt error." }, { "name": "ERR_FILE_MISSING_DEPENDENCIES", - "value": 17 + "value": 17, + "documentation": "File: Missing dependencies error." }, { "name": "ERR_FILE_EOF", - "value": 18 + "value": 18, + "documentation": "File: End of file (EOF) error." }, { "name": "ERR_CANT_OPEN", - "value": 19 + "value": 19, + "documentation": "Can't open error." }, { "name": "ERR_CANT_CREATE", - "value": 20 + "value": 20, + "documentation": "Can't create error." }, { "name": "ERR_QUERY_FAILED", - "value": 21 + "value": 21, + "documentation": "Query failed error." }, { "name": "ERR_ALREADY_IN_USE", - "value": 22 + "value": 22, + "documentation": "Already in use error." }, { "name": "ERR_LOCKED", - "value": 23 + "value": 23, + "documentation": "Locked error." }, { "name": "ERR_TIMEOUT", - "value": 24 + "value": 24, + "documentation": "Timeout error." }, { "name": "ERR_CANT_CONNECT", - "value": 25 + "value": 25, + "documentation": "Can't connect error." }, { "name": "ERR_CANT_RESOLVE", - "value": 26 + "value": 26, + "documentation": "Can't resolve error." }, { "name": "ERR_CONNECTION_ERROR", - "value": 27 + "value": 27, + "documentation": "Connection error." }, { "name": "ERR_CANT_ACQUIRE_RESOURCE", - "value": 28 + "value": 28, + "documentation": "Can't acquire resource error." }, { "name": "ERR_CANT_FORK", - "value": 29 + "value": 29, + "documentation": "Can't fork process error." }, { "name": "ERR_INVALID_DATA", - "value": 30 + "value": 30, + "documentation": "Invalid data error." }, { "name": "ERR_INVALID_PARAMETER", - "value": 31 + "value": 31, + "documentation": "Invalid parameter error." }, { "name": "ERR_ALREADY_EXISTS", - "value": 32 + "value": 32, + "documentation": "Already exists error." }, { "name": "ERR_DOES_NOT_EXIST", - "value": 33 + "value": 33, + "documentation": "Does not exist error." }, { "name": "ERR_DATABASE_CANT_READ", - "value": 34 + "value": 34, + "documentation": "Database: Read error." }, { "name": "ERR_DATABASE_CANT_WRITE", - "value": 35 + "value": 35, + "documentation": "Database: Write error." }, { "name": "ERR_COMPILATION_FAILED", - "value": 36 + "value": 36, + "documentation": "Compilation failed error." }, { "name": "ERR_METHOD_NOT_FOUND", - "value": 37 + "value": 37, + "documentation": "Method not found error." }, { "name": "ERR_LINK_FAILED", - "value": 38 + "value": 38, + "documentation": "Linking failed error." }, { "name": "ERR_SCRIPT_FAILED", - "value": 39 + "value": 39, + "documentation": "Script failed error." }, { "name": "ERR_CYCLIC_LINK", - "value": 40 + "value": 40, + "documentation": "Cycling link (import cycle) error." }, { "name": "ERR_INVALID_DECLARATION", - "value": 41 + "value": 41, + "documentation": "Invalid declaration error." }, { "name": "ERR_DUPLICATE_SYMBOL", - "value": 42 + "value": 42, + "documentation": "Duplicate symbol error." }, { "name": "ERR_PARSE_ERROR", - "value": 43 + "value": 43, + "documentation": "Parse error." }, { "name": "ERR_BUSY", - "value": 44 + "value": 44, + "documentation": "Busy error." }, { "name": "ERR_SKIP", - "value": 45 + "value": 45, + "documentation": "Skip error." }, { "name": "ERR_HELP", - "value": 46 + "value": 46, + "documentation": "Help error. Used internally when passing [code]--version[/code] or [code]--help[/code] as executable options." }, { "name": "ERR_BUG", - "value": 47 + "value": 47, + "documentation": "Bug error, caused by an implementation issue in the method.\n[b]Note:[/b] If a built-in method returns this code, please open an issue on [url=https://github.com/godotengine/godot/issues]the GitHub Issue Tracker[/url]." }, { "name": "ERR_PRINTER_ON_FIRE", - "value": 48 + "value": 48, + "documentation": "Printer on fire error (This is an easter egg, no built-in methods return this error code)." } ] }, @@ -3447,159 +3804,198 @@ "values": [ { "name": "PROPERTY_HINT_NONE", - "value": 0 + "value": 0, + "documentation": "The property has no hint for the editor." }, { "name": "PROPERTY_HINT_RANGE", - "value": 1 + "value": 1, + "documentation": "Hints that an [int] or [float] property should be within a range specified via the hint string [code]\"min,max\"[/code] or [code]\"min,max,step\"[/code]. The hint string can optionally include [code]\"or_greater\"[/code] and/or [code]\"or_less\"[/code] to allow manual input going respectively above the max or below the min values.\n[b]Example:[/b] [code]\"-360,360,1,or_greater,or_less\"[/code].\nAdditionally, other keywords can be included: [code]\"exp\"[/code] for exponential range editing, [code]\"radians_as_degrees\"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]\"degrees\"[/code] to hint at an angle and [code]\"hide_slider\"[/code] to hide the slider." }, { "name": "PROPERTY_HINT_ENUM", - "value": 2 + "value": 2, + "documentation": "Hints that an [int] or [String] property is an enumerated value to pick in a list specified via a hint string.\nThe hint string is a comma separated list of names such as [code]\"Hello,Something,Else\"[/code]. Whitespaces are [b]not[/b] removed from either end of a name. For integer properties, the first name in the list has value 0, the next 1, and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]\"Zero,One,Three:3,Four,Six:6\"[/code]." }, { "name": "PROPERTY_HINT_ENUM_SUGGESTION", - "value": 3 + "value": 3, + "documentation": "Hints that a [String] property can be an enumerated value to pick in a list specified via a hint string such as [code]\"Hello,Something,Else\"[/code].\nUnlike [constant PROPERTY_HINT_ENUM], a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values." }, { "name": "PROPERTY_HINT_EXP_EASING", - "value": 4 + "value": 4, + "documentation": "Hints that a [float] property should be edited via an exponential easing function. The hint string can include [code]\"attenuation\"[/code] to flip the curve horizontally and/or [code]\"positive_only\"[/code] to exclude in/out easing and limit values to be greater than or equal to zero." }, { "name": "PROPERTY_HINT_LINK", - "value": 5 + "value": 5, + "documentation": "Hints that a vector property should allow its components to be linked. For example, this allows [member Vector2.x] and [member Vector2.y] to be edited together." }, { "name": "PROPERTY_HINT_FLAGS", - "value": 6 + "value": 6, + "documentation": "Hints that an [int] property is a bitmask with named bit flags.\nThe hint string is a comma separated list of names such as [code]\"Bit0,Bit1,Bit2,Bit3\"[/code]. Whitespaces are [b]not[/b] removed from either end of a name. The first name in the list has value 1, the next 2, then 4, 8, 16 and so on. Explicit values can also be specified by appending [code]:integer[/code] to the name, e.g. [code]\"A:4,B:8,C:16\"[/code]. You can also combine several flags ([code]\"A:4,B:8,AB:12,C:16\"[/code]).\n[b]Note:[/b] A flag value must be at least [code]1[/code] and at most [code]2 ** 32 - 1[/code].\n[b]Note:[/b] Unlike [constant PROPERTY_HINT_ENUM], the previous explicit value is not taken into account. For the hint [code]\"A:16,B,C\"[/code], A is 16, B is 2, C is 4." }, { "name": "PROPERTY_HINT_LAYERS_2D_RENDER", - "value": 7 + "value": 7, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 2D render layers." }, { "name": "PROPERTY_HINT_LAYERS_2D_PHYSICS", - "value": 8 + "value": 8, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 2D physics layers." }, { "name": "PROPERTY_HINT_LAYERS_2D_NAVIGATION", - "value": 9 + "value": 9, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 2D navigation layers." }, { "name": "PROPERTY_HINT_LAYERS_3D_RENDER", - "value": 10 + "value": 10, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 3D render layers." }, { "name": "PROPERTY_HINT_LAYERS_3D_PHYSICS", - "value": 11 + "value": 11, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 3D physics layers." }, { "name": "PROPERTY_HINT_LAYERS_3D_NAVIGATION", - "value": 12 + "value": 12, + "documentation": "Hints that an [int] property is a bitmask using the optionally named 3D navigation layers." }, { "name": "PROPERTY_HINT_LAYERS_AVOIDANCE", - "value": 37 + "value": 37, + "documentation": "Hints that an integer property is a bitmask using the optionally named avoidance layers." }, { "name": "PROPERTY_HINT_FILE", - "value": 13 + "value": 13, + "documentation": "Hints that a [String] property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]\"*.png,*.jpg\"[/code]." }, { "name": "PROPERTY_HINT_DIR", - "value": 14 + "value": 14, + "documentation": "Hints that a [String] property is a path to a directory. Editing it will show a file dialog for picking the path." }, { "name": "PROPERTY_HINT_GLOBAL_FILE", - "value": 15 + "value": 15, + "documentation": "Hints that a [String] property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards, like [code]\"*.png,*.jpg\"[/code]." }, { "name": "PROPERTY_HINT_GLOBAL_DIR", - "value": 16 + "value": 16, + "documentation": "Hints that a [String] property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path." }, { "name": "PROPERTY_HINT_RESOURCE_TYPE", - "value": 17 + "value": 17, + "documentation": "Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]\"Texture2D\"[/code]). Editing it will show a popup menu of valid resource types to instantiate." }, { "name": "PROPERTY_HINT_MULTILINE_TEXT", - "value": 18 + "value": 18, + "documentation": "Hints that a [String] property is text with line breaks. Editing it will show a text input field where line breaks can be typed." }, { "name": "PROPERTY_HINT_EXPRESSION", - "value": 19 + "value": 19, + "documentation": "Hints that a [String] property is an [Expression]." }, { "name": "PROPERTY_HINT_PLACEHOLDER_TEXT", - "value": 20 + "value": 20, + "documentation": "Hints that a [String] property should show a placeholder text on its input field, if empty. The hint string is the placeholder text to use." }, { "name": "PROPERTY_HINT_COLOR_NO_ALPHA", - "value": 21 + "value": 21, + "documentation": "Hints that a [Color] property should be edited without affecting its transparency ([member Color.a] is not editable)." }, { "name": "PROPERTY_HINT_OBJECT_ID", - "value": 22 + "value": 22, + "documentation": "" }, { "name": "PROPERTY_HINT_TYPE_STRING", - "value": 23 + "value": 23, + "documentation": "If a property is [String], hints that the property represents a particular type (class). This allows to select a type from the create dialog. The property will store the selected type as a string.\nIf a property is [Array], hints the editor how to show elements. The [code]hint_string[/code] must encode nested types using [code]\":\"[/code] and [code]\"/\"[/code].\n[codeblocks]\n[gdscript]\n# Array of elem_type.\nhint_string = \"%d:\" % [elem_type]\nhint_string = \"%d/%d:%s\" % [elem_type, elem_hint, elem_hint_string]\n# Two-dimensional array of elem_type (array of arrays of elem_type).\nhint_string = \"%d:%d:\" % [TYPE_ARRAY, elem_type]\nhint_string = \"%d:%d/%d:%s\" % [TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]\n# Three-dimensional array of elem_type (array of arrays of arrays of elem_type).\nhint_string = \"%d:%d:%d:\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type]\nhint_string = \"%d:%d:%d/%d:%s\" % [TYPE_ARRAY, TYPE_ARRAY, elem_type, elem_hint, elem_hint_string]\n[/gdscript]\n[csharp]\n// Array of elemType.\nhintString = $\"{elemType:D}:\";\nhintString = $\"{elemType:}/{elemHint:D}:{elemHintString}\";\n// Two-dimensional array of elemType (array of arrays of elemType).\nhintString = $\"{Variant.Type.Array:D}:{elemType:D}:\";\nhintString = $\"{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}\";\n// Three-dimensional array of elemType (array of arrays of arrays of elemType).\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}:\";\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.Array:D}:{elemType:D}/{elemHint:D}:{elemHintString}\";\n[/csharp]\n[/codeblocks]\nExamples:\n[codeblocks]\n[gdscript]\nhint_string = \"%d:\" % [TYPE_INT] # Array of integers.\nhint_string = \"%d/%d:1,10,1\" % [TYPE_INT, PROPERTY_HINT_RANGE] # Array of integers (in range from 1 to 10).\nhint_string = \"%d/%d:Zero,One,Two\" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).\nhint_string = \"%d/%d:Zero,One,Three:3,Six:6\" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum).\nhint_string = \"%d/%d:*.png\" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths).\nhint_string = \"%d/%d:Texture2D\" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures.\n\nhint_string = \"%d:%d:\" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats.\nhint_string = \"%d:%d/%d:\" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings.\nhint_string = \"%d:%d/%d:-1,1,0.1\" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1).\nhint_string = \"%d:%d/%d:Texture2D\" % [TYPE_ARRAY, TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Two-dimensional array of textures.\n[/gdscript]\n[csharp]\nhintString = $\"{Variant.Type.Int:D}/{PropertyHint.Range:D}:1,10,1\"; // Array of integers (in range from 1 to 10).\nhintString = $\"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Two\"; // Array of integers (an enum).\nhintString = $\"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6\"; // Array of integers (an enum).\nhintString = $\"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png\"; // Array of strings (file paths).\nhintString = $\"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D\"; // Array of textures.\n\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}:\"; // Two-dimensional array of floats.\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:\"; // Two-dimensional array of multiline strings.\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1\"; // Two-dimensional array of floats (in range from -1 to 1).\nhintString = $\"{Variant.Type.Array:D}:{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D\"; // Two-dimensional array of textures.\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] The trailing colon is required for properly detecting built-in types." }, { "name": "PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE", - "value": 24 + "value": 24, + "documentation": "" }, { "name": "PROPERTY_HINT_OBJECT_TOO_BIG", - "value": 25 + "value": 25, + "documentation": "" }, { "name": "PROPERTY_HINT_NODE_PATH_VALID_TYPES", - "value": 26 + "value": 26, + "documentation": "" }, { "name": "PROPERTY_HINT_SAVE_FILE", - "value": 27 + "value": 27, + "documentation": "" }, { "name": "PROPERTY_HINT_GLOBAL_SAVE_FILE", - "value": 28 + "value": 28, + "documentation": "" }, { "name": "PROPERTY_HINT_INT_IS_OBJECTID", - "value": 29 + "value": 29, + "documentation": "" }, { "name": "PROPERTY_HINT_INT_IS_POINTER", - "value": 30 + "value": 30, + "documentation": "" }, { "name": "PROPERTY_HINT_ARRAY_TYPE", - "value": 31 + "value": 31, + "documentation": "" }, { "name": "PROPERTY_HINT_LOCALE_ID", - "value": 32 + "value": 32, + "documentation": "Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country." }, { "name": "PROPERTY_HINT_LOCALIZABLE_STRING", - "value": 33 + "value": 33, + "documentation": "Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings." }, { "name": "PROPERTY_HINT_NODE_TYPE", - "value": 34 + "value": 34, + "documentation": "" }, { "name": "PROPERTY_HINT_HIDE_QUATERNION_EDIT", - "value": 35 + "value": 35, + "documentation": "Hints that a quaternion property should disable the temporary euler editor." }, { "name": "PROPERTY_HINT_PASSWORD", - "value": 36 + "value": 36, + "documentation": "Hints that a string property is a password, and every character is replaced with the secret character." }, { "name": "PROPERTY_HINT_MAX", - "value": 38 + "value": 38, + "documentation": "Represents the size of the [enum PropertyHint] enum." } ] }, @@ -3609,131 +4005,163 @@ "values": [ { "name": "PROPERTY_USAGE_NONE", - "value": 0 + "value": 0, + "documentation": "The property is not stored, and does not display in the editor. This is the default for non-exported properties." }, { "name": "PROPERTY_USAGE_STORAGE", - "value": 2 + "value": 2, + "documentation": "The property is serialized and saved in the scene file (default)." }, { "name": "PROPERTY_USAGE_EDITOR", - "value": 4 + "value": 4, + "documentation": "The property is shown in the [EditorInspector] (default)." }, { "name": "PROPERTY_USAGE_INTERNAL", - "value": 8 + "value": 8, + "documentation": "The property is excluded from the class reference." }, { "name": "PROPERTY_USAGE_CHECKABLE", - "value": 16 + "value": 16, + "documentation": "The property can be checked in the [EditorInspector]." }, { "name": "PROPERTY_USAGE_CHECKED", - "value": 32 + "value": 32, + "documentation": "The property is checked in the [EditorInspector]." }, { "name": "PROPERTY_USAGE_GROUP", - "value": 64 + "value": 64, + "documentation": "Used to group properties together in the editor. See [EditorInspector]." }, { "name": "PROPERTY_USAGE_CATEGORY", - "value": 128 + "value": 128, + "documentation": "Used to categorize properties together in the editor." }, { "name": "PROPERTY_USAGE_SUBGROUP", - "value": 256 + "value": 256, + "documentation": "Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector]." }, { "name": "PROPERTY_USAGE_CLASS_IS_BITFIELD", - "value": 512 + "value": 512, + "documentation": "" }, { "name": "PROPERTY_USAGE_NO_INSTANCE_STATE", - "value": 1024 + "value": 1024, + "documentation": "The property does not save its state in [PackedScene]." }, { "name": "PROPERTY_USAGE_RESTART_IF_CHANGED", - "value": 2048 + "value": 2048, + "documentation": "Editing the property prompts the user for restarting the editor." }, { "name": "PROPERTY_USAGE_SCRIPT_VARIABLE", - "value": 4096 + "value": 4096, + "documentation": "The property is a script variable which should be serialized and saved in the scene file." }, { "name": "PROPERTY_USAGE_STORE_IF_NULL", - "value": 8192 + "value": 8192, + "documentation": "" }, { "name": "PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED", - "value": 16384 + "value": 16384, + "documentation": "" }, { "name": "PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE", - "value": 32768 + "value": 32768, + "documentation": "" }, { "name": "PROPERTY_USAGE_CLASS_IS_ENUM", - "value": 65536 + "value": 65536, + "documentation": "" }, { "name": "PROPERTY_USAGE_NIL_IS_VARIANT", - "value": 131072 + "value": 131072, + "documentation": "" }, { "name": "PROPERTY_USAGE_ARRAY", - "value": 262144 + "value": 262144, + "documentation": "The property is an array." }, { "name": "PROPERTY_USAGE_ALWAYS_DUPLICATE", - "value": 524288 + "value": 524288, + "documentation": "When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should always be duplicated, regardless of the [code]subresources[/code] bool parameter." }, { "name": "PROPERTY_USAGE_NEVER_DUPLICATE", - "value": 1048576 + "value": 1048576, + "documentation": "When duplicating a resource with [method Resource.duplicate], and this flag is set on a property of that resource, the property should never be duplicated, regardless of the [code]subresources[/code] bool parameter." }, { "name": "PROPERTY_USAGE_HIGH_END_GFX", - "value": 2097152 + "value": 2097152, + "documentation": "The property is only shown in the editor if modern renderers are supported (the Compatibility rendering method is excluded)." }, { "name": "PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT", - "value": 4194304 + "value": 4194304, + "documentation": "" }, { "name": "PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT", - "value": 8388608 + "value": 8388608, + "documentation": "" }, { "name": "PROPERTY_USAGE_KEYING_INCREMENTS", - "value": 16777216 + "value": 16777216, + "documentation": "" }, { "name": "PROPERTY_USAGE_DEFERRED_SET_RESOURCE", - "value": 33554432 + "value": 33554432, + "documentation": "" }, { "name": "PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT", - "value": 67108864 + "value": 67108864, + "documentation": "" }, { "name": "PROPERTY_USAGE_EDITOR_BASIC_SETTING", - "value": 134217728 + "value": 134217728, + "documentation": "" }, { "name": "PROPERTY_USAGE_READ_ONLY", - "value": 268435456 + "value": 268435456, + "documentation": "The property is read-only in the [EditorInspector]." }, { "name": "PROPERTY_USAGE_SECRET", - "value": 536870912 + "value": 536870912, + "documentation": "An export preset property with this flag contains confidential information and is stored separately from the rest of the export preset configuration." }, { "name": "PROPERTY_USAGE_DEFAULT", - "value": 6 + "value": 6, + "documentation": "Default usage (storage and editor)." }, { "name": "PROPERTY_USAGE_NO_EDITOR", - "value": 2 + "value": 2, + "documentation": "Default usage but without showing the property in the editor (storage)." } ] }, @@ -3743,35 +4171,43 @@ "values": [ { "name": "METHOD_FLAG_NORMAL", - "value": 1 + "value": 1, + "documentation": "Flag for a normal method." }, { "name": "METHOD_FLAG_EDITOR", - "value": 2 + "value": 2, + "documentation": "Flag for an editor method." }, { "name": "METHOD_FLAG_CONST", - "value": 4 + "value": 4, + "documentation": "Flag for a constant method." }, { "name": "METHOD_FLAG_VIRTUAL", - "value": 8 + "value": 8, + "documentation": "Flag for a virtual method." }, { "name": "METHOD_FLAG_VARARG", - "value": 16 + "value": 16, + "documentation": "Flag for a method with a variable number of arguments." }, { "name": "METHOD_FLAG_STATIC", - "value": 32 + "value": 32, + "documentation": "Flag for a static method." }, { "name": "METHOD_FLAG_OBJECT_CORE", - "value": 64 + "value": 64, + "documentation": "Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API." }, { "name": "METHOD_FLAGS_DEFAULT", - "value": 1 + "value": 1, + "documentation": "Default method flags (normal)." } ] }, @@ -3781,159 +4217,198 @@ "values": [ { "name": "TYPE_NIL", - "value": 0 + "value": 0, + "documentation": "Variable is [code]null[/code]." }, { "name": "TYPE_BOOL", - "value": 1 + "value": 1, + "documentation": "Variable is of type [bool]." }, { "name": "TYPE_INT", - "value": 2 + "value": 2, + "documentation": "Variable is of type [int]." }, { "name": "TYPE_FLOAT", - "value": 3 + "value": 3, + "documentation": "Variable is of type [float]." }, { "name": "TYPE_STRING", - "value": 4 + "value": 4, + "documentation": "Variable is of type [String]." }, { "name": "TYPE_VECTOR2", - "value": 5 + "value": 5, + "documentation": "Variable is of type [Vector2]." }, { "name": "TYPE_VECTOR2I", - "value": 6 + "value": 6, + "documentation": "Variable is of type [Vector2i]." }, { "name": "TYPE_RECT2", - "value": 7 + "value": 7, + "documentation": "Variable is of type [Rect2]." }, { "name": "TYPE_RECT2I", - "value": 8 + "value": 8, + "documentation": "Variable is of type [Rect2i]." }, { "name": "TYPE_VECTOR3", - "value": 9 + "value": 9, + "documentation": "Variable is of type [Vector3]." }, { "name": "TYPE_VECTOR3I", - "value": 10 + "value": 10, + "documentation": "Variable is of type [Vector3i]." }, { "name": "TYPE_TRANSFORM2D", - "value": 11 + "value": 11, + "documentation": "Variable is of type [Transform2D]." }, { "name": "TYPE_VECTOR4", - "value": 12 + "value": 12, + "documentation": "Variable is of type [Vector4]." }, { "name": "TYPE_VECTOR4I", - "value": 13 + "value": 13, + "documentation": "Variable is of type [Vector4i]." }, { "name": "TYPE_PLANE", - "value": 14 + "value": 14, + "documentation": "Variable is of type [Plane]." }, { "name": "TYPE_QUATERNION", - "value": 15 + "value": 15, + "documentation": "Variable is of type [Quaternion]." }, { "name": "TYPE_AABB", - "value": 16 + "value": 16, + "documentation": "Variable is of type [AABB]." }, { "name": "TYPE_BASIS", - "value": 17 + "value": 17, + "documentation": "Variable is of type [Basis]." }, { "name": "TYPE_TRANSFORM3D", - "value": 18 + "value": 18, + "documentation": "Variable is of type [Transform3D]." }, { "name": "TYPE_PROJECTION", - "value": 19 + "value": 19, + "documentation": "Variable is of type [Projection]." }, { "name": "TYPE_COLOR", - "value": 20 + "value": 20, + "documentation": "Variable is of type [Color]." }, { "name": "TYPE_STRING_NAME", - "value": 21 + "value": 21, + "documentation": "Variable is of type [StringName]." }, { "name": "TYPE_NODE_PATH", - "value": 22 + "value": 22, + "documentation": "Variable is of type [NodePath]." }, { "name": "TYPE_RID", - "value": 23 + "value": 23, + "documentation": "Variable is of type [RID]." }, { "name": "TYPE_OBJECT", - "value": 24 + "value": 24, + "documentation": "Variable is of type [Object]." }, { "name": "TYPE_CALLABLE", - "value": 25 + "value": 25, + "documentation": "Variable is of type [Callable]." }, { "name": "TYPE_SIGNAL", - "value": 26 + "value": 26, + "documentation": "Variable is of type [Signal]." }, { "name": "TYPE_DICTIONARY", - "value": 27 + "value": 27, + "documentation": "Variable is of type [Dictionary]." }, { "name": "TYPE_ARRAY", - "value": 28 + "value": 28, + "documentation": "Variable is of type [Array]." }, { "name": "TYPE_PACKED_BYTE_ARRAY", - "value": 29 + "value": 29, + "documentation": "Variable is of type [PackedByteArray]." }, { "name": "TYPE_PACKED_INT32_ARRAY", - "value": 30 + "value": 30, + "documentation": "Variable is of type [PackedInt32Array]." }, { "name": "TYPE_PACKED_INT64_ARRAY", - "value": 31 + "value": 31, + "documentation": "Variable is of type [PackedInt64Array]." }, { "name": "TYPE_PACKED_FLOAT32_ARRAY", - "value": 32 + "value": 32, + "documentation": "Variable is of type [PackedFloat32Array]." }, { "name": "TYPE_PACKED_FLOAT64_ARRAY", - "value": 33 + "value": 33, + "documentation": "Variable is of type [PackedFloat64Array]." }, { "name": "TYPE_PACKED_STRING_ARRAY", - "value": 34 + "value": 34, + "documentation": "Variable is of type [PackedStringArray]." }, { "name": "TYPE_PACKED_VECTOR2_ARRAY", - "value": 35 + "value": 35, + "documentation": "Variable is of type [PackedVector2Array]." }, { "name": "TYPE_PACKED_VECTOR3_ARRAY", - "value": 36 + "value": 36, + "documentation": "Variable is of type [PackedVector3Array]." }, { "name": "TYPE_PACKED_COLOR_ARRAY", - "value": 37 + "value": 37, + "documentation": "Variable is of type [PackedColorArray]." }, { "name": "TYPE_MAX", - "value": 38 + "value": 38, + "documentation": "Represents the size of the [enum Variant.Type] enum." } ] }, @@ -3943,107 +4418,133 @@ "values": [ { "name": "OP_EQUAL", - "value": 0 + "value": 0, + "documentation": "Equality operator ([code]==[/code])." }, { "name": "OP_NOT_EQUAL", - "value": 1 + "value": 1, + "documentation": "Inequality operator ([code]!=[/code])." }, { "name": "OP_LESS", - "value": 2 + "value": 2, + "documentation": "Less than operator ([code]<[/code])." }, { "name": "OP_LESS_EQUAL", - "value": 3 + "value": 3, + "documentation": "Less than or equal operator ([code]<=[/code])." }, { "name": "OP_GREATER", - "value": 4 + "value": 4, + "documentation": "Greater than operator ([code]>[/code])." }, { "name": "OP_GREATER_EQUAL", - "value": 5 + "value": 5, + "documentation": "Greater than or equal operator ([code]>=[/code])." }, { "name": "OP_ADD", - "value": 6 + "value": 6, + "documentation": "Addition operator ([code]+[/code])." }, { "name": "OP_SUBTRACT", - "value": 7 + "value": 7, + "documentation": "Subtraction operator ([code]-[/code])." }, { "name": "OP_MULTIPLY", - "value": 8 + "value": 8, + "documentation": "Multiplication operator ([code]*[/code])." }, { "name": "OP_DIVIDE", - "value": 9 + "value": 9, + "documentation": "Division operator ([code]/[/code])." }, { "name": "OP_NEGATE", - "value": 10 + "value": 10, + "documentation": "Unary negation operator ([code]-[/code])." }, { "name": "OP_POSITIVE", - "value": 11 + "value": 11, + "documentation": "Unary plus operator ([code]+[/code])." }, { "name": "OP_MODULE", - "value": 12 + "value": 12, + "documentation": "Remainder/modulo operator ([code]%[/code])." }, { "name": "OP_POWER", - "value": 13 + "value": 13, + "documentation": "Power operator ([code]**[/code])." }, { "name": "OP_SHIFT_LEFT", - "value": 14 + "value": 14, + "documentation": "Left shift operator ([code]<<[/code])." }, { "name": "OP_SHIFT_RIGHT", - "value": 15 + "value": 15, + "documentation": "Right shift operator ([code]>>[/code])." }, { "name": "OP_BIT_AND", - "value": 16 + "value": 16, + "documentation": "Bitwise AND operator ([code]&[/code])." }, { "name": "OP_BIT_OR", - "value": 17 + "value": 17, + "documentation": "Bitwise OR operator ([code]|[/code])." }, { "name": "OP_BIT_XOR", - "value": 18 + "value": 18, + "documentation": "Bitwise XOR operator ([code]^[/code])." }, { "name": "OP_BIT_NEGATE", - "value": 19 + "value": 19, + "documentation": "Bitwise NOT operator ([code]~[/code])." }, { "name": "OP_AND", - "value": 20 + "value": 20, + "documentation": "Logical AND operator ([code]and[/code] or [code]&&[/code])." }, { "name": "OP_OR", - "value": 21 + "value": 21, + "documentation": "Logical OR operator ([code]or[/code] or [code]||[/code])." }, { "name": "OP_XOR", - "value": 22 + "value": 22, + "documentation": "Logical XOR operator (not implemented in GDScript)." }, { "name": "OP_NOT", - "value": 23 + "value": 23, + "documentation": "Logical NOT operator ([code]not[/code] or [code]![/code])." }, { "name": "OP_IN", - "value": 24 + "value": 24, + "documentation": "Logical IN operator ([code]in[/code])." }, { "name": "OP_MAX", - "value": 25 + "value": 25, + "documentation": "Represents the size of the [enum Variant.Operator] enum." } ] } @@ -4060,7 +4561,8 @@ "name": "angle_rad", "type": "float" } - ] + ], + "documentation": "Returns the sine of angle [param angle_rad] in radians.\n[codeblock]\nsin(0.523599) # Returns 0.5\nsin(deg_to_rad(90)) # Returns 1.0\n[/codeblock]" }, { "name": "cos", @@ -4073,7 +4575,8 @@ "name": "angle_rad", "type": "float" } - ] + ], + "documentation": "Returns the cosine of angle [param angle_rad] in radians.\n[codeblock]\ncos(PI * 2) # Returns 1.0\ncos(PI) # Returns -1.0\ncos(deg_to_rad(90)) # Returns 0.0\n[/codeblock]" }, { "name": "tan", @@ -4086,7 +4589,8 @@ "name": "angle_rad", "type": "float" } - ] + ], + "documentation": "Returns the tangent of angle [param angle_rad] in radians.\n[codeblock]\ntan(deg_to_rad(45)) # Returns 1\n[/codeblock]" }, { "name": "sinh", @@ -4099,7 +4603,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic sine of [param x].\n[codeblock]\nvar a = log(2.0) # Returns 0.693147\nsinh(a) # Returns 0.75\n[/codeblock]" }, { "name": "cosh", @@ -4112,7 +4617,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic cosine of [param x] in radians.\n[codeblock]\nprint(cosh(1)) # Prints 1.543081\n[/codeblock]" }, { "name": "tanh", @@ -4125,7 +4631,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic tangent of [param x].\n[codeblock]\nvar a = log(2.0) # Returns 0.693147\ntanh(a) # Returns 0.6\n[/codeblock]" }, { "name": "asin", @@ -4138,7 +4645,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method asin] from returning [constant @GDScript.NAN].\n[codeblock]\n# s is 0.523599 or 30 degrees if converted with rad_to_deg(s)\nvar s = asin(0.5)\n[/codeblock]" }, { "name": "acos", @@ -4151,7 +4659,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method acos] from returning [constant @GDScript.NAN].\n[codeblock]\n# c is 0.523599 or 30 degrees if converted with rad_to_deg(c)\nvar c = acos(0.866025)\n[/codeblock]" }, { "name": "atan", @@ -4164,7 +4673,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry.\nThe method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code skip-lint]x[/code].\n[codeblock]\nvar a = atan(0.5) # a is 0.463648\n[/codeblock]\nIf [param x] is between [code]-PI / 2[/code] and [code]PI / 2[/code] (inclusive), [code]atan(tan(x))[/code] is equal to [param x]." }, { "name": "atan2", @@ -4181,7 +4691,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant.\nImportant note: The Y coordinate comes first, by convention.\n[codeblock]\nvar a = atan2(0, -1) # a is 3.141593\n[/codeblock]" }, { "name": "asinh", @@ -4194,7 +4705,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic arc (also called inverse) sine of [param x], returning a value in radians. Use it to get the angle from an angle's sine in hyperbolic space.\n[codeblock]\nvar a = asinh(0.9) # Returns 0.8088669356527824\nsinh(a) # Returns 0.9\n[/codeblock]" }, { "name": "acosh", @@ -4207,7 +4719,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic arc (also called inverse) cosine of [param x], returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if [param x] is larger or equal to 1. For values of [param x] lower than 1, it will return 0, in order to prevent [method acosh] from returning [constant @GDScript.NAN].\n[codeblock]\nvar a = acosh(2) # Returns 1.31695789692482\ncosh(a) # Returns 2\n\nvar b = acosh(-1) # Returns 0\n[/codeblock]" }, { "name": "atanh", @@ -4220,7 +4733,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the hyperbolic arc (also called inverse) tangent of [param x], returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if [param x] is between -1 and 1 (non-inclusive).\nIn mathematics, the inverse hyperbolic tangent is only defined for -1 < [param x] < 1 in the real set, so values equal or lower to -1 for [param x] return negative [constant @GDScript.INF] and values equal or higher than 1 return positive [constant @GDScript.INF] in order to prevent [method atanh] from returning [constant @GDScript.NAN].\n[codeblock]\nvar a = atanh(0.9) # Returns 1.47221948958322\ntanh(a) # Returns 0.9\n\nvar b = atanh(-2) # Returns -inf\ntanh(b) # Returns -1\n[/codeblock]" }, { "name": "sqrt", @@ -4233,7 +4747,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the square root of [param x], where [param x] is a non-negative number.\n[codeblock]\nsqrt(9) # Returns 3\nsqrt(10.24) # Returns 3.2\nsqrt(-1) # Returns NaN\n[/codeblock]\n[b]Note:[/b] Negative values of [param x] return NaN (\"Not a Number\"). in C#, if you need negative inputs, use [code]System.Numerics.Complex[/code]." }, { "name": "fmod", @@ -4250,7 +4765,8 @@ "name": "y", "type": "float" } - ] + ], + "documentation": "Returns the floating-point remainder of [param x] divided by [param y], keeping the sign of [param x].\n[codeblock]\nvar remainder = fmod(7, 5.5) # remainder is 1.5\n[/codeblock]\nFor the integer remainder operation, use the [code]%[/code] operator." }, { "name": "fposmod", @@ -4267,7 +4783,8 @@ "name": "y", "type": "float" } - ] + ], + "documentation": "Returns the floating-point modulus of [param x] divided by [param y], wrapping equally in positive and negative.\n[codeblock]\nprint(\" (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\")\nfor i in 7:\n var x = i * 0.5 - 1.5\n print(\"%4.1f %4.1f | %4.1f\" % [x, fmod(x, 1.5), fposmod(x, 1.5)])\n[/codeblock]\nProduces:\n[codeblock]\n (x) (fmod(x, 1.5)) (fposmod(x, 1.5))\n-1.5 -0.0 | 0.0\n-1.0 -1.0 | 0.5\n-0.5 -0.5 | 1.0\n 0.0 0.0 | 0.0\n 0.5 0.5 | 0.5\n 1.0 1.0 | 1.0\n 1.5 0.0 | 0.0\n[/codeblock]" }, { "name": "posmod", @@ -4284,7 +4801,8 @@ "name": "y", "type": "int" } - ] + ], + "documentation": "Returns the integer modulus of [param x] divided by [param y] that wraps equally in positive and negative.\n[codeblock]\nprint(\"#(i) (i % 3) (posmod(i, 3))\")\nfor i in range(-3, 4):\n print(\"%2d %2d | %2d\" % [i, i % 3, posmod(i, 3)])\n[/codeblock]\nProduces:\n[codeblock]\n(i) (i % 3) (posmod(i, 3))\n-3 0 | 0\n-2 -2 | 1\n-1 -1 | 2\n 0 0 | 0\n 1 1 | 1\n 2 2 | 2\n 3 0 | 0\n[/codeblock]" }, { "name": "floor", @@ -4297,7 +4815,8 @@ "name": "x", "type": "Variant" } - ] + ], + "documentation": "Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].\n[codeblock]\nvar a = floor(2.99) # a is 2.0\na = floor(-2.99) # a is -3.0\n[/codeblock]\nSee also [method ceil], [method round], and [method snapped].\n[b]Note:[/b] For better type safety, use [method floorf], [method floori], [method Vector2.floor], [method Vector3.floor], or [method Vector4.floor]." }, { "name": "floorf", @@ -4310,7 +4829,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].\nA type-safe version of [method floor], returning a [float]." }, { "name": "floori", @@ -4323,7 +4843,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] downward (towards negative infinity), returning the largest whole number that is not more than [param x].\nA type-safe version of [method floor], returning an [int].\n[b]Note:[/b] This function is [i]not[/i] the same as [code]int(x)[/code], which rounds towards 0." }, { "name": "ceil", @@ -4336,7 +4857,8 @@ "name": "x", "type": "Variant" } - ] + ], + "documentation": "Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x]. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].\n[codeblock]\nvar i = ceil(1.45) # i is 2.0\ni = ceil(1.001) # i is 2.0\n[/codeblock]\nSee also [method floor], [method round], and [method snapped].\n[b]Note:[/b] For better type safety, use [method ceilf], [method ceili], [method Vector2.ceil], [method Vector3.ceil], or [method Vector4.ceil]." }, { "name": "ceilf", @@ -4349,7 +4871,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].\nA type-safe version of [method ceil], returning a [float]." }, { "name": "ceili", @@ -4362,7 +4885,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] upward (towards positive infinity), returning the smallest whole number that is not less than [param x].\nA type-safe version of [method ceil], returning an [int]." }, { "name": "round", @@ -4375,7 +4899,8 @@ "name": "x", "type": "Variant" } - ] + ], + "documentation": "Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0. Supported types: [int], [float], [Vector2], [Vector3], [Vector4].\n[codeblock]\nround(2.4) # Returns 2\nround(2.5) # Returns 3\nround(2.6) # Returns 3\n[/codeblock]\nSee also [method floor], [method ceil], and [method snapped].\n[b]Note:[/b] For better type safety, use [method roundf], [method roundi], [method Vector2.round], [method Vector3.round], or [method Vector4.round]." }, { "name": "roundf", @@ -4388,7 +4913,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.\nA type-safe version of [method round], returning a [float]." }, { "name": "roundi", @@ -4401,7 +4927,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Rounds [param x] to the nearest whole number, with halfway cases rounded away from 0.\nA type-safe version of [method round], returning an [int]." }, { "name": "abs", @@ -4414,7 +4941,8 @@ "name": "x", "type": "Variant" } - ] + ], + "documentation": "Returns the absolute value of a [Variant] parameter [param x] (i.e. non-negative value). Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].\n[codeblock]\nvar a = abs(-1)\n# a is 1\n\nvar b = abs(-1.2)\n# b is 1.2\n\nvar c = abs(Vector2(-3.5, -4))\n# c is (3.5, 4)\n\nvar d = abs(Vector2i(-5, -6))\n# d is (5, 6)\n\nvar e = abs(Vector3(-7, 8.5, -3.8))\n# e is (7, 8.5, 3.8)\n\nvar f = abs(Vector3i(-7, -8, -9))\n# f is (7, 8, 9)\n[/codeblock]\n[b]Note:[/b] For better type safety, use [method absf], [method absi], [method Vector2.abs], [method Vector2i.abs], [method Vector3.abs], [method Vector3i.abs], [method Vector4.abs], or [method Vector4i.abs]." }, { "name": "absf", @@ -4427,7 +4955,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the absolute value of float parameter [param x] (i.e. positive value).\n[codeblock]\n# a is 1.2\nvar a = absf(-1.2)\n[/codeblock]" }, { "name": "absi", @@ -4440,7 +4969,8 @@ "name": "x", "type": "int" } - ] + ], + "documentation": "Returns the absolute value of int parameter [param x] (i.e. positive value).\n[codeblock]\n# a is 1\nvar a = absi(-1)\n[/codeblock]" }, { "name": "sign", @@ -4453,7 +4983,8 @@ "name": "x", "type": "Variant" } - ] + ], + "documentation": "Returns the same type of [Variant] as [param x], with [code]-1[/code] for negative values, [code]1[/code] for positive values, and [code]0[/code] for zeros. For [code]nan[/code] values it returns 0.\nSupported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].\n[codeblock]\nsign(-6.0) # Returns -1\nsign(0.0) # Returns 0\nsign(6.0) # Returns 1\nsign(NAN) # Returns 0\n\nsign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1)\n[/codeblock]\n[b]Note:[/b] For better type safety, use [method signf], [method signi], [method Vector2.sign], [method Vector2i.sign], [method Vector3.sign], [method Vector3i.sign], [method Vector4.sign], or [method Vector4i.sign]." }, { "name": "signf", @@ -4466,7 +4997,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns [code]-1.0[/code] if [param x] is negative, [code]1.0[/code] if [param x] is positive, and [code]0.0[/code] if [param x] is zero. For [code]nan[/code] values of [param x] it returns 0.0.\n[codeblock]\nsignf(-6.5) # Returns -1.0\nsignf(0.0) # Returns 0.0\nsignf(6.5) # Returns 1.0\nsignf(NAN) # Returns 0.0\n[/codeblock]" }, { "name": "signi", @@ -4479,7 +5011,8 @@ "name": "x", "type": "int" } - ] + ], + "documentation": "Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if if [param x] is zero.\n[codeblock]\nsigni(-6) # Returns -1\nsigni(0) # Returns 0\nsigni(6) # Returns 1\n[/codeblock]" }, { "name": "snapped", @@ -4496,7 +5029,8 @@ "name": "step", "type": "Variant" } - ] + ], + "documentation": "Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.\nThe returned value is the same type of [Variant] as [param step]. Supported types: [int], [float], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i].\n[codeblock]\nsnapped(100, 32) # Returns 96\nsnapped(3.14159, 0.01) # Returns 3.14\n\nsnapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72)\n[/codeblock]\nSee also [method ceil], [method floor], and [method round].\n[b]Note:[/b] For better type safety, use [method snappedf], [method snappedi], [method Vector2.snapped], [method Vector2i.snapped], [method Vector3.snapped], [method Vector3i.snapped], [method Vector4.snapped], or [method Vector4i.snapped]." }, { "name": "snappedf", @@ -4513,7 +5047,8 @@ "name": "step", "type": "float" } - ] + ], + "documentation": "Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.\nA type-safe version of [method snapped], returning a [float].\n[codeblock]\nsnappedf(32.0, 2.5) # Returns 32.5\nsnappedf(3.14159, 0.01) # Returns 3.14\n[/codeblock]" }, { "name": "snappedi", @@ -4530,7 +5065,8 @@ "name": "step", "type": "int" } - ] + ], + "documentation": "Returns the multiple of [param step] that is the closest to [param x].\nA type-safe version of [method snapped], returning an [int].\n[codeblock]\nsnappedi(53, 16) # Returns 48\nsnappedi(4096, 100) # Returns 4100\n[/codeblock]" }, { "name": "pow", @@ -4547,7 +5083,8 @@ "name": "exp", "type": "float" } - ] + ], + "documentation": "Returns the result of [param base] raised to the power of [param exp].\nIn GDScript, this is the equivalent of the [code]**[/code] operator.\n[codeblock]\npow(2, 5) # Returns 32.0\npow(4, 1.5) # Returns 8.0\n[/codeblock]" }, { "name": "log", @@ -4560,7 +5097,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.\n[b]Note:[/b] This is not the same as the \"log\" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use [code]log(x) / log(10)[/code].\n[codeblock]\nlog(10) # Returns 2.302585\n[/codeblock]\n[b]Note:[/b] The logarithm of [code]0[/code] returns [code]-inf[/code], while negative values return [code]-nan[/code]." }, { "name": "exp", @@ -4573,7 +5111,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "The natural exponential function. It raises the mathematical constant [i]e[/i] to the power of [param x] and returns it.\n[i]e[/i] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code].\nFor exponents to other bases use the method [method pow].\n[codeblock]\nvar a = exp(2) # Approximately 7.39\n[/codeblock]" }, { "name": "is_nan", @@ -4586,7 +5125,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if [param x] is a NaN (\"Not a Number\" or invalid) value." }, { "name": "is_inf", @@ -4599,7 +5139,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if [param x] is either positive infinity or negative infinity." }, { "name": "is_equal_approx", @@ -4616,7 +5157,8 @@ "name": "b", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if [param a] and [param b] are approximately equal to each other.\nHere, \"approximately equal\" means that [param a] and [param b] are within a small internal epsilon of each other, which scales with the magnitude of the numbers.\nInfinity values of the same sign are considered equal." }, { "name": "is_zero_approx", @@ -4629,7 +5171,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if [param x] is zero or almost zero. The comparison is done using a tolerance calculation with a small internal epsilon.\nThis function is faster than using [method is_equal_approx] with one value as zero." }, { "name": "is_finite", @@ -4642,7 +5185,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns whether [param x] is a finite value, i.e. it is not [constant @GDScript.NAN], positive infinity, or negative infinity." }, { "name": "ease", @@ -4659,7 +5203,8 @@ "name": "curve", "type": "float" } - ] + ], + "documentation": "Returns an \"eased\" value of [param x] based on an easing function defined with [param curve]. This easing function is based on an exponent. The [param curve] can be any floating-point number, with specific values leading to the following behaviors:\n[codeblock]\n- Lower than -1.0 (exclusive): Ease in-out\n- 1.0: Linear\n- Between -1.0 and 0.0 (exclusive): Ease out-in\n- 0.0: Constant\n- Between 0.0 to 1.0 (exclusive): Ease out\n- 1.0: Linear\n- Greater than 1.0 (exclusive): Ease in\n[/codeblock]\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]\nSee also [method smoothstep]. If you need to perform more advanced transitions, use [method Tween.interpolate_value]." }, { "name": "step_decimals", @@ -4672,7 +5217,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation.\n[codeblock]\nvar n = step_decimals(5) # n is 0\nn = step_decimals(1.0005) # n is 4\nn = step_decimals(0.000000005) # n is 9\n[/codeblock]" }, { "name": "lerp", @@ -4693,7 +5239,8 @@ "name": "weight", "type": "Variant" } - ] + ], + "documentation": "Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clamp] on the result of this function.\nBoth [param from] and [param to] must be the same type. Supported types: [int], [float], [Vector2], [Vector3], [Vector4], [Color], [Quaternion], [Basis].\n[codeblock]\nlerp(0, 4, 0.75) # Returns 3.0\n[/codeblock]\nSee also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]. See also [method remap] to map a continuous series of values to another.\n[b]Note:[/b] For better type safety, use [method lerpf], [method Vector2.lerp], [method Vector3.lerp], [method Vector4.lerp], [method Color.lerp], [method Quaternion.slerp] or [method Basis.slerp]." }, { "name": "lerpf", @@ -4714,7 +5261,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.\n[codeblock]\nlerpf(0, 4, 0.75) # Returns 3.0\n[/codeblock]\nSee also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep]." }, { "name": "cubic_interpolate", @@ -4743,7 +5291,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values." }, { "name": "cubic_interpolate_angle", @@ -4772,7 +5321,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle]." }, { "name": "cubic_interpolate_in_time", @@ -4813,7 +5363,8 @@ "name": "post_t", "type": "float" } - ] + ], + "documentation": "Cubic interpolates between two values by the factor defined in [param weight] with [param pre] and [param post] values.\nIt can perform smoother interpolation than [method cubic_interpolate] by the time values." }, { "name": "cubic_interpolate_angle_in_time", @@ -4854,7 +5405,8 @@ "name": "post_t", "type": "float" } - ] + ], + "documentation": "Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].\nIt can perform smoother interpolation than [method cubic_interpolate] by the time values." }, { "name": "bezier_interpolate", @@ -4883,7 +5435,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the point at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points." }, { "name": "bezier_derivative", @@ -4912,7 +5465,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the derivative at the given [param t] on a one-dimensional [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by the given [param control_1], [param control_2], and [param end] points." }, { "name": "angle_difference", @@ -4929,7 +5483,8 @@ "name": "to", "type": "float" } - ] + ], + "documentation": "Returns the difference between the two angles, in the range of [code][-PI, +PI][/code]. When [param from] and [param to] are opposite, returns [code]-PI[/code] if [param from] is smaller than [param to], or [code]PI[/code] otherwise." }, { "name": "lerp_angle", @@ -4950,7 +5505,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Linearly interpolates between two angles (in radians) by a [param weight] value between 0.0 and 1.0.\nSimilar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. To perform eased interpolation with [method lerp_angle], combine it with [method ease] or [method smoothstep].\n[codeblock]\nextends Sprite\nvar elapsed = 0.0\nfunc _process(delta):\n var min_angle = deg_to_rad(0.0)\n var max_angle = deg_to_rad(90.0)\n rotation = lerp_angle(min_angle, max_angle, elapsed)\n elapsed += delta\n[/codeblock]\n[b]Note:[/b] This function lerps through the shortest path between [param from] and [param to]. However, when these two angles are approximately [code]PI + k * TAU[/code] apart for any integer [code]k[/code], it's not obvious which way they lerp due to floating-point precision errors. For example, [code]lerp_angle(0, PI, weight)[/code] lerps counter-clockwise, while [code]lerp_angle(0, PI + 5 * TAU, weight)[/code] lerps clockwise." }, { "name": "inverse_lerp", @@ -4971,7 +5527,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns an interpolation or extrapolation factor considering the range specified in [param from] and [param to], and the interpolated value specified in [param weight]. The returned value will be between [code]0.0[/code] and [code]1.0[/code] if [param weight] is between [param from] and [param to] (inclusive). If [param weight] is located outside this range, then an extrapolation factor will be returned (return value lower than [code]0.0[/code] or greater than [code]1.0[/code]). Use [method clamp] on the result of [method inverse_lerp] if this is not desired.\n[codeblock]\n# The interpolation ratio in the `lerp()` call below is 0.75.\nvar middle = lerp(20, 30, 0.75)\n# middle is now 27.5.\n\n# Now, we pretend to have forgotten the original ratio and want to get it back.\nvar ratio = inverse_lerp(20, 30, 27.5)\n# ratio is now 0.75.\n[/codeblock]\nSee also [method lerp], which performs the reverse of this operation, and [method remap] to map a continuous series of values to another." }, { "name": "remap", @@ -5000,7 +5557,8 @@ "name": "ostop", "type": "float" } - ] + ], + "documentation": "Maps a [param value] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. See also [method lerp] and [method inverse_lerp]. If [param value] is outside [code][istart, istop][/code], then the resulting value will also be outside [code][ostart, ostop][/code]. If this is not desired, use [method clamp] on the result of this function.\n[codeblock]\nremap(75, 0, 100, -1, 1) # Returns 0.5\n[/codeblock]\nFor complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead." }, { "name": "smoothstep", @@ -5021,7 +5579,8 @@ "name": "x", "type": "float" } - ] + ], + "documentation": "Returns the result of smoothly interpolating the value of [param x] between [code]0[/code] and [code]1[/code], based on the where [param x] lies with respect to the edges [param from] and [param to].\nThe return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [param x] lies between [param from] and [param to], the returned value follows an S-shaped curve that maps [param x] between [code]0[/code] and [code]1[/code].\nThis S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code].\n[codeblock]\nsmoothstep(0, 2, -5.0) # Returns 0.0\nsmoothstep(0, 2, 0.5) # Returns 0.15625\nsmoothstep(0, 2, 1.0) # Returns 0.5\nsmoothstep(0, 2, 2.0) # Returns 1.0\n[/codeblock]\nCompared to [method ease] with a curve value of [code]-1.6521[/code], [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]" }, { "name": "move_toward", @@ -5042,7 +5601,8 @@ "name": "delta", "type": "float" } - ] + ], + "documentation": "Moves [param from] toward [param to] by the [param delta] amount. Will not go past [param to].\nUse a negative [param delta] value to move away.\n[codeblock]\nmove_toward(5, 10, 4) # Returns 9\nmove_toward(10, 5, 4) # Returns 6\nmove_toward(5, 10, 9) # Returns 10\nmove_toward(10, 5, -1.5) # Returns 11.5\n[/codeblock]" }, { "name": "rotate_toward", @@ -5063,7 +5623,8 @@ "name": "delta", "type": "float" } - ] + ], + "documentation": "Rotates [param from] toward [param to] by the [param delta] amount. Will not go past [param to].\nSimilar to [method move_toward], but interpolates correctly when the angles wrap around [constant @GDScript.TAU].\nIf [param delta] is negative, this function will rotate away from [param to], toward the opposite angle, and will not go past the opposite angle." }, { "name": "deg_to_rad", @@ -5076,7 +5637,8 @@ "name": "deg", "type": "float" } - ] + ], + "documentation": "Converts an angle expressed in degrees to radians.\n[codeblock]\nvar r = deg_to_rad(180) # r is 3.141593\n[/codeblock]" }, { "name": "rad_to_deg", @@ -5089,7 +5651,8 @@ "name": "rad", "type": "float" } - ] + ], + "documentation": "Converts an angle expressed in radians to degrees.\n[codeblock]\nrad_to_deg(0.523599) # Returns 30\nrad_to_deg(PI) # Returns 180\nrad_to_deg(PI * 2) # Returns 360\n[/codeblock]" }, { "name": "linear_to_db", @@ -5102,7 +5665,8 @@ "name": "lin", "type": "float" } - ] + ], + "documentation": "Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear).\n[b]Example:[/b]\n[codeblock]\n# \"Slider\" refers to a node that inherits Range such as HSlider or VSlider.\n# Its range must be configured to go from 0 to 1.\n# Change the bus name if you'd like to change the volume of a specific bus only.\nAudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Master\"), linear_to_db($Slider.value))\n[/codeblock]" }, { "name": "db_to_linear", @@ -5115,7 +5679,8 @@ "name": "db", "type": "float" } - ] + ], + "documentation": "Converts from decibels to linear energy (audio)." }, { "name": "wrap", @@ -5136,7 +5701,8 @@ "name": "max", "type": "Variant" } - ] + ], + "documentation": "Wraps the [Variant] [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.\nVariant types [int] and [float] are supported. If any of the arguments is [float] this function returns a [float], otherwise it returns an [int].\n[codeblock]\nvar a = wrap(4, 5, 10)\n# a is 9 (int)\n\nvar a = wrap(7, 5, 10)\n# a is 7 (int)\n\nvar a = wrap(10.5, 5, 10)\n# a is 5.5 (float)\n[/codeblock]" }, { "name": "wrapi", @@ -5157,7 +5723,8 @@ "name": "max", "type": "int" } - ] + ], + "documentation": "Wraps the integer [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.\n[codeblock]\n# Infinite loop between 5 and 9\nframe = wrapi(frame + 1, 5, 10)\n[/codeblock]\n[codeblock]\n# result is -2\nvar result = wrapi(-6, -5, -1)\n[/codeblock]" }, { "name": "wrapf", @@ -5178,7 +5745,8 @@ "name": "max", "type": "float" } - ] + ], + "documentation": "Wraps the float [param value] between [param min] and [param max]. Can be used for creating loop-alike behavior or infinite surfaces.\n[codeblock]\n# Infinite loop between 5.0 and 9.9\nvalue = wrapf(value + 0.1, 5.0, 10.0)\n[/codeblock]\n[codeblock]\n# Infinite rotation (in radians)\nangle = wrapf(angle + 0.1, 0.0, TAU)\n[/codeblock]\n[codeblock]\n# Infinite rotation (in radians)\nangle = wrapf(angle + 0.1, -PI, PI)\n[/codeblock]\n[b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.\n[method wrapf] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value." }, { "name": "max", @@ -5195,7 +5763,8 @@ "name": "arg2", "type": "Variant" } - ] + ], + "documentation": "Returns the maximum of the given numeric values. This function can take any number of arguments.\n[codeblock]\nmax(1, 7, 3, -6, 5) # Returns 7\n[/codeblock]" }, { "name": "maxi", @@ -5212,7 +5781,8 @@ "name": "b", "type": "int" } - ] + ], + "documentation": "Returns the maximum of two [int] values.\n[codeblock]\nmaxi(1, 2) # Returns 2\nmaxi(-3, -4) # Returns -3\n[/codeblock]" }, { "name": "maxf", @@ -5229,7 +5799,8 @@ "name": "b", "type": "float" } - ] + ], + "documentation": "Returns the maximum of two [float] values.\n[codeblock]\nmaxf(3.6, 24) # Returns 24.0\nmaxf(-3.99, -4) # Returns -3.99\n[/codeblock]" }, { "name": "min", @@ -5246,7 +5817,8 @@ "name": "arg2", "type": "Variant" } - ] + ], + "documentation": "Returns the minimum of the given numeric values. This function can take any number of arguments.\n[codeblock]\nmin(1, 7, 3, -6, 5) # Returns -6\n[/codeblock]" }, { "name": "mini", @@ -5263,7 +5835,8 @@ "name": "b", "type": "int" } - ] + ], + "documentation": "Returns the minimum of two [int] values.\n[codeblock]\nmini(1, 2) # Returns 1\nmini(-3, -4) # Returns -4\n[/codeblock]" }, { "name": "minf", @@ -5280,7 +5853,8 @@ "name": "b", "type": "float" } - ] + ], + "documentation": "Returns the minimum of two [float] values.\n[codeblock]\nminf(3.6, 24) # Returns 3.6\nminf(-3.99, -4) # Returns -4.0\n[/codeblock]" }, { "name": "clamp", @@ -5301,7 +5875,8 @@ "name": "max", "type": "Variant" } - ] + ], + "documentation": "Clamps the [param value], returning a [Variant] not less than [param min] and not more than [param max]. Any values that can be compared with the less than and greater than operators will work.\n[codeblock]\nvar a = clamp(-10, -1, 5)\n# a is -1\n\nvar b = clamp(8.1, 0.9, 5.5)\n# b is 5.5\n\nvar c = clamp(Vector2(-3.5, -4), Vector2(-3.2, -2), Vector2(2, 6.5))\n# c is (-3.2, -2)\n\nvar d = clamp(Vector2i(7, 8), Vector2i(-3, -2), Vector2i(2, 6))\n# d is (2, 6)\n\nvar e = clamp(Vector3(-7, 8.5, -3.8), Vector3(-3, -2, 5.4), Vector3(-2, 6, -4.1))\n# e is (-3, -2, 5.4)\n\nvar f = clamp(Vector3i(-7, -8, -9), Vector3i(-1, 2, 3), Vector3i(-4, -5, -6))\n# f is (-4, -5, -6)\n[/codeblock]\n[b]Note:[/b] For better type safety, use [method clampf], [method clampi], [method Vector2.clamp], [method Vector2i.clamp], [method Vector3.clamp], [method Vector3i.clamp], [method Vector4.clamp], [method Vector4i.clamp], or [method Color.clamp]." }, { "name": "clampi", @@ -5322,7 +5897,8 @@ "name": "max", "type": "int" } - ] + ], + "documentation": "Clamps the [param value], returning an [int] not less than [param min] and not more than [param max].\n[codeblock]\nvar speed = 42\nvar a = clampi(speed, 1, 20) # a is 20\n\nspeed = -10\nvar b = clampi(speed, -1, 1) # b is -1\n[/codeblock]" }, { "name": "clampf", @@ -5343,7 +5919,8 @@ "name": "max", "type": "float" } - ] + ], + "documentation": "Clamps the [param value], returning a [float] not less than [param min] and not more than [param max].\n[codeblock]\nvar speed = 42.1\nvar a = clampf(speed, 1.0, 20.5) # a is 20.5\n\nspeed = -10.0\nvar b = clampf(speed, -1.0, 1.0) # b is -1.0\n[/codeblock]" }, { "name": "nearest_po2", @@ -5356,7 +5933,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns the smallest integer power of 2 that is greater than or equal to [param value].\n[codeblock]\nnearest_po2(3) # Returns 4\nnearest_po2(4) # Returns 4\nnearest_po2(5) # Returns 8\n\nnearest_po2(0) # Returns 0 (this may not be expected)\nnearest_po2(-1) # Returns 0 (this may not be expected)\n[/codeblock]\n[b]Warning:[/b] Due to its implementation, this method returns [code]0[/code] rather than [code]1[/code] for values less than or equal to [code]0[/code], with an exception for [param value] being the smallest negative 64-bit integer ([code]-9223372036854775808[/code]) in which case the [param value] is returned unchanged." }, { "name": "pingpong", @@ -5373,27 +5951,31 @@ "name": "length", "type": "float" } - ] + ], + "documentation": "Wraps [param value] between [code]0[/code] and the [param length]. If the limit is reached, the next value the function returns is decreased to the [code]0[/code] side or increased to the [param length] side (like a triangle wave). If [param length] is less than zero, it becomes positive.\n[codeblock]\npingpong(-3.0, 3.0) # Returns 3.0\npingpong(-2.0, 3.0) # Returns 2.0\npingpong(-1.0, 3.0) # Returns 1.0\npingpong(0.0, 3.0) # Returns 0.0\npingpong(1.0, 3.0) # Returns 1.0\npingpong(2.0, 3.0) # Returns 2.0\npingpong(3.0, 3.0) # Returns 3.0\npingpong(4.0, 3.0) # Returns 2.0\npingpong(5.0, 3.0) # Returns 1.0\npingpong(6.0, 3.0) # Returns 0.0\n[/codeblock]" }, { "name": "randomize", "category": "random", "is_vararg": false, - "hash": 1691721052 + "hash": 1691721052, + "documentation": "Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time.\n[b]Note:[/b] This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use [method seed] to initialize the random number generator." }, { "name": "randi", "return_type": "int", "category": "random", "is_vararg": false, - "hash": 701202648 + "hash": 701202648, + "documentation": "Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32).\n[codeblocks]\n[gdscript]\nrandi() # Returns random integer between 0 and 2^32 - 1\nrandi() % 20 # Returns random integer between 0 and 19\nrandi() % 100 # Returns random integer between 0 and 99\nrandi() % 100 + 1 # Returns random integer between 1 and 100\n[/gdscript]\n[csharp]\nGD.Randi(); // Returns random integer between 0 and 2^32 - 1\nGD.Randi() % 20; // Returns random integer between 0 and 19\nGD.Randi() % 100; // Returns random integer between 0 and 99\nGD.Randi() % 100 + 1; // Returns random integer between 1 and 100\n[/csharp]\n[/codeblocks]" }, { "name": "randf", "return_type": "float", "category": "random", "is_vararg": false, - "hash": 2086227845 + "hash": 2086227845, + "documentation": "Returns a random floating point value between [code]0.0[/code] and [code]1.0[/code] (inclusive).\n[codeblocks]\n[gdscript]\nrandf() # Returns e.g. 0.375671\n[/gdscript]\n[csharp]\nGD.Randf(); // Returns e.g. 0.375671\n[/csharp]\n[/codeblocks]" }, { "name": "randi_range", @@ -5410,7 +5992,8 @@ "name": "to", "type": "int" } - ] + ], + "documentation": "Returns a random signed 32-bit integer between [param from] and [param to] (inclusive). If [param to] is lesser than [param from], they are swapped.\n[codeblocks]\n[gdscript]\nrandi_range(0, 1) # Returns either 0 or 1\nrandi_range(-10, 1000) # Returns random integer between -10 and 1000\n[/gdscript]\n[csharp]\nGD.RandRange(0, 1); // Returns either 0 or 1\nGD.RandRange(-10, 1000); // Returns random integer between -10 and 1000\n[/csharp]\n[/codeblocks]" }, { "name": "randf_range", @@ -5427,7 +6010,8 @@ "name": "to", "type": "float" } - ] + ], + "documentation": "Returns a random floating point value between [param from] and [param to] (inclusive).\n[codeblocks]\n[gdscript]\nrandf_range(0, 20.5) # Returns e.g. 7.45315\nrandf_range(-10, 10) # Returns e.g. -3.844535\n[/gdscript]\n[csharp]\nGD.RandRange(0.0, 20.5); // Returns e.g. 7.45315\nGD.RandRange(-10.0, 10.0); // Returns e.g. -3.844535\n[/csharp]\n[/codeblocks]" }, { "name": "randfn", @@ -5444,7 +6028,8 @@ "name": "deviation", "type": "float" } - ] + ], + "documentation": "Returns a normally-distributed pseudo-random floating point value using Box-Muller transform with the specified [param mean] and a standard [param deviation]. This is also called Gaussian distribution." }, { "name": "seed", @@ -5456,7 +6041,8 @@ "name": "base", "type": "int" } - ] + ], + "documentation": "Sets the seed for the random number generator to [param base]. Setting the seed manually can ensure consistent, repeatable results for most random functions.\n[codeblocks]\n[gdscript]\nvar my_seed = \"Godot Rocks\".hash()\nseed(my_seed)\nvar a = randf() + randi()\nseed(my_seed)\nvar b = randf() + randi()\n# a and b are now identical\n[/gdscript]\n[csharp]\nulong mySeed = (ulong)GD.Hash(\"Godot Rocks\");\nGD.Seed(mySeed);\nvar a = GD.Randf() + GD.Randi();\nGD.Seed(mySeed);\nvar b = GD.Randf() + GD.Randi();\n// a and b are now identical\n[/csharp]\n[/codeblocks]" }, { "name": "rand_from_seed", @@ -5469,7 +6055,8 @@ "name": "seed", "type": "int" } - ] + ], + "documentation": "Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array.\n[b]Note:[/b] \"Seed\" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer.\n[codeblock]\nvar a = rand_from_seed(4)\n\nprint(a[0])# Prints 2879024997\nprint(a[1])# Prints 4\n[/codeblock]" }, { "name": "weakref", @@ -5482,7 +6069,8 @@ "name": "obj", "type": "Variant" } - ] + ], + "documentation": "Returns a weak reference to an object, or [code]null[/code] if [param obj] is invalid.\nA weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it." }, { "name": "typeof", @@ -5495,7 +6083,8 @@ "name": "variable", "type": "Variant" } - ] + ], + "documentation": "Returns the internal type of the given [param variable], using the [enum Variant.Type] values.\n[codeblock]\nvar json = JSON.new()\njson.parse('[\"a\", \"b\", \"c\"]')\nvar result = json.get_data()\nif typeof(result) == TYPE_ARRAY:\n print(result[0]) # Prints a\nelse:\n print(\"Unexpected result\")\n[/codeblock]\nSee also [method type_string]." }, { "name": "type_convert", @@ -5512,7 +6101,8 @@ "name": "type", "type": "int" } - ] + ], + "documentation": "Converts the given [param variant] to the given [param type], using the [enum Variant.Type] values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric [String]s to [int], and converting most things to [String].\nIf the type conversion cannot be done, this method will return the default value for that type, for example converting [Rect2] to [Vector2] will always return [constant Vector2.ZERO]. This method will never show error messages as long as [param type] is a valid Variant type.\nThe returned value is a [Variant], but the data inside and the [enum Variant.Type] will be the same as the requested type.\n[codeblock]\ntype_convert(\"Hi!\", TYPE_INT) # Returns 0\ntype_convert(\"123\", TYPE_INT) # Returns 123\ntype_convert(123.4, TYPE_INT) # Returns 123\ntype_convert(5, TYPE_VECTOR2) # Returns (0, 0)\ntype_convert(\"Hi!\", TYPE_NIL) # Returns null\n[/codeblock]" }, { "name": "str", @@ -5525,7 +6115,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Converts one or more arguments of any [Variant] type to a [String] in the best way possible.\n[codeblock]\nvar a = [10, 20, 30]\nvar b = str(a)\nprint(len(a)) # Prints 3 (the number of elements in the array).\nprint(len(b)) # Prints 12 (the length of the string \"[10, 20, 30]\").\n[/codeblock]" }, { "name": "error_string", @@ -5538,7 +6129,8 @@ "name": "error", "type": "int" } - ] + ], + "documentation": "Returns a human-readable name for the given [enum Error] code.\n[codeblock]\nprint(OK) # Prints 0\nprint(error_string(OK)) # Prints OK\nprint(error_string(ERR_BUSY)) # Prints Busy\nprint(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory\n[/codeblock]" }, { "name": "type_string", @@ -5551,7 +6143,8 @@ "name": "type", "type": "int" } - ] + ], + "documentation": "Returns a human-readable name of the given [param type], using the [enum Variant.Type] values.\n[codeblock]\nprint(TYPE_INT) # Prints 2.\nprint(type_string(TYPE_INT)) # Prints \"int\".\nprint(type_string(TYPE_STRING)) # Prints \"String\".\n[/codeblock]\nSee also [method typeof]." }, { "name": "print", @@ -5563,7 +6156,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Converts one or more arguments of any type to string in the best way possible and prints them to the console.\n[codeblocks]\n[gdscript]\nvar a = [1, 2, 3]\nprint(\"a\", \"b\", a) # Prints ab[1, 2, 3]\n[/gdscript]\n[csharp]\nvar a = new Godot.Collections.Array { 1, 2, 3 };\nGD.Print(\"a\", \"b\", a); // Prints ab[1, 2, 3]\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed." }, { "name": "print_rich", @@ -5575,7 +6169,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Converts one or more arguments of any type to string in the best way possible and prints them to the console.\nThe following BBCode tags are supported: [code]b[/code], [code]i[/code], [code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], [code]url[/code], [code]center[/code], [code]right[/code], [code]color[/code], [code]bgcolor[/code], [code]fgcolor[/code].\nColor tags only support the following named colors: [code]black[/code], [code]red[/code], [code]green[/code], [code]yellow[/code], [code]blue[/code], [code]magenta[/code], [code]pink[/code], [code]purple[/code], [code]cyan[/code], [code]white[/code], [code]orange[/code], [code]gray[/code]. Hexadecimal color codes are not supported.\nURL tags only support URLs wrapped by a URL tag, not URLs with a different title.\nWhen printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.\n[codeblocks]\n[gdscript skip-lint]\nprint_rich(\"[color=green][b]Hello world![/b][/color]\") # Prints out \"Hello world!\" in green with a bold font\n[/gdscript]\n[csharp skip-lint]\nGD.PrintRich(\"[color=green][b]Hello world![/b][/color]\"); // Prints out \"Hello world!\" in green with a bold font\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.\n[b]Note:[/b] On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output." }, { "name": "printerr", @@ -5587,7 +6182,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Prints one or more arguments to strings in the best way possible to standard error line.\n[codeblocks]\n[gdscript]\nprinterr(\"prints to stderr\")\n[/gdscript]\n[csharp]\nGD.PrintErr(\"prints to stderr\");\n[/csharp]\n[/codeblocks]" }, { "name": "printt", @@ -5599,7 +6195,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Prints one or more arguments to the console with a tab between each argument.\n[codeblocks]\n[gdscript]\nprintt(\"A\", \"B\", \"C\") # Prints A B C\n[/gdscript]\n[csharp]\nGD.PrintT(\"A\", \"B\", \"C\"); // Prints A B C\n[/csharp]\n[/codeblocks]" }, { "name": "prints", @@ -5611,7 +6208,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Prints one or more arguments to the console with a space between each argument.\n[codeblocks]\n[gdscript]\nprints(\"A\", \"B\", \"C\") # Prints A B C\n[/gdscript]\n[csharp]\nGD.PrintS(\"A\", \"B\", \"C\"); // Prints A B C\n[/csharp]\n[/codeblocks]" }, { "name": "printraw", @@ -5623,7 +6221,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike [method print], no newline is automatically added at the end.\n[codeblocks]\n[gdscript]\nprintraw(\"A\")\nprintraw(\"B\")\nprintraw(\"C\")\n# Prints ABC to terminal\n[/gdscript]\n[csharp]\nGD.PrintRaw(\"A\");\nGD.PrintRaw(\"B\");\nGD.PrintRaw(\"C\");\n// Prints ABC to terminal\n[/csharp]\n[/codeblocks]" }, { "name": "print_verbose", @@ -5635,7 +6234,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "If verbose mode is enabled ([method OS.is_stdout_verbose] returning [code]true[/code]), converts one or more arguments of any type to string in the best way possible and prints them to the console." }, { "name": "push_error", @@ -5647,7 +6247,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Pushes an error message to Godot's built-in debugger and to the OS terminal.\n[codeblocks]\n[gdscript]\npush_error(\"test error\") # Prints \"test error\" to debugger and terminal as error call\n[/gdscript]\n[csharp]\nGD.PushError(\"test error\"); // Prints \"test error\" to debugger and terminal as error call\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] This function does not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, \"test error\")[/code] instead." }, { "name": "push_warning", @@ -5659,7 +6260,8 @@ "name": "arg1", "type": "Variant" } - ] + ], + "documentation": "Pushes a warning message to Godot's built-in debugger and to the OS terminal.\n[codeblocks]\n[gdscript]\npush_warning(\"test warning\") # Prints \"test warning\" to debugger and terminal as warning call\n[/gdscript]\n[csharp]\nGD.PushWarning(\"test warning\"); // Prints \"test warning\" to debugger and terminal as warning call\n[/csharp]\n[/codeblocks]" }, { "name": "var_to_str", @@ -5672,7 +6274,8 @@ "name": "variable", "type": "Variant" } - ] + ], + "documentation": "Converts a [Variant] [param variable] to a formatted [String] that can then be parsed using [method str_to_var].\n[codeblocks]\n[gdscript]\nvar a = { \"a\": 1, \"b\": 2 }\nprint(var_to_str(a))\n[/gdscript]\n[csharp]\nvar a = new Godot.Collections.Dictionary { [\"a\"] = 1, [\"b\"] = 2 };\nGD.Print(GD.VarToStr(a));\n[/csharp]\n[/codeblocks]\nPrints:\n[codeblock]\n{\n \"a\": 1,\n \"b\": 2\n}\n[/codeblock]\n[b]Note:[/b] Converting [Signal] or [Callable] is not supported and will result in an empty value for these types, regardless of their data." }, { "name": "str_to_var", @@ -5685,7 +6288,8 @@ "name": "string", "type": "String" } - ] + ], + "documentation": "Converts a formatted [param string] that was returned by [method var_to_str] to the original [Variant].\n[codeblocks]\n[gdscript]\nvar data = '{ \"a\": 1, \"b\": 2 }' # data is a String\nvar dict = str_to_var(data) # dict is a Dictionary\nprint(dict[\"a\"]) # Prints 1\n[/gdscript]\n[csharp]\nstring data = \"{ \\\"a\\\": 1, \\\"b\\\": 2 }\"; // data is a string\nvar dict = GD.StrToVar(data).AsGodotDictionary(); // dict is a Dictionary\nGD.Print(dict[\"a\"]); // Prints 1\n[/csharp]\n[/codeblocks]" }, { "name": "var_to_bytes", @@ -5698,7 +6302,8 @@ "name": "variable", "type": "Variant" } - ] + ], + "documentation": "Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes_to_var].\n[b]Note:[/b] If you need object serialization, see [method var_to_bytes_with_objects]." }, { "name": "bytes_to_var", @@ -5711,7 +6316,8 @@ "name": "bytes", "type": "PackedByteArray" } - ] + ], + "documentation": "Decodes a byte array back to a [Variant] value, without decoding objects.\n[b]Note:[/b] If you need object deserialization, see [method bytes_to_var_with_objects]." }, { "name": "var_to_bytes_with_objects", @@ -5724,7 +6330,8 @@ "name": "variable", "type": "Variant" } - ] + ], + "documentation": "Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with [method bytes_to_var_with_objects]." }, { "name": "bytes_to_var_with_objects", @@ -5737,7 +6344,8 @@ "name": "bytes", "type": "PackedByteArray" } - ] + ], + "documentation": "Decodes a byte array back to a [Variant] value. Decoding objects is allowed.\n[b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution)." }, { "name": "hash", @@ -5750,7 +6358,8 @@ "name": "variable", "type": "Variant" } - ] + ], + "documentation": "Returns the integer hash of the passed [param variable].\n[codeblocks]\n[gdscript]\nprint(hash(\"a\")) # Prints 177670\n[/gdscript]\n[csharp]\nGD.Print(GD.Hash(\"a\")); // Prints 177670\n[/csharp]\n[/codeblocks]" }, { "name": "instance_from_id", @@ -5763,7 +6372,8 @@ "name": "instance_id", "type": "int" } - ] + ], + "documentation": "Returns the [Object] that corresponds to [param instance_id]. All Objects have a unique instance ID. See also [method Object.get_instance_id].\n[codeblocks]\n[gdscript]\nvar foo = \"bar\"\n\nfunc _ready():\n var id = get_instance_id()\n var inst = instance_from_id(id)\n print(inst.foo) # Prints bar\n[/gdscript]\n[csharp]\npublic partial class MyNode : Node\n{\n public string Foo { get; set; } = \"bar\";\n\n public override void _Ready()\n {\n ulong id = GetInstanceId();\n var inst = (MyNode)InstanceFromId(Id);\n GD.Print(inst.Foo); // Prints bar\n }\n}\n[/csharp]\n[/codeblocks]" }, { "name": "is_instance_id_valid", @@ -5776,7 +6386,8 @@ "name": "id", "type": "int" } - ] + ], + "documentation": "Returns [code]true[/code] if the Object that corresponds to [param id] is a valid object (e.g. has not been deleted from memory). All Objects have a unique instance ID." }, { "name": "is_instance_valid", @@ -5789,14 +6400,16 @@ "name": "instance", "type": "Variant" } - ] + ], + "documentation": "Returns [code]true[/code] if [param instance] is a valid Object (e.g. has not been deleted from memory)." }, { "name": "rid_allocate_id", "return_type": "int", "category": "general", "is_vararg": false, - "hash": 701202648 + "hash": 701202648, + "documentation": "Allocates a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers." }, { "name": "rid_from_int64", @@ -5809,7 +6422,8 @@ "name": "base", "type": "int" } - ] + ], + "documentation": "Creates a RID from a [param base]. This is used mainly from native extensions to build servers." }, { "name": "is_same", @@ -5826,7 +6440,8 @@ "name": "b", "type": "Variant" } - ] + ], + "documentation": "Returns [code]true[/code], for value types, if [param a] and [param b] share the same value. Returns [code]true[/code], for reference types, if the references of [param a] and [param b] are the same.\n[codeblock]\n# Vector2 is a value type\nvar vec2_a = Vector2(0, 0)\nvar vec2_b = Vector2(0, 0)\nvar vec2_c = Vector2(1, 1)\nis_same(vec2_a, vec2_a) # true\nis_same(vec2_a, vec2_b) # true\nis_same(vec2_a, vec2_c) # false\n\n# Array is a reference type\nvar arr_a = []\nvar arr_b = []\nis_same(arr_a, arr_a) # true\nis_same(arr_a, arr_b) # false\n[/codeblock]\nThese are [Variant] value types: [code]null[/code], [bool], [int], [float], [String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], [Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], [RID], [Callable] and [Signal].\nThese are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array] and [PackedColorArray]." } ], "builtin_classes": [ @@ -6317,12 +6932,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two booleans are equal. That is, both are [code]true[/code] or both are [code]false[/code]. This operation can be seen as a logical EQ or XNOR." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two booleans are not equal. That is, one is [code]true[/code] and the other is [code]false[/code]. This operation can be seen as a logical XOR." }, { "name": "and", @@ -6346,22 +6963,26 @@ { "name": "==", "right_type": "bool", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two booleans are equal. That is, both are [code]true[/code] or both are [code]false[/code]. This operation can be seen as a logical EQ or XNOR." }, { "name": "!=", "right_type": "bool", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two booleans are not equal. That is, one is [code]true[/code] and the other is [code]false[/code]. This operation can be seen as a logical XOR." }, { "name": "<", "right_type": "bool", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left operand is [code]false[/code] and the right operand is [code]true[/code]." }, { "name": ">", "right_type": "bool", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left operand is [code]true[/code] and the right operand is [code]false[/code]." }, { "name": "and", @@ -6436,7 +7057,8 @@ ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a [bool] set to [code]false[/code]." }, { "index": 1, @@ -6445,7 +7067,8 @@ "name": "from", "type": "bool" } - ] + ], + "documentation": "Constructs a [bool] as a copy of the given [bool]." }, { "index": 2, @@ -6454,7 +7077,8 @@ "name": "from", "type": "int" } - ] + ], + "documentation": "Cast an [int] value to a boolean value. Returns [code]false[/code] if [param from] is equal to [code]0[/code], and [code]true[/code] for all other values." }, { "index": 3, @@ -6463,10 +7087,12 @@ "name": "from", "type": "float" } - ] + ], + "documentation": "Cast a [float] value to a boolean value. Returns [code]false[/code] if [param from] is equal to [code]0.0[/code] (including [code]-0.0[/code]), and [code]true[/code] for all other values (including [constant @GDScript.INF] and [constant @GDScript.NAN])." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "The [bool] is a built-in [Variant] type that may only store one of two values: [code]true[/code] or [code]false[/code]. You can imagine it as a switch that can be either turned on or off, or as a binary digit that can either be 1 or 0.\nBooleans can be directly used in [code]if[/code], and other conditional statements:\n[codeblocks]\n[gdscript]\nvar can_shoot = true\nif can_shoot:\n launch_bullet()\n[/gdscript]\n[csharp]\nbool canShoot = true;\nif (canShoot)\n{\n LaunchBullet();\n}\n[/csharp]\n[/codeblocks]\nAll comparison operators return booleans ([code]==[/code], [code]>[/code], [code]<=[/code], etc.). As such, it is not necessary to compare booleans themselves. You do not need to add [code]== true[/code] or [code]== false[/code].\nBooleans can be combined with the logical operators [code]and[/code], [code]or[/code], [code]not[/code] to create complex conditions:\n[codeblocks]\n[gdscript]\nif bullets > 0 and not is_reloading():\n launch_bullet()\n\nif bullets == 0 or is_reloading():\n play_clack_sound()\n[/gdscript]\n[csharp]\nif (bullets > 0 && !IsReloading())\n{\n LaunchBullet();\n}\n\nif (bullets == 0 || IsReloading())\n{\n PlayClackSound();\n}\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as [url=https://en.wikipedia.org/wiki/Short-circuit_evaluation]short-circuit evaluation[/url] and can be useful to avoid evaluating expensive conditions in some performance-critical cases.\n[b]Note:[/b] By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar ([method String.is_empty], [method Node.can_process], [member Camera2D.enabled], etc.)." }, { "name": "int", @@ -6475,24 +7101,29 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two [int]s are equal." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [int]s are not equal." }, { "name": "unary-", - "return_type": "int" + "return_type": "int", + "documentation": "Returns the negated value of the [int]. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing." }, { "name": "unary+", - "return_type": "int" + "return_type": "int", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "~", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise [code]NOT[/code] operation on the [int]. Due to [url=https://en.wikipedia.org/wiki/Two%27s_complement]2's complement[/url], it's effectively equal to [code]-(int + 1)[/code].\n[codeblock]\nprint(~4) # Prints -5\nprint(~(-7)) # Prints 6\n[/codeblock]" }, { "name": "and", @@ -6531,87 +7162,104 @@ { "name": "==", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two [int]s are equal." }, { "name": "!=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [int]s are not equal." }, { "name": "<", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is less than the right [int]." }, { "name": "<=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is less than or equal to the right [int]." }, { "name": ">", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is greater than the right [int]." }, { "name": ">=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is greater than or equal to the right [int]." }, { "name": "+", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Adds the two [int]s." }, { "name": "-", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Subtracts the two [int]s." }, { "name": "*", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Multiplies the two [int]s." }, { "name": "/", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Divides the two [int]s. The result is an [int]. This will truncate the [float], discarding anything after the floating point.\n[codeblock]\nprint(6 / 2) # Prints 3\nprint(5 / 3) # Prints 1\n[/codeblock]" }, { "name": "%", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Returns the remainder after dividing two [int]s. Uses truncated division, which returns a negative number if the dividend is negative. If this is not desired, consider using [method @GlobalScope.posmod].\n[codeblock]\nprint(6 % 2) # Prints 0\nprint(11 % 4) # Prints 3\nprint(-5 % 3) # Prints -2\n[/codeblock]" }, { "name": "**", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Raises the left [int] to a power of the right [int].\n[codeblock]\nprint(3 ** 4) # Prints 81\n[/codeblock]" }, { "name": "<<", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise shift left operation. Effectively the same as multiplying by a power of 2.\n[codeblock]\nprint(0b1010 << 1) # Prints 20 (binary 10100)\nprint(0b1010 << 3) # Prints 80 (binary 1010000)\n[/codeblock]" }, { "name": ">>", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise shift right operation. Effectively the same as dividing by a power of 2.\n[codeblock]\nprint(0b1010 >> 1) # Prints 5 (binary 101)\nprint(0b1010 >> 2) # Prints 2 (binary 10)\n[/codeblock]" }, { "name": "&", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise [code]AND[/code] operation.\n[codeblock]\nprint(0b1100 & 0b1010) # Prints 8 (binary 1000)\n[/codeblock]\nThis is useful for retrieving binary flags from a variable.\n[codeblock]\nvar flags = 0b101\n# Check if the first or second bit are enabled.\nif flags & 0b011:\n do_stuff() # This line will run.\n[/codeblock]" }, { "name": "|", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise [code]OR[/code] operation.\n[codeblock]\nprint(0b1100 | 0b1010) # Prints 14 (binary 1110)\n[/codeblock]\nThis is useful for storing binary flags in a variable.\n[codeblock]\nvar flags = 0\nflags |= 0b101 # Turn the first and third bits on.\n[/codeblock]" }, { "name": "^", "right_type": "int", - "return_type": "int" + "return_type": "int", + "documentation": "Performs the bitwise [code]XOR[/code] operation.\n[codeblock]\nprint(0b1100 ^ 0b1010) # Prints 6 (binary 110)\n[/codeblock]" }, { "name": "and", @@ -6631,57 +7279,68 @@ { "name": "==", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two [int]s are equal." }, { "name": "!=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [int]s are not equal." }, { "name": "<", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is less than the right [int]." }, { "name": "<=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is less than or equal to the right [int]." }, { "name": ">", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is greater than the right [int]." }, { "name": ">=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [int] is greater than or equal to the right [int]." }, { "name": "+", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Adds the two [int]s." }, { "name": "-", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Subtracts the two [int]s." }, { "name": "*", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Multiplies the two [int]s." }, { "name": "/", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Divides the two [int]s. The result is an [int]. This will truncate the [float], discarding anything after the floating point.\n[codeblock]\nprint(6 / 2) # Prints 3\nprint(5 / 3) # Prints 1\n[/codeblock]" }, { "name": "**", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Raises the left [int] to a power of the right [int].\n[codeblock]\nprint(3 ** 4) # Prints 81\n[/codeblock]" }, { "name": "and", @@ -6701,42 +7360,50 @@ { "name": "*", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Quaternion", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Multiplies the two [int]s." }, { "name": "*", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Multiplies the two [int]s." }, { "name": "and", @@ -6791,7 +7458,8 @@ ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an [int] set to [code]0[/code]." }, { "index": 1, @@ -6800,7 +7468,8 @@ "name": "from", "type": "int" } - ] + ], + "documentation": "Constructs an [int] as a copy of the given [int]." }, { "index": 2, @@ -6809,7 +7478,8 @@ "name": "from", "type": "float" } - ] + ], + "documentation": "Constructs a new [int] from a [float]. This will truncate the [float], discarding anything after the floating point." }, { "index": 3, @@ -6818,7 +7488,8 @@ "name": "from", "type": "bool" } - ] + ], + "documentation": "Constructs a new [int] from a [bool]. [code]true[/code] is converted to [code]1[/code] and [code]false[/code] is converted to [code]0[/code]." }, { "index": 4, @@ -6827,10 +7498,12 @@ "name": "from", "type": "String" } - ] + ], + "documentation": "Constructs a new [int] from a [String], following the same rules as [method String.to_int]." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "Signed 64-bit integer type. This means that it can take values from [code]-2^63[/code] to [code]2^63 - 1[/code], i.e. from [code]-9223372036854775808[/code] to [code]9223372036854775807[/code]. When it exceeds these bounds, it will wrap around.\n[int]s can be automatically converted to [float]s when necessary, for example when passing them as arguments in functions. The [float] will be as close to the original integer as possible.\nLikewise, [float]s can be automatically converted into [int]s. This will truncate the [float], discarding anything after the floating point.\n[b]Note:[/b] In a boolean context, an [int] will evaluate to [code]false[/code] if it equals [code]0[/code], and to [code]true[/code] otherwise.\n[codeblocks]\n[gdscript]\nvar x: int = 1 # x is 1\nx = 4.2 # x is 4, because 4.2 gets truncated\nvar max_int = 9223372036854775807 # Biggest value an int can store\nmax_int += 1 # max_int is -9223372036854775808, because it wrapped around\n[/gdscript]\n[csharp]\nint x = 1; // x is 1\nx = (int)4.2; // x is 4, because 4.2 gets truncated\n// We use long below, because GDScript's int is 64-bit while C#'s int is 32-bit.\nlong maxLong = 9223372036854775807; // Biggest value a long can store\nmaxLong++; // maxLong is now -9223372036854775808, because it wrapped around.\n\n// Alternatively with C#'s 32-bit int type, which has a smaller maximum value.\nint maxInt = 2147483647; // Biggest value an int can store\nmaxInt++; // maxInt is now -2147483648, because it wrapped around\n[/csharp]\n[/codeblocks]\nYou can use the [code]0b[/code] literal for binary representation, the [code]0x[/code] literal for hexadecimal representation, and the [code]_[/code] symbol to separate long numbers and improve readability.\n[codeblocks]\n[gdscript]\nvar x = 0b1001 # x is 9\nvar y = 0xF5 # y is 245\nvar z = 10_000_000 # z is 10000000\n[/gdscript]\n[csharp]\nint x = 0b1001; // x is 9\nint y = 0xF5; // y is 245\nint z = 10_000_000; // z is 10000000\n[/csharp]\n[/codeblocks]" }, { "name": "float", @@ -6839,20 +7512,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [float] and the given [int] are equal." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the integer has different value than the float." }, { "name": "unary-", - "return_type": "float" + "return_type": "float", + "documentation": "Returns the negative value of the [float]. If positive, turns the number negative. If negative, turns the number positive. With floats, the number zero can be either positive or negative." }, { "name": "unary+", - "return_type": "float" + "return_type": "float", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "and", @@ -6891,57 +7568,68 @@ { "name": "==", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [float] and the given [int] are equal." }, { "name": "!=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the integer has different value than the float." }, { "name": "<", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is less than the given [int]." }, { "name": "<=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is less than or equal to the given [int]." }, { "name": ">", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is greater than the given [int]." }, { "name": ">=", "right_type": "int", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is greater than or equal to the given [int]." }, { "name": "+", "right_type": "int", - "return_type": "float" + "return_type": "float", + "documentation": "Adds a [float] and an [int]. The result is a [float]." }, { "name": "-", "right_type": "int", - "return_type": "float" + "return_type": "float", + "documentation": "Subtracts an [int] from a [float]. The result is a [float]." }, { "name": "*", "right_type": "int", - "return_type": "float" + "return_type": "float", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "/", "right_type": "int", - "return_type": "float" + "return_type": "float", + "documentation": "Divides a [float] by an [int]. The result is a [float]." }, { "name": "**", "right_type": "int", - "return_type": "float" + "return_type": "float", + "documentation": "Raises a [float] to a power of an [int]. The result is a [float].\n[codeblock]\nprint(0.9**3) # 0.729\n[/codeblock]" }, { "name": "and", @@ -6961,57 +7649,68 @@ { "name": "==", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [float] and the given [int] are equal." }, { "name": "!=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the integer has different value than the float." }, { "name": "<", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is less than the given [int]." }, { "name": "<=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is less than or equal to the given [int]." }, { "name": ">", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is greater than the given [int]." }, { "name": ">=", "right_type": "float", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [float] is greater than or equal to the given [int]." }, { "name": "+", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Adds a [float] and an [int]. The result is a [float]." }, { "name": "-", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Subtracts an [int] from a [float]. The result is a [float]." }, { "name": "*", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "/", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Divides a [float] by an [int]. The result is a [float]." }, { "name": "**", "right_type": "float", - "return_type": "float" + "return_type": "float", + "documentation": "Raises a [float] to a power of an [int]. The result is a [float].\n[codeblock]\nprint(0.9**3) # 0.729\n[/codeblock]" }, { "name": "and", @@ -7031,42 +7730,50 @@ { "name": "*", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Vector2i", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Vector3i", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Vector4i", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Quaternion", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "*", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Multiplies a [float] and an [int]. The result is a [float]." }, { "name": "and", @@ -7121,7 +7828,8 @@ ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [float] set to [code]0.0[/code]." }, { "index": 1, @@ -7130,7 +7838,8 @@ "name": "from", "type": "float" } - ] + ], + "documentation": "Constructs a [float] as a copy of the given [float]." }, { "index": 2, @@ -7139,7 +7848,8 @@ "name": "from", "type": "int" } - ] + ], + "documentation": "Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code]." }, { "index": 3, @@ -7148,7 +7858,8 @@ "name": "from", "type": "bool" } - ] + ], + "documentation": "Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0." }, { "index": 4, @@ -7157,10 +7868,12 @@ "name": "from", "type": "String" } - ] + ], + "documentation": "Converts a [String] to a [float], following the same rules as [method String.to_float]." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code].\nMany methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code skip-lint]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]precision=double[/code] option.\nMath done using the [float] type is not guaranteed to be exact and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality." }, { "name": "String", @@ -7170,17 +7883,20 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings contain the same sequence of characters." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings do not contain the same sequence of characters." }, { "name": "%", "right_type": "Variant", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "not", @@ -7189,57 +7905,68 @@ { "name": "%", "right_type": "bool", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "int", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "float", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "==", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings contain the same sequence of characters." }, { "name": "!=", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings do not contain the same sequence of characters." }, { "name": "<", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [String] comes before [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order. Useful for sorting." }, { "name": "<=", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [String] comes before [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order, or if both are equal." }, { "name": ">", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [String] comes after [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order. Useful for sorting." }, { "name": ">=", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [String] comes after [param right] in [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url], which roughly matches the alphabetical order, or if both are equal." }, { "name": "+", "right_type": "String", - "return_type": "String" + "return_type": "String", + "documentation": "Appends [param right] at the end of this [String], also known as a string concatenation." }, { "name": "%", "right_type": "String", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7249,102 +7976,122 @@ { "name": "%", "right_type": "Vector2", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector2i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Rect2", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Rect2i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector3", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector3i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Transform2D", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector4", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector4i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Plane", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Quaternion", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "AABB", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Basis", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Transform3D", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Projection", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Color", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "==", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings contain the same sequence of characters." }, { "name": "!=", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both strings do not contain the same sequence of characters." }, { "name": "+", "right_type": "StringName", - "return_type": "String" + "return_type": "String", + "documentation": "Appends [param right] at the end of this [String], also known as a string concatenation." }, { "name": "%", "right_type": "StringName", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7354,12 +8101,14 @@ { "name": "%", "right_type": "NodePath", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Object", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7369,17 +8118,20 @@ { "name": "%", "right_type": "Callable", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Signal", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Dictionary", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7389,7 +8141,8 @@ { "name": "%", "right_type": "Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7399,32 +8152,38 @@ { "name": "%", "right_type": "PackedByteArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedInt32Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedInt64Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedFloat32Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedFloat64Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedStringArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -7434,17 +8193,20 @@ { "name": "%", "right_type": "PackedVector2Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedVector3Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedColorArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [String], replacing the placeholders with one or more parameters. To pass multiple parameters, [param right] needs to be an [Array].\n[codeblock]\nprint(\"I caught %d fishes!\" % 2) # Prints \"I caught 2 fishes!\"\n\nvar my_message = \"Travelling to %s, at %2.2f km/h.\"\nvar location = \"Deep Valley\"\nvar speed = 40.3485\nprint(my_message % [location, speed]) # Prints \"Travelling to Deep Valley, at 40.35 km/h.\"\n[/codeblock]\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." } ], "methods": [ @@ -7460,7 +8222,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" and \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to], [method naturalcasecmp_to], and [method naturalnocasecmp_to]." }, { "name": "nocasecmp_to", @@ -7474,7 +8237,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-insensitive[/b] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to], [method naturalcasecmp_to], and [method naturalnocasecmp_to]." }, { "name": "naturalcasecmp_to", @@ -7488,7 +8252,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-sensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.\nWhen used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code][\"1\", \"2\", \"3\", ...][/code], not [code][\"1\", \"10\", \"2\", \"3\", ...][/code].\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalnocasecmp_to], [method nocasecmp_to], and [method casecmp_to]." }, { "name": "naturalnocasecmp_to", @@ -7502,7 +8267,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-insensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.\nWhen used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code][\"1\", \"2\", \"3\", ...][/code], not [code][\"1\", \"10\", \"2\", \"3\", ...][/code].\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalcasecmp_to], [method nocasecmp_to], and [method casecmp_to]." }, { "name": "length", @@ -7510,7 +8276,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of characters in the string. Empty strings ([code]\"\"[/code]) always return [code]0[/code]. See also [method is_empty]." }, { "name": "substr", @@ -7529,7 +8296,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns part of the string from the position [param from] with length [param len]. If [param len] is [code]-1[/code] (as by default), returns the rest of the string starting from the given position." }, { "name": "get_slice", @@ -7547,7 +8315,8 @@ "name": "slice", "type": "int" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns the original string if [param delimiter] does not occur in the string. Returns an empty string if the [param slice] does not exist.\nThis is faster than [method split], if you only need one substring.\n[b]Example:[/b]\n[codeblock]\nprint(\"i/am/example/hi\".get_slice(\"/\", 2)) # Prints \"example\"\n[/codeblock]" }, { "name": "get_slicec", @@ -7565,7 +8334,8 @@ "name": "slice", "type": "int" } - ] + ], + "documentation": "Splits the string using a Unicode character with code [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.\nThis is faster than [method split], if you only need one substring." }, { "name": "get_slice_count", @@ -7579,7 +8349,8 @@ "name": "delimiter", "type": "String" } - ] + ], + "documentation": "Returns the total number of slices when the string is split with the given [param delimiter] (see [method split])." }, { "name": "find", @@ -7598,7 +8369,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the index of the [b]first[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the end of the string.\n[codeblocks]\n[gdscript]\nprint(\"Team\".find(\"I\")) # Prints -1\n\nprint(\"Potato\".find(\"t\")) # Prints 2\nprint(\"Potato\".find(\"t\", 3)) # Prints 4\nprint(\"Potato\".find(\"t\", 5)) # Prints -1\n[/gdscript]\n[csharp]\nGD.Print(\"Team\".Find(\"I\")); // Prints -1\n\nGD.Print(\"Potato\".Find(\"t\")); // Prints 2\nGD.Print(\"Potato\".Find(\"t\", 3)); // Prints 4\nGD.Print(\"Potato\".Find(\"t\", 5)); // Prints -1\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator." }, { "name": "count", @@ -7622,7 +8394,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions. If [param to] is 0, the search continues until the end of the string." }, { "name": "countn", @@ -7646,7 +8419,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions, [b]ignoring case[/b]. If [param to] is 0, the search continues until the end of the string." }, { "name": "findn", @@ -7665,7 +8439,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the index of the [b]first[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the end of the string." }, { "name": "rfind", @@ -7684,7 +8459,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns the index of the [b]last[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method find]." }, { "name": "rfindn", @@ -7703,7 +8479,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns the index of the [b]last[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method findn]." }, { "name": "match", @@ -7717,7 +8494,8 @@ "name": "expr", "type": "String" } - ] + ], + "documentation": "Does a simple expression match (also called \"glob\" or \"globbing\"), where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code]." }, { "name": "matchn", @@ -7731,7 +8509,8 @@ "name": "expr", "type": "String" } - ] + ], + "documentation": "Does a simple [b]case-insensitive[/b] expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code]." }, { "name": "begins_with", @@ -7745,7 +8524,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string begins with the given [param text]. See also [method ends_with]." }, { "name": "ends_with", @@ -7759,7 +8539,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string ends with the given [param text]. See also [method begins_with]." }, { "name": "is_subsequence_of", @@ -7773,7 +8554,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order.\n[codeblock]\nvar text = \"Wow, incredible!\"\n\nprint(\"inedible\".is_subsequence_of(text)) # Prints true\nprint(\"Word!\".is_subsequence_of(text)) # Prints true\nprint(\"Window\".is_subsequence_of(text)) # Prints false\nprint(\"\".is_subsequence_of(text)) # Prints true\n[/codeblock]" }, { "name": "is_subsequence_ofn", @@ -7787,7 +8569,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order, [b]ignoring case[/b]." }, { "name": "bigrams", @@ -7795,7 +8578,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 747180633 + "hash": 747180633, + "documentation": "Returns an array containing the bigrams (pairs of consecutive characters) of this string.\n[codeblock]\nprint(\"Get up!\".bigrams()) # Prints [\"Ge\", \"et\", \"t \", \" u\", \"up\", \"p!\"]\n[/codeblock]" }, { "name": "similarity", @@ -7809,7 +8593,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) of this string compared to another. A result of [code]1.0[/code] means totally similar, while [code]0.0[/code] means totally dissimilar.\n[codeblock]\nprint(\"ABC123\".similarity(\"ABC123\")) # Prints 1.0\nprint(\"ABC123\".similarity(\"XYZ456\")) # Prints 0.0\nprint(\"ABC123\".similarity(\"123ABC\")) # Prints 0.8\nprint(\"ABC123\".similarity(\"abc123\")) # Prints 0.4\n[/codeblock]" }, { "name": "format", @@ -7828,7 +8613,8 @@ "type": "String", "default_value": "\"{_}\"" } - ] + ], + "documentation": "Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values].\n[param values] can be a [Dictionary] or an [Array]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.\n[codeblock]\n# Prints \"Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it.\"\nvar use_array_values = \"Waiting for {0} is a play by {1}, and {0} Engine is named after it.\"\nprint(use_array_values.format([\"Godot\", \"Samuel Beckett\"]))\n\n# Prints \"User 42 is Godot.\"\nprint(\"User {id} is {name}.\".format({\"id\": 42, \"name\": \"Godot\"}))\n[/codeblock]\nSome additional handling is performed when [param values] is an [Array]. If [param placeholder] does not contain an underscore, the elements of the [param values] array will be used to replace one occurrence of the placeholder in order; If an element of [param values] is another 2-element array, it'll be interpreted as a key-value pair.\n[codeblock]\n# Prints \"User 42 is Godot.\"\nprint(\"User {} is {}.\".format([42, \"Godot\"], \"{}\"))\nprint(\"User {id} is {name}.\".format([[\"id\", 42], [\"name\", \"Godot\"]]))\n[/codeblock]\nSee also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial.\n[b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with \"$\"[/url], instead." }, { "name": "replace", @@ -7846,7 +8632,8 @@ "name": "forwhat", "type": "String" } - ] + ], + "documentation": "Replaces all occurrences of [param what] inside the string with the given [param forwhat]." }, { "name": "replacen", @@ -7864,7 +8651,8 @@ "name": "forwhat", "type": "String" } - ] + ], + "documentation": "Replaces all [b]case-insensitive[/b] occurrences of [param what] inside the string with the given [param forwhat]." }, { "name": "repeat", @@ -7878,7 +8666,8 @@ "name": "count", "type": "int" } - ] + ], + "documentation": "Repeats this string a number of times. [param count] needs to be greater than [code]0[/code]. Otherwise, returns an empty string." }, { "name": "reverse", @@ -7886,7 +8675,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the copy of this string in reverse order." }, { "name": "insert", @@ -7904,7 +8694,8 @@ "name": "what", "type": "String" } - ] + ], + "documentation": "Inserts [param what] at the given [param position] in the string." }, { "name": "erase", @@ -7923,7 +8714,8 @@ "type": "int", "default_value": "1" } - ] + ], + "documentation": "Returns a string with [param chars] characters erased starting from [param position]. If [param chars] goes beyond the string's length given the specified [param position], fewer characters will be erased from the returned string. Returns an empty string if either [param position] or [param chars] is negative. Returns the original string unmodified if [param chars] is [code]0[/code]." }, { "name": "capitalize", @@ -7931,7 +8723,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Changes the appearance of the string: replaces underscores ([code]_[/code]) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase.\n[codeblocks]\n[gdscript]\n\"move_local_x\".capitalize() # Returns \"Move Local X\"\n\"sceneFile_path\".capitalize() # Returns \"Scene File Path\"\n[/gdscript]\n[csharp]\n\"move_local_x\".Capitalize(); // Returns \"Move Local X\"\n\"sceneFile_path\".Capitalize(); // Returns \"Scene File Path\"\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] This method not the same as the default appearance of properties in the Inspector dock, as it does not capitalize acronyms ([code]\"2D\"[/code], [code]\"FPS\"[/code], [code]\"PNG\"[/code], etc.) as you may expect." }, { "name": "to_camel_case", @@ -7939,7 +8732,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]camelCase[/code]." }, { "name": "to_pascal_case", @@ -7947,7 +8741,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]PascalCase[/code]." }, { "name": "to_snake_case", @@ -7955,7 +8750,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]snake_case[/code]." }, { "name": "split", @@ -7980,7 +8776,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join].\nIf [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.\nIf [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split.\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar some_array = \"One,Two,Three,Four\".split(\",\", true, 2)\n\nprint(some_array.size()) # Prints 3\nprint(some_array[0]) # Prints \"One\"\nprint(some_array[1]) # Prints \"Two\"\nprint(some_array[2]) # Prints \"Three,Four\"\n[/gdscript]\n[csharp]\n// C#'s `Split()` does not support the `maxsplit` parameter.\nvar someArray = \"One,Two,Three\".Split(\",\");\n\nGD.Print(someArray[0]); // Prints \"One\"\nGD.Print(someArray[1]); // Prints \"Two\"\nGD.Print(someArray[2]); // Prints \"Three\"\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you only need one substring from the array, consider using [method get_slice] which is faster. If you need to split strings with more complex rules, use the [RegEx] class instead." }, { "name": "rsplit", @@ -8005,7 +8802,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character.\nIf [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.\nIf [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar some_string = \"One,Two,Three,Four\"\nvar some_array = some_string.rsplit(\",\", true, 1)\n\nprint(some_array.size()) # Prints 2\nprint(some_array[0]) # Prints \"One,Two,Three\"\nprint(some_array[1]) # Prints \"Four\"\n[/gdscript]\n[csharp]\n// In C#, there is no String.RSplit() method.\n[/csharp]\n[/codeblocks]" }, { "name": "split_floats", @@ -8024,7 +8822,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Splits the string into floats by using a [param delimiter] and returns a [PackedFloat64Array].\nIf [param allow_empty] is [code]false[/code], empty or invalid [float] conversions between adjacent delimiters are excluded.\n[codeblock]\nvar a = \"1,2,4.5\".split_floats(\",\") # a is [1.0, 2.0, 4.5]\nvar c = \"1| ||4.5\".split_floats(\"|\") # c is [1.0, 0.0, 0.0, 4.5]\nvar b = \"1| ||4.5\".split_floats(\"|\", false) # b is [1.0, 4.5]\n[/codeblock]" }, { "name": "join", @@ -8038,7 +8837,8 @@ "name": "parts", "type": "PackedStringArray" } - ] + ], + "documentation": "Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar fruits = [\"Apple\", \"Orange\", \"Pear\", \"Kiwi\"]\n\nprint(\", \".join(fruits)) # Prints \"Apple, Orange, Pear, Kiwi\"\nprint(\"---\".join(fruits)) # Prints \"Apple---Orange---Pear---Kiwi\"\n[/gdscript]\n[csharp]\nvar fruits = new string[] {\"Apple\", \"Orange\", \"Pear\", \"Kiwi\"};\n\n// In C#, this method is static.\nGD.Print(string.Join(\", \", fruits)); // Prints \"Apple, Orange, Pear, Kiwi\"\nGD.Print(string.Join(\"---\", fruits)); // Prints \"Apple---Orange---Pear---Kiwi\"\n[/csharp]\n[/codeblocks]" }, { "name": "to_upper", @@ -8046,7 +8846,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to uppercase." }, { "name": "to_lower", @@ -8054,7 +8855,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to lowercase." }, { "name": "left", @@ -8068,7 +8870,8 @@ "name": "length", "type": "int" } - ] + ], + "documentation": "Returns the first [param length] characters from the beginning of the string. If [param length] is negative, strips the last [param length] characters from the string's end.\n[codeblock]\nprint(\"Hello World!\".left(3)) # Prints \"Hel\"\nprint(\"Hello World!\".left(-4)) # Prints \"Hello Wo\"\n[/codeblock]" }, { "name": "right", @@ -8082,7 +8885,8 @@ "name": "length", "type": "int" } - ] + ], + "documentation": "Returns the last [param length] characters from the end of the string. If [param length] is negative, strips the first [param length] characters from the string's beginning.\n[codeblock]\nprint(\"Hello World!\".right(3)) # Prints \"ld!\"\nprint(\"Hello World!\".right(-4)) # Prints \"o World!\"\n[/codeblock]" }, { "name": "strip_edges", @@ -8102,7 +8906,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations ([code]\\t[/code]), and newlines ([code]\\n[/code] [code]\\r[/code]).\nIf [param left] is [code]false[/code], ignores the string's beginning. Likewise, if [param right] is [code]false[/code], ignores the string's end." }, { "name": "strip_escapes", @@ -8110,7 +8915,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation ([code]\\t[/code]) and newline ([code]\\n[/code], [code]\\r[/code]) characters, but [i]not[/i] spaces." }, { "name": "lstrip", @@ -8124,7 +8930,8 @@ "name": "chars", "type": "String" } - ] + ], + "documentation": "Removes a set of characters defined in [param chars] from the string's beginning. See also [method rstrip].\n[b]Note:[/b] [param chars] is not a prefix. Use [method trim_prefix] to remove a single prefix, rather than a set of characters." }, { "name": "rstrip", @@ -8138,7 +8945,8 @@ "name": "chars", "type": "String" } - ] + ], + "documentation": "Removes a set of characters defined in [param chars] from the string's end. See also [method lstrip].\n[b]Note:[/b] [param chars] is not a suffix. Use [method trim_suffix] to remove a single suffix, rather than a set of characters." }, { "name": "get_extension", @@ -8146,7 +8954,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file name or path, returns the file extension without the leading period ([code].[/code]). Otherwise, returns an empty string.\n[codeblock]\nvar a = \"/path/to/file.txt\".get_extension() # a is \"txt\"\nvar b = \"cool.txt\".get_extension() # b is \"txt\"\nvar c = \"cool.font.tres\".get_extension() # c is \"tres\"\nvar d = \".pack1\".get_extension() # d is \"pack1\"\n\nvar e = \"file.txt.\".get_extension() # e is \"\"\nvar f = \"file.txt..\".get_extension() # f is \"\"\nvar g = \"txt\".get_extension() # g is \"\"\nvar h = \"\".get_extension() # h is \"\"\n[/codeblock]" }, { "name": "get_basename", @@ -8154,7 +8963,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the full file path, without the extension.\n[codeblock]\nvar base = \"/path/to/file.txt\".get_basename() # base is \"/path/to/file\"\n[/codeblock]" }, { "name": "path_join", @@ -8168,7 +8978,8 @@ "name": "file", "type": "String" } - ] + ], + "documentation": "Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary.\n[b]Example:[/b] [code]\"this/is\".path_join(\"path\") == \"this/is/path\"[/code]." }, { "name": "unicode_at", @@ -8182,7 +8993,8 @@ "name": "at", "type": "int" } - ] + ], + "documentation": "Returns the character code at position [param at]." }, { "name": "indent", @@ -8196,7 +9008,8 @@ "name": "prefix", "type": "String" } - ] + ], + "documentation": "Indents every line of the string with the given [param prefix]. Empty lines are not indented. See also [method dedent] to remove indentation.\nFor example, the string can be indented with two tabulations using [code]\"\\t\\t\"[/code], or four spaces using [code]\" \"[/code]." }, { "name": "dedent", @@ -8204,7 +9017,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation." }, { "name": "hash", @@ -8212,7 +9026,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the 32-bit hash value representing the string's contents.\n[b]Note:[/b] Strings with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different." }, { "name": "md5_text", @@ -8220,7 +9035,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as another [String]." }, { "name": "sha1_text", @@ -8228,7 +9044,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as another [String]." }, { "name": "sha256_text", @@ -8236,7 +9053,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as another [String]." }, { "name": "md5_buffer", @@ -8244,7 +9062,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as a [PackedByteArray]." }, { "name": "sha1_buffer", @@ -8252,7 +9071,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as a [PackedByteArray]." }, { "name": "sha256_buffer", @@ -8260,7 +9080,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as a [PackedByteArray]." }, { "name": "is_empty", @@ -8268,7 +9089,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string's length is [code]0[/code] ([code]\"\"[/code]). See also [method length]." }, { "name": "contains", @@ -8282,7 +9104,8 @@ "name": "what", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string contains [param what]. In GDScript, this corresponds to the [code]in[/code] operator.\n[codeblocks]\n[gdscript]\nprint(\"Node\".contains(\"de\")) # Prints true\nprint(\"team\".contains(\"I\")) # Prints false\nprint(\"I\" in \"team\") # Prints false\n[/gdscript]\n[csharp]\nGD.Print(\"Node\".Contains(\"de\")); // Prints true\nGD.Print(\"team\".Contains(\"I\")); // Prints false\n[/csharp]\n[/codeblocks]\nIf you need to know where [param what] is within the string, use [method find]." }, { "name": "is_absolute_path", @@ -8290,7 +9113,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of [method is_relative_path].\nThis includes all paths starting with [code]\"res://\"[/code], [code]\"user://\"[/code], [code]\"C:\\\"[/code], [code]\"/\"[/code], etc." }, { "name": "is_relative_path", @@ -8298,7 +9122,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current [Node] (if the string is derived from a [NodePath]), and may sometimes be prefixed with [code]\"./\"[/code]. This method is the opposite of [method is_absolute_path]." }, { "name": "simplify_path", @@ -8306,7 +9131,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without [code]\"./\"[/code], and all the unnecessary [code]\"..\"[/code] and [code]\"/\"[/code].\n[codeblock]\nvar simple_path = \"./path/to///../file\".simplify_path()\nprint(simple_path) # Prints \"path/file\"\n[/codeblock]" }, { "name": "get_base_dir", @@ -8314,7 +9140,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the base directory name.\n[codeblock]\nvar dir_path = \"/path/to/file.txt\".get_base_dir() # dir_path is \"/path/to\"\n[/codeblock]" }, { "name": "get_file", @@ -8322,7 +9149,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the file name, including the extension.\n[codeblock]\nvar file = \"/path/to/icon.png\".get_file() # file is \"icon.png\"\n[/codeblock]" }, { "name": "xml_escape", @@ -8337,7 +9165,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]\"[/code]) characters are also escaped." }, { "name": "xml_unescape", @@ -8345,7 +9174,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard." }, { "name": "uri_encode", @@ -8353,7 +9183,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request. See also [method uri_decode].\n[codeblocks]\n[gdscript]\nvar prefix = \"$DOCS_URL/?highlight=\"\nvar url = prefix + \"Godot Engine:docs\".uri_encode()\n\nprint(url) # Prints \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\n[/gdscript]\n[csharp]\nvar prefix = \"$DOCS_URL/?highlight=\";\nvar url = prefix + \"Godot Engine:docs\".URIEncode();\n\nGD.Print(url); // Prints \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\n[/csharp]\n[/codeblocks]" }, { "name": "uri_decode", @@ -8361,7 +9192,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request. See also [method uri_encode].\n[codeblocks]\n[gdscript]\nvar url = \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\nprint(url.uri_decode()) # Prints \"$DOCS_URL/?highlight=Godot Engine:docs\"\n[/gdscript]\n[csharp]\nvar url = \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\nGD.Print(url.URIDecode()) // Prints \"$DOCS_URL/?highlight=Godot Engine:docs\"\n[/csharp]\n[/codeblocks]" }, { "name": "c_escape", @@ -8369,7 +9201,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with special characters escaped using the C language standard." }, { "name": "c_unescape", @@ -8377,7 +9210,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\\'[/code], [code]\\\"[/code], [code]\\\\[/code], [code]\\a[/code], [code]\\b[/code], [code]\\f[/code], [code]\\n[/code], [code]\\r[/code], [code]\\t[/code], [code]\\v[/code].\n[b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\\uXXXX[/code] escape sequence." }, { "name": "json_escape", @@ -8385,7 +9219,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use [method c_unescape] to unescape the string, if necessary." }, { "name": "validate_node_name", @@ -8393,7 +9228,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with all characters that are not allowed in [member Node.name] ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]\"[/code] [code]%[/code]) replaced with underscores." }, { "name": "validate_filename", @@ -8401,7 +9237,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with all characters that are not allowed in [method is_valid_filename] replaced with underscores." }, { "name": "is_valid_identifier", @@ -8409,7 +9246,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]), and the first character may not be a digit.\n[codeblock]\nprint(\"node_2d\".is_valid_identifier()) # Prints true\nprint(\"TYPE_FLOAT\".is_valid_identifier()) # Prints true\nprint(\"1st_method\".is_valid_identifier()) # Prints false\nprint(\"MyMethod#2\".is_valid_identifier()) # Prints false\n[/codeblock]" }, { "name": "is_valid_int", @@ -8417,7 +9255,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. See also [method to_int].\n[codeblock]\nprint(\"7\".is_valid_int()) # Prints true\nprint(\"1.65\".is_valid_int()) # Prints false\nprint(\"Hi\".is_valid_int()) # Prints false\nprint(\"+3\".is_valid_int()) # Prints true\nprint(\"-12\".is_valid_int()) # Prints true\n[/codeblock]" }, { "name": "is_valid_float", @@ -8425,7 +9264,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point ([code].[/code]), and the exponent letter ([code]e[/code]). It may also be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. Any valid integer is also a valid float (see [method is_valid_int]). See also [method to_float].\n[codeblock]\nprint(\"1.7\".is_valid_float()) # Prints true\nprint(\"24\".is_valid_float()) # Prints true\nprint(\"7e3\".is_valid_float()) # Prints true\nprint(\"Hello\".is_valid_float()) # Prints false\n[/codeblock]" }, { "name": "is_valid_hex_number", @@ -8440,7 +9280,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns [code]true[/code] if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters [code]A[/code] to [code]F[/code] (either uppercase or lowercase), and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign.\nIf [param with_prefix] is [code]true[/code], the hexadecimal number needs to prefixed by [code]\"0x\"[/code] to be considered valid.\n[codeblock]\nprint(\"A08E\".is_valid_hex_number()) # Prints true\nprint(\"-AbCdEf\".is_valid_hex_number()) # Prints true\nprint(\"2.5\".is_valid_hex_number()) # Prints false\n\nprint(\"0xDEADC0DE\".is_valid_hex_number(true)) # Prints true\n[/codeblock]" }, { "name": "is_valid_html_color", @@ -8448,7 +9289,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see [method is_valid_hex_number]) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). Other HTML notations for colors, such as names or [code]hsl()[/code], are not considered valid. See also [method Color.html]." }, { "name": "is_valid_ip_address", @@ -8456,7 +9298,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]\"0.0.0.0\"[/code] and [code]\"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\"[/code] as valid." }, { "name": "is_valid_filename", @@ -8464,7 +9307,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string does not contain characters that are not allowed in file names ([code]:[/code] [code]/[/code] [code]\\[/code] [code]?[/code] [code]*[/code] [code]\"[/code] [code]|[/code] [code]%[/code] [code]<[/code] [code]>[/code])." }, { "name": "to_int", @@ -8472,7 +9316,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing an integer number into an [int]. This method removes any non-number character and stops at the first decimal point ([code].[/code]). See also [method is_valid_int].\n[codeblock]\nvar a = \"123\".to_int() # a is 123\nvar b = \"x1y2z3\".to_int() # b is 123\nvar c = \"-1.2.3\".to_int() # c is -1\nvar d = \"Hello!\".to_int() # d is 0\n[/codeblock]" }, { "name": "to_float", @@ -8480,7 +9325,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point ([code].[/code]) and the exponent letter ([code]e[/code]). See also [method is_valid_float].\n[codeblock]\nvar a = \"12.35\".to_float() # a is 12.35\nvar b = \"1.2.3\".to_float() # b is 1.2\nvar c = \"12xy3\".to_float() # c is 12.0\nvar d = \"1e3\".to_float() # d is 1000.0\nvar e = \"Hello!\".to_float() # e is 0.0\n[/codeblock]" }, { "name": "hex_to_int", @@ -8488,7 +9334,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing a hexadecimal number into an [int]. The string may be optionally prefixed with [code]\"0x\"[/code], and an additional [code]-[/code] prefix for negative numbers.\n[codeblocks]\n[gdscript]\nprint(\"0xff\".hex_to_int()) # Prints 255\nprint(\"ab\".hex_to_int()) # Prints 171\n[/gdscript]\n[csharp]\nGD.Print(\"0xff\".HexToInt()); // Prints 255\nGD.Print(\"ab\".HexToInt()); // Prints 171\n[/csharp]\n[/codeblocks]" }, { "name": "bin_to_int", @@ -8496,7 +9343,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing a binary number into an [int]. The string may optionally be prefixed with [code]\"0b\"[/code], and an additional [code]-[/code] prefix for negative numbers.\n[codeblocks]\n[gdscript]\nprint(\"101\".bin_to_int()) # Prints 5\nprint(\"0b101\".bin_to_int()) # Prints 5\nprint(\"-0b10\".bin_to_int()) # Prints -2\n[/gdscript]\n[csharp]\nGD.Print(\"101\".BinToInt()); // Prints 5\nGD.Print(\"0b101\".BinToInt()); // Prints 5\nGD.Print(\"-0b10\".BinToInt()); // Prints -2\n[/csharp]\n[/codeblocks]" }, { "name": "lpad", @@ -8515,7 +9363,8 @@ "type": "String", "default_value": "\" \"" } - ] + ], + "documentation": "Formats the string to be at least [param min_length] long by adding [param character]s to the left of the string, if necessary. See also [method rpad]." }, { "name": "rpad", @@ -8534,7 +9383,8 @@ "type": "String", "default_value": "\" \"" } - ] + ], + "documentation": "Formats the string to be at least [param min_length] long, by adding [param character]s to the right of the string, if necessary. See also [method lpad]." }, { "name": "pad_decimals", @@ -8548,7 +9398,8 @@ "name": "digits", "type": "int" } - ] + ], + "documentation": "Formats the string representing a number to have an exact number of [param digits] [i]after[/i] the decimal point." }, { "name": "pad_zeros", @@ -8562,7 +9413,8 @@ "name": "digits", "type": "int" } - ] + ], + "documentation": "Formats the string representing a number to have an exact number of [param digits] [i]before[/i] the decimal point." }, { "name": "trim_prefix", @@ -8576,7 +9428,8 @@ "name": "prefix", "type": "String" } - ] + ], + "documentation": "Removes the given [param prefix] from the start of the string, or returns the string unchanged." }, { "name": "trim_suffix", @@ -8590,7 +9443,8 @@ "name": "suffix", "type": "String" } - ] + ], + "documentation": "Removes the given [param suffix] from the end of the string, or returns the string unchanged." }, { "name": "to_ascii_buffer", @@ -8598,7 +9452,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to an [url=https://en.wikipedia.org/wiki/ASCII]ASCII[/url]/Latin-1 encoded [PackedByteArray]. This method is slightly faster than [method to_utf8_buffer], but replaces all unsupported characters with spaces. This is the inverse of [method PackedByteArray.get_string_from_ascii]." }, { "name": "to_utf8_buffer", @@ -8606,7 +9461,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method. This is the inverse of [method PackedByteArray.get_string_from_utf8]." }, { "name": "to_utf16_buffer", @@ -8614,7 +9470,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-16]UTF-16[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf16]." }, { "name": "to_utf32_buffer", @@ -8622,7 +9479,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-32]UTF-32[/url] encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_utf32]." }, { "name": "hex_decode", @@ -8630,7 +9488,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Decodes a hexadecimal string as a [PackedByteArray].\n[codeblocks]\n[gdscript]\nvar text = \"hello world\"\nvar encoded = text.to_utf8_buffer().hex_encode() # outputs \"68656c6c6f20776f726c64\"\nprint(buf.hex_decode().get_string_from_utf8())\n[/gdscript]\n[csharp]\nvar text = \"hello world\";\nvar encoded = text.ToUtf8Buffer().HexEncode(); // outputs \"68656c6c6f20776f726c64\"\nGD.Print(buf.HexDecode().GetStringFromUtf8());\n[/csharp]\n[/codeblocks]" }, { "name": "to_wchar_buffer", @@ -8638,7 +9497,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray]. This is the inverse of [method PackedByteArray.get_string_from_wchar]." }, { "name": "num_scientific", @@ -8652,7 +9512,8 @@ "name": "number", "type": "float" } - ] + ], + "documentation": "Converts the given [param number] to a string representation, in scientific notation.\n[codeblocks]\n[gdscript]\nvar n = -5.2e8\nprint(n) # Prints -520000000\nprint(String.NumScientific(n)) # Prints -5.2e+08\n[/gdscript]\n[csharp]\n// This method is not implemented in C#.\n// Use `string.ToString()` with \"e\" to achieve similar results.\nvar n = -5.2e8f;\nGD.Print(n); // Prints -520000000\nGD.Print(n.ToString(\"e1\")); // Prints -5.2e+008\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] In C#, this method is not implemented. To achieve similar results, see C#'s [url=https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings]Standard numeric format strings[/url]" }, { "name": "num", @@ -8671,7 +9532,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Converts a [float] to a string representation of a decimal number, with the number of decimal places specified in [param decimals].\nIf [param decimals] is [code]-1[/code] as by default, the string representation may only have up to 14 significant digits, with digits before the decimal point having priority over digits after.\nTrailing zeros are not included in the string. The last digit is rounded, not truncated.\n[b]Example:[/b]\n[codeblock]\nString.num(3.141593) # Returns \"3.141593\"\nString.num(3.141593, 3) # Returns \"3.142\"\nString.num(3.14159300) # Returns \"3.141593\"\n\n# Here, the last digit will be rounded up,\n# which reduces the total digit count, since trailing zeros are removed:\nString.num(42.129999, 5) # Returns \"42.13\"\n\n# If `decimals` is not specified, the maximum number of significant digits is 14:\nString.num(-0.0000012345432123454321) # Returns \"-0.00000123454321\"\nString.num(-10000.0000012345432123454321) # Returns \"-10000.0000012345\"\n[/codeblock]" }, { "name": "num_int64", @@ -8695,7 +9557,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Converts the given [param number] to a string representation, with the given [param base].\nBy default, [param base] is set to decimal ([code]10[/code]). Other common bases in programming include binary ([code]2[/code]), [url=https://en.wikipedia.org/wiki/Octal]octal[/url] ([code]8[/code]), hexadecimal ([code]16[/code]).\nIf [param capitalize_hex] is [code]true[/code], digits higher than 9 are represented in uppercase." }, { "name": "num_uint64", @@ -8719,7 +9582,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Converts the given unsigned [int] to a string representation, with the given [param base].\nBy default, [param base] is set to decimal ([code]10[/code]). Other common bases in programming include binary ([code]2[/code]), [url=https://en.wikipedia.org/wiki/Octal]octal[/url] ([code]8[/code]), hexadecimal ([code]16[/code]).\nIf [param capitalize_hex] is [code]true[/code], digits higher than 9 are represented in uppercase." }, { "name": "chr", @@ -8733,7 +9597,8 @@ "name": "char", "type": "int" } - ] + ], + "documentation": "Returns a single Unicode character from the decimal [param char]. You may use [url=https://unicodelookup.com/]unicodelookup.com[/url] or [url=https://www.unicode.org/charts/]unicode.org[/url] as points of reference.\n[codeblock]\nprint(String.chr(65)) # Prints \"A\"\nprint(String.chr(129302)) # Prints \"🤖\" (robot face emoji)\n[/codeblock]" }, { "name": "humanize_size", @@ -8747,12 +9612,14 @@ "name": "size", "type": "int" } - ] + ], + "documentation": "Converts [param size] which represents a number of bytes into a human-readable form.\nThe result is in [url=https://en.wikipedia.org/wiki/Binary_prefix#IEC_prefixes]IEC prefix format[/url], which may end in either [code]\"B\"[/code], [code]\"KiB\"[/code], [code]\"MiB\"[/code], [code]\"GiB\"[/code], [code]\"TiB\"[/code], [code]\"PiB\"[/code], or [code]\"EiB\"[/code]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [String] ([code]\"\"[/code])." }, { "index": 1, @@ -8761,7 +9628,8 @@ "name": "from", "type": "String" } - ] + ], + "documentation": "Constructs a [String] as a copy of the given [String]." }, { "index": 2, @@ -8770,7 +9638,8 @@ "name": "from", "type": "StringName" } - ] + ], + "documentation": "Constructs a new [String] from the given [StringName]." }, { "index": 3, @@ -8779,10 +9648,12 @@ "name": "from", "type": "NodePath" } - ] + ], + "documentation": "Constructs a new [String] from the given [NodePath]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources.\nSome string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning.\n[b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]\"\"[/code]). Otherwise, a string will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty strings." }, { "name": "Vector2", @@ -8791,58 +9662,69 @@ "members": [ { "name": "x", - "type": "float" + "type": "float", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "float" + "type": "float", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector2", - "value": "Vector2(0, 0)" + "value": "Vector2(0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector2", - "value": "Vector2(1, 1)" + "value": "Vector2(1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "INF", "type": "Vector2", - "value": "Vector2(inf, inf)" + "value": "Vector2(inf, inf)", + "documentation": "Infinity vector, a vector with all components set to [constant @GDScript.INF]." }, { "name": "LEFT", "type": "Vector2", - "value": "Vector2(-1, 0)" + "value": "Vector2(-1, 0)", + "documentation": "Left unit vector. Represents the direction of left." }, { "name": "RIGHT", "type": "Vector2", - "value": "Vector2(1, 0)" + "value": "Vector2(1, 0)", + "documentation": "Right unit vector. Represents the direction of right." }, { "name": "UP", "type": "Vector2", - "value": "Vector2(0, -1)" + "value": "Vector2(0, -1)", + "documentation": "Up unit vector. Y is down in 2D, so this vector points -Y." }, { "name": "DOWN", "type": "Vector2", - "value": "Vector2(0, 1)" + "value": "Vector2(0, 1)", + "documentation": "Down unit vector. Y is down in 2D, so this vector points +Y." } ], "enums": [ @@ -8851,11 +9733,13 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -8864,20 +9748,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "unary-", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Returns the negative value of the [Vector2]. This is the same as writing [code]Vector2(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative." }, { "name": "unary+", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -8886,77 +9774,92 @@ { "name": "*", "right_type": "int", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies each component of the [Vector2] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Divides each component of the [Vector2] by the given [int]." }, { "name": "*", "right_type": "float", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies each component of the [Vector2] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Divides each component of the [Vector2] by the given [int]." }, { "name": "==", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<=", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">=", "right_type": "Vector2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "+", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Adds each component of the [Vector2] by the components of the given [Vector2].\n[codeblock]\nprint(Vector2(10, 20) + Vector2(3, 4)) # Prints \"(13, 24)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Subtracts each component of the [Vector2] by the components of the given [Vector2].\n[codeblock]\nprint(Vector2(10, 20) - Vector2(3, 4)) # Prints \"(7, 16)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies each component of the [Vector2] by the given [int]." }, { "name": "/", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Divides each component of the [Vector2] by the given [int]." }, { "name": "*", "right_type": "Transform2D", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies each component of the [Vector2] by the given [int]." }, { "name": "in", @@ -8981,7 +9884,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians.\nFor example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees).\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle.png]Illustration of the returned angle.[/url]\nEquivalent to the result of [method @GlobalScope.atan2] when called with the vector's [member y] and [member x] as parameters: [code]atan2(y, x)[/code]." }, { "name": "angle_to", @@ -8995,7 +9899,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns the angle to the given vector, in radians.\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to.png]Illustration of the returned angle.[/url]" }, { "name": "angle_to_point", @@ -9009,7 +9914,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns the angle between the line connecting the two points and the X axis, in radians.\n[code]a.angle_to_point(b)[/code] is equivalent of doing [code](b - a).angle()[/code].\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/vector2_angle_to_point.png]Illustration of the returned angle.[/url]" }, { "name": "direction_to", @@ -9023,7 +9929,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code]." }, { "name": "distance_to", @@ -9037,7 +9944,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns the distance between this vector and [param to]." }, { "name": "distance_squared_to", @@ -9051,7 +9959,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns the squared distance between this vector and [param to].\nThis method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "length", @@ -9059,7 +9968,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -9067,7 +9977,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "limit_length", @@ -9082,7 +9993,8 @@ "type": "float", "default_value": "1.0" } - ] + ], + "documentation": "Returns the vector with a maximum length by limiting its length to [param length]." }, { "name": "normalized", @@ -9090,7 +10002,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized].\n[b]Note:[/b] This function may return incorrect values if the input vector length is near zero." }, { "name": "is_normalized", @@ -9098,7 +10011,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the vector is normalized, i.e. its length is approximately equal to 1." }, { "name": "is_equal_approx", @@ -9112,7 +10026,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_zero_approx", @@ -9120,7 +10035,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.\nThis method is faster than using [method is_equal_approx] with one value as a zero vector." }, { "name": "is_finite", @@ -9128,7 +10044,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "posmod", @@ -9142,7 +10059,8 @@ "name": "mod", "type": "float" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]." }, { "name": "posmodv", @@ -9156,7 +10074,8 @@ "name": "modv", "type": "Vector2" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components." }, { "name": "project", @@ -9170,7 +10089,8 @@ "name": "b", "type": "Vector2" } - ] + ], + "documentation": "Returns the result of projecting the vector onto the given vector [param b]." }, { "name": "lerp", @@ -9188,7 +10108,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation." }, { "name": "slerp", @@ -9206,7 +10127,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.\nThis method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp]." }, { "name": "cubic_interpolate", @@ -9232,7 +10154,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation." }, { "name": "cubic_interpolate_in_time", @@ -9270,7 +10193,8 @@ "name": "post_b_t", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.\nIt can perform smoother interpolation than [method cubic_interpolate] by the time values." }, { "name": "bezier_interpolate", @@ -9296,7 +10220,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points." }, { "name": "bezier_derivative", @@ -9322,7 +10247,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points." }, { "name": "max_axis_index", @@ -9330,7 +10256,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "min_axis_index", @@ -9338,7 +10265,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]." }, { "name": "move_toward", @@ -9356,7 +10284,8 @@ "name": "delta", "type": "float" } - ] + ], + "documentation": "Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value." }, { "name": "rotated", @@ -9370,7 +10299,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns the result of rotating this vector by [param angle] (in radians). See also [method @GlobalScope.deg_to_rad]." }, { "name": "orthogonal", @@ -9378,7 +10308,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length." }, { "name": "floor", @@ -9386,7 +10317,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a new vector with all components rounded down (towards negative infinity)." }, { "name": "ceil", @@ -9394,7 +10326,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a new vector with all components rounded up (towards positive infinity)." }, { "name": "round", @@ -9402,7 +10335,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero." }, { "name": "aspect", @@ -9410,7 +10344,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the aspect ratio of this vector, the ratio of [member x] to [member y]." }, { "name": "dot", @@ -9424,7 +10359,8 @@ "name": "with", "type": "Vector2" } - ] + ], + "documentation": "Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.\nThe dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.\nWhen using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.\n[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]." }, { "name": "slide", @@ -9438,7 +10374,8 @@ "name": "n", "type": "Vector2" } - ] + ], + "documentation": "Returns the result of sliding the vector along a plane defined by the given normal." }, { "name": "bounce", @@ -9452,7 +10389,8 @@ "name": "n", "type": "Vector2" } - ] + ], + "documentation": "Returns a new vector \"bounced off\" from a plane defined by the given normal." }, { "name": "reflect", @@ -9466,7 +10404,8 @@ "name": "n", "type": "Vector2" } - ] + ], + "documentation": "Returns the result of reflecting the vector from a line defined by the given direction vector [param n]." }, { "name": "cross", @@ -9480,7 +10419,8 @@ "name": "with", "type": "Vector2" } - ] + ], + "documentation": "Returns the 2D analog of the cross product for this vector and [param with].\nThis is the signed area of the parallelogram formed by the two vectors. If the second vector is clockwise from the first vector, then the cross product is the positive area. If counter-clockwise, the cross product is the negative area.\n[b]Note:[/b] Cross product is not defined in 2D mathematically. This method embeds the 2D vectors in the XY plane of 3D space and uses their cross product's Z component as the analog." }, { "name": "abs", @@ -9488,7 +10428,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "sign", @@ -9496,7 +10437,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns a new vector with each component set to [code]1.0[/code] if it's positive, [code]-1.0[/code] if it's negative, and [code]0.0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "clamp", @@ -9514,7 +10456,8 @@ "name": "max", "type": "Vector2" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "snapped", @@ -9528,7 +10471,8 @@ "name": "step", "type": "Vector2" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals." }, { "name": "from_angle", @@ -9542,12 +10486,14 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Creates a unit [Vector2] rotated to the given [param angle] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code].\n[codeblock]\nprint(Vector2.from_angle(0)) # Prints (1, 0).\nprint(Vector2(1, 0).angle()) # Prints 0, which is the angle used above.\nprint(Vector2.from_angle(PI / 2)) # Prints (0, 1).\n[/codeblock]" } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector2] with all components set to [code]0[/code]." }, { "index": 1, @@ -9556,7 +10502,8 @@ "name": "from", "type": "Vector2" } - ] + ], + "documentation": "Constructs a [Vector2] as a copy of the given [Vector2]." }, { "index": 2, @@ -9565,7 +10512,8 @@ "name": "from", "type": "Vector2i" } - ] + ], + "documentation": "Constructs a new [Vector2] from [Vector2i]." }, { "index": 3, @@ -9578,10 +10526,12 @@ "name": "y", "type": "float" } - ] + ], + "documentation": "Constructs a new [Vector2] from the given [param x] and [param y]." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 2-element structure that can be used to represent 2D coordinates or any other pair of numeric values.\nIt uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].\nSee [Vector2i] for its integer counterpart.\n[b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code]." }, { "name": "Vector2i", @@ -9590,63 +10540,75 @@ "members": [ { "name": "x", - "type": "int" + "type": "int", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "int" + "type": "int", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector2i", - "value": "Vector2i(0, 0)" + "value": "Vector2i(0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector2i", - "value": "Vector2i(1, 1)" + "value": "Vector2i(1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "MIN", "type": "Vector2i", - "value": "Vector2i(-2147483648, -2147483648)" + "value": "Vector2i(-2147483648, -2147483648)", + "documentation": "Min vector, a vector with all components equal to [code]INT32_MIN[/code]. Can be used as a negative integer equivalent of [constant Vector2.INF]." }, { "name": "MAX", "type": "Vector2i", - "value": "Vector2i(2147483647, 2147483647)" + "value": "Vector2i(2147483647, 2147483647)", + "documentation": "Max vector, a vector with all components equal to [code]INT32_MAX[/code]. Can be used as an integer equivalent of [constant Vector2.INF]." }, { "name": "LEFT", "type": "Vector2i", - "value": "Vector2i(-1, 0)" + "value": "Vector2i(-1, 0)", + "documentation": "Left unit vector. Represents the direction of left." }, { "name": "RIGHT", "type": "Vector2i", - "value": "Vector2i(1, 0)" + "value": "Vector2i(1, 0)", + "documentation": "Right unit vector. Represents the direction of right." }, { "name": "UP", "type": "Vector2i", - "value": "Vector2i(0, -1)" + "value": "Vector2i(0, -1)", + "documentation": "Up unit vector. Y is down in 2D, so this vector points -Y." }, { "name": "DOWN", "type": "Vector2i", - "value": "Vector2i(0, 1)" + "value": "Vector2i(0, 1)", + "documentation": "Down unit vector. Y is down in 2D, so this vector points +Y." } ], "enums": [ @@ -9655,11 +10617,13 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -9668,20 +10632,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are equal." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "unary-", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Returns the negative value of the [Vector2i]. This is the same as writing [code]Vector2i(-v.x, -v.y)[/code]. This operation flips the direction of the vector while keeping the same magnitude." }, { "name": "unary+", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -9690,82 +10658,98 @@ { "name": "*", "right_type": "int", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Multiplies each component of the [Vector2i] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Divides each component of the [Vector2i] by the given [int]." }, { "name": "%", "right_type": "int", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector2i(10, -20) % 7) # Prints \"(3, -6)\"\n[/codeblock]" }, { "name": "*", "right_type": "float", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Multiplies each component of the [Vector2i] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "Divides each component of the [Vector2i] by the given [int]." }, { "name": "==", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are equal." }, { "name": "!=", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "<", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors." }, { "name": "<=", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors." }, { "name": ">", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors." }, { "name": ">=", "right_type": "Vector2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector2i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors." }, { "name": "+", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Adds each component of the [Vector2i] by the components of the given [Vector2i].\n[codeblock]\nprint(Vector2i(10, 20) + Vector2i(3, 4)) # Prints \"(13, 24)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Subtracts each component of the [Vector2i] by the components of the given [Vector2i].\n[codeblock]\nprint(Vector2i(10, 20) - Vector2i(3, 4)) # Prints \"(7, 16)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Multiplies each component of the [Vector2i] by the given [int]." }, { "name": "/", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Divides each component of the [Vector2i] by the given [int]." }, { "name": "%", "right_type": "Vector2i", - "return_type": "Vector2i" + "return_type": "Vector2i", + "documentation": "Gets the remainder of each component of the [Vector2i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector2i(10, -20) % 7) # Prints \"(3, -6)\"\n[/codeblock]" }, { "name": "in", @@ -9785,7 +10769,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the aspect ratio of this vector, the ratio of [member x] to [member y]." }, { "name": "max_axis_index", @@ -9793,7 +10778,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "min_axis_index", @@ -9801,7 +10787,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]." }, { "name": "length", @@ -9809,7 +10796,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -9817,7 +10805,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "sign", @@ -9825,7 +10814,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3444277866 + "hash": 3444277866, + "documentation": "Returns a new vector with each component set to [code]1[/code] if it's positive, [code]-1[/code] if it's negative, and [code]0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "abs", @@ -9833,7 +10823,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3444277866 + "hash": 3444277866, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "clamp", @@ -9851,7 +10842,8 @@ "name": "max", "type": "Vector2i" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "snapped", @@ -9865,12 +10857,14 @@ "name": "step", "type": "Vector2i" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector2i] with all components set to [code]0[/code]." }, { "index": 1, @@ -9879,7 +10873,8 @@ "name": "from", "type": "Vector2i" } - ] + ], + "documentation": "Constructs a [Vector2i] as a copy of the given [Vector2i]." }, { "index": 2, @@ -9888,7 +10883,8 @@ "name": "from", "type": "Vector2" } - ] + ], + "documentation": "Constructs a new [Vector2i] from the given [Vector2] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector2.ceil], [method Vector2.floor] or [method Vector2.round] to this constructor instead." }, { "index": 3, @@ -9901,10 +10897,12 @@ "name": "y", "type": "int" } - ] + ], + "documentation": "Constructs a new [Vector2i] from the given [param x] and [param y]." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 2-element structure that can be used to represent 2D grid coordinates or any other pair of integers.\nIt uses integer coordinates and is therefore preferable to [Vector2] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector2] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.\n[b]Note:[/b] In a boolean context, a Vector2i will evaluate to [code]false[/code] if it's equal to [code]Vector2i(0, 0)[/code]. Otherwise, a Vector2i will always evaluate to [code]true[/code]." }, { "name": "Rect2", @@ -9912,27 +10910,32 @@ "members": [ { "name": "position", - "type": "Vector2" + "type": "Vector2", + "documentation": "The origin point. This is usually the top-left corner of the rectangle." }, { "name": "size", - "type": "Vector2" + "type": "Vector2", + "documentation": "The rectangle's width and height, starting from [member position]. Setting this value also affects the [member end] point.\n[b]Note:[/b] It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner. To get an equivalent rectangle with non-negative size, use [method abs]." }, { "name": "end", - "type": "Vector2" + "type": "Vector2", + "documentation": "The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size]." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [member position] and [member size] of the rectangles are exactly equal, respectively.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [member position] or [member size] of both rectangles are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "not", @@ -9941,17 +10944,20 @@ { "name": "==", "right_type": "Rect2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [member position] and [member size] of the rectangles are exactly equal, respectively.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Rect2", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [member position] or [member size] of both rectangles are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Transform2D", - "return_type": "Rect2" + "return_type": "Rect2", + "documentation": "Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix." }, { "name": "in", @@ -9971,7 +10977,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the center point of the rectangle. This is the same as [code]position + (size / 2.0)[/code]." }, { "name": "get_area", @@ -9979,7 +10986,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the rectangle's area. This is equivalent to [code]size.x * size.y[/code]. See also [method has_area]." }, { "name": "has_area", @@ -9987,7 +10995,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this rectangle has positive width and height. See also [method get_area]." }, { "name": "has_point", @@ -10001,7 +11010,8 @@ "name": "point", "type": "Vector2" } - ] + ], + "documentation": "Returns [code]true[/code] if the rectangle contains the given [param point]. By convention, points on the right and bottom edges are [b]not[/b] included.\n[b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative[/i] [member size]. Use [method abs] first to get a valid rectangle." }, { "name": "is_equal_approx", @@ -10015,7 +11025,8 @@ "name": "rect", "type": "Rect2" } - ] + ], + "documentation": "Returns [code]true[/code] if this rectangle and [param rect] are approximately equal, by calling [method Vector2.is_equal_approx] on the [member position] and the [member size]." }, { "name": "is_finite", @@ -10023,7 +11034,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this rectangle's values are finite, by calling [method Vector2.is_finite] on the [member position] and the [member size]." }, { "name": "intersects", @@ -10042,7 +11054,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns [code]true[/code] if this rectangle overlaps with the [param b] rectangle. The edges of both rectangles are excluded, unless [param include_borders] is [code]true[/code]." }, { "name": "encloses", @@ -10056,7 +11069,8 @@ "name": "b", "type": "Rect2" } - ] + ], + "documentation": "Returns [code]true[/code] if this rectangle [i]completely[/i] encloses the [param b] rectangle." }, { "name": "intersection", @@ -10070,7 +11084,8 @@ "name": "b", "type": "Rect2" } - ] + ], + "documentation": "Returns the intersection between this rectangle and [param b]. If the rectangles do not intersect, returns an empty [Rect2].\n[codeblocks]\n[gdscript]\nvar rect1 = Rect2(0, 0, 5, 10)\nvar rect2 = Rect2(2, 0, 8, 4)\n\nvar a = rect1.intersection(rect2) # a is Rect2(2, 0, 3, 4)\n[/gdscript]\n[csharp]\nvar rect1 = new Rect2(0, 0, 5, 10);\nvar rect2 = new Rect2(2, 0, 8, 4);\n\nvar a = rect1.Intersection(rect2); // a is Rect2(2, 0, 3, 4)\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you only need to know whether two rectangles are overlapping, use [method intersects], instead." }, { "name": "merge", @@ -10084,7 +11099,8 @@ "name": "b", "type": "Rect2" } - ] + ], + "documentation": "Returns a [Rect2] that encloses both this rectangle and [param b] around the edges. See also [method encloses]." }, { "name": "expand", @@ -10098,7 +11114,8 @@ "name": "to", "type": "Vector2" } - ] + ], + "documentation": "Returns a copy of this rectangle expanded to align the edges with the given [param to] point, if necessary.\n[codeblocks]\n[gdscript]\nvar rect = Rect2(0, 0, 5, 2)\n\nrect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2)\nrect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5)\n[/gdscript]\n[csharp]\nvar rect = new Rect2(0, 0, 5, 2);\n\nrect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2)\nrect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5)\n[/csharp]\n[/codeblocks]" }, { "name": "grow", @@ -10112,7 +11129,8 @@ "name": "amount", "type": "float" } - ] + ], + "documentation": "Returns a copy of this rectangle extended on all sides by the given [param amount]. A negative [param amount] shrinks the rectangle instead. See also [method grow_individual] and [method grow_side].\n[codeblocks]\n[gdscript]\nvar a = Rect2(4, 4, 8, 8).grow(4) # a is Rect2(0, 0, 16, 16)\nvar b = Rect2(0, 0, 8, 4).grow(2) # b is Rect2(-2, -2, 12, 8)\n[/gdscript]\n[csharp]\nvar a = new Rect2(4, 4, 8, 8).Grow(4); // a is Rect2(0, 0, 16, 16)\nvar b = new Rect2(0, 0, 8, 4).Grow(2); // b is Rect2(-2, -2, 12, 8)\n[/csharp]\n[/codeblocks]" }, { "name": "grow_side", @@ -10130,7 +11148,8 @@ "name": "amount", "type": "float" } - ] + ], + "documentation": "Returns a copy of this rectangle with its [param side] extended by the given [param amount] (see [enum Side] constants). A negative [param amount] shrinks the rectangle, instead. See also [method grow] and [method grow_individual]." }, { "name": "grow_individual", @@ -10156,7 +11175,8 @@ "name": "bottom", "type": "float" } - ] + ], + "documentation": "Returns a copy of this rectangle with its [param left], [param top], [param right], and [param bottom] sides extended by the given amounts. Negative values shrink the sides, instead. See also [method grow] and [method grow_side]." }, { "name": "abs", @@ -10164,12 +11184,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3107653634 + "hash": 3107653634, + "documentation": "Returns a [Rect2] equivalent to this rectangle, with its width and height modified to be non-negative values, and with its [member position] being the top-left corner of the rectangle.\n[codeblocks]\n[gdscript]\nvar rect = Rect2(25, 25, -100, -50)\nvar absolute = rect.abs() # absolute is Rect2(-75, -25, 100, 50)\n[/gdscript]\n[csharp]\nvar rect = new Rect2(25, 25, -100, -50);\nvar absolute = rect.Abs(); // absolute is Rect2(-75, -25, 100, 50)\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] It's recommended to use this method when [member size] is negative, as most other methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a [Rect2] with its [member position] and [member size] set to [constant Vector2.ZERO]." }, { "index": 1, @@ -10178,7 +11200,8 @@ "name": "from", "type": "Rect2" } - ] + ], + "documentation": "Constructs a [Rect2] as a copy of the given [Rect2]." }, { "index": 2, @@ -10187,7 +11210,8 @@ "name": "from", "type": "Rect2i" } - ] + ], + "documentation": "Constructs a [Rect2] from a [Rect2i]." }, { "index": 3, @@ -10200,7 +11224,8 @@ "name": "size", "type": "Vector2" } - ] + ], + "documentation": "Constructs a [Rect2] by [param position] and [param size]." }, { "index": 4, @@ -10221,10 +11246,12 @@ "name": "height", "type": "float" } - ] + ], + "documentation": "Constructs a [Rect2] by setting its [member position] to ([param x], [param y]), and its [member size] to ([param width], [param height])." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "The [Rect2] built-in [Variant] type represents an axis-aligned rectangle in a 2D space. It is defined by its [member position] and [member size], which are [Vector2]. It is frequently used for fast overlap tests (see [method intersects]). Although [Rect2] itself is axis-aligned, it can be combined with [Transform2D] to represent a rotated or skewed rectangle.\nFor integer coordinates, use [Rect2i]. The 3D equivalent to [Rect2] is [AABB].\n[b]Note:[/b] Negative values for [member size] are not supported. With negative size, most [Rect2] methods do not work correctly. Use [method abs] to get an equivalent [Rect2] with a non-negative size.\n[b]Note:[/b] In a boolean context, a [Rect2] evaluates to [code]false[/code] if both [member position] and [member size] are zero (equal to [constant Vector2.ZERO]). Otherwise, it always evaluates to [code]true[/code]." }, { "name": "Rect2i", @@ -10232,27 +11259,32 @@ "members": [ { "name": "position", - "type": "Vector2i" + "type": "Vector2i", + "documentation": "The origin point. This is usually the top-left corner of the rectangle." }, { "name": "size", - "type": "Vector2i" + "type": "Vector2i", + "documentation": "The rectangle's width and height, starting from [member position]. Setting this value also affects the [member end] point.\n[b]Note:[/b] It's recommended setting the width and height to non-negative values, as most methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner. To get an equivalent rectangle with non-negative size, use [method abs]." }, { "name": "end", - "type": "Vector2i" + "type": "Vector2i", + "documentation": "The ending point. This is usually the bottom-right corner of the rectangle, and is equivalent to [code]position + size[/code]. Setting this point affects the [member size]." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [member position] and [member size] of the rectangles are equal, respectively." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [member position] or [member size] of both rectangles are not equal." }, { "name": "not", @@ -10261,12 +11293,14 @@ { "name": "==", "right_type": "Rect2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [member position] and [member size] of the rectangles are equal, respectively." }, { "name": "!=", "right_type": "Rect2i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [member position] or [member size] of both rectangles are not equal." }, { "name": "in", @@ -10286,7 +11320,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3444277866 + "hash": 3444277866, + "documentation": "Returns the center point of the rectangle. This is the same as [code]position + (size / 2)[/code].\n[b]Note:[/b] If the [member size] is odd, the result will be rounded towards [member position]." }, { "name": "get_area", @@ -10294,7 +11329,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the rectangle's area. This is equivalent to [code]size.x * size.y[/code]. See also [method has_area]." }, { "name": "has_area", @@ -10302,7 +11338,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this rectangle has positive width and height. See also [method get_area]." }, { "name": "has_point", @@ -10316,7 +11353,8 @@ "name": "point", "type": "Vector2i" } - ] + ], + "documentation": "Returns [code]true[/code] if the rectangle contains the given [param point]. By convention, points on the right and bottom edges are [b]not[/b] included.\n[b]Note:[/b] This method is not reliable for [Rect2i] with a [i]negative[/i] [member size]. Use [method abs] first to get a valid rectangle." }, { "name": "intersects", @@ -10330,7 +11368,8 @@ "name": "b", "type": "Rect2i" } - ] + ], + "documentation": "Returns [code]true[/code] if this rectangle overlaps with the [param b] rectangle. The edges of both rectangles are excluded." }, { "name": "encloses", @@ -10344,7 +11383,8 @@ "name": "b", "type": "Rect2i" } - ] + ], + "documentation": "Returns [code]true[/code] if this [Rect2i] completely encloses another one." }, { "name": "intersection", @@ -10358,7 +11398,8 @@ "name": "b", "type": "Rect2i" } - ] + ], + "documentation": "Returns the intersection between this rectangle and [param b]. If the rectangles do not intersect, returns an empty [Rect2i].\n[codeblocks]\n[gdscript]\nvar a = Rect2i(0, 0, 5, 10)\nvar b = Rect2i(2, 0, 8, 4)\n\nvar c = a.intersection(b) # c is Rect2i(2, 0, 3, 4)\n[/gdscript]\n[csharp]\nvar a = new Rect2I(0, 0, 5, 10);\nvar b = new Rect2I(2, 0, 8, 4);\n\nvar c = rect1.Intersection(rect2); // c is Rect2I(2, 0, 3, 4)\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you only need to know whether two rectangles are overlapping, use [method intersects], instead." }, { "name": "merge", @@ -10372,7 +11413,8 @@ "name": "b", "type": "Rect2i" } - ] + ], + "documentation": "Returns a [Rect2i] that encloses both this rectangle and [param b] around the edges. See also [method encloses]." }, { "name": "expand", @@ -10386,7 +11428,8 @@ "name": "to", "type": "Vector2i" } - ] + ], + "documentation": "Returns a copy of this rectangle expanded to align the edges with the given [param to] point, if necessary.\n[codeblocks]\n[gdscript]\nvar rect = Rect2i(0, 0, 5, 2)\n\nrect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2)\nrect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5)\n[/gdscript]\n[csharp]\nvar rect = new Rect2I(0, 0, 5, 2);\n\nrect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2)\nrect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5)\n[/csharp]\n[/codeblocks]" }, { "name": "grow", @@ -10400,7 +11443,8 @@ "name": "amount", "type": "int" } - ] + ], + "documentation": "Returns a copy of this rectangle extended on all sides by the given [param amount]. A negative [param amount] shrinks the rectangle instead. See also [method grow_individual] and [method grow_side].\n[codeblocks]\n[gdscript]\nvar a = Rect2i(4, 4, 8, 8).grow(4) # a is Rect2i(0, 0, 16, 16)\nvar b = Rect2i(0, 0, 8, 4).grow(2) # b is Rect2i(-2, -2, 12, 8)\n[/gdscript]\n[csharp]\nvar a = new Rect2I(4, 4, 8, 8).Grow(4); // a is Rect2I(0, 0, 16, 16)\nvar b = new Rect2I(0, 0, 8, 4).Grow(2); // b is Rect2I(-2, -2, 12, 8)\n[/csharp]\n[/codeblocks]" }, { "name": "grow_side", @@ -10418,7 +11462,8 @@ "name": "amount", "type": "int" } - ] + ], + "documentation": "Returns a copy of this rectangle with its [param side] extended by the given [param amount] (see [enum Side] constants). A negative [param amount] shrinks the rectangle, instead. See also [method grow] and [method grow_individual]." }, { "name": "grow_individual", @@ -10444,7 +11489,8 @@ "name": "bottom", "type": "int" } - ] + ], + "documentation": "Returns a copy of this rectangle with its [param left], [param top], [param right], and [param bottom] sides extended by the given amounts. Negative values shrink the sides, instead. See also [method grow] and [method grow_side]." }, { "name": "abs", @@ -10452,12 +11498,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1469025700 + "hash": 1469025700, + "documentation": "Returns a [Rect2i] equivalent to this rectangle, with its width and height modified to be non-negative values, and with its [member position] being the top-left corner of the rectangle.\n[codeblocks]\n[gdscript]\nvar rect = Rect2i(25, 25, -100, -50)\nvar absolute = rect.abs() # absolute is Rect2i(-75, -25, 100, 50)\n[/gdscript]\n[csharp]\nvar rect = new Rect2I(25, 25, -100, -50);\nvar absolute = rect.Abs(); // absolute is Rect2I(-75, -25, 100, 50)\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] It's recommended to use this method when [member size] is negative, as most other methods in Godot assume that the [member position] is the top-left corner, and the [member end] is the bottom-right corner." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a [Rect2i] with its [member position] and [member size] set to [constant Vector2i.ZERO]." }, { "index": 1, @@ -10466,7 +11514,8 @@ "name": "from", "type": "Rect2i" } - ] + ], + "documentation": "Constructs a [Rect2i] as a copy of the given [Rect2i]." }, { "index": 2, @@ -10475,7 +11524,8 @@ "name": "from", "type": "Rect2" } - ] + ], + "documentation": "Constructs a [Rect2i] from a [Rect2]. The floating-point coordinates are truncated." }, { "index": 3, @@ -10488,7 +11538,8 @@ "name": "size", "type": "Vector2i" } - ] + ], + "documentation": "Constructs a [Rect2i] by [param position] and [param size]." }, { "index": 4, @@ -10509,10 +11560,12 @@ "name": "height", "type": "int" } - ] + ], + "documentation": "Constructs a [Rect2i] by setting its [member position] to ([param x], [param y]), and its [member size] to ([param width], [param height])." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "The [Rect2i] built-in [Variant] type represents an axis-aligned rectangle in a 2D space, using integer coordinates. It is defined by its [member position] and [member size], which are [Vector2i]. Because it does not rotate, it is frequently used for fast overlap tests (see [method intersects]).\nFor floating-point coordinates, see [Rect2].\n[b]Note:[/b] Negative values for [member size] are not supported. With negative size, most [Rect2i] methods do not work correctly. Use [method abs] to get an equivalent [Rect2i] with a non-negative size.\n[b]Note:[/b] In a boolean context, a [Rect2i] evaluates to [code]false[/code] if both [member position] and [member size] are zero (equal to [constant Vector2i.ZERO]). Otherwise, it always evaluates to [code]true[/code]." }, { "name": "Vector3", @@ -10521,107 +11574,128 @@ "members": [ { "name": "x", - "type": "float" + "type": "float", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "float" + "type": "float", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." }, { "name": "z", - "type": "float" + "type": "float", + "documentation": "The vector's Z component. Also accessible by using the index position [code][2][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", "type": "int", - "value": "2" + "value": "2", + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector3", - "value": "Vector3(0, 0, 0)" + "value": "Vector3(0, 0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector3", - "value": "Vector3(1, 1, 1)" + "value": "Vector3(1, 1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "INF", "type": "Vector3", - "value": "Vector3(inf, inf, inf)" + "value": "Vector3(inf, inf, inf)", + "documentation": "Infinity vector, a vector with all components set to [constant @GDScript.INF]." }, { "name": "LEFT", "type": "Vector3", - "value": "Vector3(-1, 0, 0)" + "value": "Vector3(-1, 0, 0)", + "documentation": "Left unit vector. Represents the local direction of left, and the global direction of west." }, { "name": "RIGHT", "type": "Vector3", - "value": "Vector3(1, 0, 0)" + "value": "Vector3(1, 0, 0)", + "documentation": "Right unit vector. Represents the local direction of right, and the global direction of east." }, { "name": "UP", "type": "Vector3", - "value": "Vector3(0, 1, 0)" + "value": "Vector3(0, 1, 0)", + "documentation": "Up unit vector." }, { "name": "DOWN", "type": "Vector3", - "value": "Vector3(0, -1, 0)" + "value": "Vector3(0, -1, 0)", + "documentation": "Down unit vector." }, { "name": "FORWARD", "type": "Vector3", - "value": "Vector3(0, 0, -1)" + "value": "Vector3(0, 0, -1)", + "documentation": "Forward unit vector. Represents the local direction of forward, and the global direction of north. Keep in mind that the forward direction for lights, cameras, etc is different from 3D assets like characters, which face towards the camera by convention. Use [constant Vector3.MODEL_FRONT] and similar constants when working in 3D asset space." }, { "name": "BACK", "type": "Vector3", - "value": "Vector3(0, 0, 1)" + "value": "Vector3(0, 0, 1)", + "documentation": "Back unit vector. Represents the local direction of back, and the global direction of south." }, { "name": "MODEL_LEFT", "type": "Vector3", - "value": "Vector3(1, 0, 0)" + "value": "Vector3(1, 0, 0)", + "documentation": "Unit vector pointing towards the left side of imported 3D assets." }, { "name": "MODEL_RIGHT", "type": "Vector3", - "value": "Vector3(-1, 0, 0)" + "value": "Vector3(-1, 0, 0)", + "documentation": "Unit vector pointing towards the right side of imported 3D assets." }, { "name": "MODEL_TOP", "type": "Vector3", - "value": "Vector3(0, 1, 0)" + "value": "Vector3(0, 1, 0)", + "documentation": "Unit vector pointing towards the top side (up) of imported 3D assets." }, { "name": "MODEL_BOTTOM", "type": "Vector3", - "value": "Vector3(0, -1, 0)" + "value": "Vector3(0, -1, 0)", + "documentation": "Unit vector pointing towards the bottom side (down) of imported 3D assets." }, { "name": "MODEL_FRONT", "type": "Vector3", - "value": "Vector3(0, 0, 1)" + "value": "Vector3(0, 0, 1)", + "documentation": "Unit vector pointing towards the front side (facing forward) of imported 3D assets." }, { "name": "MODEL_REAR", "type": "Vector3", - "value": "Vector3(0, 0, -1)" + "value": "Vector3(0, 0, -1)", + "documentation": "Unit vector pointing towards the rear side (back) of imported 3D assets." } ], "enums": [ @@ -10630,15 +11704,18 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", - "value": 2 + "value": 2, + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -10647,20 +11724,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "unary-", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Returns the negative value of the [Vector3]. This is the same as writing [code]Vector3(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative." }, { "name": "unary+", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -10669,87 +11750,104 @@ { "name": "*", "right_type": "int", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Divides each component of the [Vector3] by the given [int]." }, { "name": "*", "right_type": "float", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Divides each component of the [Vector3] by the given [int]." }, { "name": "==", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<=", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">=", "right_type": "Vector3", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "+", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Adds each component of the [Vector3] by the components of the given [Vector3].\n[codeblock]\nprint(Vector3(10, 20, 30) + Vector3(3, 4, 5)) # Prints \"(13, 24, 35)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Subtracts each component of the [Vector3] by the components of the given [Vector3].\n[codeblock]\nprint(Vector3(10, 20, 30) - Vector3(3, 4, 5)) # Prints \"(7, 16, 25)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "/", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Divides each component of the [Vector3] by the given [int]." }, { "name": "*", "right_type": "Quaternion", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "*", "right_type": "Basis", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "*", "right_type": "Transform3D", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3] by the given [int]." }, { "name": "in", @@ -10774,7 +11872,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]." }, { "name": "max_axis_index", @@ -10782,7 +11881,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "angle_to", @@ -10796,7 +11896,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the unsigned minimum angle to the given vector, in radians." }, { "name": "signed_angle_to", @@ -10814,7 +11915,8 @@ "name": "axis", "type": "Vector3" } - ] + ], + "documentation": "Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [param axis]." }, { "name": "direction_to", @@ -10828,7 +11930,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code]." }, { "name": "distance_to", @@ -10842,7 +11945,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the distance between this vector and [param to]." }, { "name": "distance_squared_to", @@ -10856,7 +11960,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the squared distance between this vector and [param to].\nThis method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "length", @@ -10864,7 +11969,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -10872,7 +11978,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "limit_length", @@ -10887,7 +11994,8 @@ "type": "float", "default_value": "1.0" } - ] + ], + "documentation": "Returns the vector with a maximum length by limiting its length to [param length]." }, { "name": "normalized", @@ -10895,7 +12003,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized].\n[b]Note:[/b] This function may return incorrect values if the input vector length is near zero." }, { "name": "is_normalized", @@ -10903,7 +12012,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the vector is normalized, i.e. its length is approximately equal to 1." }, { "name": "is_equal_approx", @@ -10917,7 +12027,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_zero_approx", @@ -10925,7 +12036,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.\nThis method is faster than using [method is_equal_approx] with one value as a zero vector." }, { "name": "is_finite", @@ -10933,7 +12045,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "inverse", @@ -10941,7 +12054,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the inverse of the vector. This is the same as [code]Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)[/code]." }, { "name": "clamp", @@ -10959,7 +12073,8 @@ "name": "max", "type": "Vector3" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "snapped", @@ -10973,7 +12088,8 @@ "name": "step", "type": "Vector3" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals." }, { "name": "rotated", @@ -10991,7 +12107,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns the result of rotating this vector around a given axis by [param angle] (in radians). The axis must be a normalized vector. See also [method @GlobalScope.deg_to_rad]." }, { "name": "lerp", @@ -11009,7 +12126,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation." }, { "name": "slerp", @@ -11027,7 +12145,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of spherical linear interpolation between this vector and [param to], by amount [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.\nThis method also handles interpolating the lengths if the input vectors have different lengths. For the special case of one or both input vectors having zero length, this method behaves like [method lerp]." }, { "name": "cubic_interpolate", @@ -11053,7 +12172,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation." }, { "name": "cubic_interpolate_in_time", @@ -11091,7 +12211,8 @@ "name": "post_b_t", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.\nIt can perform smoother interpolation than [method cubic_interpolate] by the time values." }, { "name": "bezier_interpolate", @@ -11117,7 +12238,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the point at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points." }, { "name": "bezier_derivative", @@ -11143,7 +12265,8 @@ "name": "t", "type": "float" } - ] + ], + "documentation": "Returns the derivative at the given [param t] on the [url=https://en.wikipedia.org/wiki/B%C3%A9zier_curve]Bézier curve[/url] defined by this vector and the given [param control_1], [param control_2], and [param end] points." }, { "name": "move_toward", @@ -11161,7 +12284,8 @@ "name": "delta", "type": "float" } - ] + ], + "documentation": "Returns a new vector moved toward [param to] by the fixed [param delta] amount. Will not go past the final value." }, { "name": "dot", @@ -11175,7 +12299,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Returns the dot product of this vector and [param with]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player.\nThe dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees.\nWhen using unit (normalized) vectors, the result will always be between [code]-1.0[/code] (180 degree angle) when the vectors are facing opposite directions, and [code]1.0[/code] (0 degree angle) when the vectors are aligned.\n[b]Note:[/b] [code]a.dot(b)[/code] is equivalent to [code]b.dot(a)[/code]." }, { "name": "cross", @@ -11189,7 +12314,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Returns the cross product of this vector and [param with]." }, { "name": "outer", @@ -11203,7 +12329,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Returns the outer product with [param with]." }, { "name": "abs", @@ -11211,7 +12338,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "floor", @@ -11219,7 +12347,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns a new vector with all components rounded down (towards negative infinity)." }, { "name": "ceil", @@ -11227,7 +12356,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns a new vector with all components rounded up (towards positive infinity)." }, { "name": "round", @@ -11235,7 +12365,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero." }, { "name": "posmod", @@ -11249,7 +12380,8 @@ "name": "mod", "type": "float" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]." }, { "name": "posmodv", @@ -11263,7 +12395,8 @@ "name": "modv", "type": "Vector3" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components." }, { "name": "project", @@ -11277,7 +12410,8 @@ "name": "b", "type": "Vector3" } - ] + ], + "documentation": "Returns the result of projecting the vector onto the given vector [param b]." }, { "name": "slide", @@ -11291,7 +12425,8 @@ "name": "n", "type": "Vector3" } - ] + ], + "documentation": "Returns a new vector slid along a plane defined by the given normal." }, { "name": "bounce", @@ -11305,7 +12440,8 @@ "name": "n", "type": "Vector3" } - ] + ], + "documentation": "Returns the vector \"bounced off\" from a plane defined by the given normal." }, { "name": "reflect", @@ -11319,7 +12455,8 @@ "name": "n", "type": "Vector3" } - ] + ], + "documentation": "Returns the result of reflecting the vector from a plane defined by the given normal [param n]." }, { "name": "sign", @@ -11327,7 +12464,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns a new vector with each component set to [code]1.0[/code] if it's positive, [code]-1.0[/code] if it's negative, and [code]0.0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "octahedron_encode", @@ -11335,7 +12473,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the octahedral-encoded (oct32) form of this [Vector3] as a [Vector2]. Since a [Vector2] occupies 1/3 less memory compared to [Vector3], this form of compression can be used to pass greater amounts of [method normalized] [Vector3]s without increasing storage or memory requirements. See also [method octahedron_decode].\n[b]Note:[/b] [method octahedron_encode] can only be used for [method normalized] vectors. [method octahedron_encode] does [i]not[/i] check whether this [Vector3] is normalized, and will return a value that does not decompress to the original value if the [Vector3] is not normalized.\n[b]Note:[/b] Octahedral compression is [i]lossy[/i], although visual differences are rarely perceptible in real world scenarios." }, { "name": "octahedron_decode", @@ -11349,12 +12488,14 @@ "name": "uv", "type": "Vector2" } - ] + ], + "documentation": "Returns the [Vector3] from an octahedral-compressed form created using [method octahedron_encode] (stored as a [Vector2])." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector3] with all components set to [code]0[/code]." }, { "index": 1, @@ -11363,7 +12504,8 @@ "name": "from", "type": "Vector3" } - ] + ], + "documentation": "Constructs a [Vector3] as a copy of the given [Vector3]." }, { "index": 2, @@ -11372,7 +12514,8 @@ "name": "from", "type": "Vector3i" } - ] + ], + "documentation": "Constructs a new [Vector3] from [Vector3i]." }, { "index": 3, @@ -11389,10 +12532,12 @@ "name": "z", "type": "float" } - ] + ], + "documentation": "Returns a [Vector3] with the given components." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 3-element structure that can be used to represent 3D coordinates or any other triplet of numeric values.\nIt uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].\nSee [Vector3i] for its integer counterpart.\n[b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code]." }, { "name": "Vector3i", @@ -11401,82 +12546,98 @@ "members": [ { "name": "x", - "type": "int" + "type": "int", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "int" + "type": "int", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." }, { "name": "z", - "type": "int" + "type": "int", + "documentation": "The vector's Z component. Also accessible by using the index position [code][2][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", "type": "int", - "value": "2" + "value": "2", + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector3i", - "value": "Vector3i(0, 0, 0)" + "value": "Vector3i(0, 0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector3i", - "value": "Vector3i(1, 1, 1)" + "value": "Vector3i(1, 1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "MIN", "type": "Vector3i", - "value": "Vector3i(-2147483648, -2147483648, -2147483648)" + "value": "Vector3i(-2147483648, -2147483648, -2147483648)", + "documentation": "Min vector, a vector with all components equal to [code]INT32_MIN[/code]. Can be used as a negative integer equivalent of [constant Vector3.INF]." }, { "name": "MAX", "type": "Vector3i", - "value": "Vector3i(2147483647, 2147483647, 2147483647)" + "value": "Vector3i(2147483647, 2147483647, 2147483647)", + "documentation": "Max vector, a vector with all components equal to [code]INT32_MAX[/code]. Can be used as an integer equivalent of [constant Vector3.INF]." }, { "name": "LEFT", "type": "Vector3i", - "value": "Vector3i(-1, 0, 0)" + "value": "Vector3i(-1, 0, 0)", + "documentation": "Left unit vector. Represents the local direction of left, and the global direction of west." }, { "name": "RIGHT", "type": "Vector3i", - "value": "Vector3i(1, 0, 0)" + "value": "Vector3i(1, 0, 0)", + "documentation": "Right unit vector. Represents the local direction of right, and the global direction of east." }, { "name": "UP", "type": "Vector3i", - "value": "Vector3i(0, 1, 0)" + "value": "Vector3i(0, 1, 0)", + "documentation": "Up unit vector." }, { "name": "DOWN", "type": "Vector3i", - "value": "Vector3i(0, -1, 0)" + "value": "Vector3i(0, -1, 0)", + "documentation": "Down unit vector." }, { "name": "FORWARD", "type": "Vector3i", - "value": "Vector3i(0, 0, -1)" + "value": "Vector3i(0, 0, -1)", + "documentation": "Forward unit vector. Represents the local direction of forward, and the global direction of north." }, { "name": "BACK", "type": "Vector3i", - "value": "Vector3i(0, 0, 1)" + "value": "Vector3i(0, 0, 1)", + "documentation": "Back unit vector. Represents the local direction of back, and the global direction of south." } ], "enums": [ @@ -11485,15 +12646,18 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", - "value": 2 + "value": 2, + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -11502,20 +12666,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are equal." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "unary-", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Returns the negative value of the [Vector3i]. This is the same as writing [code]Vector3i(-v.x, -v.y, -v.z)[/code]. This operation flips the direction of the vector while keeping the same magnitude." }, { "name": "unary+", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -11524,82 +12692,98 @@ { "name": "*", "right_type": "int", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Multiplies each component of the [Vector3i] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Divides each component of the [Vector3i] by the given [int]." }, { "name": "%", "right_type": "int", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector3i(10, -20, 30) % 7) # Prints \"(3, -6, 2)\"\n[/codeblock]" }, { "name": "*", "right_type": "float", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Vector3i] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Divides each component of the [Vector3i] by the given [int]." }, { "name": "==", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are equal." }, { "name": "!=", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "<", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors." }, { "name": "<=", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors." }, { "name": ">", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors." }, { "name": ">=", "right_type": "Vector3i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector3i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors." }, { "name": "+", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Adds each component of the [Vector3i] by the components of the given [Vector3i].\n[codeblock]\nprint(Vector3i(10, 20, 30) + Vector3i(3, 4, 5)) # Prints \"(13, 24, 35)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Subtracts each component of the [Vector3i] by the components of the given [Vector3i].\n[codeblock]\nprint(Vector3i(10, 20, 30) - Vector3i(3, 4, 5)) # Prints \"(7, 16, 25)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Multiplies each component of the [Vector3i] by the given [int]." }, { "name": "/", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Divides each component of the [Vector3i] by the given [int]." }, { "name": "%", "right_type": "Vector3i", - "return_type": "Vector3i" + "return_type": "Vector3i", + "documentation": "Gets the remainder of each component of the [Vector3i] with the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector3i(10, -20, 30) % 7) # Prints \"(3, -6, 2)\"\n[/codeblock]" }, { "name": "in", @@ -11619,7 +12803,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]." }, { "name": "max_axis_index", @@ -11627,7 +12812,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "length", @@ -11635,7 +12821,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -11643,7 +12830,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "sign", @@ -11651,7 +12839,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3729604559 + "hash": 3729604559, + "documentation": "Returns a new vector with each component set to [code]1[/code] if it's positive, [code]-1[/code] if it's negative, and [code]0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "abs", @@ -11659,7 +12848,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3729604559 + "hash": 3729604559, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "clamp", @@ -11677,7 +12867,8 @@ "name": "max", "type": "Vector3i" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "snapped", @@ -11691,12 +12882,14 @@ "name": "step", "type": "Vector3i" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector3i] with all components set to [code]0[/code]." }, { "index": 1, @@ -11705,7 +12898,8 @@ "name": "from", "type": "Vector3i" } - ] + ], + "documentation": "Constructs a [Vector3i] as a copy of the given [Vector3i]." }, { "index": 2, @@ -11714,7 +12908,8 @@ "name": "from", "type": "Vector3" } - ] + ], + "documentation": "Constructs a new [Vector3i] from the given [Vector3] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector3.ceil], [method Vector3.floor] or [method Vector3.round] to this constructor instead." }, { "index": 3, @@ -11731,10 +12926,12 @@ "name": "z", "type": "int" } - ] + ], + "documentation": "Returns a [Vector3i] with the given components." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 3-element structure that can be used to represent 3D grid coordinates or any other triplet of integers.\nIt uses integer coordinates and is therefore preferable to [Vector3] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector3] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.\n[b]Note:[/b] In a boolean context, a Vector3i will evaluate to [code]false[/code] if it's equal to [code]Vector3i(0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code]." }, { "name": "Transform2D", @@ -11743,44 +12940,52 @@ "members": [ { "name": "x", - "type": "Vector2" + "type": "Vector2", + "documentation": "The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]." }, { "name": "y", - "type": "Vector2" + "type": "Vector2", + "documentation": "The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]." }, { "name": "origin", - "type": "Vector2" + "type": "Vector2", + "documentation": "The origin vector (column 2, the third column). Equivalent to array index [code]2[/code]. The origin vector represents translation." } ], "constants": [ { "name": "IDENTITY", "type": "Transform2D", - "value": "Transform2D(1, 0, 0, 1, 0, 0)" + "value": "Transform2D(1, 0, 0, 1, 0, 0)", + "documentation": "The identity [Transform2D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation." }, { "name": "FLIP_X", "type": "Transform2D", - "value": "Transform2D(-1, 0, 0, 1, 0, 0)" + "value": "Transform2D(-1, 0, 0, 1, 0, 0)", + "documentation": "The [Transform2D] that will flip something along the X axis." }, { "name": "FLIP_Y", "type": "Transform2D", - "value": "Transform2D(1, 0, 0, -1, 0, 0)" + "value": "Transform2D(1, 0, 0, -1, 0, 0)", + "documentation": "The [Transform2D] that will flip something along the Y axis." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "not", @@ -11789,37 +12994,44 @@ { "name": "*", "right_type": "int", - "return_type": "Transform2D" + "return_type": "Transform2D", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "float", - "return_type": "Transform2D" + "return_type": "Transform2D", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "Vector2", - "return_type": "Vector2" + "return_type": "Vector2", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "Rect2", - "return_type": "Rect2" + "return_type": "Rect2", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." }, { "name": "==", "right_type": "Transform2D", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Transform2D", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Transform2D", - "return_type": "Transform2D" + "return_type": "Transform2D", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." }, { "name": "in", @@ -11834,7 +13046,8 @@ { "name": "*", "right_type": "PackedVector2Array", - "return_type": "PackedVector2Array" + "return_type": "PackedVector2Array", + "documentation": "This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly." } ], "methods": [ @@ -11844,7 +13057,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1420440541 + "hash": 1420440541, + "documentation": "Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling)." }, { "name": "affine_inverse", @@ -11852,7 +13066,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1420440541 + "hash": 1420440541, + "documentation": "Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation." }, { "name": "get_rotation", @@ -11860,7 +13075,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the transform's rotation (in radians)." }, { "name": "get_origin", @@ -11868,7 +13084,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the transform's origin (translation)." }, { "name": "get_scale", @@ -11876,7 +13093,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the scale." }, { "name": "get_skew", @@ -11884,7 +13102,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the transform's skew (in radians)." }, { "name": "orthonormalized", @@ -11892,7 +13111,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1420440541 + "hash": 1420440541, + "documentation": "Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1)." }, { "name": "rotated", @@ -11906,7 +13126,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns a copy of the transform rotated by the given [param angle] (in radians).\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "rotated_local", @@ -11920,7 +13141,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns a copy of the transform rotated by the given [param angle] (in radians).\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "scaled", @@ -11934,7 +13156,8 @@ "name": "scale", "type": "Vector2" } - ] + ], + "documentation": "Returns a copy of the transform scaled by the given [param scale] factor.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "scaled_local", @@ -11948,7 +13171,8 @@ "name": "scale", "type": "Vector2" } - ] + ], + "documentation": "Returns a copy of the transform scaled by the given [param scale] factor.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "translated", @@ -11962,7 +13186,8 @@ "name": "offset", "type": "Vector2" } - ] + ], + "documentation": "Returns a copy of the transform translated by the given [param offset].\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "translated_local", @@ -11976,7 +13201,8 @@ "name": "offset", "type": "Vector2" } - ] + ], + "documentation": "Returns a copy of the transform translated by the given [param offset].\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "determinant", @@ -11984,7 +13210,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the determinant of the basis matrix. If the basis is uniformly scaled, then its determinant equals the square of the scale factor.\nA negative determinant means the basis was flipped, so one part of the scale is negative. A zero determinant means the basis isn't invertible, and is usually considered invalid." }, { "name": "basis_xform", @@ -11998,7 +13225,8 @@ "name": "v", "type": "Vector2" } - ] + ], + "documentation": "Returns a vector transformed (multiplied) by the basis matrix.\nThis method does not account for translation (the origin vector)." }, { "name": "basis_xform_inv", @@ -12012,7 +13240,8 @@ "name": "v", "type": "Vector2" } - ] + ], + "documentation": "Returns a vector transformed (multiplied) by the inverse basis matrix.\nThis method does not account for translation (the origin vector)." }, { "name": "interpolate_with", @@ -12030,7 +13259,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0)." }, { "name": "is_conformal", @@ -12038,7 +13268,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the transform's basis is conformal, meaning it preserves angles and distance ratios, and may only be composed of rotation and uniform scale. Returns [code]false[/code] if the transform's basis has non-uniform scale or shear/skew. This can be used to validate if the transform is non-distorted, which is important for physics and other use cases." }, { "name": "is_equal_approx", @@ -12052,7 +13283,8 @@ "name": "xform", "type": "Transform2D" } - ] + ], + "documentation": "Returns [code]true[/code] if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_finite", @@ -12060,7 +13292,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "looking_at", @@ -12075,12 +13308,14 @@ "type": "Vector2", "default_value": "Vector2(0, 0)" } - ] + ], + "documentation": "Returns a copy of the transform rotated such that the rotated X-axis points towards the [param target] position.\nOperations take place in global space." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Transform2D] set to [constant IDENTITY]." }, { "index": 1, @@ -12089,7 +13324,8 @@ "name": "from", "type": "Transform2D" } - ] + ], + "documentation": "Constructs a [Transform2D] as a copy of the given [Transform2D]." }, { "index": 2, @@ -12102,7 +13338,8 @@ "name": "position", "type": "Vector2" } - ] + ], + "documentation": "Constructs the transform from a given angle (in radians) and position." }, { "index": 3, @@ -12123,7 +13360,8 @@ "name": "position", "type": "Vector2" } - ] + ], + "documentation": "Constructs the transform from a given angle (in radians), scale, skew (in radians) and position." }, { "index": 4, @@ -12140,10 +13378,12 @@ "name": "origin", "type": "Vector2" } - ] + ], + "documentation": "Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors)." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of three [Vector2] values: [member x], [member y], and the [member origin].\nFor more information, read the \"Matrices and transforms\" documentation article." }, { "name": "Vector4", @@ -12152,56 +13392,67 @@ "members": [ { "name": "x", - "type": "float" + "type": "float", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "float" + "type": "float", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." }, { "name": "z", - "type": "float" + "type": "float", + "documentation": "The vector's Z component. Also accessible by using the index position [code][2][/code]." }, { "name": "w", - "type": "float" + "type": "float", + "documentation": "The vector's W component. Also accessible by using the index position [code][3][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", "type": "int", - "value": "2" + "value": "2", + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_W", "type": "int", - "value": "3" + "value": "3", + "documentation": "Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector4", - "value": "Vector4(0, 0, 0, 0)" + "value": "Vector4(0, 0, 0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector4", - "value": "Vector4(1, 1, 1, 1)" + "value": "Vector4(1, 1, 1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "INF", "type": "Vector4", - "value": "Vector4(inf, inf, inf, inf)" + "value": "Vector4(inf, inf, inf, inf)", + "documentation": "Infinity vector, a vector with all components set to [constant @GDScript.INF]." } ], "enums": [ @@ -12210,19 +13461,23 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", - "value": 2 + "value": 2, + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_W", - "value": 3 + "value": 3, + "documentation": "Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -12231,20 +13486,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "unary-", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Returns the negative value of the [Vector4]. This is the same as writing [code]Vector4(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude. With floats, the number zero can be either positive or negative." }, { "name": "unary+", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -12253,77 +13512,92 @@ { "name": "*", "right_type": "int", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies each component of the [Vector4] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Divides each component of the [Vector4] by the given [int]." }, { "name": "*", "right_type": "float", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies each component of the [Vector4] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Divides each component of the [Vector4] by the given [int]." }, { "name": "==", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "!=", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "<=", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": ">=", "right_type": "Vector4", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this operator may not be accurate if NaNs are included." }, { "name": "+", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Adds each component of the [Vector4] by the components of the given [Vector4].\n[codeblock]\nprint(Vector4(10, 20, 30, 40) + Vector4(3, 4, 5, 6)) # Prints \"(13, 24, 35, 46)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Subtracts each component of the [Vector4] by the components of the given [Vector4].\n[codeblock]\nprint(Vector4(10, 20, 30, 40) - Vector4(3, 4, 5, 6)) # Prints \"(7, 16, 25, 34)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies each component of the [Vector4] by the given [int]." }, { "name": "/", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Divides each component of the [Vector4] by the given [int]." }, { "name": "*", "right_type": "Projection", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies each component of the [Vector4] by the given [int]." }, { "name": "in", @@ -12343,7 +13617,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W]." }, { "name": "max_axis_index", @@ -12351,7 +13626,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "length", @@ -12359,7 +13635,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -12367,7 +13644,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "abs", @@ -12375,7 +13653,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "sign", @@ -12383,7 +13662,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns a new vector with each component set to [code]1.0[/code] if it's positive, [code]-1.0[/code] if it's negative, and [code]0.0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "floor", @@ -12391,7 +13671,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns a new vector with all components rounded down (towards negative infinity)." }, { "name": "ceil", @@ -12399,7 +13680,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns a new vector with all components rounded up (towards positive infinity)." }, { "name": "round", @@ -12407,7 +13689,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns a new vector with all components rounded to the nearest integer, with halfway cases rounded away from zero." }, { "name": "lerp", @@ -12425,7 +13708,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation." }, { "name": "cubic_interpolate", @@ -12451,7 +13735,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation." }, { "name": "cubic_interpolate_in_time", @@ -12489,7 +13774,8 @@ "name": "post_b_t", "type": "float" } - ] + ], + "documentation": "Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.\nIt can perform smoother interpolation than [method cubic_interpolate] by the time values." }, { "name": "posmod", @@ -12503,7 +13789,8 @@ "name": "mod", "type": "float" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param mod]." }, { "name": "posmodv", @@ -12517,7 +13804,8 @@ "name": "modv", "type": "Vector4" } - ] + ], + "documentation": "Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [param modv]'s components." }, { "name": "snapped", @@ -12531,7 +13819,8 @@ "name": "step", "type": "Vector4" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals." }, { "name": "clamp", @@ -12549,7 +13838,8 @@ "name": "max", "type": "Vector4" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "normalized", @@ -12557,7 +13847,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns the result of scaling the vector to unit length. Equivalent to [code]v / v.length()[/code]. See also [method is_normalized].\n[b]Note:[/b] This function may return incorrect values if the input vector length is near zero." }, { "name": "is_normalized", @@ -12565,7 +13856,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the vector is normalized, i.e. its length is approximately equal to 1." }, { "name": "direction_to", @@ -12579,7 +13871,8 @@ "name": "to", "type": "Vector4" } - ] + ], + "documentation": "Returns the normalized vector pointing from this vector to [param to]. This is equivalent to using [code](b - a).normalized()[/code]." }, { "name": "distance_to", @@ -12593,7 +13886,8 @@ "name": "to", "type": "Vector4" } - ] + ], + "documentation": "Returns the distance between this vector and [param to]." }, { "name": "distance_squared_to", @@ -12607,7 +13901,8 @@ "name": "to", "type": "Vector4" } - ] + ], + "documentation": "Returns the squared distance between this vector and [param to].\nThis method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "dot", @@ -12621,7 +13916,8 @@ "name": "with", "type": "Vector4" } - ] + ], + "documentation": "Returns the dot product of this vector and [param with]." }, { "name": "inverse", @@ -12629,7 +13925,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 80860099 + "hash": 80860099, + "documentation": "Returns the inverse of the vector. This is the same as [code]Vector4(1.0 / v.x, 1.0 / v.y, 1.0 / v.z, 1.0 / v.w)[/code]." }, { "name": "is_equal_approx", @@ -12643,7 +13940,8 @@ "name": "to", "type": "Vector4" } - ] + ], + "documentation": "Returns [code]true[/code] if this vector and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_zero_approx", @@ -12651,7 +13949,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector's values are approximately zero, by running [method @GlobalScope.is_zero_approx] on each component.\nThis method is faster than using [method is_equal_approx] with one value as a zero vector." }, { "name": "is_finite", @@ -12659,12 +13958,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this vector is finite, by calling [method @GlobalScope.is_finite] on each component." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector4] with all components set to [code]0[/code]." }, { "index": 1, @@ -12673,7 +13974,8 @@ "name": "from", "type": "Vector4" } - ] + ], + "documentation": "Constructs a [Vector4] as a copy of the given [Vector4]." }, { "index": 2, @@ -12682,7 +13984,8 @@ "name": "from", "type": "Vector4i" } - ] + ], + "documentation": "Constructs a new [Vector4] from the given [Vector4i]." }, { "index": 3, @@ -12703,10 +14006,12 @@ "name": "w", "type": "float" } - ] + ], + "documentation": "Returns a [Vector4] with the given components." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 4-element structure that can be used to represent 4D coordinates or any other quadruplet of numeric values.\nIt uses floating-point coordinates. By default, these floating-point values use 32-bit precision, unlike [float] which is always 64-bit. If double precision is needed, compile the engine with the option [code]precision=double[/code].\nSee [Vector4i] for its integer counterpart.\n[b]Note:[/b] In a boolean context, a Vector4 will evaluate to [code]false[/code] if it's equal to [code]Vector4(0, 0, 0, 0)[/code]. Otherwise, a Vector4 will always evaluate to [code]true[/code]." }, { "name": "Vector4i", @@ -12715,61 +14020,73 @@ "members": [ { "name": "x", - "type": "int" + "type": "int", + "documentation": "The vector's X component. Also accessible by using the index position [code][0][/code]." }, { "name": "y", - "type": "int" + "type": "int", + "documentation": "The vector's Y component. Also accessible by using the index position [code][1][/code]." }, { "name": "z", - "type": "int" + "type": "int", + "documentation": "The vector's Z component. Also accessible by using the index position [code][2][/code]." }, { "name": "w", - "type": "int" + "type": "int", + "documentation": "The vector's W component. Also accessible by using the index position [code][3][/code]." } ], "constants": [ { "name": "AXIS_X", "type": "int", - "value": "0" + "value": "0", + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", "type": "int", - "value": "1" + "value": "1", + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", "type": "int", - "value": "2" + "value": "2", + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_W", "type": "int", - "value": "3" + "value": "3", + "documentation": "Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "ZERO", "type": "Vector4i", - "value": "Vector4i(0, 0, 0, 0)" + "value": "Vector4i(0, 0, 0, 0)", + "documentation": "Zero vector, a vector with all components set to [code]0[/code]." }, { "name": "ONE", "type": "Vector4i", - "value": "Vector4i(1, 1, 1, 1)" + "value": "Vector4i(1, 1, 1, 1)", + "documentation": "One vector, a vector with all components set to [code]1[/code]." }, { "name": "MIN", "type": "Vector4i", - "value": "Vector4i(-2147483648, -2147483648, -2147483648, -2147483648)" + "value": "Vector4i(-2147483648, -2147483648, -2147483648, -2147483648)", + "documentation": "Min vector, a vector with all components equal to [code]INT32_MIN[/code]. Can be used as a negative integer equivalent of [constant Vector4.INF]." }, { "name": "MAX", "type": "Vector4i", - "value": "Vector4i(2147483647, 2147483647, 2147483647, 2147483647)" + "value": "Vector4i(2147483647, 2147483647, 2147483647, 2147483647)", + "documentation": "Max vector, a vector with all components equal to [code]INT32_MAX[/code]. Can be used as an integer equivalent of [constant Vector4.INF]." } ], "enums": [ @@ -12778,19 +14095,23 @@ "values": [ { "name": "AXIS_X", - "value": 0 + "value": 0, + "documentation": "Enumerated value for the X axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Y", - "value": 1 + "value": 1, + "documentation": "Enumerated value for the Y axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_Z", - "value": 2 + "value": 2, + "documentation": "Enumerated value for the Z axis. Returned by [method max_axis_index] and [method min_axis_index]." }, { "name": "AXIS_W", - "value": 3 + "value": 3, + "documentation": "Enumerated value for the W axis. Returned by [method max_axis_index] and [method min_axis_index]." } ] } @@ -12799,20 +14120,24 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "unary-", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Returns the negative value of the [Vector4i]. This is the same as writing [code]Vector4i(-v.x, -v.y, -v.z, -v.w)[/code]. This operation flips the direction of the vector while keeping the same magnitude." }, { "name": "unary+", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -12821,82 +14146,98 @@ { "name": "*", "right_type": "int", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Multiplies each component of the [Vector4i] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Divides each component of the [Vector4i] by the given [int]." }, { "name": "%", "right_type": "int", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Gets the remainder of each component of the [Vector4i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector4i(10, -20, 30, -40) % 7) # Prints \"(3, -6, 2, -5)\"\n[/codeblock]" }, { "name": "*", "right_type": "float", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Multiplies each component of the [Vector4i] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Divides each component of the [Vector4i] by the given [int]." }, { "name": "==", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are exactly equal." }, { "name": "!=", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the vectors are not equal." }, { "name": "<", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors." }, { "name": "<=", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors." }, { "name": ">", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors." }, { "name": ">=", "right_type": "Vector4i", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares two [Vector4i] vectors by first checking if the X value of the left vector is greater than or equal to the X value of the [param right] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, Z values of the two vectors, and then with the W values. This operator is useful for sorting vectors." }, { "name": "+", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Adds each component of the [Vector4i] by the components of the given [Vector4i].\n[codeblock]\nprint(Vector4i(10, 20, 30, 40) + Vector4i(3, 4, 5, 6)) # Prints \"(13, 24, 35, 46)\"\n[/codeblock]" }, { "name": "-", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Subtracts each component of the [Vector4i] by the components of the given [Vector4i].\n[codeblock]\nprint(Vector4i(10, 20, 30, 40) - Vector4i(3, 4, 5, 6)) # Prints \"(7, 16, 25, 34)\"\n[/codeblock]" }, { "name": "*", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Multiplies each component of the [Vector4i] by the given [int]." }, { "name": "/", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Divides each component of the [Vector4i] by the given [int]." }, { "name": "%", "right_type": "Vector4i", - "return_type": "Vector4i" + "return_type": "Vector4i", + "documentation": "Gets the remainder of each component of the [Vector4i] with the the given [int]. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using [method @GlobalScope.posmod] instead if you want to handle negative numbers.\n[codeblock]\nprint(Vector4i(10, -20, 30, -40) % 7) # Prints \"(3, -6, 2, -5)\"\n[/codeblock]" }, { "name": "in", @@ -12916,7 +14257,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W]." }, { "name": "max_axis_index", @@ -12924,7 +14266,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]." }, { "name": "length", @@ -12932,7 +14275,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length (magnitude) of this vector." }, { "name": "length_squared", @@ -12940,7 +14284,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the squared length (squared magnitude) of this vector.\nThis method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula." }, { "name": "sign", @@ -12948,7 +14293,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4134919947 + "hash": 4134919947, + "documentation": "Returns a new vector with each component set to [code]1[/code] if it's positive, [code]-1[/code] if it's negative, and [code]0[/code] if it's zero. The result is identical to calling [method @GlobalScope.sign] on each component." }, { "name": "abs", @@ -12956,7 +14302,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4134919947 + "hash": 4134919947, + "documentation": "Returns a new vector with all components in absolute values (i.e. positive)." }, { "name": "clamp", @@ -12974,7 +14321,8 @@ "name": "max", "type": "Vector4i" } - ] + ], + "documentation": "Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "snapped", @@ -12988,12 +14336,14 @@ "name": "step", "type": "Vector4i" } - ] + ], + "documentation": "Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Vector4i] with all components set to [code]0[/code]." }, { "index": 1, @@ -13002,7 +14352,8 @@ "name": "from", "type": "Vector4i" } - ] + ], + "documentation": "Constructs a [Vector4i] as a copy of the given [Vector4i]." }, { "index": 2, @@ -13011,7 +14362,8 @@ "name": "from", "type": "Vector4" } - ] + ], + "documentation": "Constructs a new [Vector4i] from the given [Vector4] by truncating components' fractional parts (rounding towards zero). For a different behavior consider passing the result of [method Vector4.ceil], [method Vector4.floor] or [method Vector4.round] to this constructor instead." }, { "index": 3, @@ -13032,10 +14384,12 @@ "name": "w", "type": "int" } - ] + ], + "documentation": "Returns a [Vector4i] with the given components." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 4-element structure that can be used to represent 4D grid coordinates or any other quadruplet of integers.\nIt uses integer coordinates and is therefore preferable to [Vector4] when exact precision is required. Note that the values are limited to 32 bits, and unlike [Vector4] this cannot be configured with an engine build option. Use [int] or [PackedInt64Array] if 64-bit values are needed.\n[b]Note:[/b] In a boolean context, a Vector4i will evaluate to [code]false[/code] if it's equal to [code]Vector4i(0, 0, 0, 0)[/code]. Otherwise, a Vector3i will always evaluate to [code]true[/code]." }, { "name": "Plane", @@ -13043,60 +14397,72 @@ "members": [ { "name": "x", - "type": "float" + "type": "float", + "documentation": "The X component of the plane's [member normal] vector." }, { "name": "y", - "type": "float" + "type": "float", + "documentation": "The Y component of the plane's [member normal] vector." }, { "name": "z", - "type": "float" + "type": "float", + "documentation": "The Z component of the plane's [member normal] vector." }, { "name": "d", - "type": "float" + "type": "float", + "documentation": "The distance from the origin to the plane, expressed in terms of [member normal] (according to its direction and magnitude). Actual absolute distance from the origin to the plane can be calculated as [code]abs(d) / normal.length()[/code] (if [member normal] has zero length then this [Plane] does not represent a valid plane).\nIn the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code skip-lint]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property." }, { "name": "normal", - "type": "Vector3" + "type": "Vector3", + "documentation": "The normal of the plane, typically a unit vector. Shouldn't be a zero vector as [Plane] with such [member normal] does not represent a valid plane.\nIn the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code skip-lint]d[/code] is the [member d] property." } ], "constants": [ { "name": "PLANE_YZ", "type": "Plane", - "value": "Plane(1, 0, 0, 0)" + "value": "Plane(1, 0, 0, 0)", + "documentation": "A plane that extends in the Y and Z axes (normal vector points +X)." }, { "name": "PLANE_XZ", "type": "Plane", - "value": "Plane(0, 1, 0, 0)" + "value": "Plane(0, 1, 0, 0)", + "documentation": "A plane that extends in the X and Z axes (normal vector points +Y)." }, { "name": "PLANE_XY", "type": "Plane", - "value": "Plane(0, 0, 1, 0)" + "value": "Plane(0, 0, 1, 0)", + "documentation": "A plane that extends in the X and Y axes (normal vector points +Z)." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the planes are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the planes are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "unary-", - "return_type": "Plane" + "return_type": "Plane", + "documentation": "Returns the negative value of the [Plane]. This is the same as writing [code]Plane(-p.normal, -p.d)[/code]. This operation flips the direction of the normal vector and also flips the distance value, resulting in a Plane that is in the same place, but facing the opposite direction." }, { "name": "unary+", - "return_type": "Plane" + "return_type": "Plane", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -13105,17 +14471,20 @@ { "name": "==", "right_type": "Plane", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the planes are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Plane", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the planes are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Transform3D", - "return_type": "Plane" + "return_type": "Plane", + "documentation": "Inversely transforms (multiplies) the [Plane] by the given [Transform3D] transformation matrix." }, { "name": "in", @@ -13135,7 +14504,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1051796340 + "hash": 1051796340, + "documentation": "Returns a copy of the plane, with normalized [member normal] (so it's a unit vector). Returns [code]Plane(0, 0, 0, 0)[/code] if [member normal] can't be normalized (it has zero length)." }, { "name": "get_center", @@ -13143,7 +14513,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the center of the plane." }, { "name": "is_equal_approx", @@ -13157,7 +14528,8 @@ "name": "to_plane", "type": "Plane" } - ] + ], + "documentation": "Returns [code]true[/code] if this plane and [param to_plane] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_finite", @@ -13165,7 +14537,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this plane is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "is_point_over", @@ -13179,7 +14552,8 @@ "name": "point", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] if [param point] is located above the plane." }, { "name": "distance_to", @@ -13193,7 +14567,8 @@ "name": "point", "type": "Vector3" } - ] + ], + "documentation": "Returns the shortest distance from the plane to the position [param point]. If the point is above the plane, the distance will be positive. If below, the distance will be negative." }, { "name": "has_point", @@ -13212,7 +14587,8 @@ "type": "float", "default_value": "1e-05" } - ] + ], + "documentation": "Returns [code]true[/code] if [param point] is inside the plane. Comparison uses a custom minimum [param tolerance] threshold." }, { "name": "project", @@ -13226,7 +14602,8 @@ "name": "point", "type": "Vector3" } - ] + ], + "documentation": "Returns the orthogonal projection of [param point] into a point in the plane." }, { "name": "intersect_3", @@ -13244,7 +14621,8 @@ "name": "c", "type": "Plane" } - ] + ], + "documentation": "Returns the intersection point of the three planes [param b], [param c] and this plane. If no intersection is found, [code]null[/code] is returned." }, { "name": "intersects_ray", @@ -13262,7 +14640,8 @@ "name": "dir", "type": "Vector3" } - ] + ], + "documentation": "Returns the intersection point of a ray consisting of the position [param from] and the direction normal [param dir] with this plane. If no intersection is found, [code]null[/code] is returned." }, { "name": "intersects_segment", @@ -13280,12 +14659,14 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the intersection point of a segment from position [param from] to position [param to] with this plane. If no intersection is found, [code]null[/code] is returned." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Plane] with all components set to [code]0[/code]." }, { "index": 1, @@ -13294,7 +14675,8 @@ "name": "from", "type": "Plane" } - ] + ], + "documentation": "Constructs a [Plane] as a copy of the given [Plane]." }, { "index": 2, @@ -13303,7 +14685,8 @@ "name": "normal", "type": "Vector3" } - ] + ], + "documentation": "Creates a plane from the normal vector. The plane will intersect the origin.\nThe [param normal] of the plane must be a unit vector." }, { "index": 3, @@ -13316,7 +14699,8 @@ "name": "d", "type": "float" } - ] + ], + "documentation": "Creates a plane from the normal vector and the plane's distance from the origin.\nThe [param normal] of the plane must be a unit vector." }, { "index": 4, @@ -13329,7 +14713,8 @@ "name": "point", "type": "Vector3" } - ] + ], + "documentation": "Creates a plane from the normal vector and a point on the plane.\nThe [param normal] of the plane must be a unit vector." }, { "index": 5, @@ -13346,7 +14731,8 @@ "name": "point3", "type": "Vector3" } - ] + ], + "documentation": "Creates a plane from the three points, given in clockwise order." }, { "index": 6, @@ -13367,10 +14753,12 @@ "name": "d", "type": "float" } - ] + ], + "documentation": "Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [param a], [param b] and [param c], and the plane has a distance of [param d] from the origin." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "Represents a normalized plane equation. [member normal] is the normal of the plane (a, b, c normalized), and [member d] is the distance from the origin to the plane (in the direction of \"normal\"). \"Over\" or \"Above\" the plane is considered the side of the plane towards where the normal is pointing." }, { "name": "Quaternion", @@ -13379,46 +14767,55 @@ "members": [ { "name": "x", - "type": "float" + "type": "float", + "documentation": "X component of the quaternion (imaginary [code]i[/code] axis part).\nQuaternion components should usually not be manipulated directly." }, { "name": "y", - "type": "float" + "type": "float", + "documentation": "Y component of the quaternion (imaginary [code]j[/code] axis part).\nQuaternion components should usually not be manipulated directly." }, { "name": "z", - "type": "float" + "type": "float", + "documentation": "Z component of the quaternion (imaginary [code]k[/code] axis part).\nQuaternion components should usually not be manipulated directly." }, { "name": "w", - "type": "float" + "type": "float", + "documentation": "W component of the quaternion (real part).\nQuaternion components should usually not be manipulated directly." } ], "constants": [ { "name": "IDENTITY", "type": "Quaternion", - "value": "Quaternion(0, 0, 0, 1)" + "value": "Quaternion(0, 0, 0, 1)", + "documentation": "The identity quaternion, representing no rotation. Equivalent to an identity [Basis] matrix. If a vector is transformed by an identity quaternion, it will not change." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the quaternions are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the quaternions are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "unary-", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Returns the negative value of the [Quaternion]. This is the same as writing [code]Quaternion(-q.x, -q.y, -q.z, -q.w)[/code]. This operation results in a quaternion that represents the same rotation." }, { "name": "unary+", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -13427,52 +14824,62 @@ { "name": "*", "right_type": "int", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "/", "right_type": "int", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "*", "right_type": "float", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "/", "right_type": "float", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "==", "right_type": "Quaternion", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the quaternions are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Quaternion", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the quaternions are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "+", "right_type": "Quaternion", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Adds each component of the left [Quaternion] to the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression, such as approximating an intermediate rotation between two nearby rotations." }, { "name": "-", "right_type": "Quaternion", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Subtracts each component of the left [Quaternion] by the right [Quaternion]. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "*", "right_type": "Quaternion", - "return_type": "Quaternion" + "return_type": "Quaternion", + "documentation": "Multiplies each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression." }, { "name": "in", @@ -13492,7 +14899,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length of the quaternion." }, { "name": "length_squared", @@ -13500,7 +14908,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the length of the quaternion, squared." }, { "name": "normalized", @@ -13508,7 +14917,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4274879941 + "hash": 4274879941, + "documentation": "Returns a copy of the quaternion, normalized to unit length." }, { "name": "is_normalized", @@ -13516,7 +14926,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns whether the quaternion is normalized or not." }, { "name": "is_equal_approx", @@ -13530,7 +14941,8 @@ "name": "to", "type": "Quaternion" } - ] + ], + "documentation": "Returns [code]true[/code] if this quaternion and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_finite", @@ -13538,7 +14950,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this quaternion is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "inverse", @@ -13546,7 +14959,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4274879941 + "hash": 4274879941, + "documentation": "Returns the inverse of the quaternion." }, { "name": "log", @@ -13554,7 +14968,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4274879941 + "hash": 4274879941, + "documentation": "" }, { "name": "exp", @@ -13562,7 +14977,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4274879941 + "hash": 4274879941, + "documentation": "" }, { "name": "angle_to", @@ -13576,7 +14992,8 @@ "name": "to", "type": "Quaternion" } - ] + ], + "documentation": "Returns the angle between this quaternion and [param to]. This is the magnitude of the angle you would need to rotate by to get from one to the other.\n[b]Note:[/b] The magnitude of the floating-point error for this method is abnormally high, so methods such as [code]is_zero_approx[/code] will not work reliably." }, { "name": "dot", @@ -13590,7 +15007,8 @@ "name": "with", "type": "Quaternion" } - ] + ], + "documentation": "Returns the dot product of two quaternions." }, { "name": "slerp", @@ -13608,7 +15026,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight].\n[b]Note:[/b] Both quaternions must be normalized." }, { "name": "slerpni", @@ -13626,7 +15045,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the result of the spherical linear interpolation between this quaternion and [param to] by amount [param weight], but without checking if the rotation path is not bigger than 90 degrees." }, { "name": "spherical_cubic_interpolate", @@ -13652,7 +15072,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight]." }, { "name": "spherical_cubic_interpolate_in_time", @@ -13690,7 +15111,8 @@ "name": "post_b_t", "type": "float" } - ] + ], + "documentation": "Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight].\nIt can perform smoother interpolation than [method spherical_cubic_interpolate] by the time values." }, { "name": "get_euler", @@ -13705,7 +15127,8 @@ "type": "int", "default_value": "2" } - ] + ], + "documentation": "Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the [enum EulerOrder] enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle)." }, { "name": "from_euler", @@ -13719,7 +15142,8 @@ "name": "euler", "type": "Vector3" } - ] + ], + "documentation": "Constructs a Quaternion from Euler angles in YXZ rotation order." }, { "name": "get_axis", @@ -13727,7 +15151,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "" }, { "name": "get_angle", @@ -13735,12 +15160,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "" } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized quaternion with all components set to [code]0[/code]." }, { "index": 1, @@ -13749,7 +15176,8 @@ "name": "from", "type": "Quaternion" } - ] + ], + "documentation": "Constructs a [Quaternion] as a copy of the given [Quaternion]." }, { "index": 2, @@ -13758,7 +15186,8 @@ "name": "from", "type": "Basis" } - ] + ], + "documentation": "Constructs a quaternion from the given [Basis]." }, { "index": 3, @@ -13771,7 +15200,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector." }, { "index": 4, @@ -13784,7 +15214,8 @@ "name": "arc_to", "type": "Vector3" } - ] + ], + "documentation": "Constructs a quaternion representing the shortest arc between two points on the surface of a sphere with a radius of [code]1.0[/code]." }, { "index": 5, @@ -13805,10 +15236,12 @@ "name": "w", "type": "float" } - ] + ], + "documentation": "Constructs a quaternion defined by the given values." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "Quaternions are similar to [Basis], which implements the matrix representation of rotations. Unlike [Basis], which stores rotation, scale, and shearing, quaternions only store rotation.\nQuaternions can be parametrized using both an axis-angle pair or Euler angles. Due to their compactness and the way they are stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors.\n[b]Note:[/b] Quaternions need to be normalized before being used for rotation." }, { "name": "AABB", @@ -13816,27 +15249,32 @@ "members": [ { "name": "position", - "type": "Vector3" + "type": "Vector3", + "documentation": "Beginning corner. Typically has values lower than [member end]." }, { "name": "size", - "type": "Vector3" + "type": "Vector3", + "documentation": "Size from [member position] to [member end]. Typically, all components are positive.\nIf the size is negative, you can use [method abs] to fix it." }, { "name": "end", - "type": "Vector3" + "type": "Vector3", + "documentation": "Ending corner. This is calculated as [code]position + size[/code]. Setting this value will change the size." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the AABBs are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the AABBs are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "not", @@ -13845,17 +15283,20 @@ { "name": "==", "right_type": "AABB", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the AABBs are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "AABB", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the AABBs are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Transform3D", - "return_type": "AABB" + "return_type": "AABB", + "documentation": "Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix." }, { "name": "in", @@ -13875,7 +15316,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1576868580 + "hash": 1576868580, + "documentation": "Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive." }, { "name": "get_center", @@ -13883,7 +15325,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the center of the [AABB], which is equal to [member position] + ([member size] / 2)." }, { "name": "get_volume", @@ -13891,7 +15334,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the volume of the [AABB]." }, { "name": "has_volume", @@ -13899,7 +15343,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the [AABB] has a volume, and [code]false[/code] if the [AABB] is flat, empty, or has a negative [member size]." }, { "name": "has_surface", @@ -13907,7 +15352,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the [AABB] has a surface or a length, and [code]false[/code] if the [AABB] is empty (all components of [member size] are zero or negative)." }, { "name": "has_point", @@ -13921,7 +15367,8 @@ "name": "point", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] if the [AABB] contains a point. Points on the faces of the AABB are considered included, though float-point precision errors may impact the accuracy of such checks.\n[b]Note:[/b] This method is not reliable for [AABB] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent [AABB] to check for contained points." }, { "name": "is_equal_approx", @@ -13935,7 +15382,8 @@ "name": "aabb", "type": "AABB" } - ] + ], + "documentation": "Returns [code]true[/code] if this [AABB] and [param aabb] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_finite", @@ -13943,7 +15391,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this [AABB] is finite, by calling [method @GlobalScope.is_finite] on each component." }, { "name": "intersects", @@ -13957,7 +15406,8 @@ "name": "with", "type": "AABB" } - ] + ], + "documentation": "Returns [code]true[/code] if the [AABB] overlaps with another." }, { "name": "encloses", @@ -13971,7 +15421,8 @@ "name": "with", "type": "AABB" } - ] + ], + "documentation": "Returns [code]true[/code] if this [AABB] completely encloses another one." }, { "name": "intersects_plane", @@ -13985,7 +15436,8 @@ "name": "plane", "type": "Plane" } - ] + ], + "documentation": "Returns [code]true[/code] if the [AABB] is on both sides of a plane." }, { "name": "intersection", @@ -13999,7 +15451,8 @@ "name": "with", "type": "AABB" } - ] + ], + "documentation": "Returns the intersection between two [AABB]. An empty AABB (size [code](0, 0, 0)[/code]) is returned on failure." }, { "name": "merge", @@ -14013,7 +15466,8 @@ "name": "with", "type": "AABB" } - ] + ], + "documentation": "Returns a larger [AABB] that contains both this [AABB] and [param with]." }, { "name": "expand", @@ -14027,7 +15481,8 @@ "name": "to_point", "type": "Vector3" } - ] + ], + "documentation": "Returns a copy of this [AABB] expanded to include a given point.\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\n# position (-3, 2, 0), size (1, 1, 1)\nvar box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1))\n# position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)\nvar box2 = box.expand(Vector3(0, -1, 2))\n[/gdscript]\n[csharp]\n// position (-3, 2, 0), size (1, 1, 1)\nvar box = new Aabb(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));\n// position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)\nvar box2 = box.Expand(new Vector3(0, -1, 2));\n[/csharp]\n[/codeblocks]" }, { "name": "grow", @@ -14041,7 +15496,8 @@ "name": "by", "type": "float" } - ] + ], + "documentation": "Returns a copy of the [AABB] grown a given number of units towards all the sides." }, { "name": "get_support", @@ -14055,7 +15511,8 @@ "name": "dir", "type": "Vector3" } - ] + ], + "documentation": "Returns the vertex of the AABB that's the farthest in a given direction. This point is commonly known as the support point in collision detection algorithms." }, { "name": "get_longest_axis", @@ -14063,7 +15520,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the normalized longest axis of the [AABB]." }, { "name": "get_longest_axis_index", @@ -14071,7 +15529,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants)." }, { "name": "get_longest_axis_size", @@ -14079,7 +15538,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the scalar length of the longest axis of the [AABB]." }, { "name": "get_shortest_axis", @@ -14087,7 +15547,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Returns the normalized shortest axis of the [AABB]." }, { "name": "get_shortest_axis_index", @@ -14095,7 +15556,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum)." }, { "name": "get_shortest_axis_size", @@ -14103,7 +15565,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the scalar length of the shortest axis of the [AABB]." }, { "name": "get_endpoint", @@ -14117,7 +15580,8 @@ "name": "idx", "type": "int" } - ] + ], + "documentation": "Gets the position of the 8 endpoints of the [AABB] in space." }, { "name": "intersects_segment", @@ -14135,7 +15599,8 @@ "name": "to", "type": "Vector3" } - ] + ], + "documentation": "Returns the point of intersection between [param from] and [param to] with this [AABB] or [code]null[/code] if there is no intersection." }, { "name": "intersects_ray", @@ -14153,12 +15618,14 @@ "name": "dir", "type": "Vector3" } - ] + ], + "documentation": "Returns the point of intersection of the given ray with this [AABB] or [code]null[/code] if there is no intersection. Ray length is infinite." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size]." }, { "index": 1, @@ -14167,7 +15634,8 @@ "name": "from", "type": "AABB" } - ] + ], + "documentation": "Constructs an [AABB] as a copy of the given [AABB]." }, { "index": 2, @@ -14180,10 +15648,12 @@ "name": "size", "type": "Vector3" } - ] + ], + "documentation": "Constructs an [AABB] from a position and size." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "[AABB] consists of a position, a size, and several utility functions. It is typically used for fast overlap tests.\nIt uses floating-point coordinates. The 2D counterpart to [AABB] is [Rect2].\nNegative values for [member size] are not supported and will not work for most methods. Use [method abs] to get an AABB with a positive size.\n[b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates." }, { "name": "Basis", @@ -14192,49 +15662,58 @@ "members": [ { "name": "x", - "type": "Vector3" + "type": "Vector3", + "documentation": "The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code]." }, { "name": "y", - "type": "Vector3" + "type": "Vector3", + "documentation": "The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code]." }, { "name": "z", - "type": "Vector3" + "type": "Vector3", + "documentation": "The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code]." } ], "constants": [ { "name": "IDENTITY", "type": "Basis", - "value": "Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)" + "value": "Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)", + "documentation": "The identity basis, with no rotation or scaling applied.\nThis is identical to creating [constructor Basis] without any parameters. This constant can be used to make your code clearer, and for consistency with C#." }, { "name": "FLIP_X", "type": "Basis", - "value": "Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)" + "value": "Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)", + "documentation": "The basis that will flip something along the X axis when used in a transformation." }, { "name": "FLIP_Y", "type": "Basis", - "value": "Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)" + "value": "Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)", + "documentation": "The basis that will flip something along the Y axis when used in a transformation." }, { "name": "FLIP_Z", "type": "Basis", - "value": "Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)" + "value": "Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)", + "documentation": "The basis that will flip something along the Z axis when used in a transformation." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [Basis] matrices are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [Basis] matrices are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "not", @@ -14243,32 +15722,38 @@ { "name": "*", "right_type": "int", - "return_type": "Basis" + "return_type": "Basis", + "documentation": "This operator multiplies all components of the [Basis], which scales it uniformly." }, { "name": "*", "right_type": "float", - "return_type": "Basis" + "return_type": "Basis", + "documentation": "This operator multiplies all components of the [Basis], which scales it uniformly." }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "This operator multiplies all components of the [Basis], which scales it uniformly." }, { "name": "==", "right_type": "Basis", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [Basis] matrices are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Basis", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [Basis] matrices are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Basis", - "return_type": "Basis" + "return_type": "Basis", + "documentation": "This operator multiplies all components of the [Basis], which scales it uniformly." }, { "name": "in", @@ -14288,7 +15773,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 594669093 + "hash": 594669093, + "documentation": "Returns the inverse of the matrix." }, { "name": "transposed", @@ -14296,7 +15782,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 594669093 + "hash": 594669093, + "documentation": "Returns the transposed version of the matrix." }, { "name": "orthonormalized", @@ -14304,7 +15791,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 594669093 + "hash": 594669093, + "documentation": "Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix." }, { "name": "determinant", @@ -14312,7 +15800,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale.\nA negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid." }, { "name": "rotated", @@ -14330,7 +15819,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Introduce an additional rotation around the given axis by [param angle] (in radians). The axis must be a normalized vector." }, { "name": "scaled", @@ -14344,7 +15834,8 @@ "name": "scale", "type": "Vector3" } - ] + ], + "documentation": "Introduce an additional scaling specified by the given 3D scaling factor." }, { "name": "get_scale", @@ -14352,7 +15843,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1776574132 + "hash": 1776574132, + "documentation": "Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis." }, { "name": "get_euler", @@ -14367,7 +15859,8 @@ "type": "int", "default_value": "2" } - ] + ], + "documentation": "Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).\nConsider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles." }, { "name": "tdotx", @@ -14381,7 +15874,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Transposed dot product with the X axis of the matrix." }, { "name": "tdoty", @@ -14395,7 +15889,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Transposed dot product with the Y axis of the matrix." }, { "name": "tdotz", @@ -14409,7 +15904,8 @@ "name": "with", "type": "Vector3" } - ] + ], + "documentation": "Transposed dot product with the Z axis of the matrix." }, { "name": "slerp", @@ -14427,7 +15923,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix." }, { "name": "is_conformal", @@ -14435,7 +15932,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the basis is conformal, meaning it preserves angles and distance ratios, and may only be composed of rotation and uniform scale. Returns [code]false[/code] if the basis has non-uniform scale or shear/skew. This can be used to validate if the basis is non-distorted, which is important for physics and other use cases." }, { "name": "is_equal_approx", @@ -14449,7 +15947,8 @@ "name": "b", "type": "Basis" } - ] + ], + "documentation": "Returns [code]true[/code] if this basis and [param b] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on all vector components." }, { "name": "is_finite", @@ -14457,7 +15956,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this basis is finite, by calling [method @GlobalScope.is_finite] on all vector components." }, { "name": "get_rotation_quaternion", @@ -14465,7 +15965,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4274879941 + "hash": 4274879941, + "documentation": "Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles." }, { "name": "looking_at", @@ -14489,7 +15990,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Creates a Basis with a rotation such that the forward axis (-Z) points towards the [param target] position.\nThe up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [param target] and [param up] vectors cannot be zero, and cannot be parallel to each other.\nIf [param use_model_front] is [code]true[/code], 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)." }, { "name": "from_scale", @@ -14503,7 +16005,8 @@ "name": "scale", "type": "Vector3" } - ] + ], + "documentation": "Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero." }, { "name": "from_euler", @@ -14522,12 +16025,14 @@ "type": "int", "default_value": "2" } - ] + ], + "documentation": "Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Basis] set to [constant IDENTITY]." }, { "index": 1, @@ -14536,7 +16041,8 @@ "name": "from", "type": "Basis" } - ] + ], + "documentation": "Constructs a [Basis] as a copy of the given [Basis]." }, { "index": 2, @@ -14545,7 +16051,8 @@ "name": "from", "type": "Quaternion" } - ] + ], + "documentation": "Constructs a pure rotation basis matrix from the given quaternion." }, { "index": 3, @@ -14558,7 +16065,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Constructs a pure rotation basis matrix, rotated around the given [param axis] by [param angle] (in radians). The axis must be a normalized vector." }, { "index": 4, @@ -14575,10 +16083,12 @@ "name": "z_axis", "type": "Vector3" } - ] + ], + "documentation": "Constructs a basis matrix from 3 axis vectors (matrix columns)." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 3×3 matrix used for representing 3D rotation and scale. Usually used as an orthogonal basis for a [Transform3D].\nContains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).\nBasis can also be accessed as an array of 3D vectors. These vectors are usually orthogonal to each other, but are not necessarily normalized (due to scaling).\nFor more information, read the \"Matrices and transforms\" documentation article." }, { "name": "Transform3D", @@ -14586,45 +16096,53 @@ "members": [ { "name": "basis", - "type": "Basis" + "type": "Basis", + "documentation": "The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object." }, { "name": "origin", - "type": "Vector3" + "type": "Vector3", + "documentation": "The translation offset of the transform (column 3, the fourth column). Equivalent to array index [code]3[/code]." } ], "constants": [ { "name": "IDENTITY", "type": "Transform3D", - "value": "Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" + "value": "Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)", + "documentation": "[Transform3D] with no translation, rotation or scaling applied. When applied to other data structures, [constant IDENTITY] performs no transformation." }, { "name": "FLIP_X", "type": "Transform3D", - "value": "Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" + "value": "Transform3D(-1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)", + "documentation": "[Transform3D] with mirroring applied perpendicular to the YZ plane." }, { "name": "FLIP_Y", "type": "Transform3D", - "value": "Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)" + "value": "Transform3D(1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0)", + "documentation": "[Transform3D] with mirroring applied perpendicular to the XZ plane." }, { "name": "FLIP_Z", "type": "Transform3D", - "value": "Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)" + "value": "Transform3D(1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0)", + "documentation": "[Transform3D] with mirroring applied perpendicular to the XY plane." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "not", @@ -14633,42 +16151,50 @@ { "name": "*", "right_type": "int", - "return_type": "Transform3D" + "return_type": "Transform3D", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "float", - "return_type": "Transform3D" + "return_type": "Transform3D", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "Vector3", - "return_type": "Vector3" + "return_type": "Vector3", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "Plane", - "return_type": "Plane" + "return_type": "Plane", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "*", "right_type": "AABB", - "return_type": "AABB" + "return_type": "AABB", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "==", "right_type": "Transform3D", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Transform3D", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the transforms are not equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "*", "right_type": "Transform3D", - "return_type": "Transform3D" + "return_type": "Transform3D", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." }, { "name": "in", @@ -14683,7 +16209,8 @@ { "name": "*", "right_type": "PackedVector3Array", - "return_type": "PackedVector3Array" + "return_type": "PackedVector3Array", + "documentation": "This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly." } ], "methods": [ @@ -14693,7 +16220,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3816817146 + "hash": 3816817146, + "documentation": "Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling)." }, { "name": "affine_inverse", @@ -14701,7 +16229,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3816817146 + "hash": 3816817146, + "documentation": "Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation." }, { "name": "orthonormalized", @@ -14709,7 +16238,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3816817146 + "hash": 3816817146, + "documentation": "Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1)." }, { "name": "rotated", @@ -14727,7 +16257,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).\nThe [param axis] must be a normalized vector.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the left, i.e., [code]R * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "rotated_local", @@ -14745,7 +16276,8 @@ "name": "angle", "type": "float" } - ] + ], + "documentation": "Returns a copy of the transform rotated around the given [param axis] by the given [param angle] (in radians).\nThe [param axis] must be a normalized vector.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding rotation transform [code]R[/code] from the right, i.e., [code]X * R[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "scaled", @@ -14759,7 +16291,8 @@ "name": "scale", "type": "Vector3" } - ] + ], + "documentation": "Returns a copy of the transform scaled by the given [param scale] factor.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the left, i.e., [code]S * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "scaled_local", @@ -14773,7 +16306,8 @@ "name": "scale", "type": "Vector3" } - ] + ], + "documentation": "Returns a copy of the transform scaled by the given [param scale] factor.\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding scaling transform [code]S[/code] from the right, i.e., [code]X * S[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "translated", @@ -14787,7 +16321,8 @@ "name": "offset", "type": "Vector3" } - ] + ], + "documentation": "Returns a copy of the transform translated by the given [param offset].\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the left, i.e., [code]T * X[/code].\nThis can be seen as transforming with respect to the global/parent frame." }, { "name": "translated_local", @@ -14801,7 +16336,8 @@ "name": "offset", "type": "Vector3" } - ] + ], + "documentation": "Returns a copy of the transform translated by the given [param offset].\nThis method is an optimized version of multiplying the given transform [code]X[/code] with a corresponding translation transform [code]T[/code] from the right, i.e., [code]X * T[/code].\nThis can be seen as transforming with respect to the local frame." }, { "name": "looking_at", @@ -14825,7 +16361,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [param target] position.\nThe up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [param target] and [param up] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.\nIf [param use_model_front] is [code]true[/code], 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)." }, { "name": "interpolate_with", @@ -14843,7 +16380,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns a transform interpolated between this transform and another by a given [param weight] (on the range of 0.0 to 1.0)." }, { "name": "is_equal_approx", @@ -14857,7 +16395,8 @@ "name": "xform", "type": "Transform3D" } - ] + ], + "documentation": "Returns [code]true[/code] if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "is_finite", @@ -14865,12 +16404,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this transform is finite, by calling [method @GlobalScope.is_finite] on each component." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Transform3D] set to [constant IDENTITY]." }, { "index": 1, @@ -14879,7 +16420,8 @@ "name": "from", "type": "Transform3D" } - ] + ], + "documentation": "Constructs a [Transform3D] as a copy of the given [Transform3D]." }, { "index": 2, @@ -14892,7 +16434,8 @@ "name": "origin", "type": "Vector3" } - ] + ], + "documentation": "Constructs a Transform3D from a [Basis] and [Vector3]." }, { "index": 3, @@ -14913,7 +16456,8 @@ "name": "origin", "type": "Vector3" } - ] + ], + "documentation": "Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled)." }, { "index": 4, @@ -14922,10 +16466,12 @@ "name": "from", "type": "Projection" } - ] + ], + "documentation": "Constructs a Transform3D from a [Projection] by trimming the last row of the projection matrix ([code]from.x.w[/code], [code]from.y.w[/code], [code]from.z.w[/code], and [code]from.w.w[/code] are not copied over)." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 3×4 matrix (3 rows, 4 columns) used for 3D linear transformations. It can represent transformations such as translation, rotation, and scaling. It consists of a [member basis] (first 3 columns) and a [Vector3] for the [member origin] (last column).\nFor more information, read the \"Matrices and transforms\" documentation article." }, { "name": "Projection", @@ -14934,61 +16480,73 @@ "members": [ { "name": "x", - "type": "Vector4" + "type": "Vector4", + "documentation": "The projection matrix's X vector (column 0). Equivalent to array index [code]0[/code]." }, { "name": "y", - "type": "Vector4" + "type": "Vector4", + "documentation": "The projection matrix's Y vector (column 1). Equivalent to array index [code]1[/code]." }, { "name": "z", - "type": "Vector4" + "type": "Vector4", + "documentation": "The projection matrix's Z vector (column 2). Equivalent to array index [code]2[/code]." }, { "name": "w", - "type": "Vector4" + "type": "Vector4", + "documentation": "The projection matrix's W vector (column 3). Equivalent to array index [code]3[/code]." } ], "constants": [ { "name": "PLANE_NEAR", "type": "int", - "value": "0" + "value": "0", + "documentation": "The index value of the projection's near clipping plane." }, { "name": "PLANE_FAR", "type": "int", - "value": "1" + "value": "1", + "documentation": "The index value of the projection's far clipping plane." }, { "name": "PLANE_LEFT", "type": "int", - "value": "2" + "value": "2", + "documentation": "The index value of the projection's left clipping plane." }, { "name": "PLANE_TOP", "type": "int", - "value": "3" + "value": "3", + "documentation": "The index value of the projection's top clipping plane." }, { "name": "PLANE_RIGHT", "type": "int", - "value": "4" + "value": "4", + "documentation": "The index value of the projection's right clipping plane." }, { "name": "PLANE_BOTTOM", "type": "int", - "value": "5" + "value": "5", + "documentation": "The index value of the projection bottom clipping plane." }, { "name": "IDENTITY", "type": "Projection", - "value": "Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)" + "value": "Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)", + "documentation": "A [Projection] with no transformation defined. When applied to other data structures, no transformation is performed." }, { "name": "ZERO", "type": "Projection", - "value": "Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)" + "value": "Projection(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", + "documentation": "A [Projection] with all values initialized to 0. When applied to other data structures, they will be zeroed." } ], "enums": [ @@ -14997,27 +16555,33 @@ "values": [ { "name": "PLANE_NEAR", - "value": 0 + "value": 0, + "documentation": "The index value of the projection's near clipping plane." }, { "name": "PLANE_FAR", - "value": 1 + "value": 1, + "documentation": "The index value of the projection's far clipping plane." }, { "name": "PLANE_LEFT", - "value": 2 + "value": 2, + "documentation": "The index value of the projection's left clipping plane." }, { "name": "PLANE_TOP", - "value": 3 + "value": 3, + "documentation": "The index value of the projection's top clipping plane." }, { "name": "PLANE_RIGHT", - "value": 4 + "value": 4, + "documentation": "The index value of the projection's right clipping plane." }, { "name": "PLANE_BOTTOM", - "value": 5 + "value": 5, + "documentation": "The index value of the projection bottom clipping plane." } ] } @@ -15026,12 +16590,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the projections are equal.\n[b]Note:[/b] Due to floating-point precision errors, this may return [code]false[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the projections are not equal.\n[b]Note:[/b] Due to floating-point precision errors, this may return [code]true[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot." }, { "name": "not", @@ -15040,22 +16606,26 @@ { "name": "*", "right_type": "Vector4", - "return_type": "Vector4" + "return_type": "Vector4", + "documentation": "Projects (multiplies) the given [Vector4] by this [Projection] matrix." }, { "name": "==", "right_type": "Projection", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the projections are equal.\n[b]Note:[/b] Due to floating-point precision errors, this may return [code]false[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot." }, { "name": "!=", "right_type": "Projection", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the projections are not equal.\n[b]Note:[/b] Due to floating-point precision errors, this may return [code]true[/code], even if the projections are virtually equal. An [code]is_equal_approx[/code] method may be added in a future version of Godot." }, { "name": "*", "right_type": "Projection", - "return_type": "Projection" + "return_type": "Projection", + "documentation": "Projects (multiplies) the given [Vector4] by this [Projection] matrix." }, { "name": "in", @@ -15081,7 +16651,8 @@ "name": "flip_y", "type": "bool" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions from a depth range of [code]-1[/code] to [code]1[/code] to one that ranges from [code]0[/code] to [code]1[/code], and flips the projected positions vertically, according to [param flip_y]." }, { "name": "create_light_atlas_rect", @@ -15095,7 +16666,8 @@ "name": "rect", "type": "Rect2" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions into the given [Rect2]." }, { "name": "create_perspective", @@ -15126,7 +16698,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping planes.\n[param flip_fov] determines whether the projection's field of view is flipped over its diagonal." }, { "name": "create_perspective_hmd", @@ -15168,7 +16741,8 @@ "name": "convergence_dist", "type": "float" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions using a perspective projection with the given Y-axis field of view (in degrees), X:Y aspect ratio, and clipping distances. The projection is adjusted for a head-mounted display with the given distance between eyes and distance to a point that can be focused on.\n[param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2.\n[param flip_fov] determines whether the projection's field of view is flipped over its diagonal." }, { "name": "create_for_hmd", @@ -15210,7 +16784,8 @@ "name": "z_far", "type": "float" } - ] + ], + "documentation": "Creates a new [Projection] for projecting positions onto a head-mounted display with the given X:Y aspect ratio, distance between eyes, display width, distance to lens, oversampling factor, and depth clipping planes.\n[param eye] creates the projection for the left eye when set to 1, or the right eye when set to 2." }, { "name": "create_orthogonal", @@ -15244,7 +16819,8 @@ "name": "z_far", "type": "float" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions using an orthogonal projection with the given clipping planes." }, { "name": "create_orthogonal_aspect", @@ -15275,7 +16851,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions using an orthogonal projection with the given size, X:Y aspect ratio, and clipping planes.\n[param flip_fov] determines whether the projection's field of view is flipped over its diagonal." }, { "name": "create_frustum", @@ -15309,7 +16886,8 @@ "name": "z_far", "type": "float" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions in a frustum with the given clipping planes." }, { "name": "create_frustum_aspect", @@ -15344,7 +16922,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Creates a new [Projection] that projects positions in a frustum with the given size, X:Y aspect ratio, offset, and clipping planes.\n[param flip_fov] determines whether the projection's field of view is flipped over its diagonal." }, { "name": "create_fit_aabb", @@ -15358,7 +16937,8 @@ "name": "aabb", "type": "AABB" } - ] + ], + "documentation": "Creates a new [Projection] that scales a given projection to fit around a given [AABB] in projection space." }, { "name": "determinant", @@ -15366,7 +16946,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns a scalar value that is the signed factor by which areas are scaled by this matrix. If the sign is negative, the matrix flips the orientation of the area.\nThe determinant can be used to calculate the invertibility of a matrix or solve linear systems of equations involving the matrix, among other applications." }, { "name": "perspective_znear_adjusted", @@ -15380,7 +16961,8 @@ "name": "new_znear", "type": "float" } - ] + ], + "documentation": "Returns a [Projection] with the near clipping distance adjusted to be [param new_znear].\n[b]Note:[/b] The original [Projection] must be a perspective projection." }, { "name": "get_projection_plane", @@ -15394,7 +16976,8 @@ "name": "plane", "type": "int" } - ] + ], + "documentation": "Returns the clipping plane of this [Projection] whose index is given by [param plane].\n[param plane] should be equal to one of [constant PLANE_NEAR], [constant PLANE_FAR], [constant PLANE_LEFT], [constant PLANE_TOP], [constant PLANE_RIGHT], or [constant PLANE_BOTTOM]." }, { "name": "flipped_y", @@ -15402,7 +16985,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4212530932 + "hash": 4212530932, + "documentation": "Returns a copy of this [Projection] with the signs of the values of the Y column flipped." }, { "name": "jitter_offseted", @@ -15416,7 +17000,8 @@ "name": "offset", "type": "Vector2" } - ] + ], + "documentation": "Returns a [Projection] with the X and Y values from the given [Vector2] added to the first and second values of the final column respectively." }, { "name": "get_fovy", @@ -15434,7 +17019,8 @@ "name": "aspect", "type": "float" } - ] + ], + "documentation": "Returns the vertical field of view of the projection (in degrees) associated with the given horizontal field of view (in degrees) and aspect ratio." }, { "name": "get_z_far", @@ -15442,7 +17028,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the distance for this [Projection] beyond which positions are clipped." }, { "name": "get_z_near", @@ -15450,7 +17037,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the distance for this [Projection] before which positions are clipped." }, { "name": "get_aspect", @@ -15458,7 +17046,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the X:Y aspect ratio of this [Projection]'s viewport." }, { "name": "get_fov", @@ -15466,7 +17055,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the horizontal field of view of the projection (in degrees)." }, { "name": "is_orthogonal", @@ -15474,7 +17064,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this [Projection] performs an orthogonal projection." }, { "name": "get_viewport_half_extents", @@ -15482,7 +17073,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the dimensions of the viewport plane that this [Projection] projects positions onto, divided by two." }, { "name": "get_far_plane_half_extents", @@ -15490,7 +17082,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 2428350749 + "hash": 2428350749, + "documentation": "Returns the dimensions of the far clipping plane of the projection, divided by two." }, { "name": "inverse", @@ -15498,7 +17091,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4212530932 + "hash": 4212530932, + "documentation": "Returns a [Projection] that performs the inverse of this [Projection]'s projective transformation." }, { "name": "get_pixels_per_meter", @@ -15512,7 +17106,8 @@ "name": "for_pixel_width", "type": "int" } - ] + ], + "documentation": "Returns the number of pixels with the given pixel width displayed per meter, after this [Projection] is applied." }, { "name": "get_lod_multiplier", @@ -15520,12 +17115,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the factor by which the visible level of detail is scaled by this [Projection]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default-initialized [Projection] set to [constant IDENTITY]." }, { "index": 1, @@ -15534,7 +17131,8 @@ "name": "from", "type": "Projection" } - ] + ], + "documentation": "Constructs a [Projection] as a copy of the given [Projection]." }, { "index": 2, @@ -15543,7 +17141,8 @@ "name": "from", "type": "Transform3D" } - ] + ], + "documentation": "Constructs a Projection as a copy of the given [Transform3D]." }, { "index": 3, @@ -15564,10 +17163,12 @@ "name": "w_axis", "type": "Vector4" } - ] + ], + "documentation": "Constructs a Projection from four [Vector4] values (matrix columns)." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A 4x4 matrix used for 3D projective transformations. It can represent transformations such as translation, rotation, scaling, shearing, and perspective division. It consists of four [Vector4] columns.\nFor purely linear transformations (translation, rotation, and scale), it is recommended to use [Transform3D], as it is more performant and requires less memory.\nUsed internally as [Camera3D]'s projection matrix." }, { "name": "Color", @@ -15576,799 +17177,960 @@ "members": [ { "name": "r", - "type": "float" + "type": "float", + "documentation": "The color's red component, typically on the range of 0 to 1." }, { "name": "g", - "type": "float" + "type": "float", + "documentation": "The color's green component, typically on the range of 0 to 1." }, { "name": "b", - "type": "float" + "type": "float", + "documentation": "The color's blue component, typically on the range of 0 to 1." }, { "name": "a", - "type": "float" + "type": "float", + "documentation": "The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque." }, { "name": "r8", - "type": "int" + "type": "int", + "documentation": "Wrapper for [member r] that uses the range 0 to 255, instead of 0 to 1." }, { "name": "g8", - "type": "int" + "type": "int", + "documentation": "Wrapper for [member g] that uses the range 0 to 255, instead of 0 to 1." }, { "name": "b8", - "type": "int" + "type": "int", + "documentation": "Wrapper for [member b] that uses the range 0 to 255, instead of 0 to 1." }, { "name": "a8", - "type": "int" + "type": "int", + "documentation": "Wrapper for [member a] that uses the range 0 to 255, instead of 0 to 1." }, { "name": "h", - "type": "float" + "type": "float", + "documentation": "The HSV hue of this color, on the range 0 to 1." }, { "name": "s", - "type": "float" + "type": "float", + "documentation": "The HSV saturation of this color, on the range 0 to 1." }, { "name": "v", - "type": "float" + "type": "float", + "documentation": "The HSV value (brightness) of this color, on the range 0 to 1." } ], "constants": [ { "name": "ALICE_BLUE", "type": "Color", - "value": "Color(0.941176, 0.972549, 1, 1)" + "value": "Color(0.941176, 0.972549, 1, 1)", + "documentation": "Alice blue color." }, { "name": "ANTIQUE_WHITE", "type": "Color", - "value": "Color(0.980392, 0.921569, 0.843137, 1)" + "value": "Color(0.980392, 0.921569, 0.843137, 1)", + "documentation": "Antique white color." }, { "name": "AQUA", "type": "Color", - "value": "Color(0, 1, 1, 1)" + "value": "Color(0, 1, 1, 1)", + "documentation": "Aqua color." }, { "name": "AQUAMARINE", "type": "Color", - "value": "Color(0.498039, 1, 0.831373, 1)" + "value": "Color(0.498039, 1, 0.831373, 1)", + "documentation": "Aquamarine color." }, { "name": "AZURE", "type": "Color", - "value": "Color(0.941176, 1, 1, 1)" + "value": "Color(0.941176, 1, 1, 1)", + "documentation": "Azure color." }, { "name": "BEIGE", "type": "Color", - "value": "Color(0.960784, 0.960784, 0.862745, 1)" + "value": "Color(0.960784, 0.960784, 0.862745, 1)", + "documentation": "Beige color." }, { "name": "BISQUE", "type": "Color", - "value": "Color(1, 0.894118, 0.768627, 1)" + "value": "Color(1, 0.894118, 0.768627, 1)", + "documentation": "Bisque color." }, { "name": "BLACK", "type": "Color", - "value": "Color(0, 0, 0, 1)" + "value": "Color(0, 0, 0, 1)", + "documentation": "Black color. In GDScript, this is the default value of any color." }, { "name": "BLANCHED_ALMOND", "type": "Color", - "value": "Color(1, 0.921569, 0.803922, 1)" + "value": "Color(1, 0.921569, 0.803922, 1)", + "documentation": "Blanched almond color." }, { "name": "BLUE", "type": "Color", - "value": "Color(0, 0, 1, 1)" + "value": "Color(0, 0, 1, 1)", + "documentation": "Blue color." }, { "name": "BLUE_VIOLET", "type": "Color", - "value": "Color(0.541176, 0.168627, 0.886275, 1)" + "value": "Color(0.541176, 0.168627, 0.886275, 1)", + "documentation": "Blue violet color." }, { "name": "BROWN", "type": "Color", - "value": "Color(0.647059, 0.164706, 0.164706, 1)" + "value": "Color(0.647059, 0.164706, 0.164706, 1)", + "documentation": "Brown color." }, { "name": "BURLYWOOD", "type": "Color", - "value": "Color(0.870588, 0.721569, 0.529412, 1)" + "value": "Color(0.870588, 0.721569, 0.529412, 1)", + "documentation": "Burlywood color." }, { "name": "CADET_BLUE", "type": "Color", - "value": "Color(0.372549, 0.619608, 0.627451, 1)" + "value": "Color(0.372549, 0.619608, 0.627451, 1)", + "documentation": "Cadet blue color." }, { "name": "CHARTREUSE", "type": "Color", - "value": "Color(0.498039, 1, 0, 1)" + "value": "Color(0.498039, 1, 0, 1)", + "documentation": "Chartreuse color." }, { "name": "CHOCOLATE", "type": "Color", - "value": "Color(0.823529, 0.411765, 0.117647, 1)" + "value": "Color(0.823529, 0.411765, 0.117647, 1)", + "documentation": "Chocolate color." }, { "name": "CORAL", "type": "Color", - "value": "Color(1, 0.498039, 0.313726, 1)" + "value": "Color(1, 0.498039, 0.313726, 1)", + "documentation": "Coral color." }, { "name": "CORNFLOWER_BLUE", "type": "Color", - "value": "Color(0.392157, 0.584314, 0.929412, 1)" + "value": "Color(0.392157, 0.584314, 0.929412, 1)", + "documentation": "Cornflower blue color." }, { "name": "CORNSILK", "type": "Color", - "value": "Color(1, 0.972549, 0.862745, 1)" + "value": "Color(1, 0.972549, 0.862745, 1)", + "documentation": "Cornsilk color." }, { "name": "CRIMSON", "type": "Color", - "value": "Color(0.862745, 0.0784314, 0.235294, 1)" + "value": "Color(0.862745, 0.0784314, 0.235294, 1)", + "documentation": "Crimson color." }, { "name": "CYAN", "type": "Color", - "value": "Color(0, 1, 1, 1)" + "value": "Color(0, 1, 1, 1)", + "documentation": "Cyan color." }, { "name": "DARK_BLUE", "type": "Color", - "value": "Color(0, 0, 0.545098, 1)" + "value": "Color(0, 0, 0.545098, 1)", + "documentation": "Dark blue color." }, { "name": "DARK_CYAN", "type": "Color", - "value": "Color(0, 0.545098, 0.545098, 1)" + "value": "Color(0, 0.545098, 0.545098, 1)", + "documentation": "Dark cyan color." }, { "name": "DARK_GOLDENROD", "type": "Color", - "value": "Color(0.721569, 0.52549, 0.0431373, 1)" + "value": "Color(0.721569, 0.52549, 0.0431373, 1)", + "documentation": "Dark goldenrod color." }, { "name": "DARK_GRAY", "type": "Color", - "value": "Color(0.662745, 0.662745, 0.662745, 1)" + "value": "Color(0.662745, 0.662745, 0.662745, 1)", + "documentation": "Dark gray color." }, { "name": "DARK_GREEN", "type": "Color", - "value": "Color(0, 0.392157, 0, 1)" + "value": "Color(0, 0.392157, 0, 1)", + "documentation": "Dark green color." }, { "name": "DARK_KHAKI", "type": "Color", - "value": "Color(0.741176, 0.717647, 0.419608, 1)" + "value": "Color(0.741176, 0.717647, 0.419608, 1)", + "documentation": "Dark khaki color." }, { "name": "DARK_MAGENTA", "type": "Color", - "value": "Color(0.545098, 0, 0.545098, 1)" + "value": "Color(0.545098, 0, 0.545098, 1)", + "documentation": "Dark magenta color." }, { "name": "DARK_OLIVE_GREEN", "type": "Color", - "value": "Color(0.333333, 0.419608, 0.184314, 1)" + "value": "Color(0.333333, 0.419608, 0.184314, 1)", + "documentation": "Dark olive green color." }, { "name": "DARK_ORANGE", "type": "Color", - "value": "Color(1, 0.54902, 0, 1)" + "value": "Color(1, 0.54902, 0, 1)", + "documentation": "Dark orange color." }, { "name": "DARK_ORCHID", "type": "Color", - "value": "Color(0.6, 0.196078, 0.8, 1)" + "value": "Color(0.6, 0.196078, 0.8, 1)", + "documentation": "Dark orchid color." }, { "name": "DARK_RED", "type": "Color", - "value": "Color(0.545098, 0, 0, 1)" + "value": "Color(0.545098, 0, 0, 1)", + "documentation": "Dark red color." }, { "name": "DARK_SALMON", "type": "Color", - "value": "Color(0.913725, 0.588235, 0.478431, 1)" + "value": "Color(0.913725, 0.588235, 0.478431, 1)", + "documentation": "Dark salmon color." }, { "name": "DARK_SEA_GREEN", "type": "Color", - "value": "Color(0.560784, 0.737255, 0.560784, 1)" + "value": "Color(0.560784, 0.737255, 0.560784, 1)", + "documentation": "Dark sea green color." }, { "name": "DARK_SLATE_BLUE", "type": "Color", - "value": "Color(0.282353, 0.239216, 0.545098, 1)" + "value": "Color(0.282353, 0.239216, 0.545098, 1)", + "documentation": "Dark slate blue color." }, { "name": "DARK_SLATE_GRAY", "type": "Color", - "value": "Color(0.184314, 0.309804, 0.309804, 1)" + "value": "Color(0.184314, 0.309804, 0.309804, 1)", + "documentation": "Dark slate gray color." }, { "name": "DARK_TURQUOISE", "type": "Color", - "value": "Color(0, 0.807843, 0.819608, 1)" + "value": "Color(0, 0.807843, 0.819608, 1)", + "documentation": "Dark turquoise color." }, { "name": "DARK_VIOLET", "type": "Color", - "value": "Color(0.580392, 0, 0.827451, 1)" + "value": "Color(0.580392, 0, 0.827451, 1)", + "documentation": "Dark violet color." }, { "name": "DEEP_PINK", "type": "Color", - "value": "Color(1, 0.0784314, 0.576471, 1)" + "value": "Color(1, 0.0784314, 0.576471, 1)", + "documentation": "Deep pink color." }, { "name": "DEEP_SKY_BLUE", "type": "Color", - "value": "Color(0, 0.74902, 1, 1)" + "value": "Color(0, 0.74902, 1, 1)", + "documentation": "Deep sky blue color." }, { "name": "DIM_GRAY", "type": "Color", - "value": "Color(0.411765, 0.411765, 0.411765, 1)" + "value": "Color(0.411765, 0.411765, 0.411765, 1)", + "documentation": "Dim gray color." }, { "name": "DODGER_BLUE", "type": "Color", - "value": "Color(0.117647, 0.564706, 1, 1)" + "value": "Color(0.117647, 0.564706, 1, 1)", + "documentation": "Dodger blue color." }, { "name": "FIREBRICK", "type": "Color", - "value": "Color(0.698039, 0.133333, 0.133333, 1)" + "value": "Color(0.698039, 0.133333, 0.133333, 1)", + "documentation": "Firebrick color." }, { "name": "FLORAL_WHITE", "type": "Color", - "value": "Color(1, 0.980392, 0.941176, 1)" + "value": "Color(1, 0.980392, 0.941176, 1)", + "documentation": "Floral white color." }, { "name": "FOREST_GREEN", "type": "Color", - "value": "Color(0.133333, 0.545098, 0.133333, 1)" + "value": "Color(0.133333, 0.545098, 0.133333, 1)", + "documentation": "Forest green color." }, { "name": "FUCHSIA", "type": "Color", - "value": "Color(1, 0, 1, 1)" + "value": "Color(1, 0, 1, 1)", + "documentation": "Fuchsia color." }, { "name": "GAINSBORO", "type": "Color", - "value": "Color(0.862745, 0.862745, 0.862745, 1)" + "value": "Color(0.862745, 0.862745, 0.862745, 1)", + "documentation": "Gainsboro color." }, { "name": "GHOST_WHITE", "type": "Color", - "value": "Color(0.972549, 0.972549, 1, 1)" + "value": "Color(0.972549, 0.972549, 1, 1)", + "documentation": "Ghost white color." }, { "name": "GOLD", "type": "Color", - "value": "Color(1, 0.843137, 0, 1)" + "value": "Color(1, 0.843137, 0, 1)", + "documentation": "Gold color." }, { "name": "GOLDENROD", "type": "Color", - "value": "Color(0.854902, 0.647059, 0.12549, 1)" + "value": "Color(0.854902, 0.647059, 0.12549, 1)", + "documentation": "Goldenrod color." }, { "name": "GRAY", "type": "Color", - "value": "Color(0.745098, 0.745098, 0.745098, 1)" + "value": "Color(0.745098, 0.745098, 0.745098, 1)", + "documentation": "Gray color." }, { "name": "GREEN", "type": "Color", - "value": "Color(0, 1, 0, 1)" + "value": "Color(0, 1, 0, 1)", + "documentation": "Green color." }, { "name": "GREEN_YELLOW", "type": "Color", - "value": "Color(0.678431, 1, 0.184314, 1)" + "value": "Color(0.678431, 1, 0.184314, 1)", + "documentation": "Green yellow color." }, { "name": "HONEYDEW", "type": "Color", - "value": "Color(0.941176, 1, 0.941176, 1)" + "value": "Color(0.941176, 1, 0.941176, 1)", + "documentation": "Honeydew color." }, { "name": "HOT_PINK", "type": "Color", - "value": "Color(1, 0.411765, 0.705882, 1)" + "value": "Color(1, 0.411765, 0.705882, 1)", + "documentation": "Hot pink color." }, { "name": "INDIAN_RED", "type": "Color", - "value": "Color(0.803922, 0.360784, 0.360784, 1)" + "value": "Color(0.803922, 0.360784, 0.360784, 1)", + "documentation": "Indian red color." }, { "name": "INDIGO", "type": "Color", - "value": "Color(0.294118, 0, 0.509804, 1)" + "value": "Color(0.294118, 0, 0.509804, 1)", + "documentation": "Indigo color." }, { "name": "IVORY", "type": "Color", - "value": "Color(1, 1, 0.941176, 1)" + "value": "Color(1, 1, 0.941176, 1)", + "documentation": "Ivory color." }, { "name": "KHAKI", "type": "Color", - "value": "Color(0.941176, 0.901961, 0.54902, 1)" + "value": "Color(0.941176, 0.901961, 0.54902, 1)", + "documentation": "Khaki color." }, { "name": "LAVENDER", "type": "Color", - "value": "Color(0.901961, 0.901961, 0.980392, 1)" + "value": "Color(0.901961, 0.901961, 0.980392, 1)", + "documentation": "Lavender color." }, { "name": "LAVENDER_BLUSH", "type": "Color", - "value": "Color(1, 0.941176, 0.960784, 1)" + "value": "Color(1, 0.941176, 0.960784, 1)", + "documentation": "Lavender blush color." }, { "name": "LAWN_GREEN", "type": "Color", - "value": "Color(0.486275, 0.988235, 0, 1)" + "value": "Color(0.486275, 0.988235, 0, 1)", + "documentation": "Lawn green color." }, { "name": "LEMON_CHIFFON", "type": "Color", - "value": "Color(1, 0.980392, 0.803922, 1)" + "value": "Color(1, 0.980392, 0.803922, 1)", + "documentation": "Lemon chiffon color." }, { "name": "LIGHT_BLUE", "type": "Color", - "value": "Color(0.678431, 0.847059, 0.901961, 1)" + "value": "Color(0.678431, 0.847059, 0.901961, 1)", + "documentation": "Light blue color." }, { "name": "LIGHT_CORAL", "type": "Color", - "value": "Color(0.941176, 0.501961, 0.501961, 1)" + "value": "Color(0.941176, 0.501961, 0.501961, 1)", + "documentation": "Light coral color." }, { "name": "LIGHT_CYAN", "type": "Color", - "value": "Color(0.878431, 1, 1, 1)" + "value": "Color(0.878431, 1, 1, 1)", + "documentation": "Light cyan color." }, { "name": "LIGHT_GOLDENROD", "type": "Color", - "value": "Color(0.980392, 0.980392, 0.823529, 1)" + "value": "Color(0.980392, 0.980392, 0.823529, 1)", + "documentation": "Light goldenrod color." }, { "name": "LIGHT_GRAY", "type": "Color", - "value": "Color(0.827451, 0.827451, 0.827451, 1)" + "value": "Color(0.827451, 0.827451, 0.827451, 1)", + "documentation": "Light gray color." }, { "name": "LIGHT_GREEN", "type": "Color", - "value": "Color(0.564706, 0.933333, 0.564706, 1)" + "value": "Color(0.564706, 0.933333, 0.564706, 1)", + "documentation": "Light green color." }, { "name": "LIGHT_PINK", "type": "Color", - "value": "Color(1, 0.713726, 0.756863, 1)" + "value": "Color(1, 0.713726, 0.756863, 1)", + "documentation": "Light pink color." }, { "name": "LIGHT_SALMON", "type": "Color", - "value": "Color(1, 0.627451, 0.478431, 1)" + "value": "Color(1, 0.627451, 0.478431, 1)", + "documentation": "Light salmon color." }, { "name": "LIGHT_SEA_GREEN", "type": "Color", - "value": "Color(0.12549, 0.698039, 0.666667, 1)" + "value": "Color(0.12549, 0.698039, 0.666667, 1)", + "documentation": "Light sea green color." }, { "name": "LIGHT_SKY_BLUE", "type": "Color", - "value": "Color(0.529412, 0.807843, 0.980392, 1)" + "value": "Color(0.529412, 0.807843, 0.980392, 1)", + "documentation": "Light sky blue color." }, { "name": "LIGHT_SLATE_GRAY", "type": "Color", - "value": "Color(0.466667, 0.533333, 0.6, 1)" + "value": "Color(0.466667, 0.533333, 0.6, 1)", + "documentation": "Light slate gray color." }, { "name": "LIGHT_STEEL_BLUE", "type": "Color", - "value": "Color(0.690196, 0.768627, 0.870588, 1)" + "value": "Color(0.690196, 0.768627, 0.870588, 1)", + "documentation": "Light steel blue color." }, { "name": "LIGHT_YELLOW", "type": "Color", - "value": "Color(1, 1, 0.878431, 1)" + "value": "Color(1, 1, 0.878431, 1)", + "documentation": "Light yellow color." }, { "name": "LIME", "type": "Color", - "value": "Color(0, 1, 0, 1)" + "value": "Color(0, 1, 0, 1)", + "documentation": "Lime color." }, { "name": "LIME_GREEN", "type": "Color", - "value": "Color(0.196078, 0.803922, 0.196078, 1)" + "value": "Color(0.196078, 0.803922, 0.196078, 1)", + "documentation": "Lime green color." }, { "name": "LINEN", "type": "Color", - "value": "Color(0.980392, 0.941176, 0.901961, 1)" + "value": "Color(0.980392, 0.941176, 0.901961, 1)", + "documentation": "Linen color." }, { "name": "MAGENTA", "type": "Color", - "value": "Color(1, 0, 1, 1)" + "value": "Color(1, 0, 1, 1)", + "documentation": "Magenta color." }, { "name": "MAROON", "type": "Color", - "value": "Color(0.690196, 0.188235, 0.376471, 1)" + "value": "Color(0.690196, 0.188235, 0.376471, 1)", + "documentation": "Maroon color." }, { "name": "MEDIUM_AQUAMARINE", "type": "Color", - "value": "Color(0.4, 0.803922, 0.666667, 1)" + "value": "Color(0.4, 0.803922, 0.666667, 1)", + "documentation": "Medium aquamarine color." }, { "name": "MEDIUM_BLUE", "type": "Color", - "value": "Color(0, 0, 0.803922, 1)" + "value": "Color(0, 0, 0.803922, 1)", + "documentation": "Medium blue color." }, { "name": "MEDIUM_ORCHID", "type": "Color", - "value": "Color(0.729412, 0.333333, 0.827451, 1)" + "value": "Color(0.729412, 0.333333, 0.827451, 1)", + "documentation": "Medium orchid color." }, { "name": "MEDIUM_PURPLE", "type": "Color", - "value": "Color(0.576471, 0.439216, 0.858824, 1)" + "value": "Color(0.576471, 0.439216, 0.858824, 1)", + "documentation": "Medium purple color." }, { "name": "MEDIUM_SEA_GREEN", "type": "Color", - "value": "Color(0.235294, 0.701961, 0.443137, 1)" + "value": "Color(0.235294, 0.701961, 0.443137, 1)", + "documentation": "Medium sea green color." }, { "name": "MEDIUM_SLATE_BLUE", "type": "Color", - "value": "Color(0.482353, 0.407843, 0.933333, 1)" + "value": "Color(0.482353, 0.407843, 0.933333, 1)", + "documentation": "Medium slate blue color." }, { "name": "MEDIUM_SPRING_GREEN", "type": "Color", - "value": "Color(0, 0.980392, 0.603922, 1)" + "value": "Color(0, 0.980392, 0.603922, 1)", + "documentation": "Medium spring green color." }, { "name": "MEDIUM_TURQUOISE", "type": "Color", - "value": "Color(0.282353, 0.819608, 0.8, 1)" + "value": "Color(0.282353, 0.819608, 0.8, 1)", + "documentation": "Medium turquoise color." }, { "name": "MEDIUM_VIOLET_RED", "type": "Color", - "value": "Color(0.780392, 0.0823529, 0.521569, 1)" + "value": "Color(0.780392, 0.0823529, 0.521569, 1)", + "documentation": "Medium violet red color." }, { "name": "MIDNIGHT_BLUE", "type": "Color", - "value": "Color(0.0980392, 0.0980392, 0.439216, 1)" + "value": "Color(0.0980392, 0.0980392, 0.439216, 1)", + "documentation": "Midnight blue color." }, { "name": "MINT_CREAM", "type": "Color", - "value": "Color(0.960784, 1, 0.980392, 1)" + "value": "Color(0.960784, 1, 0.980392, 1)", + "documentation": "Mint cream color." }, { "name": "MISTY_ROSE", "type": "Color", - "value": "Color(1, 0.894118, 0.882353, 1)" + "value": "Color(1, 0.894118, 0.882353, 1)", + "documentation": "Misty rose color." }, { "name": "MOCCASIN", "type": "Color", - "value": "Color(1, 0.894118, 0.709804, 1)" + "value": "Color(1, 0.894118, 0.709804, 1)", + "documentation": "Moccasin color." }, { "name": "NAVAJO_WHITE", "type": "Color", - "value": "Color(1, 0.870588, 0.678431, 1)" + "value": "Color(1, 0.870588, 0.678431, 1)", + "documentation": "Navajo white color." }, { "name": "NAVY_BLUE", "type": "Color", - "value": "Color(0, 0, 0.501961, 1)" + "value": "Color(0, 0, 0.501961, 1)", + "documentation": "Navy blue color." }, { "name": "OLD_LACE", "type": "Color", - "value": "Color(0.992157, 0.960784, 0.901961, 1)" + "value": "Color(0.992157, 0.960784, 0.901961, 1)", + "documentation": "Old lace color." }, { "name": "OLIVE", "type": "Color", - "value": "Color(0.501961, 0.501961, 0, 1)" + "value": "Color(0.501961, 0.501961, 0, 1)", + "documentation": "Olive color." }, { "name": "OLIVE_DRAB", "type": "Color", - "value": "Color(0.419608, 0.556863, 0.137255, 1)" + "value": "Color(0.419608, 0.556863, 0.137255, 1)", + "documentation": "Olive drab color." }, { "name": "ORANGE", "type": "Color", - "value": "Color(1, 0.647059, 0, 1)" + "value": "Color(1, 0.647059, 0, 1)", + "documentation": "Orange color." }, { "name": "ORANGE_RED", "type": "Color", - "value": "Color(1, 0.270588, 0, 1)" + "value": "Color(1, 0.270588, 0, 1)", + "documentation": "Orange red color." }, { "name": "ORCHID", "type": "Color", - "value": "Color(0.854902, 0.439216, 0.839216, 1)" + "value": "Color(0.854902, 0.439216, 0.839216, 1)", + "documentation": "Orchid color." }, { "name": "PALE_GOLDENROD", "type": "Color", - "value": "Color(0.933333, 0.909804, 0.666667, 1)" + "value": "Color(0.933333, 0.909804, 0.666667, 1)", + "documentation": "Pale goldenrod color." }, { "name": "PALE_GREEN", "type": "Color", - "value": "Color(0.596078, 0.984314, 0.596078, 1)" + "value": "Color(0.596078, 0.984314, 0.596078, 1)", + "documentation": "Pale green color." }, { "name": "PALE_TURQUOISE", "type": "Color", - "value": "Color(0.686275, 0.933333, 0.933333, 1)" + "value": "Color(0.686275, 0.933333, 0.933333, 1)", + "documentation": "Pale turquoise color." }, { "name": "PALE_VIOLET_RED", "type": "Color", - "value": "Color(0.858824, 0.439216, 0.576471, 1)" + "value": "Color(0.858824, 0.439216, 0.576471, 1)", + "documentation": "Pale violet red color." }, { "name": "PAPAYA_WHIP", "type": "Color", - "value": "Color(1, 0.937255, 0.835294, 1)" + "value": "Color(1, 0.937255, 0.835294, 1)", + "documentation": "Papaya whip color." }, { "name": "PEACH_PUFF", "type": "Color", - "value": "Color(1, 0.854902, 0.72549, 1)" + "value": "Color(1, 0.854902, 0.72549, 1)", + "documentation": "Peach puff color." }, { "name": "PERU", "type": "Color", - "value": "Color(0.803922, 0.521569, 0.247059, 1)" + "value": "Color(0.803922, 0.521569, 0.247059, 1)", + "documentation": "Peru color." }, { "name": "PINK", "type": "Color", - "value": "Color(1, 0.752941, 0.796078, 1)" + "value": "Color(1, 0.752941, 0.796078, 1)", + "documentation": "Pink color." }, { "name": "PLUM", "type": "Color", - "value": "Color(0.866667, 0.627451, 0.866667, 1)" + "value": "Color(0.866667, 0.627451, 0.866667, 1)", + "documentation": "Plum color." }, { "name": "POWDER_BLUE", "type": "Color", - "value": "Color(0.690196, 0.878431, 0.901961, 1)" + "value": "Color(0.690196, 0.878431, 0.901961, 1)", + "documentation": "Powder blue color." }, { "name": "PURPLE", "type": "Color", - "value": "Color(0.627451, 0.12549, 0.941176, 1)" + "value": "Color(0.627451, 0.12549, 0.941176, 1)", + "documentation": "Purple color." }, { "name": "REBECCA_PURPLE", "type": "Color", - "value": "Color(0.4, 0.2, 0.6, 1)" + "value": "Color(0.4, 0.2, 0.6, 1)", + "documentation": "Rebecca purple color." }, { "name": "RED", "type": "Color", - "value": "Color(1, 0, 0, 1)" + "value": "Color(1, 0, 0, 1)", + "documentation": "Red color." }, { "name": "ROSY_BROWN", "type": "Color", - "value": "Color(0.737255, 0.560784, 0.560784, 1)" + "value": "Color(0.737255, 0.560784, 0.560784, 1)", + "documentation": "Rosy brown color." }, { "name": "ROYAL_BLUE", "type": "Color", - "value": "Color(0.254902, 0.411765, 0.882353, 1)" + "value": "Color(0.254902, 0.411765, 0.882353, 1)", + "documentation": "Royal blue color." }, { "name": "SADDLE_BROWN", "type": "Color", - "value": "Color(0.545098, 0.270588, 0.0745098, 1)" + "value": "Color(0.545098, 0.270588, 0.0745098, 1)", + "documentation": "Saddle brown color." }, { "name": "SALMON", "type": "Color", - "value": "Color(0.980392, 0.501961, 0.447059, 1)" + "value": "Color(0.980392, 0.501961, 0.447059, 1)", + "documentation": "Salmon color." }, { "name": "SANDY_BROWN", "type": "Color", - "value": "Color(0.956863, 0.643137, 0.376471, 1)" + "value": "Color(0.956863, 0.643137, 0.376471, 1)", + "documentation": "Sandy brown color." }, { "name": "SEA_GREEN", "type": "Color", - "value": "Color(0.180392, 0.545098, 0.341176, 1)" + "value": "Color(0.180392, 0.545098, 0.341176, 1)", + "documentation": "Sea green color." }, { "name": "SEASHELL", "type": "Color", - "value": "Color(1, 0.960784, 0.933333, 1)" + "value": "Color(1, 0.960784, 0.933333, 1)", + "documentation": "Seashell color." }, { "name": "SIENNA", "type": "Color", - "value": "Color(0.627451, 0.321569, 0.176471, 1)" + "value": "Color(0.627451, 0.321569, 0.176471, 1)", + "documentation": "Sienna color." }, { "name": "SILVER", "type": "Color", - "value": "Color(0.752941, 0.752941, 0.752941, 1)" + "value": "Color(0.752941, 0.752941, 0.752941, 1)", + "documentation": "Silver color." }, { "name": "SKY_BLUE", "type": "Color", - "value": "Color(0.529412, 0.807843, 0.921569, 1)" + "value": "Color(0.529412, 0.807843, 0.921569, 1)", + "documentation": "Sky blue color." }, { "name": "SLATE_BLUE", "type": "Color", - "value": "Color(0.415686, 0.352941, 0.803922, 1)" + "value": "Color(0.415686, 0.352941, 0.803922, 1)", + "documentation": "Slate blue color." }, { "name": "SLATE_GRAY", "type": "Color", - "value": "Color(0.439216, 0.501961, 0.564706, 1)" + "value": "Color(0.439216, 0.501961, 0.564706, 1)", + "documentation": "Slate gray color." }, { "name": "SNOW", "type": "Color", - "value": "Color(1, 0.980392, 0.980392, 1)" + "value": "Color(1, 0.980392, 0.980392, 1)", + "documentation": "Snow color." }, { "name": "SPRING_GREEN", "type": "Color", - "value": "Color(0, 1, 0.498039, 1)" + "value": "Color(0, 1, 0.498039, 1)", + "documentation": "Spring green color." }, { "name": "STEEL_BLUE", "type": "Color", - "value": "Color(0.27451, 0.509804, 0.705882, 1)" + "value": "Color(0.27451, 0.509804, 0.705882, 1)", + "documentation": "Steel blue color." }, { "name": "TAN", "type": "Color", - "value": "Color(0.823529, 0.705882, 0.54902, 1)" + "value": "Color(0.823529, 0.705882, 0.54902, 1)", + "documentation": "Tan color." }, { "name": "TEAL", "type": "Color", - "value": "Color(0, 0.501961, 0.501961, 1)" + "value": "Color(0, 0.501961, 0.501961, 1)", + "documentation": "Teal color." }, { "name": "THISTLE", "type": "Color", - "value": "Color(0.847059, 0.74902, 0.847059, 1)" + "value": "Color(0.847059, 0.74902, 0.847059, 1)", + "documentation": "Thistle color." }, { "name": "TOMATO", "type": "Color", - "value": "Color(1, 0.388235, 0.278431, 1)" + "value": "Color(1, 0.388235, 0.278431, 1)", + "documentation": "Tomato color." }, { "name": "TRANSPARENT", "type": "Color", - "value": "Color(1, 1, 1, 0)" + "value": "Color(1, 1, 1, 0)", + "documentation": "Transparent color (white with zero alpha)." }, { "name": "TURQUOISE", "type": "Color", - "value": "Color(0.25098, 0.878431, 0.815686, 1)" + "value": "Color(0.25098, 0.878431, 0.815686, 1)", + "documentation": "Turquoise color." }, { "name": "VIOLET", "type": "Color", - "value": "Color(0.933333, 0.509804, 0.933333, 1)" + "value": "Color(0.933333, 0.509804, 0.933333, 1)", + "documentation": "Violet color." }, { "name": "WEB_GRAY", "type": "Color", - "value": "Color(0.501961, 0.501961, 0.501961, 1)" + "value": "Color(0.501961, 0.501961, 0.501961, 1)", + "documentation": "Web gray color." }, { "name": "WEB_GREEN", "type": "Color", - "value": "Color(0, 0.501961, 0, 1)" + "value": "Color(0, 0.501961, 0, 1)", + "documentation": "Web green color." }, { "name": "WEB_MAROON", "type": "Color", - "value": "Color(0.501961, 0, 0, 1)" + "value": "Color(0.501961, 0, 0, 1)", + "documentation": "Web maroon color." }, { "name": "WEB_PURPLE", "type": "Color", - "value": "Color(0.501961, 0, 0.501961, 1)" + "value": "Color(0.501961, 0, 0.501961, 1)", + "documentation": "Web purple color." }, { "name": "WHEAT", "type": "Color", - "value": "Color(0.960784, 0.870588, 0.701961, 1)" + "value": "Color(0.960784, 0.870588, 0.701961, 1)", + "documentation": "Wheat color." }, { "name": "WHITE", "type": "Color", - "value": "Color(1, 1, 1, 1)" + "value": "Color(1, 1, 1, 1)", + "documentation": "White color." }, { "name": "WHITE_SMOKE", "type": "Color", - "value": "Color(0.960784, 0.960784, 0.960784, 1)" + "value": "Color(0.960784, 0.960784, 0.960784, 1)", + "documentation": "White smoke color." }, { "name": "YELLOW", "type": "Color", - "value": "Color(1, 1, 0, 1)" + "value": "Color(1, 1, 0, 1)", + "documentation": "Yellow color." }, { "name": "YELLOW_GREEN", "type": "Color", - "value": "Color(0.603922, 0.803922, 0.196078, 1)" + "value": "Color(0.603922, 0.803922, 0.196078, 1)", + "documentation": "Yellow green color." } ], "operators": [ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the colors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the colors are not exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "unary-", - "return_type": "Color" + "return_type": "Color", + "documentation": "Inverts the given color. This is equivalent to [code]Color.WHITE - c[/code] or [code]Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)[/code]. Unlike with [method inverted], the [member a] component is inverted, too." }, { "name": "unary+", - "return_type": "Color" + "return_type": "Color", + "documentation": "Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable." }, { "name": "not", @@ -16377,52 +18139,62 @@ { "name": "*", "right_type": "int", - "return_type": "Color" + "return_type": "Color", + "documentation": "Multiplies each component of the [Color] by the given [int]." }, { "name": "/", "right_type": "int", - "return_type": "Color" + "return_type": "Color", + "documentation": "Divides each component of the [Color] by the given [int]." }, { "name": "*", "right_type": "float", - "return_type": "Color" + "return_type": "Color", + "documentation": "Multiplies each component of the [Color] by the given [int]." }, { "name": "/", "right_type": "float", - "return_type": "Color" + "return_type": "Color", + "documentation": "Divides each component of the [Color] by the given [int]." }, { "name": "==", "right_type": "Color", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the colors are exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "!=", "right_type": "Color", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the colors are not exactly equal.\n[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable." }, { "name": "+", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Adds each component of the [Color] with the components of the given [Color]." }, { "name": "-", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Subtracts each component of the [Color] by the components of the given [Color]." }, { "name": "*", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Multiplies each component of the [Color] by the given [int]." }, { "name": "/", "right_type": "Color", - "return_type": "Color" + "return_type": "Color", + "documentation": "Divides each component of the [Color] by the given [int]." }, { "name": "in", @@ -16447,7 +18219,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 32-bit integer in ARGB format (each component is 8 bits). ARGB is more compatible with DirectX.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_argb32()) # Prints 4294934323\n[/gdscript]\n[csharp]\nvar color = new Color(1.0f, 0.5f, 0.2f);\nGD.Print(color.ToArgb32()); // Prints 4294934323\n[/csharp]\n[/codeblocks]" }, { "name": "to_abgr32", @@ -16455,7 +18228,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 32-bit integer in ABGR format (each component is 8 bits). ABGR is the reversed version of the default RGBA format.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_abgr32()) # Prints 4281565439\n[/gdscript]\n[csharp]\nvar color = new Color(1.0f, 0.5f, 0.2f);\nGD.Print(color.ToAbgr32()); // Prints 4281565439\n[/csharp]\n[/codeblocks]" }, { "name": "to_rgba32", @@ -16463,7 +18237,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Godot's default format.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_rgba32()) # Prints 4286526463\n[/gdscript]\n[csharp]\nvar color = new Color(1, 0.5f, 0.2f);\nGD.Print(color.ToRgba32()); // Prints 4286526463\n[/csharp]\n[/codeblocks]" }, { "name": "to_argb64", @@ -16471,7 +18246,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 64-bit integer in ARGB format (each component is 16 bits). ARGB is more compatible with DirectX.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_argb64()) # Prints -2147470541\n[/gdscript]\n[csharp]\nvar color = new Color(1.0f, 0.5f, 0.2f);\nGD.Print(color.ToArgb64()); // Prints -2147470541\n[/csharp]\n[/codeblocks]" }, { "name": "to_abgr64", @@ -16479,7 +18255,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 64-bit integer in ABGR format (each component is 16 bits). ABGR is the reversed version of the default RGBA format.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_abgr64()) # Prints -225178692812801\n[/gdscript]\n[csharp]\nvar color = new Color(1.0f, 0.5f, 0.2f);\nGD.Print(color.ToAbgr64()); // Prints -225178692812801\n[/csharp]\n[/codeblocks]" }, { "name": "to_rgba64", @@ -16487,7 +18264,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Godot's default format.\n[codeblocks]\n[gdscript]\nvar color = Color(1, 0.5, 0.2)\nprint(color.to_rgba64()) # Prints -140736629309441\n[/gdscript]\n[csharp]\nvar color = new Color(1, 0.5f, 0.2f);\nGD.Print(color.ToRgba64()); // Prints -140736629309441\n[/csharp]\n[/codeblocks]" }, { "name": "to_html", @@ -16502,7 +18280,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Returns the color converted to an HTML hexadecimal color [String] in RGBA format, without the hash ([code]#[/code]) prefix.\nSetting [param with_alpha] to [code]false[/code], excludes alpha from the hexadecimal string, using RGB format instead of RGBA format.\n[codeblocks]\n[gdscript]\nvar white = Color(1, 1, 1, 0.5)\nvar with_alpha = white.to_html() # Returns \"ffffff7f\"\nvar without_alpha = white.to_html(false) # Returns \"ffffff\"\n[/gdscript]\n[csharp]\nvar white = new Color(1, 1, 1, 0.5f);\nstring withAlpha = white.ToHtml(); // Returns \"ffffff7f\"\nstring withoutAlpha = white.ToHtml(false); // Returns \"ffffff\"\n[/csharp]\n[/codeblocks]" }, { "name": "clamp", @@ -16522,7 +18301,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Returns a new color with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component." }, { "name": "inverted", @@ -16530,7 +18310,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3334027602 + "hash": 3334027602, + "documentation": "Returns the color with its [member r], [member g], and [member b] components inverted ([code](1 - r, 1 - g, 1 - b, a)[/code]).\n[codeblocks]\n[gdscript]\nvar black = Color.WHITE.inverted()\nvar color = Color(0.3, 0.4, 0.9)\nvar inverted_color = color.inverted() # Equivalent to `Color(0.7, 0.6, 0.1)`\n[/gdscript]\n[csharp]\nvar black = Colors.White.Inverted();\nvar color = new Color(0.3f, 0.4f, 0.9f);\nColor invertedColor = color.Inverted(); // Equivalent to `new Color(0.7f, 0.6f, 0.1f)`\n[/csharp]\n[/codeblocks]" }, { "name": "lerp", @@ -16548,7 +18329,8 @@ "name": "weight", "type": "float" } - ] + ], + "documentation": "Returns the linear interpolation between this color's components and [param to]'s components. The interpolation factor [param weight] should be between 0.0 and 1.0 (inclusive). See also [method @GlobalScope.lerp].\n[codeblocks]\n[gdscript]\nvar red = Color(1.0, 0.0, 0.0)\nvar aqua = Color(0.0, 1.0, 0.8)\n\nred.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16)\nred.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4)\nred.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8)\n[/gdscript]\n[csharp]\nvar red = new Color(1.0f, 0.0f, 0.0f);\nvar aqua = new Color(0.0f, 1.0f, 0.8f);\n\nred.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f)\nred.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f)\nred.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f)\n[/csharp]\n[/codeblocks]" }, { "name": "lightened", @@ -16562,7 +18344,8 @@ "name": "amount", "type": "float" } - ] + ], + "documentation": "Returns a new color resulting from making this color lighter by the specified [param amount], which should be a ratio from 0.0 to 1.0. See also [method darkened].\n[codeblocks]\n[gdscript]\nvar green = Color(0.0, 1.0, 0.0)\nvar light_green = green.lightened(0.2) # 20% lighter than regular green\n[/gdscript]\n[csharp]\nvar green = new Color(0.0f, 1.0f, 0.0f);\nColor lightGreen = green.Lightened(0.2f); // 20% lighter than regular green\n[/csharp]\n[/codeblocks]" }, { "name": "darkened", @@ -16576,7 +18359,8 @@ "name": "amount", "type": "float" } - ] + ], + "documentation": "Returns a new color resulting from making this color darker by the specified [param amount] (ratio from 0.0 to 1.0). See also [method lightened].\n[codeblocks]\n[gdscript]\nvar green = Color(0.0, 1.0, 0.0)\nvar darkgreen = green.darkened(0.2) # 20% darker than regular green\n[/gdscript]\n[csharp]\nvar green = new Color(0.0f, 1.0f, 0.0f);\nColor darkgreen = green.Darkened(0.2f); // 20% darker than regular green\n[/csharp]\n[/codeblocks]" }, { "name": "blend", @@ -16590,7 +18374,8 @@ "name": "over", "type": "Color" } - ] + ], + "documentation": "Returns a new color resulting from overlaying this color over the given color. In a painting program, you can imagine it as the [param over] color painted over this color (including alpha).\n[codeblocks]\n[gdscript]\nvar bg = Color(0.0, 1.0, 0.0, 0.5) # Green with alpha of 50%\nvar fg = Color(1.0, 0.0, 0.0, 0.5) # Red with alpha of 50%\nvar blended_color = bg.blend(fg) # Brown with alpha of 75%\n[/gdscript]\n[csharp]\nvar bg = new Color(0.0f, 1.0f, 0.0f, 0.5f); // Green with alpha of 50%\nvar fg = new Color(1.0f, 0.0f, 0.0f, 0.5f); // Red with alpha of 50%\nColor blendedColor = bg.Blend(fg); // Brown with alpha of 75%\n[/csharp]\n[/codeblocks]" }, { "name": "get_luminance", @@ -16598,7 +18383,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark.\n[b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first." }, { "name": "srgb_to_linear", @@ -16606,7 +18392,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3334027602 + "hash": 3334027602, + "documentation": "Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also [method linear_to_srgb] which performs the opposite operation." }, { "name": "linear_to_srgb", @@ -16614,7 +18401,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3334027602 + "hash": 3334027602, + "documentation": "Returns the color converted to the [url=https://en.wikipedia.org/wiki/SRGB]sRGB[/url] color space. This method assumes the original color is in the linear color space. See also [method srgb_to_linear] which performs the opposite operation." }, { "name": "is_equal_approx", @@ -16628,7 +18416,8 @@ "name": "to", "type": "Color" } - ] + ], + "documentation": "Returns [code]true[/code] if this color and [param to] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component." }, { "name": "hex", @@ -16642,7 +18431,8 @@ "name": "hex", "type": "int" } - ] + ], + "documentation": "Returns the [Color] associated with the provided [param hex] integer in 32-bit RGBA format (8 bits per channel).\nIn GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]\"0x\"[/code] prefix, making it [code]\"0xRRGGBBAA\"[/code]).\n[codeblocks]\n[gdscript]\nvar red = Color.hex(0xff0000ff)\nvar dark_cyan = Color.hex(0x008b8bff)\nvar my_color = Color.hex(0xbbefd2a4)\n[/gdscript]\n[csharp]\nvar red = new Color(0xff0000ff);\nvar dark_cyan = new Color(0x008b8bff);\nvar my_color = new Color(0xbbefd2a4);\n[/csharp]\n[/codeblocks]" }, { "name": "hex64", @@ -16656,7 +18446,8 @@ "name": "hex", "type": "int" } - ] + ], + "documentation": "Returns the [Color] associated with the provided [param hex] integer in 64-bit RGBA format (16 bits per channel).\nIn GDScript and C#, the [int] is best visualized with hexadecimal notation ([code]\"0x\"[/code] prefix, making it [code]\"0xRRRRGGGGBBBBAAAA\"[/code])." }, { "name": "html", @@ -16670,7 +18461,8 @@ "name": "rgba", "type": "String" } - ] + ], + "documentation": "Returns a new color from [param rgba], an HTML hexadecimal color string. [param rgba] is not case-sensitive, and may be prefixed by a hash sign ([code]#[/code]).\n[param rgba] must be a valid three-digit or six-digit hexadecimal color string, and may contain an alpha channel value. If [param rgba] does not contain an alpha channel value, an alpha channel value of 1.0 is applied. If [param rgba] is invalid, returns an empty color.\n[codeblocks]\n[gdscript]\nvar blue = Color.html(\"#0000ff\") # blue is Color(0.0, 0.0, 1.0, 1.0)\nvar green = Color.html(\"#0F0\") # green is Color(0.0, 1.0, 0.0, 1.0)\nvar col = Color.html(\"663399cc\") # col is Color(0.4, 0.2, 0.6, 0.8)\n[/gdscript]\n[csharp]\nvar blue = Color.FromHtml(\"#0000ff\"); // blue is Color(0.0, 0.0, 1.0, 1.0)\nvar green = Color.FromHtml(\"#0F0\"); // green is Color(0.0, 1.0, 0.0, 1.0)\nvar col = Color.FromHtml(\"663399cc\"); // col is Color(0.4, 0.2, 0.6, 0.8)\n[/csharp]\n[/codeblocks]" }, { "name": "html_is_valid", @@ -16684,7 +18476,8 @@ "name": "color", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if [param color] is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). This method is identical to [method String.is_valid_html_color].\n[codeblocks]\n[gdscript]\nColor.html_is_valid(\"#55aaFF\") # Returns true\nColor.html_is_valid(\"#55AAFF20\") # Returns true\nColor.html_is_valid(\"55AAFF\") # Returns true\nColor.html_is_valid(\"#F2C\") # Returns true\n\nColor.html_is_valid(\"#AABBC\") # Returns false\nColor.html_is_valid(\"#55aaFF5\") # Returns false\n[/gdscript]\n[csharp]\nColor.HtmlIsValid(\"#55AAFF\"); // Returns true\nColor.HtmlIsValid(\"#55AAFF20\"); // Returns true\nColor.HtmlIsValid(\"55AAFF\"); // Returns true\nColor.HtmlIsValid(\"#F2C\"); // Returns true\n\nColor.HtmlIsValid(\"#AABBC\"); // Returns false\nColor.HtmlIsValid(\"#55aaFF5\"); // Returns false\n[/csharp]\n[/codeblocks]" }, { "name": "from_string", @@ -16702,7 +18495,8 @@ "name": "default", "type": "Color" } - ] + ], + "documentation": "Creates a [Color] from the given string, which can be either an HTML color code or a named color (case-insensitive). Returns [param default] if the color cannot be inferred from the string." }, { "name": "from_hsv", @@ -16729,7 +18523,8 @@ "type": "float", "default_value": "1.0" } - ] + ], + "documentation": "Constructs a color from an [url=https://en.wikipedia.org/wiki/HSL_and_HSV]HSV profile[/url]. The hue ([param h]), saturation ([param s]), and value ([param v]) are typically between 0.0 and 1.0.\n[codeblocks]\n[gdscript]\nvar color = Color.from_hsv(0.58, 0.5, 0.79, 0.8)\n[/gdscript]\n[csharp]\nvar color = Color.FromHsv(0.58f, 0.5f, 0.79f, 0.8f);\n[/csharp]\n[/codeblocks]" }, { "name": "from_ok_hsl", @@ -16756,7 +18551,8 @@ "type": "float", "default_value": "1.0" } - ] + ], + "documentation": "Constructs a color from an [url=https://bottosson.github.io/posts/colorpicker/]OK HSL profile[/url]. The hue ([param h]), saturation ([param s]), and lightness ([param l]) are typically between 0.0 and 1.0.\n[codeblocks]\n[gdscript]\nvar color = Color.from_ok_hsl(0.58, 0.5, 0.79, 0.8)\n[/gdscript]\n[csharp]\nvar color = Color.FromOkHsl(0.58f, 0.5f, 0.79f, 0.8f);\n[/csharp]\n[/codeblocks]" }, { "name": "from_rgbe9995", @@ -16770,12 +18566,14 @@ "name": "rgbe", "type": "int" } - ] + ], + "documentation": "Decodes a [Color] from a RGBE9995 format integer. See [constant Image.FORMAT_RGBE9995]." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs a default [Color] from opaque black. This is the same as [constant BLACK].\n[b]Note:[/b] in C#, constructs an empty color with all of its components set to [code]0.0[/code] (transparent black)." }, { "index": 1, @@ -16784,7 +18582,8 @@ "name": "from", "type": "Color" } - ] + ], + "documentation": "Constructs a [Color] as a copy of the given [Color]." }, { "index": 2, @@ -16797,7 +18596,8 @@ "name": "alpha", "type": "float" } - ] + ], + "documentation": "Constructs a [Color] from the existing color, with [member a] set to the given [param alpha] value.\n[codeblocks]\n[gdscript]\nvar red = Color(Color.RED, 0.2) # 20% opaque red.\n[/gdscript]\n[csharp]\nvar red = new Color(Colors.Red, 0.2f); // 20% opaque red.\n[/csharp]\n[/codeblocks]" }, { "index": 3, @@ -16814,7 +18614,8 @@ "name": "b", "type": "float" } - ] + ], + "documentation": "Constructs a [Color] from RGB values, typically between 0.0 and 1.0. [member a] is set to 1.0.\n[codeblocks]\n[gdscript]\nvar color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)`\n[/gdscript]\n[csharp]\nvar color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)`\n[/csharp]\n[/codeblocks]" }, { "index": 4, @@ -16835,7 +18636,8 @@ "name": "a", "type": "float" } - ] + ], + "documentation": "Constructs a [Color] from RGBA values, typically between 0.0 and 1.0.\n[codeblocks]\n[gdscript]\nvar color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)`\n[/gdscript]\n[csharp]\nvar color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)`\n[/csharp]\n[/codeblocks]" }, { "index": 5, @@ -16844,7 +18646,8 @@ "name": "code", "type": "String" } - ] + ], + "documentation": "Constructs a [Color] either from an HTML color code or from a standardized color name. The supported color names are the same as the constants." }, { "index": 6, @@ -16857,10 +18660,12 @@ "name": "alpha", "type": "float" } - ] + ], + "documentation": "Constructs a [Color] either from an HTML color code or from a standardized color name, with [param alpha] on the range of 0.0 to 1.0. The supported color names are the same as the constants." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 16-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.\nColors can be created in various ways: By the various [Color] constructors, by static methods such as [method from_hsv], and by using a name from the set of standardized colors based on [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the addition of [constant TRANSPARENT]. GDScript also provides [method @GDScript.Color8], which uses integers from [code]0[/code] to [code]255[/code] and doesn't support overbright colors.\n[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it is equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].\n[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]" }, { "name": "StringName", @@ -16869,17 +18674,20 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is equivalent to the given [String]." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is not equivalent to the given [String]." }, { "name": "%", "right_type": "Variant", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "not", @@ -16888,37 +18696,44 @@ { "name": "%", "right_type": "bool", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "int", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "float", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "==", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is equivalent to the given [String]." }, { "name": "!=", "right_type": "String", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is not equivalent to the given [String]." }, { "name": "+", "right_type": "String", - "return_type": "String" + "return_type": "String", + "documentation": "Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation." }, { "name": "%", "right_type": "String", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -16928,122 +18743,146 @@ { "name": "%", "right_type": "Vector2", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector2i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Rect2", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Rect2i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector3", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector3i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Transform2D", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector4", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Vector4i", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Plane", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Quaternion", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "AABB", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Basis", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Transform3D", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Projection", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Color", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "==", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is equivalent to the given [String]." }, { "name": "!=", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if this [StringName] is not equivalent to the given [String]." }, { "name": "<", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [StringName]'s pointer comes before [param right]. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url]." }, { "name": "<=", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [StringName]'s pointer comes before [param right] or if they are the same. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url]." }, { "name": ">", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [StringName]'s pointer comes after [param right]. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url]." }, { "name": ">=", "right_type": "StringName", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the left [StringName]'s pointer comes after [param right] or if they are the same. Note that this will not match their [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode order[/url]." }, { "name": "+", "right_type": "StringName", - "return_type": "String" + "return_type": "String", + "documentation": "Appends [param right] at the end of this [StringName], returning a [String]. This is also known as a string concatenation." }, { "name": "%", "right_type": "StringName", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -17053,12 +18892,14 @@ { "name": "%", "right_type": "NodePath", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Object", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -17068,17 +18909,20 @@ { "name": "%", "right_type": "Callable", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Signal", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "Dictionary", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -17088,7 +18932,8 @@ { "name": "%", "right_type": "Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -17098,32 +18943,38 @@ { "name": "%", "right_type": "PackedByteArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedInt32Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedInt64Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedFloat32Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedFloat64Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedStringArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "in", @@ -17133,17 +18984,20 @@ { "name": "%", "right_type": "PackedVector2Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedVector3Array", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." }, { "name": "%", "right_type": "PackedColorArray", - "return_type": "String" + "return_type": "String", + "documentation": "Formats the [StringName], replacing the placeholders with one or more parameters, returning a [String]. To pass multiple parameters, [param right] needs to be an [Array].\nFor more information, see the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format strings[/url] tutorial.\n[b]Note:[/b] In C#, this operator is not available. Instead, see [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]how to interpolate strings with \"$\"[/url]." } ], "methods": [ @@ -17159,7 +19013,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" and \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to], [method naturalcasecmp_to], and [method naturalnocasecmp_to]." }, { "name": "nocasecmp_to", @@ -17173,7 +19028,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-insensitive[/b] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to], [method naturalcasecmp_to], and [method naturalnocasecmp_to]." }, { "name": "naturalcasecmp_to", @@ -17187,7 +19043,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-sensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order.\nWhen used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code][\"1\", \"2\", \"3\", ...][/code], not [code][\"1\", \"10\", \"2\", \"3\", ...][/code].\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalnocasecmp_to], [method nocasecmp_to], and [method casecmp_to]." }, { "name": "naturalnocasecmp_to", @@ -17201,7 +19058,8 @@ "name": "to", "type": "String" } - ] + ], + "documentation": "Performs a [b]case-insensitive[/b], [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. \"Less than\" or \"greater than\" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters are converted to uppercase for the comparison.\nWhen used for sorting, natural order comparison orders sequences of numbers by the combined value of each digit as is often expected, instead of the single digit's value. A sorted sequence of numbered strings will be [code][\"1\", \"2\", \"3\", ...][/code], not [code][\"1\", \"10\", \"2\", \"3\", ...][/code].\nWith different string lengths, returns [code]1[/code] if this string is longer than the [param to] string, or [code]-1[/code] if shorter. Note that the length of empty strings is [i]always[/i] [code]0[/code].\nTo get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method naturalcasecmp_to], [method nocasecmp_to], and [method casecmp_to]." }, { "name": "length", @@ -17209,7 +19067,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of characters in the string. Empty strings ([code]\"\"[/code]) always return [code]0[/code]. See also [method is_empty]." }, { "name": "substr", @@ -17228,7 +19087,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns part of the string from the position [param from] with length [param len]. If [param len] is [code]-1[/code] (as by default), returns the rest of the string starting from the given position." }, { "name": "get_slice", @@ -17246,7 +19106,8 @@ "name": "slice", "type": "int" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.\nThis is faster than [method split], if you only need one substring.\n[b]Example:[/b]\n[codeblock]\nprint(\"i/am/example/hi\".get_slice(\"/\", 2)) # Prints \"example\"\n[/codeblock]" }, { "name": "get_slicec", @@ -17264,7 +19125,8 @@ "name": "slice", "type": "int" } - ] + ], + "documentation": "Splits the string using a Unicode character with code [param delimiter] and returns the substring at index [param slice]. Returns an empty string if the [param slice] does not exist.\nThis is faster than [method split], if you only need one substring." }, { "name": "get_slice_count", @@ -17278,7 +19140,8 @@ "name": "delimiter", "type": "String" } - ] + ], + "documentation": "Returns the total number of slices when the string is split with the given [param delimiter] (see [method split])." }, { "name": "find", @@ -17297,7 +19160,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the index of the [b]first[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the end of the string.\n[codeblocks]\n[gdscript]\nprint(\"Team\".find(\"I\")) # Prints -1\n\nprint(\"Potato\".find(\"t\")) # Prints 2\nprint(\"Potato\".find(\"t\", 3)) # Prints 4\nprint(\"Potato\".find(\"t\", 5)) # Prints -1\n[/gdscript]\n[csharp]\nGD.Print(\"Team\".Find(\"I\")); // Prints -1\n\nGD.Print(\"Potato\".Find(\"t\")); // Prints 2\nGD.Print(\"Potato\".Find(\"t\", 3)); // Prints 4\nGD.Print(\"Potato\".Find(\"t\", 5)); // Prints -1\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you just want to know whether the string contains [param what], use [method contains]. In GDScript, you may also use the [code]in[/code] operator." }, { "name": "count", @@ -17321,7 +19185,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions. If [param to] is 0, the search continues until the end of the string." }, { "name": "countn", @@ -17345,7 +19210,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the number of occurrences of the substring [param what] between [param from] and [param to] positions, [b]ignoring case[/b]. If [param to] is 0, the search continues until the end of the string." }, { "name": "findn", @@ -17364,7 +19230,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns the index of the [b]first[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the end of the string." }, { "name": "rfind", @@ -17383,7 +19250,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns the index of the [b]last[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method find]." }, { "name": "rfindn", @@ -17402,7 +19270,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Returns the index of the [b]last[/b] [b]case-insensitive[/b] occurrence of [param what] in this string, or [code]-1[/code] if there are none. The starting search index can be specified with [param from], continuing to the beginning of the string. This method is the reverse of [method findn]." }, { "name": "match", @@ -17416,7 +19285,8 @@ "name": "expr", "type": "String" } - ] + ], + "documentation": "Does a simple expression match (also called \"glob\" or \"globbing\"), where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code]." }, { "name": "matchn", @@ -17430,7 +19300,8 @@ "name": "expr", "type": "String" } - ] + ], + "documentation": "Does a simple [b]case-insensitive[/b] expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except a period ([code].[/code]). An empty string or empty expression always evaluates to [code]false[/code]." }, { "name": "begins_with", @@ -17444,7 +19315,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string begins with the given [param text]. See also [method ends_with]." }, { "name": "ends_with", @@ -17458,7 +19330,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string ends with the given [param text]. See also [method begins_with]." }, { "name": "is_subsequence_of", @@ -17472,7 +19345,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order.\n[codeblock]\nvar text = \"Wow, incredible!\"\n\nprint(\"inedible\".is_subsequence_of(text)) # Prints true\nprint(\"Word!\".is_subsequence_of(text)) # Prints true\nprint(\"Window\".is_subsequence_of(text)) # Prints false\nprint(\"\".is_subsequence_of(text)) # Prints true\n[/codeblock]" }, { "name": "is_subsequence_ofn", @@ -17486,7 +19360,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if all characters of this string can be found in [param text] in their original order, [b]ignoring case[/b]." }, { "name": "bigrams", @@ -17494,7 +19369,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 747180633 + "hash": 747180633, + "documentation": "Returns an array containing the bigrams (pairs of consecutive characters) of this string.\n[codeblock]\nprint(\"Get up!\".bigrams()) # Prints [\"Ge\", \"et\", \"t \", \" u\", \"up\", \"p!\"]\n[/codeblock]" }, { "name": "similarity", @@ -17508,7 +19384,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "Returns the similarity index ([url=https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient]Sorensen-Dice coefficient[/url]) of this string compared to another. A result of [code]1.0[/code] means totally similar, while [code]0.0[/code] means totally dissimilar.\n[codeblock]\nprint(\"ABC123\".similarity(\"ABC123\")) # Prints 1.0\nprint(\"ABC123\".similarity(\"XYZ456\")) # Prints 0.0\nprint(\"ABC123\".similarity(\"123ABC\")) # Prints 0.8\nprint(\"ABC123\".similarity(\"abc123\")) # Prints 0.4\n[/codeblock]" }, { "name": "format", @@ -17527,7 +19404,8 @@ "type": "String", "default_value": "\"{_}\"" } - ] + ], + "documentation": "Formats the string by replacing all occurrences of [param placeholder] with the elements of [param values].\n[param values] can be a [Dictionary] or an [Array]. Any underscores in [param placeholder] will be replaced with the corresponding keys in advance. Array elements use their index as keys.\n[codeblock]\n# Prints \"Waiting for Godot is a play by Samuel Beckett, and Godot Engine is named after it.\"\nvar use_array_values = \"Waiting for {0} is a play by {1}, and {0} Engine is named after it.\"\nprint(use_array_values.format([\"Godot\", \"Samuel Beckett\"]))\n\n# Prints \"User 42 is Godot.\"\nprint(\"User {id} is {name}.\".format({\"id\": 42, \"name\": \"Godot\"}))\n[/codeblock]\nSome additional handling is performed when [param values] is an [Array]. If [param placeholder] does not contain an underscore, the elements of the [param values] array will be used to replace one occurrence of the placeholder in order; If an element of [param values] is another 2-element array, it'll be interpreted as a key-value pair.\n[codeblock]\n# Prints \"User 42 is Godot.\"\nprint(\"User {} is {}.\".format([42, \"Godot\"], \"{}\"))\nprint(\"User {id} is {name}.\".format([[\"id\", 42], [\"name\", \"Godot\"]]))\n[/codeblock]\nSee also the [url=$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html]GDScript format string[/url] tutorial.\n[b]Note:[/b] In C#, it's recommended to [url=https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated]interpolate strings with \"$\"[/url], instead." }, { "name": "replace", @@ -17545,7 +19423,8 @@ "name": "forwhat", "type": "String" } - ] + ], + "documentation": "Replaces all occurrences of [param what] inside the string with the given [param forwhat]." }, { "name": "replacen", @@ -17563,7 +19442,8 @@ "name": "forwhat", "type": "String" } - ] + ], + "documentation": "Replaces all [b]case-insensitive[/b] occurrences of [param what] inside the string with the given [param forwhat]." }, { "name": "repeat", @@ -17577,7 +19457,8 @@ "name": "count", "type": "int" } - ] + ], + "documentation": "Repeats this string a number of times. [param count] needs to be greater than [code]0[/code]. Otherwise, returns an empty string." }, { "name": "reverse", @@ -17585,7 +19466,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the copy of this string in reverse order." }, { "name": "insert", @@ -17603,7 +19485,8 @@ "name": "what", "type": "String" } - ] + ], + "documentation": "Inserts [param what] at the given [param position] in the string." }, { "name": "erase", @@ -17622,7 +19505,8 @@ "type": "int", "default_value": "1" } - ] + ], + "documentation": "Returns a string with [param chars] characters erased starting from [param position]. If [param chars] goes beyond the string's length given the specified [param position], fewer characters will be erased from the returned string. Returns an empty string if either [param position] or [param chars] is negative. Returns the original string unmodified if [param chars] is [code]0[/code]." }, { "name": "capitalize", @@ -17630,7 +19514,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Changes the appearance of the string: replaces underscores ([code]_[/code]) with spaces, adds spaces before uppercase letters in the middle of a word, converts all letters to lowercase, then converts the first one and each one following a space to uppercase.\n[codeblocks]\n[gdscript]\n\"move_local_x\".capitalize() # Returns \"Move Local X\"\n\"sceneFile_path\".capitalize() # Returns \"Scene File Path\"\n[/gdscript]\n[csharp]\n\"move_local_x\".Capitalize(); // Returns \"Move Local X\"\n\"sceneFile_path\".Capitalize(); // Returns \"Scene File Path\"\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] This method not the same as the default appearance of properties in the Inspector dock, as it does not capitalize acronyms ([code]\"2D\"[/code], [code]\"FPS\"[/code], [code]\"PNG\"[/code], etc.) as you may expect." }, { "name": "to_camel_case", @@ -17638,7 +19523,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]camelCase[/code]." }, { "name": "to_pascal_case", @@ -17646,7 +19532,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]PascalCase[/code]." }, { "name": "to_snake_case", @@ -17654,7 +19541,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to [code]snake_case[/code]." }, { "name": "split", @@ -17679,7 +19567,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns an array of the substrings. If [param delimiter] is an empty string, each substring will be a single character. This method is the opposite of [method join].\nIf [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.\nIf [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split.\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar some_array = \"One,Two,Three,Four\".split(\",\", true, 2)\n\nprint(some_array.size()) # Prints 3\nprint(some_array[0]) # Prints \"One\"\nprint(some_array[1]) # Prints \"Two\"\nprint(some_array[2]) # Prints \"Three,Four\"\n[/gdscript]\n[csharp]\n// C#'s `Split()` does not support the `maxsplit` parameter.\nvar someArray = \"One,Two,Three\".Split(\",\");\n\nGD.Print(someArray[0]); // Prints \"One\"\nGD.Print(someArray[1]); // Prints \"Two\"\nGD.Print(someArray[2]); // Prints \"Three\"\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If you only need one substring from the array, consider using [method get_slice] which is faster. If you need to split strings with more complex rules, use the [RegEx] class instead." }, { "name": "rsplit", @@ -17704,7 +19593,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Splits the string using a [param delimiter] and returns an array of the substrings, starting from the end of the string. The splits in the returned array appear in the same order as the original string. If [param delimiter] is an empty string, each substring will be a single character.\nIf [param allow_empty] is [code]false[/code], empty strings between adjacent delimiters are excluded from the array.\nIf [param maxsplit] is greater than [code]0[/code], the number of splits may not exceed [param maxsplit]. By default, the entire string is split, which is mostly identical to [method split].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar some_string = \"One,Two,Three,Four\"\nvar some_array = some_string.rsplit(\",\", true, 1)\n\nprint(some_array.size()) # Prints 2\nprint(some_array[0]) # Prints \"One,Two,Three\"\nprint(some_array[1]) # Prints \"Four\"\n[/gdscript]\n[csharp]\n// In C#, there is no String.RSplit() method.\n[/csharp]\n[/codeblocks]" }, { "name": "split_floats", @@ -17723,7 +19613,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Splits the string into floats by using a [param delimiter] and returns a [PackedFloat64Array].\nIf [param allow_empty] is [code]false[/code], empty or invalid [float] conversions between adjacent delimiters are excluded.\n[codeblock]\nvar a = \"1,2,4.5\".split_floats(\",\") # a is [1.0, 2.0, 4.5]\nvar c = \"1| ||4.5\".split_floats(\"|\") # c is [1.0, 0.0, 0.0, 4.5]\nvar b = \"1| ||4.5\".split_floats(\"|\", false) # b is [1.0, 4.5]\n[/codeblock]" }, { "name": "join", @@ -17737,7 +19628,8 @@ "name": "parts", "type": "PackedStringArray" } - ] + ], + "documentation": "Returns the concatenation of [param parts]' elements, with each element separated by the string calling this method. This method is the opposite of [method split].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar fruits = [\"Apple\", \"Orange\", \"Pear\", \"Kiwi\"]\n\nprint(\", \".join(fruits)) # Prints \"Apple, Orange, Pear, Kiwi\"\nprint(\"---\".join(fruits)) # Prints \"Apple---Orange---Pear---Kiwi\"\n[/gdscript]\n[csharp]\nvar fruits = new string[] {\"Apple\", \"Orange\", \"Pear\", \"Kiwi\"};\n\n// In C#, this method is static.\nGD.Print(string.Join(\", \", fruits)); // Prints \"Apple, Orange, Pear, Kiwi\"\nGD.Print(string.Join(\"---\", fruits)); // Prints \"Apple---Orange---Pear---Kiwi\"\n[/csharp]\n[/codeblocks]" }, { "name": "to_upper", @@ -17745,7 +19637,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to uppercase." }, { "name": "to_lower", @@ -17753,7 +19646,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the string converted to lowercase." }, { "name": "left", @@ -17767,7 +19661,8 @@ "name": "length", "type": "int" } - ] + ], + "documentation": "Returns the first [param length] characters from the beginning of the string. If [param length] is negative, strips the last [param length] characters from the string's end.\n[codeblock]\nprint(\"Hello World!\".left(3)) # Prints \"Hel\"\nprint(\"Hello World!\".left(-4)) # Prints \"Hello Wo\"\n[/codeblock]" }, { "name": "right", @@ -17781,7 +19676,8 @@ "name": "length", "type": "int" } - ] + ], + "documentation": "Returns the last [param length] characters from the end of the string. If [param length] is negative, strips the first [param length] characters from the string's beginning.\n[codeblock]\nprint(\"Hello World!\".right(3)) # Prints \"ld!\"\nprint(\"Hello World!\".right(-4)) # Prints \"o World!\"\n[/codeblock]" }, { "name": "strip_edges", @@ -17801,7 +19697,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Strips all non-printable characters from the beginning and the end of the string. These include spaces, tabulations ([code]\\t[/code]), and newlines ([code]\\n[/code] [code]\\r[/code]).\nIf [param left] is [code]false[/code], ignores the string's beginning. Likewise, if [param right] is [code]false[/code], ignores the string's end." }, { "name": "strip_escapes", @@ -17809,7 +19706,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Strips all escape characters from the string. These include all non-printable control characters of the first page of the ASCII table (values from 0 to 31), such as tabulation ([code]\\t[/code]) and newline ([code]\\n[/code], [code]\\r[/code]) characters, but [i]not[/i] spaces." }, { "name": "lstrip", @@ -17823,7 +19721,8 @@ "name": "chars", "type": "String" } - ] + ], + "documentation": "Removes a set of characters defined in [param chars] from the string's beginning. See also [method rstrip].\n[b]Note:[/b] [param chars] is not a prefix. Use [method trim_prefix] to remove a single prefix, rather than a set of characters." }, { "name": "rstrip", @@ -17837,7 +19736,8 @@ "name": "chars", "type": "String" } - ] + ], + "documentation": "Removes a set of characters defined in [param chars] from the string's end. See also [method lstrip].\n[b]Note:[/b] [param chars] is not a suffix. Use [method trim_suffix] to remove a single suffix, rather than a set of characters." }, { "name": "get_extension", @@ -17845,7 +19745,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file name or path, returns the file extension without the leading period ([code].[/code]). Otherwise, returns an empty string.\n[codeblock]\nvar a = \"/path/to/file.txt\".get_extension() # a is \"txt\"\nvar b = \"cool.txt\".get_extension() # b is \"txt\"\nvar c = \"cool.font.tres\".get_extension() # c is \"tres\"\nvar d = \".pack1\".get_extension() # d is \"pack1\"\n\nvar e = \"file.txt.\".get_extension() # e is \"\"\nvar f = \"file.txt..\".get_extension() # f is \"\"\nvar g = \"txt\".get_extension() # g is \"\"\nvar h = \"\".get_extension() # h is \"\"\n[/codeblock]" }, { "name": "get_basename", @@ -17853,7 +19754,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the full file path, without the extension.\n[codeblock]\nvar base = \"/path/to/file.txt\".get_basename() # base is \"/path/to/file\"\n[/codeblock]" }, { "name": "path_join", @@ -17867,7 +19769,8 @@ "name": "file", "type": "String" } - ] + ], + "documentation": "Concatenates [param file] at the end of the string as a subpath, adding [code]/[/code] if necessary.\n[b]Example:[/b] [code]\"this/is\".path_join(\"path\") == \"this/is/path\"[/code]." }, { "name": "unicode_at", @@ -17881,7 +19784,8 @@ "name": "at", "type": "int" } - ] + ], + "documentation": "Returns the character code at position [param at]." }, { "name": "indent", @@ -17895,7 +19799,8 @@ "name": "prefix", "type": "String" } - ] + ], + "documentation": "Indents every line of the string with the given [param prefix]. Empty lines are not indented. See also [method dedent] to remove indentation.\nFor example, the string can be indented with two tabulations using [code]\"\\t\\t\"[/code], or four spaces using [code]\" \"[/code]." }, { "name": "dedent", @@ -17903,7 +19808,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with indentation (leading tabs and spaces) removed. See also [method indent] to add indentation." }, { "name": "md5_text", @@ -17911,7 +19817,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as another [String]." }, { "name": "sha1_text", @@ -17919,7 +19826,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as another [String]." }, { "name": "sha256_text", @@ -17927,7 +19835,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as another [String]." }, { "name": "md5_buffer", @@ -17935,7 +19844,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/MD5]MD5 hash[/url] of the string as a [PackedByteArray]." }, { "name": "sha1_buffer", @@ -17943,7 +19853,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-1]SHA-1[/url] hash of the string as a [PackedByteArray]." }, { "name": "sha256_buffer", @@ -17951,7 +19862,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns the [url=https://en.wikipedia.org/wiki/SHA-2]SHA-256[/url] hash of the string as a [PackedByteArray]." }, { "name": "is_empty", @@ -17959,7 +19871,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string's length is [code]0[/code] ([code]\"\"[/code]). See also [method length]." }, { "name": "contains", @@ -17973,7 +19886,8 @@ "name": "what", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the string contains [param what]. In GDScript, this corresponds to the [code]in[/code] operator.\n[codeblocks]\n[gdscript]\nprint(\"Node\".contains(\"de\")) # Prints true\nprint(\"team\".contains(\"I\")) # Prints false\nprint(\"I\" in \"team\") # Prints false\n[/gdscript]\n[csharp]\nGD.Print(\"Node\".Contains(\"de\")); // Prints true\nGD.Print(\"team\".Contains(\"I\")); // Prints false\n[/csharp]\n[/codeblocks]\nIf you need to know where [param what] is within the string, use [method find]." }, { "name": "is_absolute_path", @@ -17981,7 +19895,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string is a path to a file or directory, and its starting point is explicitly defined. This method is the opposite of [method is_relative_path].\nThis includes all paths starting with [code]\"res://\"[/code], [code]\"user://\"[/code], [code]\"C:\\\"[/code], [code]\"/\"[/code], etc." }, { "name": "is_relative_path", @@ -17989,7 +19904,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the string is a path, and its starting point is dependent on context. The path could begin from the current directory, or the current [Node] (if the string is derived from a [NodePath]), and may sometimes be prefixed with [code]\"./\"[/code]. This method is the opposite of [method is_absolute_path]." }, { "name": "simplify_path", @@ -17997,7 +19913,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, converts the string into a canonical path. This is the shortest possible path, without [code]\"./\"[/code], and all the unnecessary [code]\"..\"[/code] and [code]\"/\"[/code].\n[codeblock]\nvar simple_path = \"./path/to///../file\".simplify_path()\nprint(simple_path) # Prints \"path/file\"\n[/codeblock]" }, { "name": "get_base_dir", @@ -18005,7 +19922,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the base directory name.\n[codeblock]\nvar dir_path = \"/path/to/file.txt\".get_base_dir() # dir_path is \"/path/to\"\n[/codeblock]" }, { "name": "get_file", @@ -18013,7 +19931,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "If the string is a valid file path, returns the file name, including the extension.\n[codeblock]\nvar file = \"/path/to/icon.png\".get_file() # file is \"icon.png\"\n[/codeblock]" }, { "name": "xml_escape", @@ -18028,7 +19947,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns a copy of the string with special characters escaped using the XML standard. If [param escape_quotes] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]\"[/code]) characters are also escaped." }, { "name": "xml_unescape", @@ -18036,7 +19956,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard." }, { "name": "uri_encode", @@ -18044,7 +19965,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Encodes the string to URL-friendly format. This method is meant to properly encode the parameters in a URL when sending an HTTP request.\n[codeblocks]\n[gdscript]\nvar prefix = \"$DOCS_URL/?highlight=\"\nvar url = prefix + \"Godot Engine:docs\".uri_encode()\n\nprint(url) # Prints \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\n[/gdscript]\n[csharp]\nvar prefix = \"$DOCS_URL/?highlight=\";\nvar url = prefix + \"Godot Engine:docs\".URIEncode();\n\nGD.Print(url); // Prints \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\n[/csharp]\n[/codeblocks]" }, { "name": "uri_decode", @@ -18052,7 +19974,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Decodes the string from its URL-encoded format. This method is meant to properly decode the parameters in a URL when receiving an HTTP request.\n[codeblocks]\n[gdscript]\nvar url = \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\nprint(url.uri_decode()) # Prints \"$DOCS_URL/?highlight=Godot Engine:docs\"\n[/gdscript]\n[csharp]\nvar url = \"$DOCS_URL/?highlight=Godot%20Engine%3%docs\"\nGD.Print(url.URIDecode()) // Prints \"$DOCS_URL/?highlight=Godot Engine:docs\"\n[/csharp]\n[/codeblocks]" }, { "name": "c_escape", @@ -18060,7 +19983,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with special characters escaped using the C language standard." }, { "name": "c_unescape", @@ -18068,7 +19992,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\\'[/code], [code]\\\"[/code], [code]\\\\[/code], [code]\\a[/code], [code]\\b[/code], [code]\\f[/code], [code]\\n[/code], [code]\\r[/code], [code]\\t[/code], [code]\\v[/code].\n[b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\\uXXXX[/code] escape sequence." }, { "name": "json_escape", @@ -18076,7 +20001,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with special characters escaped using the JSON standard. Because it closely matches the C standard, it is possible to use [method c_unescape] to unescape the string, if necessary." }, { "name": "validate_node_name", @@ -18084,7 +20010,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with all characters that are not allowed in [member Node.name] ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]\"[/code] [code]%[/code]) replaced with underscores." }, { "name": "validate_filename", @@ -18092,7 +20019,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a copy of the string with all characters that are not allowed in [method is_valid_filename] replaced with underscores." }, { "name": "is_valid_identifier", @@ -18100,7 +20028,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]), and the first character may not be a digit.\n[codeblock]\nprint(\"node_2d\".is_valid_identifier()) # Prints true\nprint(\"TYPE_FLOAT\".is_valid_identifier()) # Prints true\nprint(\"1st_method\".is_valid_identifier()) # Prints false\nprint(\"MyMethod#2\".is_valid_identifier()) # Prints false\n[/codeblock]" }, { "name": "is_valid_int", @@ -18108,7 +20037,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a valid integer. A valid integer only contains digits, and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. See also [method to_int].\n[codeblock]\nprint(\"7\".is_valid_int()) # Prints true\nprint(\"1.65\".is_valid_int()) # Prints false\nprint(\"Hi\".is_valid_int()) # Prints false\nprint(\"+3\".is_valid_int()) # Prints true\nprint(\"-12\".is_valid_int()) # Prints true\n[/codeblock]" }, { "name": "is_valid_float", @@ -18116,7 +20046,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a valid floating-point number. A valid float may contain only digits, one decimal point ([code].[/code]), and the exponent letter ([code]e[/code]). It may also be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign. Any valid integer is also a valid float (see [method is_valid_int]). See also [method to_float].\n[codeblock]\nprint(\"1.7\".is_valid_float()) # Prints true\nprint(\"24\".is_valid_float()) # Prints true\nprint(\"7e3\".is_valid_float()) # Prints true\nprint(\"Hello\".is_valid_float()) # Prints false\n[/codeblock]" }, { "name": "is_valid_hex_number", @@ -18131,7 +20062,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns [code]true[/code] if this string is a valid hexadecimal number. A valid hexadecimal number only contains digits or letters [code]A[/code] to [code]F[/code] (either uppercase or lowercase), and may be prefixed with a positive ([code]+[/code]) or negative ([code]-[/code]) sign.\nIf [param with_prefix] is [code]true[/code], the hexadecimal number needs to prefixed by [code]\"0x\"[/code] to be considered valid.\n[codeblock]\nprint(\"A08E\".is_valid_hex_number()) # Prints true\nprint(\"-AbCdEf\".is_valid_hex_number()) # Prints true\nprint(\"2.5\".is_valid_hex_number()) # Prints false\n\nprint(\"0xDEADC0DE\".is_valid_hex_number(true)) # Prints true\n[/codeblock]" }, { "name": "is_valid_html_color", @@ -18139,7 +20071,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string is a valid color in hexadecimal HTML notation. The string must be a hexadecimal value (see [method is_valid_hex_number]) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign ([code]#[/code]). Other HTML notations for colors, such as names or [code]hsl()[/code], are not considered valid. See also [method Color.html]." }, { "name": "is_valid_ip_address", @@ -18147,7 +20080,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string represents a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]\"0.0.0.0\"[/code] and [code]\"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff\"[/code] as valid." }, { "name": "is_valid_filename", @@ -18155,7 +20089,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this string does not contain characters that are not allowed in file names ([code]:[/code] [code]/[/code] [code]\\[/code] [code]?[/code] [code]*[/code] [code]\"[/code] [code]|[/code] [code]%[/code] [code]<[/code] [code]>[/code])." }, { "name": "to_int", @@ -18163,7 +20098,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing an integer number into an [int]. This method removes any non-number character and stops at the first decimal point ([code].[/code]). See also [method is_valid_int].\n[codeblock]\nvar a = \"123\".to_int() # a is 123\nvar b = \"x1y2z3\".to_int() # b is 123\nvar c = \"-1.2.3\".to_int() # c is -1\nvar d = \"Hello!\".to_int() # d is 0\n[/codeblock]" }, { "name": "to_float", @@ -18171,7 +20107,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 466405837 + "hash": 466405837, + "documentation": "Converts the string representing a decimal number into a [float]. This method stops on the first non-number character, except the first decimal point ([code].[/code]) and the exponent letter ([code]e[/code]). See also [method is_valid_float].\n[codeblock]\nvar a = \"12.35\".to_float() # a is 12.35\nvar b = \"1.2.3\".to_float() # b is 1.2\nvar c = \"12xy3\".to_float() # c is 12.0\nvar d = \"1e3\".to_float() # d is 1000.0\nvar e = \"Hello!\".to_int() # e is 0.0\n[/codeblock]" }, { "name": "hex_to_int", @@ -18179,7 +20116,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing a hexadecimal number into an [int]. The string may be optionally prefixed with [code]\"0x\"[/code], and an additional [code]-[/code] prefix for negative numbers.\n[codeblocks]\n[gdscript]\nprint(\"0xff\".hex_to_int()) # Prints 255\nprint(\"ab\".hex_to_int()) # Prints 171\n[/gdscript]\n[csharp]\nGD.Print(\"0xff\".HexToInt()); // Prints 255\nGD.Print(\"ab\".HexToInt()); // Prints 171\n[/csharp]\n[/codeblocks]" }, { "name": "bin_to_int", @@ -18187,7 +20125,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Converts the string representing a binary number into an [int]. The string may optionally be prefixed with [code]\"0b\"[/code], and an additional [code]-[/code] prefix for negative numbers.\n[codeblocks]\n[gdscript]\nprint(\"101\".bin_to_int()) # Prints 5\nprint(\"0b101\".bin_to_int()) # Prints 5\nprint(\"-0b10\".bin_to_int()) # Prints -2\n[/gdscript]\n[csharp]\nGD.Print(\"101\".BinToInt()); // Prints 5\nGD.Print(\"0b101\".BinToInt()); // Prints 5\nGD.Print(\"-0b10\".BinToInt()); // Prints -2\n[/csharp]\n[/codeblocks]" }, { "name": "lpad", @@ -18206,7 +20145,8 @@ "type": "String", "default_value": "\" \"" } - ] + ], + "documentation": "Formats the string to be at least [param min_length] long by adding [param character]s to the left of the string, if necessary. See also [method rpad]." }, { "name": "rpad", @@ -18225,7 +20165,8 @@ "type": "String", "default_value": "\" \"" } - ] + ], + "documentation": "Formats the string to be at least [param min_length] long, by adding [param character]s to the right of the string, if necessary. See also [method lpad]." }, { "name": "pad_decimals", @@ -18239,7 +20180,8 @@ "name": "digits", "type": "int" } - ] + ], + "documentation": "Formats the string representing a number to have an exact number of [param digits] [i]after[/i] the decimal point." }, { "name": "pad_zeros", @@ -18253,7 +20195,8 @@ "name": "digits", "type": "int" } - ] + ], + "documentation": "Formats the string representing a number to have an exact number of [param digits] [i]before[/i] the decimal point." }, { "name": "trim_prefix", @@ -18267,7 +20210,8 @@ "name": "prefix", "type": "String" } - ] + ], + "documentation": "Removes the given [param prefix] from the start of the string, or returns the string unchanged." }, { "name": "trim_suffix", @@ -18281,7 +20225,8 @@ "name": "suffix", "type": "String" } - ] + ], + "documentation": "Removes the given [param suffix] from the end of the string, or returns the string unchanged." }, { "name": "to_ascii_buffer", @@ -18289,7 +20234,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to an [url=https://en.wikipedia.org/wiki/ASCII]ASCII[/url]/Latin-1 encoded [PackedByteArray]. This method is slightly faster than [method to_utf8_buffer], but replaces all unsupported characters with spaces." }, { "name": "to_utf8_buffer", @@ -18297,7 +20243,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-8]UTF-8[/url] encoded [PackedByteArray]. This method is slightly slower than [method to_ascii_buffer], but supports all UTF-8 characters. For most cases, prefer using this method." }, { "name": "to_utf16_buffer", @@ -18305,7 +20252,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-16]UTF-16[/url] encoded [PackedByteArray]." }, { "name": "to_utf32_buffer", @@ -18313,7 +20261,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/UTF-32]UTF-32[/url] encoded [PackedByteArray]." }, { "name": "hex_decode", @@ -18321,7 +20270,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Decodes a hexadecimal string as a [PackedByteArray].\n[codeblocks]\n[gdscript]\nvar text = \"hello world\"\nvar encoded = text.to_utf8_buffer().hex_encode() # outputs \"68656c6c6f20776f726c64\"\nprint(buf.hex_decode().get_string_from_utf8())\n[/gdscript]\n[csharp]\nvar text = \"hello world\";\nvar encoded = text.ToUtf8Buffer().HexEncode(); // outputs \"68656c6c6f20776f726c64\"\nGD.Print(buf.HexDecode().GetStringFromUtf8());\n[/csharp]\n[/codeblocks]" }, { "name": "to_wchar_buffer", @@ -18329,7 +20279,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Converts the string to a [url=https://en.wikipedia.org/wiki/Wide_character]wide character[/url] ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded [PackedByteArray]." }, { "name": "hash", @@ -18337,12 +20288,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the 32-bit hash value representing the string's contents.\n[b]Note:[/b] Strings with equal hash values are [i]not[/i] guaranteed to be the same, as a result of hash collisions. On the countrary, strings with different hash values are guaranteed to be different." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [StringName]." }, { "index": 1, @@ -18351,7 +20304,8 @@ "name": "from", "type": "StringName" } - ] + ], + "documentation": "Constructs a [StringName] as a copy of the given [StringName]." }, { "index": 2, @@ -18360,10 +20314,12 @@ "name": "from", "type": "String" } - ] + ], + "documentation": "Creates a new [StringName] from the given [String]. In GDScript, [code]StringName(\"example\")[/code] is equivalent to [code]&\"example\"[/code]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "[StringName]s are immutable strings designed for general-purpose representation of unique names (also called \"string interning\"). Two [StringName]s with the same value are the same object. Comparing them is extremely fast compared to regular [String]s.\nYou will usually just pass a [String] to methods expecting a [StringName] and it will be automatically converted, but you may occasionally want to construct a [StringName] ahead of time with the [StringName] constructor or, in GDScript, the literal syntax [code]&\"example\"[/code].\nSee also [NodePath], which is a similar concept specifically designed to store pre-parsed scene tree paths.\nAll of [String]'s methods are available in this class too. They convert the [StringName] into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired.\n[b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName(\"\")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty [StringName]s." }, { "name": "NodePath", @@ -18372,12 +20328,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if two node paths are equal, i.e. all node names in the path are the same and in the same order." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if two node paths are not equal." }, { "name": "not", @@ -18386,12 +20344,14 @@ { "name": "==", "right_type": "NodePath", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if two node paths are equal, i.e. all node names in the path are the same and in the same order." }, { "name": "!=", "right_type": "NodePath", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if two node paths are not equal." }, { "name": "in", @@ -18411,7 +20371,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the node path is absolute (as opposed to relative), which means that it starts with a slash character ([code]/[/code]). Absolute node paths can be used to access the root node ([code]\"/root\"[/code]) or autoloads (e.g. [code]\"/global\"[/code] if a \"global\" autoload was registered)." }, { "name": "get_name_count", @@ -18419,7 +20380,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included.\nFor example, [code]\"Path2D/PathFollow2D/Sprite2D\"[/code] has 3 names." }, { "name": "get_name", @@ -18433,7 +20395,8 @@ "name": "idx", "type": "int" } - ] + ], + "documentation": "Gets the node name indicated by [param idx] (0 to [method get_name_count] - 1).\n[codeblocks]\n[gdscript]\nvar node_path = NodePath(\"Path2D/PathFollow2D/Sprite2D\")\nprint(node_path.get_name(0)) # Path2D\nprint(node_path.get_name(1)) # PathFollow2D\nprint(node_path.get_name(2)) # Sprite\n[/gdscript]\n[csharp]\nvar nodePath = new NodePath(\"Path2D/PathFollow2D/Sprite2D\");\nGD.Print(nodePath.GetName(0)); // Path2D\nGD.Print(nodePath.GetName(1)); // PathFollow2D\nGD.Print(nodePath.GetName(2)); // Sprite\n[/csharp]\n[/codeblocks]" }, { "name": "get_subname_count", @@ -18441,7 +20404,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Gets the number of resource or property names (\"subnames\") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path.\nFor example, [code]\"Path2D/PathFollow2D/Sprite2D:texture:load_path\"[/code] has 2 subnames." }, { "name": "hash", @@ -18449,7 +20413,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the 32-bit hash value representing the [NodePath]'s contents." }, { "name": "get_subname", @@ -18463,7 +20428,8 @@ "name": "idx", "type": "int" } - ] + ], + "documentation": "Gets the resource or property name indicated by [param idx] (0 to [method get_subname_count] - 1).\n[codeblocks]\n[gdscript]\nvar node_path = NodePath(\"Path2D/PathFollow2D/Sprite2D:texture:load_path\")\nprint(node_path.get_subname(0)) # texture\nprint(node_path.get_subname(1)) # load_path\n[/gdscript]\n[csharp]\nvar nodePath = new NodePath(\"Path2D/PathFollow2D/Sprite2D:texture:load_path\");\nGD.Print(nodePath.GetSubname(0)); // texture\nGD.Print(nodePath.GetSubname(1)); // load_path\n[/csharp]\n[/codeblocks]" }, { "name": "get_concatenated_names", @@ -18471,7 +20437,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1825232092 + "hash": 1825232092, + "documentation": "Returns all paths concatenated with a slash character ([code]/[/code]) as separator without subnames." }, { "name": "get_concatenated_subnames", @@ -18479,7 +20446,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1825232092 + "hash": 1825232092, + "documentation": "Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path.\n[codeblocks]\n[gdscript]\nvar node_path = NodePath(\"Path2D/PathFollow2D/Sprite2D:texture:load_path\")\nprint(node_path.get_concatenated_subnames()) # texture:load_path\n[/gdscript]\n[csharp]\nvar nodePath = new NodePath(\"Path2D/PathFollow2D/Sprite2D:texture:load_path\");\nGD.Print(nodePath.GetConcatenatedSubnames()); // texture:load_path\n[/csharp]\n[/codeblocks]" }, { "name": "get_as_property_path", @@ -18487,7 +20455,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1598598043 + "hash": 1598598043, + "documentation": "Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node).\n[codeblocks]\n[gdscript]\n# This will be parsed as a node path to the \"x\" property in the \"position\" node.\nvar node_path = NodePath(\"position:x\")\n# This will be parsed as a node path to the \"x\" component of the \"position\" property in the current node.\nvar property_path = node_path.get_as_property_path()\nprint(property_path) # :position:x\n[/gdscript]\n[csharp]\n// This will be parsed as a node path to the \"x\" property in the \"position\" node.\nvar nodePath = new NodePath(\"position:x\");\n// This will be parsed as a node path to the \"x\" component of the \"position\" property in the current node.\nNodePath propertyPath = nodePath.GetAsPropertyPath();\nGD.Print(propertyPath); // :position:x\n[/csharp]\n[/codeblocks]" }, { "name": "is_empty", @@ -18495,12 +20464,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the node path is empty." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [NodePath]." }, { "index": 1, @@ -18509,7 +20480,8 @@ "name": "from", "type": "NodePath" } - ] + ], + "documentation": "Constructs a [NodePath] as a copy of the given [NodePath]. [code]NodePath(\"example\")[/code] is equivalent to [code]^\"example\"[/code]." }, { "index": 2, @@ -18518,10 +20490,12 @@ "name": "from", "type": "String" } - ] + ], + "documentation": "Creates a NodePath from a string, e.g. [code]\"Path2D/PathFollow2D/Sprite2D:texture:size\"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]\".\"[/code] and [code]\"..\"[/code] indicate the current node and its parent.\nThe \"subnames\" optionally included after the path to the target node can point to resources or properties, and can also be nested.\nExamples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties):\n[codeblock]\n# Points to the Sprite2D node.\n\"Path2D/PathFollow2D/Sprite2D\"\n# Points to the Sprite2D node and its \"texture\" resource.\n# get_node() would retrieve \"Sprite2D\", while get_node_and_resource()\n# would retrieve both the Sprite2D node and the \"texture\" resource.\n\"Path2D/PathFollow2D/Sprite2D:texture\"\n# Points to the Sprite2D node and its \"position\" property.\n\"Path2D/PathFollow2D/Sprite2D:position\"\n# Points to the Sprite2D node and the \"x\" component of its \"position\" property.\n\"Path2D/PathFollow2D/Sprite2D:position:x\"\n# Absolute path (from \"root\")\n\"/root/Level/Path2D\"\n[/codeblock]" } ], - "has_destructor": true + "has_destructor": true, + "documentation": "A pre-parsed relative or absolute path in a scene tree, for use with [method Node.get_node] and similar functions. It can reference a node, a resource within a node, or a property of a node or resource. For example, [code]\"Path2D/PathFollow2D/Sprite2D:texture:size\"[/code] would refer to the [code]size[/code] property of the [code]texture[/code] resource on the node named [code]\"Sprite2D\"[/code], which is a child of the other named nodes in the path.\nYou will usually just pass a string to [method Node.get_node] and it will be automatically converted, but you may occasionally want to parse a path ahead of time with [NodePath] or the literal syntax [code]^\"path\"[/code]. Exporting a [NodePath] variable will give you a node selection widget in the properties panel of the editor, which can often be useful.\nA [NodePath] is composed of a list of slash-separated node names (like a filesystem path) and an optional colon-separated list of \"subnames\" which can be resources or properties.\nSome examples of NodePaths include the following:\n[codeblock]\n# No leading slash means it is relative to the current node.\n^\"A\" # Immediate child A\n^\"A/B\" # A's child B\n^\".\" # The current node.\n^\"..\" # The parent node.\n^\"../C\" # A sibling node C.\n^\"../..\" # The grandparent node.\n# A leading slash means it is absolute from the SceneTree.\n^\"/root\" # Equivalent to get_tree().get_root().\n^\"/root/Main\" # If your main scene's root node were named \"Main\".\n^\"/root/MyAutoload\" # If you have an autoloaded node or scene.\n[/codeblock]\nSee also [StringName], which is a similar concept for general-purpose string interning.\n[b]Note:[/b] In the editor, [NodePath] properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime.\n[b]Note:[/b] In a boolean context, a [NodePath] will evaluate to [code]false[/code] if it is empty ([code]NodePath(\"\")[/code]). Otherwise, a [NodePath] will always evaluate to [code]true[/code]." }, { "name": "RID", @@ -18530,12 +20504,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [RID]s are equal, which means they both refer to the same low-level resource." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]s are not equal." }, { "name": "not", @@ -18544,32 +20520,38 @@ { "name": "==", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [RID]s are equal, which means they both refer to the same low-level resource." }, { "name": "!=", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]s are not equal." }, { "name": "<", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]'s ID is less than [param right]'s ID." }, { "name": "<=", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]'s ID is less than or equal to [param right]'s ID." }, { "name": ">", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]'s ID is greater than [param right]'s ID." }, { "name": ">=", "right_type": "RID", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the [RID]'s ID is greater than or equal to [param right]'s ID." } ], "methods": [ @@ -18579,7 +20561,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the [RID] is not [code]0[/code]." }, { "name": "get_id", @@ -18587,12 +20570,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the ID of the referenced low-level resource." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [RID] with the invalid ID [code]0[/code]." }, { "index": 1, @@ -18601,10 +20586,12 @@ "name": "from", "type": "RID" } - ] + ], + "documentation": "Constructs a [RID] as a copy of the given [RID]." } ], - "has_destructor": false + "has_destructor": false, + "documentation": "The RID [Variant] type is used to access a low-level resource by its unique ID. RIDs are opaque, which means they do not grant access to the resource by themselves. They are used by the low-level server classes, such as [DisplayServer], [RenderingServer], [TextServer], etc.\nA low-level resource may correspond to a high-level [Resource], such as [Texture] or [Mesh]." }, { "name": "Callable", @@ -18613,12 +20600,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [Callable]s invoke the same custom target." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [Callable]s invoke different targets." }, { "name": "not", @@ -18627,12 +20616,14 @@ { "name": "==", "right_type": "Callable", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [Callable]s invoke the same custom target." }, { "name": "!=", "right_type": "Callable", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both [Callable]s invoke different targets." }, { "name": "in", @@ -18658,7 +20649,8 @@ "name": "arguments", "type": "Array" } - ] + ], + "documentation": "Calls the method represented by this [Callable]. Unlike [method call], this method expects all arguments to be contained inside the [param arguments] [Array]." }, { "name": "is_null", @@ -18666,7 +20658,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this [Callable] has no target to call the method on." }, { "name": "is_custom", @@ -18674,7 +20667,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] 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." }, { "name": "is_standard", @@ -18682,7 +20676,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if this [Callable] is a standard callable. This method is the opposite of [method is_custom]. Returns [code]false[/code] if this callable is a lambda function." }, { "name": "is_valid", @@ -18690,7 +20685,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the callable's object exists and has a valid method name assigned, or is a custom callable." }, { "name": "get_object", @@ -18698,7 +20694,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4008621732 + "hash": 4008621732, + "documentation": "Returns the object on which this [Callable] is called." }, { "name": "get_object_id", @@ -18706,7 +20703,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the ID of this [Callable]'s object (see [method Object.get_instance_id])." }, { "name": "get_method", @@ -18714,7 +20712,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1825232092 + "hash": 1825232092, + "documentation": "Returns the name of the method represented by this [Callable]. If the callable is a GDScript lambda function, returns the function's name or [code]\"\"[/code]." }, { "name": "get_bound_arguments_count", @@ -18722,7 +20721,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "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." }, { "name": "get_bound_arguments", @@ -18730,7 +20730,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4144163970 + "hash": 4144163970, + "documentation": "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)." }, { "name": "hash", @@ -18738,7 +20739,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the 32-bit hash value of this [Callable]'s object.\n[b]Note:[/b] [Callable]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] 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]." }, { "name": "bindv", @@ -18752,7 +20754,8 @@ "name": "arguments", "type": "Array" } - ] + ], + "documentation": "Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].\n[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left." }, { "name": "unbind", @@ -18766,7 +20769,8 @@ "name": "argcount", "type": "int" } - ] + ], + "documentation": "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].\n[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.\n[codeblock]\nfunc _ready():\n foo.unbind(1).call(1, 2) # Calls foo(1).\n foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind.\n[/codeblock]" }, { "name": "call", @@ -18774,21 +20778,24 @@ "is_vararg": true, "is_const": true, "is_static": false, - "hash": 3643564216 + "hash": 3643564216, + "documentation": "Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature." }, { "name": "call_deferred", "is_vararg": true, "is_const": true, "is_static": false, - "hash": 3286317445 + "hash": 3286317445, + "documentation": "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.\n[codeblock]\nfunc _ready():\n grab_focus.call_deferred()\n[/codeblock]\nSee also [method Object.call_deferred]." }, { "name": "rpc", "is_vararg": true, "is_const": true, "is_static": false, - "hash": 3286317445 + "hash": 3286317445, + "documentation": "Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as [i]RPC[/i] (using [annotation @GDScript.@rpc] or [method Node.rpc_config]). Calling this method on unsupported functions will result in an error. See [method Node.rpc]." }, { "name": "rpc_id", @@ -18801,7 +20808,8 @@ "name": "peer_id", "type": "int" } - ] + ], + "documentation": "Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i] (using [annotation @GDScript.@rpc] or [method Node.rpc_config]). Calling this method on unsupported functions will result in an error. See [method Node.rpc_id]." }, { "name": "bind", @@ -18809,12 +20817,14 @@ "is_vararg": true, "is_const": true, "is_static": false, - "hash": 3224143119 + "hash": 3224143119, + "documentation": "Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].\n[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [Callable], with no object nor method bound." }, { "index": 1, @@ -18823,7 +20833,8 @@ "name": "from", "type": "Callable" } - ] + ], + "documentation": "Constructs a [Callable] as a copy of the given [Callable]." }, { "index": 2, @@ -18836,10 +20847,12 @@ "name": "method", "type": "StringName" } - ] + ], + "documentation": "Creates a new [Callable] for the method named [param method] in the specified [param object]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "[Callable] is a built-in [Variant] type that represents a function. It can either be a method within an [Object] instance, or a standalone function not related to any object, like a lambda function. Like all [Variant] types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks.\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nfunc print_args(arg1, arg2, arg3 = \"\"):\n prints(arg1, arg2, arg3)\n\nfunc test():\n var callable = Callable(self, \"print_args\")\n callable.call(\"hello\", \"world\") # Prints \"hello world \".\n callable.call(Vector2.UP, 42, callable) # Prints \"(0, -1) 42 Node(node.gd)::print_args\".\n callable.call(\"invalid\") # Invalid call, should have at least 2 arguments.\n[/gdscript]\n[csharp]\n// Default parameter values are not supported.\npublic void PrintArgs(Variant arg1, Variant arg2, Variant arg3 = default)\n{\n GD.PrintS(arg1, arg2, arg3);\n}\n\npublic void Test()\n{\n // Invalid calls fail silently.\n Callable callable = new Callable(this, MethodName.PrintArgs);\n callable.Call(\"hello\", \"world\"); // Default parameter values are not supported, should have 3 arguments.\n callable.Call(Vector2.Up, 42, callable); // Prints \"(0, -1) 42 Node(Node.cs)::PrintArgs\".\n callable.Call(\"invalid\"); // Invalid call, should have 3 arguments.\n}\n[/csharp]\n[/codeblocks]\nIn GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an [Object] instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling [method get_method].\n[codeblock]\nfunc _init():\n var my_lambda = func (message):\n print(message)\n\n # Prints Hello everyone!\n my_lambda.call(\"Hello everyone!\")\n\n # Prints \"Attack!\", when the button_pressed signal is emitted.\n button_pressed.connect(func(): print(\"Attack!\"))\n[/codeblock]\n[b]Note:[/b] Methods of native types such as [Signal], [Array], or [Dictionary] are not of type [Callable] in order to avoid unnecessary overhead. If you need to pass those methods as [Callable], use a lambda function as a wrapper.\n[codeblock]\nfunc _init():\n var my_dictionary = { \"hello\": \"world\" }\n\n # This will not work, `clear` is not a callable.\n create_tween().tween_callback(my_dictionary.clear)\n\n # This will work, as lambdas are custom callables.\n create_tween().tween_callback(func(): my_dictionary.clear())\n[/codeblock]" }, { "name": "Signal", @@ -18848,12 +20861,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both signals share the same object and name." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the signals do not share the same object and name." }, { "name": "not", @@ -18862,12 +20877,14 @@ { "name": "==", "right_type": "Signal", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if both signals share the same object and name." }, { "name": "!=", "right_type": "Signal", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the signals do not share the same object and name." }, { "name": "in", @@ -18887,7 +20904,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the signal's name does not exist in its object, or the object is not valid." }, { "name": "get_object", @@ -18895,7 +20913,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4008621732 + "hash": 4008621732, + "documentation": "Returns the object emitting this signal." }, { "name": "get_object_id", @@ -18903,7 +20922,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the ID of the object emitting this signal (see [method Object.get_instance_id])." }, { "name": "get_name", @@ -18911,7 +20931,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1825232092 + "hash": 1825232092, + "documentation": "Returns the name of this signal." }, { "name": "connect", @@ -18930,7 +20951,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Connects this signal to the specified [param callable]. Optional [param flags] can be also added to configure the connection's behavior (see [enum Object.ConnectFlags] constants). You can provide additional arguments to the connected [param callable] by using [method Callable.bind].\nA signal can only be connected once to the same [Callable]. If the signal is already connected, returns [constant ERR_INVALID_PARAMETER] and pushes an error message, unless the signal is connected with [constant Object.CONNECT_REFERENCE_COUNTED]. To prevent this, use [method is_connected] first to check for existing connections.\n[codeblock]\nfor button in $Buttons.get_children():\n button.pressed.connect(_on_pressed.bind(button))\n\nfunc _on_pressed(button):\n print(button.name, \" was pressed\")\n[/codeblock]" }, { "name": "disconnect", @@ -18943,7 +20965,8 @@ "name": "callable", "type": "Callable" } - ] + ], + "documentation": "Disconnects this signal from the specified [Callable]. If the connection does not exist, generates an error. Use [method is_connected] to make sure that the connection exists." }, { "name": "is_connected", @@ -18957,7 +20980,8 @@ "name": "callable", "type": "Callable" } - ] + ], + "documentation": "Returns [code]true[/code] if the specified [Callable] is connected to this signal." }, { "name": "get_connections", @@ -18965,19 +20989,22 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4144163970 + "hash": 4144163970, + "documentation": "Returns an [Array] of connections for this signal. Each connection is represented as a [Dictionary] that contains three entries:\n- [code]signal[/code] is a reference to this signal;\n- [code]callable[/code] is a reference to the connected [Callable];\n- [code]flags[/code] is a combination of [enum Object.ConnectFlags]." }, { "name": "emit", "is_vararg": true, "is_const": true, "is_static": false, - "hash": 3286317445 + "hash": 3286317445, + "documentation": "Emits this signal. All [Callable]s connected to this signal will be triggered. This method supports a variable number of arguments, so parameters can be passed as a comma separated list." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [Signal] with no object nor signal name bound." }, { "index": 1, @@ -18986,7 +21013,8 @@ "name": "from", "type": "Signal" } - ] + ], + "documentation": "Constructs a [Signal] as a copy of the given [Signal]." }, { "index": 2, @@ -18999,10 +21027,12 @@ "name": "signal", "type": "StringName" } - ] + ], + "documentation": "Creates a new [Signal] named [param signal] in the specified [param object]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "[Signal] is a built-in [Variant] type that represents a signal of an [Object] instance. Like all [Variant] types, it can be stored in variables and passed to functions. Signals allow all connected [Callable]s (and by extension their respective objects) to listen and react to events, without directly referencing one another. This keeps the code flexible and easier to manage.\nIn GDScript, signals can be declared with the [code]signal[/code] keyword. In C#, you may use the [code][Signal][/code] attribute on a delegate.\n[codeblocks]\n[gdscript]\nsignal attacked\n\n# Additional arguments may be declared.\n# These arguments must be passed when the signal is emitted.\nsignal item_dropped(item_name, amount)\n[/gdscript]\n[csharp]\n[Signal]\ndelegate void AttackedEventHandler();\n\n// Additional arguments may be declared.\n// These arguments must be passed when the signal is emitted.\n[Signal]\ndelegate void ItemDroppedEventHandler(string itemName, int amount);\n[/csharp]\n[/codeblocks]" }, { "name": "Dictionary", @@ -19012,12 +21042,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two dictionaries contain the same keys and values. The order of the entries does not matter.\n[b]Note:[/b] In C#, by convention, this operator compares by [b]reference[/b]. If you need to compare by value, iterate over both dictionaries." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two dictionaries do not contain the same keys and values." }, { "name": "not", @@ -19026,12 +21058,14 @@ { "name": "==", "right_type": "Dictionary", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two dictionaries contain the same keys and values. The order of the entries does not matter.\n[b]Note:[/b] In C#, by convention, this operator compares by [b]reference[/b]. If you need to compare by value, iterate over both dictionaries." }, { "name": "!=", "right_type": "Dictionary", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if the two dictionaries do not contain the same keys and values." }, { "name": "in", @@ -19051,7 +21085,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of entries in the dictionary. Empty dictionaries ([code]{ }[/code]) always return [code]0[/code]. See also [method is_empty]." }, { "name": "is_empty", @@ -19059,14 +21094,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the dictionary is empty (its size is [code]0[/code]). See also [method size]." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the dictionary, removing all entries from it." }, { "name": "merge", @@ -19084,7 +21121,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Adds entries from [param dictionary] to this dictionary. By default, duplicate keys are not copied over, unless [param overwrite] is [code]true[/code]." }, { "name": "has", @@ -19098,7 +21136,8 @@ "name": "key", "type": "Variant" } - ] + ], + "documentation": "Returns [code]true[/code] if the dictionary contains an entry with the given [param key].\n[codeblocks]\n[gdscript]\nvar my_dict = {\n \"Godot\" : 4,\n 210 : null,\n}\n\nprint(my_dict.has(\"Godot\")) # Prints true\nprint(my_dict.has(210)) # Prints true\nprint(my_dict.has(4)) # Prints false\n[/gdscript]\n[csharp]\nvar myDict = new Godot.Collections.Dictionary\n{\n { \"Godot\", 4 },\n { 210, default },\n};\n\nGD.Print(myDict.ContainsKey(\"Godot\")); // Prints true\nGD.Print(myDict.ContainsKey(210)); // Prints true\nGD.Print(myDict.ContainsKey(4)); // Prints false\n[/csharp]\n[/codeblocks]\nIn GDScript, this is equivalent to the [code]in[/code] operator:\n[codeblock]\nif \"Godot\" in {\"Godot\": 4}:\n print(\"The key is here!\") # Will be printed.\n[/codeblock]\n[b]Note:[/b] This method returns [code]true[/code] as long as the [param key] exists, even if its corresponding value is [code]null[/code]." }, { "name": "has_all", @@ -19112,7 +21151,8 @@ "name": "keys", "type": "Array" } - ] + ], + "documentation": "Returns [code]true[/code] if the dictionary contains all keys in the given [param keys] array.\n[codeblock]\nvar data = {\"width\" : 10, \"height\" : 20}\ndata.has_all([\"height\", \"width\"]) # Returns true\n[/codeblock]" }, { "name": "find_key", @@ -19126,7 +21166,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Finds and returns the first key whose associated value is equal to [param value], or [code]null[/code] if it is not found.\n[b]Note:[/b] [code]null[/code] is also a valid key. If inside the dictionary, [method find_key] may give misleading results." }, { "name": "erase", @@ -19140,7 +21181,8 @@ "name": "key", "type": "Variant" } - ] + ], + "documentation": "Removes the dictionary entry by key, if it exists. Returns [code]true[/code] if the given [param key] existed in the dictionary, otherwise [code]false[/code].\n[b]Note:[/b] Do not erase entries while iterating over the dictionary. You can iterate over the [method keys] array instead." }, { "name": "hash", @@ -19148,7 +21190,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns a hashed 32-bit integer value representing the dictionary contents.\n[codeblocks]\n[gdscript]\nvar dict1 = {\"A\": 10, \"B\": 2}\nvar dict2 = {\"A\": 10, \"B\": 2}\n\nprint(dict1.hash() == dict2.hash()) # Prints true\n[/gdscript]\n[csharp]\nvar dict1 = new Godot.Collections.Dictionary{{\"A\", 10}, {\"B\", 2}};\nvar dict2 = new Godot.Collections.Dictionary{{\"A\", 10}, {\"B\", 2}};\n\n// Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead.\nGD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints true\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] Dictionaries with the same entries but in a different order will not have the same hash.\n[b]Note:[/b] Dictionaries with equal hash values are [i]not[/i] guaranteed to be the same, because of hash collisions. On the contrary, dictionaries with different hash values are guaranteed to be different." }, { "name": "keys", @@ -19156,7 +21199,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4144163970 + "hash": 4144163970, + "documentation": "Returns the list of keys in the dictionary." }, { "name": "values", @@ -19164,7 +21208,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 4144163970 + "hash": 4144163970, + "documentation": "Returns the list of values in this dictionary." }, { "name": "duplicate", @@ -19179,7 +21224,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Creates and returns a new copy of the dictionary. If [param deep] is [code]true[/code], inner [Dictionary] and [Array] keys and values are also copied, recursively." }, { "name": "get", @@ -19198,14 +21244,16 @@ "type": "Variant", "default_value": "null" } - ] + ], + "documentation": "Returns the corresponding value for the given [param key] in the dictionary. If the [param key] does not exist, returns [param default], or [code]null[/code] if the parameter is omitted." }, { "name": "make_read_only", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Makes the dictionary read-only, i.e. disables modification of the dictionary's contents. Does not apply to nested content, e.g. content of nested dictionaries." }, { "name": "is_read_only", @@ -19213,12 +21261,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the dictionary is read-only. See [method make_read_only]. Dictionaries are automatically read-only if declared with [code]const[/code] keyword." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [Dictionary]." }, { "index": 1, @@ -19227,10 +21277,12 @@ "name": "from", "type": "Dictionary" } - ] + ], + "documentation": "Returns the same dictionary as [param from]. If you need a copy of the dictionary, use [method duplicate]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "Dictionaries are associative containers that contain values referenced by unique keys. Dictionaries will preserve the insertion order when adding new entries. In other programming languages, this data structure is often referred to as a hash map or an associative array.\nYou can define a dictionary by placing a comma-separated list of [code]key: value[/code] pairs inside curly braces [code]{}[/code].\nCreating a dictionary:\n[codeblocks]\n[gdscript]\nvar my_dict = {} # Creates an empty dictionary.\n\nvar dict_variable_key = \"Another key name\"\nvar dict_variable_value = \"value2\"\nvar another_dict = {\n \"Some key name\": \"value1\",\n dict_variable_key: dict_variable_value,\n}\n\nvar points_dict = {\"White\": 50, \"Yellow\": 75, \"Orange\": 100}\n\n# Alternative Lua-style syntax.\n# Doesn't require quotes around keys, but only string constants can be used as key names.\n# Additionally, key names must start with a letter or an underscore.\n# Here, `some_key` is a string literal, not a variable!\nanother_dict = {\n some_key = 42,\n}\n[/gdscript]\n[csharp]\nvar myDict = new Godot.Collections.Dictionary(); // Creates an empty dictionary.\nvar pointsDict = new Godot.Collections.Dictionary\n{\n {\"White\", 50},\n {\"Yellow\", 75},\n {\"Orange\", 100}\n};\n[/csharp]\n[/codeblocks]\nYou can access a dictionary's value by referencing its corresponding key. In the above example, [code]points_dict[\"White\"][/code] will return [code]50[/code]. You can also write [code]points_dict.White[/code], which is equivalent. However, you'll have to use the bracket syntax if the key you're accessing the dictionary with isn't a fixed string (such as a number or variable).\n[codeblocks]\n[gdscript]\n@export_enum(\"White\", \"Yellow\", \"Orange\") var my_color: String\nvar points_dict = {\"White\": 50, \"Yellow\": 75, \"Orange\": 100}\nfunc _ready():\n # We can't use dot syntax here as `my_color` is a variable.\n var points = points_dict[my_color]\n[/gdscript]\n[csharp]\n[Export(PropertyHint.Enum, \"White,Yellow,Orange\")]\npublic string MyColor { get; set; }\nprivate Godot.Collections.Dictionary _pointsDict = new Godot.Collections.Dictionary\n{\n {\"White\", 50},\n {\"Yellow\", 75},\n {\"Orange\", 100}\n};\n\npublic override void _Ready()\n{\n int points = (int)_pointsDict[MyColor];\n}\n[/csharp]\n[/codeblocks]\nIn the above code, [code]points[/code] will be assigned the value that is paired with the appropriate color selected in [code]my_color[/code].\nDictionaries can contain more complex data:\n[codeblocks]\n[gdscript]\nvar my_dict = {\n \"First Array\": [1, 2, 3, 4] # Assigns an Array to a String key.\n}\n[/gdscript]\n[csharp]\nvar myDict = new Godot.Collections.Dictionary\n{\n {\"First Array\", new Godot.Collections.Array{1, 2, 3, 4}}\n};\n[/csharp]\n[/codeblocks]\nTo add a key to an existing dictionary, access it like an existing key and assign to it:\n[codeblocks]\n[gdscript]\nvar points_dict = {\"White\": 50, \"Yellow\": 75, \"Orange\": 100}\npoints_dict[\"Blue\"] = 150 # Add \"Blue\" as a key and assign 150 as its value.\n[/gdscript]\n[csharp]\nvar pointsDict = new Godot.Collections.Dictionary\n{\n {\"White\", 50},\n {\"Yellow\", 75},\n {\"Orange\", 100}\n};\npointsDict[\"Blue\"] = 150; // Add \"Blue\" as a key and assign 150 as its value.\n[/csharp]\n[/codeblocks]\nFinally, dictionaries can contain different types of keys and values in the same dictionary:\n[codeblocks]\n[gdscript]\n# This is a valid dictionary.\n# To access the string \"Nested value\" below, use `my_dict.sub_dict.sub_key` or `my_dict[\"sub_dict\"][\"sub_key\"]`.\n# Indexing styles can be mixed and matched depending on your needs.\nvar my_dict = {\n \"String Key\": 5,\n 4: [1, 2, 3],\n 7: \"Hello\",\n \"sub_dict\": {\"sub_key\": \"Nested value\"},\n}\n[/gdscript]\n[csharp]\n// This is a valid dictionary.\n// To access the string \"Nested value\" below, use `((Godot.Collections.Dictionary)myDict[\"sub_dict\"])[\"sub_key\"]`.\nvar myDict = new Godot.Collections.Dictionary {\n {\"String Key\", 5},\n {4, new Godot.Collections.Array{1,2,3}},\n {7, \"Hello\"},\n {\"sub_dict\", new Godot.Collections.Dictionary{{\"sub_key\", \"Nested value\"}}}\n};\n[/csharp]\n[/codeblocks]\nThe keys of a dictionary can be iterated with the [code]for[/code] keyword:\n[codeblocks]\n[gdscript]\nvar groceries = {\"Orange\": 20, \"Apple\": 2, \"Banana\": 4}\nfor fruit in groceries:\n var amount = groceries[fruit]\n[/gdscript]\n[csharp]\nvar groceries = new Godot.Collections.Dictionary{{\"Orange\", 20}, {\"Apple\", 2}, {\"Banana\", 4}};\nforeach (var (fruit, amount) in groceries)\n{\n // `fruit` is the key, `amount` is the value.\n}\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use [method duplicate].\n[b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior." }, { "name": "Array", @@ -19240,12 +21292,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise." }, { "name": "not", @@ -19259,37 +21313,44 @@ { "name": "==", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes and contents of the arrays are equal, [code]false[/code] otherwise." }, { "name": "!=", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Compares the left operand [Array] against the [param right] [Array]. Returns [code]true[/code] if the sizes or contents of the arrays are [i]not[/i] equal, [code]false[/code] otherwise." }, { "name": "<", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]false[/code] if the left operand [Array] has fewer elements, otherwise it returns [code]true[/code]." }, { "name": "<=", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is less, or [code]false[/code] if the element is greater. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the left operand [Array] has the same number of elements or fewer, otherwise it returns [code]false[/code]." }, { "name": ">", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more elements, otherwise it returns [code]false[/code]." }, { "name": ">=", "right_type": "Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Performs a comparison for each index between the left operand [Array] and the [param right] [Array], considering the highest common index of both arrays for this comparison: Returns [code]true[/code] on the first occurrence of an element that is greater, or [code]false[/code] if the element is less. Note that depending on the type of data stored, this function may be recursive. If all elements are equal, it compares the length of both arrays and returns [code]true[/code] if the [param right] [Array] has more or the same number of elements, otherwise it returns [code]false[/code]." }, { "name": "+", "right_type": "Array", - "return_type": "Array" + "return_type": "Array", + "documentation": "Concatenates two [Array]s together, with the [param right] [Array] being added to the end of the [Array] specified in the left operand. For example, [code][1, 2] + [3, 4][/code] results in [code][1, 2, 3, 4][/code]." }, { "name": "in", @@ -19304,7 +21365,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -19312,14 +21374,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "hash", @@ -19327,7 +21391,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns a hashed 32-bit integer value representing the array and its contents.\n[b]Note:[/b] [Array]s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does [i]not[/i] imply the arrays are equal, because different arrays can have identical hash values due to hash collisions." }, { "name": "assign", @@ -19340,7 +21405,8 @@ "name": "array", "type": "Array" } - ] + ], + "documentation": "Assigns elements of another [param array] into the array. Resizes the array to match [param array]. Performs type conversions if the array is typed." }, { "name": "push_back", @@ -19353,7 +21419,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Appends an element at the end of the array. See also [method push_front]." }, { "name": "push_front", @@ -19366,7 +21433,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Adds an element at the beginning of the array. See also [method push_back].\n[b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be." }, { "name": "append", @@ -19379,7 +21447,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -19392,7 +21461,8 @@ "name": "array", "type": "Array" } - ] + ], + "documentation": "Appends another array at the end of this array.\n[codeblock]\nvar array1 = [1, 2, 3]\nvar array2 = [4, 5, 6]\narray1.append_array(array2)\nprint(array1) # Prints [1, 2, 3, 4, 5, 6].\n[/codeblock]" }, { "name": "resize", @@ -19406,7 +21476,8 @@ "name": "size", "type": "int" } - ] + ], + "documentation": "Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code]. Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.\n[b]Note:[/b] This method acts in-place and doesn't return a modified array." }, { "name": "insert", @@ -19424,7 +21495,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]). Returns [constant OK] on success, or one of the other [enum Error] values if the operation failed.\n[b]Note:[/b] This method acts in-place and doesn't return a modified array.\n[b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed." }, { "name": "remove_at", @@ -19437,7 +21509,8 @@ "name": "position", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead.\n[b]Note:[/b] This method acts in-place and doesn't return a modified array.\n[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.\n[b]Note:[/b] [param position] cannot be negative. To remove an element relative to the end of the array, use [code]arr.remove_at(arr.size() - (i + 1))[/code]. To remove the last element from the array without returning the value, use [code]arr.resize(arr.size() - 1)[/code]." }, { "name": "fill", @@ -19450,7 +21523,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements:\n[codeblocks]\n[gdscript]\nvar array = []\narray.resize(10)\narray.fill(0) # Initialize the 10 elements to 0.\n[/gdscript]\n[csharp]\nvar array = new Godot.Collections.Array();\narray.Resize(10);\narray.Fill(0); // Initialize the 10 elements to 0.\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] If [param value] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created." }, { "name": "erase", @@ -19463,7 +21537,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead.\n[b]Note:[/b] This method acts in-place and doesn't return a modified array.\n[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.\n[b]Note:[/b] Do not erase entries while iterating over the array." }, { "name": "front", @@ -19471,7 +21546,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns the first element of the array. Prints an error and returns [code]null[/code] if the array is empty.\n[b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor." }, { "name": "back", @@ -19479,7 +21555,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns the last element of the array. Prints an error and returns [code]null[/code] if the array is empty.\n[b]Note:[/b] Calling this function is not the same as writing [code]array[-1][/code]. If the array is empty, accessing by index will pause project execution when running from the editor." }, { "name": "pick_random", @@ -19487,7 +21564,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns a random value from the target array. Prints an error and returns [code]null[/code] if the array is empty.\n[codeblocks]\n[gdscript]\nvar array: Array[int] = [1, 2, 3, 4]\nprint(array.pick_random()) # Prints either of the four numbers.\n[/gdscript]\n[csharp]\nvar array = new Godot.Collections.Array { 1, 2, 3, 4 };\nGD.Print(array.PickRandom()); // Prints either of the four numbers.\n[/csharp]\n[/codeblocks]" }, { "name": "find", @@ -19506,7 +21584,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -19525,7 +21604,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -19539,7 +21619,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Returns the number of times an element is in the array." }, { "name": "has", @@ -19553,7 +21634,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains the given value.\n[codeblocks]\n[gdscript]\nprint([\"inside\", 7].has(\"inside\")) # True\nprint([\"inside\", 7].has(\"outside\")) # False\nprint([\"inside\", 7].has(7)) # True\nprint([\"inside\", 7].has(\"7\")) # False\n[/gdscript]\n[csharp]\nvar arr = new Godot.Collections.Array { \"inside\", 7 };\n// has is renamed to Contains\nGD.Print(arr.Contains(\"inside\")); // True\nGD.Print(arr.Contains(\"outside\")); // False\nGD.Print(arr.Contains(7)); // True\nGD.Print(arr.Contains(\"7\")); // False\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows:\n[codeblocks]\n[gdscript]\n# Will evaluate to `true`.\nif 2 in [2, 4, 6, 8]:\n print(\"Contains!\")\n[/gdscript]\n[csharp]\n// As there is no \"in\" keyword in C#, you have to use Contains\nvar array = new Godot.Collections.Array { 2, 4, 6, 8 };\nif (array.Contains(2))\n{\n GD.Print(\"Contains!\");\n}\n[/csharp]\n[/codeblocks]" }, { "name": "pop_back", @@ -19561,7 +21643,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 1321915136 + "hash": 1321915136, + "documentation": "Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front]." }, { "name": "pop_front", @@ -19569,7 +21652,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 1321915136 + "hash": 1321915136, + "documentation": "Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back].\n[b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be." }, { "name": "pop_at", @@ -19583,14 +21667,16 @@ "name": "position", "type": "int" } - ] + ], + "documentation": "Removes and returns the element of the array at index [param position]. If negative, [param position] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty.\n[b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the array.\n[b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that values considered equal may have their order changed when using [method sort].\n[b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example:\n[codeblocks]\n[gdscript]\nvar strings = [\"string1\", \"string2\", \"string10\", \"string11\"]\nstrings.sort()\nprint(strings) # Prints [string1, string10, string11, string2]\n[/gdscript]\n[csharp]\nvar strings = new Godot.Collections.Array { \"string1\", \"string2\", \"string10\", \"string11\" };\nstrings.Sort();\nGD.Print(strings); // Prints [string1, string10, string11, string2]\n[/csharp]\n[/codeblocks]\nTo perform natural order sorting, you can use [method sort_custom] with [method String.naturalnocasecmp_to] as follows:\n[codeblock]\nvar strings = [\"string1\", \"string2\", \"string10\", \"string11\"]\nstrings.sort_custom(func(a, b): return a.naturalnocasecmp_to(b) < 0)\nprint(strings) # Prints [string1, string2, string10, string11]\n[/codeblock]" }, { "name": "sort_custom", @@ -19603,14 +21689,16 @@ "name": "func", "type": "Callable" } - ] + ], + "documentation": "Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array.\n[b]Note:[/b] The sorting algorithm used is not [url=https://en.wikipedia.org/wiki/Sorting_algorithm#Stability]stable[/url]. This means that values considered equal may have their order changed when using [method sort_custom].\n[b]Note:[/b] You cannot randomize the return value as the heapsort algorithm expects a deterministic result. Randomizing the return value will result in unexpected behavior.\n[codeblocks]\n[gdscript]\nfunc sort_ascending(a, b):\n if a[0] < b[0]:\n return true\n return false\n\nfunc _ready():\n var my_items = [[5, \"Potato\"], [9, \"Rice\"], [4, \"Tomato\"]]\n my_items.sort_custom(sort_ascending)\n print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]].\n\n # Descending, lambda version.\n my_items.sort_custom(func(a, b): return a[0] > b[0])\n print(my_items) # Prints [[9, Rice], [5, Potato], [4, Tomato]].\n[/gdscript]\n[csharp]\n// There is no custom sort support for Godot.Collections.Array\n[/csharp]\n[/codeblocks]" }, { "name": "shuffle", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GlobalScope.randi]. Call [method @GlobalScope.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling." }, { "name": "bsearch", @@ -19629,7 +21717,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "bsearch_custom", @@ -19652,14 +21741,16 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.\n[b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "duplicate", @@ -19674,7 +21765,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns a copy of the array.\nIf [param deep] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. Note that any [Object]-derived elements will be shallow copied regardless of the [param deep] setting." }, { "name": "slice", @@ -19703,7 +21795,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns the slice of the [Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).\nIf specified, [param step] is the relative index between source elements. It can be negative, then [param begin] must be higher than [param end]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code].\nIf [param deep] is true, each element will be copied by value rather than by reference.\n[b]Note:[/b] To include the first element when [param step] is negative, use [code]arr.slice(begin, -arr.size() - 1, step)[/code] (i.e. [code][0, 1, 2].slice(1, -4, -1)[/code] returns [code][1, 0][/code])." }, { "name": "filter", @@ -19717,7 +21810,8 @@ "name": "method", "type": "Callable" } - ] + ], + "documentation": "Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code].\nThe callable's method should take one [Variant] parameter (the current array element) and return a boolean value.\n[codeblock]\nfunc _ready():\n print([1, 2, 3].filter(remove_1)) # Prints [2, 3].\n print([1, 2, 3].filter(func(number): return number != 1)) # Same as above, but using lambda function.\n\nfunc remove_1(number):\n return number != 1\n[/codeblock]\nSee also [method any], [method all], [method map] and [method reduce]." }, { "name": "map", @@ -19731,7 +21825,8 @@ "name": "method", "type": "Callable" } - ] + ], + "documentation": "Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method.\nThe callable's method should take one [Variant] parameter (the current array element) and can return any [Variant].\n[codeblock]\nfunc _ready():\n print([1, 2, 3].map(negate)) # Prints [-1, -2, -3].\n print([1, 2, 3].map(func(number): return -number)) # Same as above, but using lambda function.\n\nfunc negate(number):\n return -number\n[/codeblock]\nSee also [method filter], [method reduce], [method any] and [method all]." }, { "name": "reduce", @@ -19750,7 +21845,8 @@ "type": "Variant", "default_value": "null" } - ] + ], + "documentation": "Calls the provided [Callable] for each element in array and accumulates the result in [param accum].\nThe callable's method takes two arguments: the current value of [param accum] and the current array element. If [param accum] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [param accum].\n[codeblock]\nfunc _ready():\n print([1, 2, 3].reduce(sum, 10)) # Prints 16.\n print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) # Same as above, but using lambda function.\n\nfunc sum(accum, number):\n return accum + number\n[/codeblock]\nSee also [method map], [method filter], [method any] and [method all]." }, { "name": "any", @@ -19764,7 +21860,8 @@ "name": "method", "type": "Callable" } - ] + ], + "documentation": "Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]one or more[/i] elements in the array. If the [Callable] returns [code]false[/code] for all elements in the array, this method returns [code]false[/code].\nThe callable's method should take one [Variant] parameter (the current array element) and return a boolean value.\n[codeblock]\nfunc _ready():\n print([6, 10, 6].any(greater_than_5)) # Prints True (3 elements evaluate to `true`).\n print([4, 10, 4].any(greater_than_5)) # Prints True (1 elements evaluate to `true`).\n print([4, 4, 4].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).\n print([].any(greater_than_5)) # Prints False (0 elements evaluate to `true`).\n\n print([6, 10, 6].any(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function.\n\nfunc greater_than_5(number):\n return number > 5\n[/codeblock]\nSee also [method all], [method filter], [method map] and [method reduce].\n[b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).\n[b]Note:[/b] For an empty array, this method always returns [code]false[/code]." }, { "name": "all", @@ -19778,7 +21875,8 @@ "name": "method", "type": "Callable" } - ] + ], + "documentation": "Calls the provided [Callable] on each element in the array and returns [code]true[/code] if the [Callable] returns [code]true[/code] for [i]all[/i] elements in the array. If the [Callable] returns [code]false[/code] for one array element or more, this method returns [code]false[/code].\nThe callable's method should take one [Variant] parameter (the current array element) and return a boolean value.\n[codeblock]\nfunc _ready():\n print([6, 10, 6].all(greater_than_5)) # Prints True (3/3 elements evaluate to `true`).\n print([4, 10, 4].all(greater_than_5)) # Prints False (1/3 elements evaluate to `true`).\n print([4, 4, 4].all(greater_than_5)) # Prints False (0/3 elements evaluate to `true`).\n print([].all(greater_than_5)) # Prints True (0/0 elements evaluate to `true`).\n\n print([6, 10, 6].all(func(number): return number > 5)) # Prints True. Same as the first line above, but using lambda function.\n\nfunc greater_than_5(number):\n return number > 5\n[/codeblock]\nSee also [method any], [method filter], [method map] and [method reduce].\n[b]Note:[/b] Unlike relying on the size of an array returned by [method filter], this method will return as early as possible to improve performance (especially with large arrays).\n[b]Note:[/b] For an empty array, this method [url=https://en.wikipedia.org/wiki/Vacuous_truth]always[/url] returns [code]true[/code]." }, { "name": "max", @@ -19786,7 +21884,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.\nTo find the maximum value using a custom comparator, you can use [method reduce]. In this example every array element is checked and the first maximum value is returned:\n[codeblock]\nfunc _ready():\n var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)]\n # In this example we compare the lengths.\n print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max))\n\nfunc is_length_greater(a, b):\n return a.length() > b.length()\n[/codeblock]" }, { "name": "min", @@ -19794,7 +21893,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.\nSee also [method max] for an example of using a custom comparator." }, { "name": "is_typed", @@ -19802,7 +21902,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is typed. Typed arrays can only store elements of their associated type and provide type safety for the [code][][/code] operator. Methods of typed array still return [Variant]." }, { "name": "is_same_typed", @@ -19816,7 +21917,8 @@ "name": "array", "type": "Array" } - ] + ], + "documentation": "Returns [code]true[/code] if the array is typed the same as [param array]." }, { "name": "get_typed_builtin", @@ -19824,7 +21926,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the [enum Variant.Type] constant for a typed array. If the [Array] is not typed, returns [constant TYPE_NIL]." }, { "name": "get_typed_class_name", @@ -19832,7 +21935,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1825232092 + "hash": 1825232092, + "documentation": "Returns a class name of a typed [Array] of type [constant TYPE_OBJECT]." }, { "name": "get_typed_script", @@ -19840,14 +21944,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1460142086 + "hash": 1460142086, + "documentation": "Returns the script associated with a typed array tied to a class name." }, { "name": "make_read_only", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Makes the array read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays." }, { "name": "is_read_only", @@ -19855,12 +21961,14 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is read-only. See [method make_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [Array]." }, { "index": 1, @@ -19869,7 +21977,8 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Returns the same array as [param from]. If you need a copy of the array, use [method duplicate]." }, { "index": 2, @@ -19890,7 +21999,8 @@ "name": "script", "type": "Variant" } - ] + ], + "documentation": "Creates a typed array from the [param base] array." }, { "index": 3, @@ -19899,7 +22009,8 @@ "name": "from", "type": "PackedByteArray" } - ] + ], + "documentation": "Constructs an array from a [PackedByteArray]." }, { "index": 4, @@ -19908,7 +22019,8 @@ "name": "from", "type": "PackedInt32Array" } - ] + ], + "documentation": "Constructs an array from a [PackedInt32Array]." }, { "index": 5, @@ -19917,7 +22029,8 @@ "name": "from", "type": "PackedInt64Array" } - ] + ], + "documentation": "Constructs an array from a [PackedInt64Array]." }, { "index": 6, @@ -19926,7 +22039,8 @@ "name": "from", "type": "PackedFloat32Array" } - ] + ], + "documentation": "Constructs an array from a [PackedFloat32Array]." }, { "index": 7, @@ -19935,7 +22049,8 @@ "name": "from", "type": "PackedFloat64Array" } - ] + ], + "documentation": "Constructs an array from a [PackedFloat64Array]." }, { "index": 8, @@ -19944,7 +22059,8 @@ "name": "from", "type": "PackedStringArray" } - ] + ], + "documentation": "Constructs an array from a [PackedStringArray]." }, { "index": 9, @@ -19953,7 +22069,8 @@ "name": "from", "type": "PackedVector2Array" } - ] + ], + "documentation": "Constructs an array from a [PackedVector2Array]." }, { "index": 10, @@ -19962,7 +22079,8 @@ "name": "from", "type": "PackedVector3Array" } - ] + ], + "documentation": "Constructs an array from a [PackedVector3Array]." }, { "index": 11, @@ -19971,10 +22089,12 @@ "name": "from", "type": "PackedColorArray" } - ] + ], + "documentation": "Constructs an array from a [PackedColorArray]." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array data structure that can contain a sequence of elements of any type. Elements are accessed by a numerical index starting at 0. Negative indices are used to count from the back (-1 is the last element, -2 is the second to last, etc.).\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar array = [\"One\", 2, 3, \"Four\"]\nprint(array[0]) # One.\nprint(array[2]) # 3.\nprint(array[-1]) # Four.\narray[2] = \"Three\"\nprint(array[-2]) # Three.\n[/gdscript]\n[csharp]\nvar array = new Godot.Collections.Array{\"One\", 2, 3, \"Four\"};\nGD.Print(array[0]); // One.\nGD.Print(array[2]); // 3.\nGD.Print(array[array.Count - 1]); // Four.\narray[2] = \"Three\";\nGD.Print(array[array.Count - 2]); // Three.\n[/csharp]\n[/codeblocks]\nArrays can be concatenated using the [code]+[/code] operator:\n[codeblocks]\n[gdscript]\nvar array1 = [\"One\", 2]\nvar array2 = [3, \"Four\"]\nprint(array1 + array2) # [\"One\", 2, 3, \"Four\"]\n[/gdscript]\n[csharp]\n// Array concatenation is not possible with C# arrays, but is with Godot.Collections.Array.\nvar array1 = new Godot.Collections.Array{\"One\", 2};\nvar array2 = new Godot.Collections.Array{3, \"Four\"};\nGD.Print(array1 + array2); // Prints [One, 2, 3, Four]\n[/csharp]\n[/codeblocks]\n[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].\n[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior." }, { "name": "PackedByteArray", @@ -19984,12 +22104,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -20008,17 +22130,20 @@ { "name": "==", "right_type": "PackedByteArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal bytes at the corresponding indices." }, { "name": "!=", "right_type": "PackedByteArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedByteArray", - "return_type": "PackedByteArray" + "return_type": "PackedByteArray", + "documentation": "Returns a new [PackedByteArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -20028,7 +22153,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -20036,7 +22162,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -20053,7 +22180,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Changes the byte at the given index." }, { "name": "push_back", @@ -20067,7 +22195,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends an element at the end of the array." }, { "name": "append", @@ -20081,7 +22210,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -20094,7 +22224,8 @@ "name": "array", "type": "PackedByteArray" } - ] + ], + "documentation": "Appends a [PackedByteArray] at the end of this array." }, { "name": "remove_at", @@ -20107,7 +22238,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -20125,7 +22257,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -20138,7 +22271,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -20152,14 +22286,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -20173,14 +22309,16 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value]." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -20199,14 +22337,16 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedByteArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedByteArray].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order." }, { "name": "bsearch", @@ -20225,7 +22365,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "duplicate", @@ -20233,7 +22374,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 851781288 + "hash": 851781288, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -20252,7 +22394,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -20271,7 +22414,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -20285,7 +22429,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns the number of times an element is in the array." }, { "name": "get_string_from_ascii", @@ -20293,7 +22438,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. This is the inverse of [method String.to_ascii_buffer]." }, { "name": "get_string_from_utf8", @@ -20301,7 +22447,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. This is the inverse of [method String.to_utf8_buffer]." }, { "name": "get_string_from_utf16", @@ -20309,7 +22456,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. This is the inverse of [method String.to_utf16_buffer]." }, { "name": "get_string_from_utf32", @@ -20317,7 +22465,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. This is the inverse of [method String.to_utf32_buffer]." }, { "name": "get_string_from_wchar", @@ -20325,7 +22474,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Converts wide character ([code]wchar_t[/code], UTF-16 on Windows, UTF-32 on other platforms) encoded array to [String]. Returns empty string if source array is not valid wide string. This is the inverse of [method String.to_wchar_buffer]." }, { "name": "hex_encode", @@ -20333,7 +22483,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3942272618 + "hash": 3942272618, + "documentation": "Returns a hexadecimal representation of this array as a [String].\n[codeblocks]\n[gdscript]\nvar array = PackedByteArray([11, 46, 255])\nprint(array.hex_encode()) # Prints: 0b2eff\n[/gdscript]\n[csharp]\nvar array = new byte[] {11, 46, 255};\nGD.Print(array.HexEncode()); // Prints: 0b2eff\n[/csharp]\n[/codeblocks]" }, { "name": "compress", @@ -20348,7 +22499,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants." }, { "name": "decompress", @@ -20367,7 +22519,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns a new [PackedByteArray] with the data decompressed. Set [param buffer_size] to the size of the uncompressed data. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants." }, { "name": "decompress_dynamic", @@ -20386,7 +22539,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants. [b]This method only accepts brotli, gzip, and deflate compression modes.[/b]\nThis method is potentially slower than [method decompress], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [method decompress] knows it's output buffer size from the beginning.\nGZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [param max_output_size]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned." }, { "name": "decode_u8", @@ -20400,7 +22554,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 8-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_s8", @@ -20414,7 +22569,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 8-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_u16", @@ -20428,7 +22584,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 16-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_s16", @@ -20442,7 +22599,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 16-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_u32", @@ -20456,7 +22614,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 32-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_s32", @@ -20470,7 +22629,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 32-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_u64", @@ -20484,7 +22644,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 64-bit unsigned integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_s64", @@ -20498,7 +22659,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 64-bit signed integer number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0[/code] if a valid number can't be decoded." }, { "name": "decode_half", @@ -20512,7 +22674,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 16-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded." }, { "name": "decode_float", @@ -20526,7 +22689,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 32-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded." }, { "name": "decode_double", @@ -20540,7 +22704,8 @@ "name": "byte_offset", "type": "int" } - ] + ], + "documentation": "Decodes a 64-bit floating point number from the bytes starting at [param byte_offset]. Fails if the byte count is insufficient. Returns [code]0.0[/code] if a valid number can't be decoded." }, { "name": "has_encoded_var", @@ -20559,7 +22724,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns [code]true[/code] if a valid [Variant] value can be decoded at the [param byte_offset]. Returns [code]false[/code] otherwise or when the value is [Object]-derived and [param allow_objects] is [code]false[/code]." }, { "name": "decode_var", @@ -20578,7 +22744,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Decodes a [Variant] from the bytes starting at [param byte_offset]. Returns [code]null[/code] if a valid variant can't be decoded or the value is [Object]-derived and [param allow_objects] is [code]false[/code]." }, { "name": "decode_var_size", @@ -20597,7 +22764,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Decodes a size of a [Variant] from the bytes starting at [param byte_offset]. Requires at least 4 bytes of data starting at the offset, otherwise fails." }, { "name": "to_int32_array", @@ -20605,7 +22773,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3158844420 + "hash": 3158844420, + "documentation": "Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ [code]int32_t[/code]).\nThe size of the input array must be a multiple of 4 (size of 32-bit integer). The size of the new array will be [code]byte_array.size() / 4[/code].\nIf the original data can't be converted to signed 32-bit integers, the resulting data is undefined." }, { "name": "to_int64_array", @@ -20613,7 +22782,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1961294120 + "hash": 1961294120, + "documentation": "Returns a copy of the data converted to a [PackedInt64Array], where each block of 8 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]).\nThe size of the input array must be a multiple of 8 (size of 64-bit integer). The size of the new array will be [code]byte_array.size() / 8[/code].\nIf the original data can't be converted to signed 64-bit integers, the resulting data is undefined." }, { "name": "to_float32_array", @@ -20621,7 +22791,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3575107827 + "hash": 3575107827, + "documentation": "Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code skip-lint]float[/code]).\nThe size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be [code]byte_array.size() / 4[/code].\nIf the original data can't be converted to 32-bit floats, the resulting data is undefined." }, { "name": "to_float64_array", @@ -20629,7 +22800,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 1627308337 + "hash": 1627308337, + "documentation": "Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ [code]double[/code], Godot [float]).\nThe size of the input array must be a multiple of 8 (size of 64-bit double). The size of the new array will be [code]byte_array.size() / 8[/code].\nIf the original data can't be converted to 64-bit floats, the resulting data is undefined." }, { "name": "encode_u8", @@ -20646,7 +22818,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 8-bit unsigned integer number (byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset." }, { "name": "encode_s8", @@ -20663,7 +22836,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 8-bit signed integer number (signed byte) at the index of [param byte_offset] bytes. The array must have at least 1 byte of space, starting at the offset." }, { "name": "encode_u16", @@ -20680,7 +22854,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 16-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset." }, { "name": "encode_s16", @@ -20697,7 +22872,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 16-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset." }, { "name": "encode_u32", @@ -20714,7 +22890,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 32-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset." }, { "name": "encode_s32", @@ -20731,7 +22908,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 32-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset." }, { "name": "encode_u64", @@ -20748,7 +22926,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 64-bit unsigned integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset." }, { "name": "encode_s64", @@ -20765,7 +22944,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Encodes a 64-bit signed integer number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of space, starting at the offset." }, { "name": "encode_half", @@ -20782,7 +22962,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Encodes a 16-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 2 bytes of space, starting at the offset." }, { "name": "encode_float", @@ -20799,7 +22980,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Encodes a 32-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 4 bytes of space, starting at the offset." }, { "name": "encode_double", @@ -20816,7 +22998,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Encodes a 64-bit floating point number as bytes at the index of [param byte_offset] bytes. The array must have at least 8 bytes of allocated space, starting at the offset." }, { "name": "encode_var", @@ -20839,12 +23022,14 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Encodes a [Variant] at the index of [param byte_offset] bytes. A sufficient space must be allocated, depending on the encoded variant's size. If [param allow_objects] is [code]false[/code], [Object]-derived values are not permitted and will instead be serialized as ID-only." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedByteArray]." }, { "index": 1, @@ -20853,7 +23038,8 @@ "name": "from", "type": "PackedByteArray" } - ] + ], + "documentation": "Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]." }, { "index": 2, @@ -20862,10 +23048,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold bytes. Packs data tightly, so it saves memory for large array sizes.\n[PackedByteArray] also provides methods to encode/decode various types to/from bytes. The way values are encoded is an implementation detail and shouldn't be relied upon when interacting with external apps." }, { "name": "PackedInt32Array", @@ -20875,12 +23063,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -20899,17 +23089,20 @@ { "name": "==", "right_type": "PackedInt32Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices." }, { "name": "!=", "right_type": "PackedInt32Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedInt32Array", - "return_type": "PackedInt32Array" + "return_type": "PackedInt32Array", + "documentation": "Returns a new [PackedInt32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -20919,7 +23112,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -20927,7 +23121,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -20944,7 +23139,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Changes the integer at the given index." }, { "name": "push_back", @@ -20958,7 +23154,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends a value to the array." }, { "name": "append", @@ -20972,7 +23169,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -20985,7 +23183,8 @@ "name": "array", "type": "PackedInt32Array" } - ] + ], + "documentation": "Appends a [PackedInt32Array] at the end of this array." }, { "name": "remove_at", @@ -20998,7 +23197,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -21016,7 +23216,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -21029,7 +23230,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -21043,14 +23245,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -21064,14 +23268,16 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value]." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -21090,7 +23296,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedInt32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt32Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -21098,14 +23305,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 4 bytes.\nThe size of the new array will be [code]int32_array.size() * 4[/code]." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order." }, { "name": "bsearch", @@ -21124,7 +23333,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "duplicate", @@ -21132,7 +23342,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 1997843129 + "hash": 1997843129, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -21151,7 +23362,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -21170,7 +23382,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -21184,12 +23397,14 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns the number of times an element is in the array." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedInt32Array]." }, { "index": 1, @@ -21198,7 +23413,8 @@ "name": "from", "type": "PackedInt32Array" } - ] + ], + "documentation": "Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array]." }, { "index": 2, @@ -21207,10 +23423,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold 32-bit integer values. Packs data tightly, so it saves memory for large array sizes.\n[b]Note:[/b] This type stores signed 32-bit integers, which means it can take values in the interval [code][-2^31, 2^31 - 1][/code], i.e. [code][-2147483648, 2147483647][/code]. Exceeding those bounds will wrap around. In comparison, [int] uses signed 64-bit integers which can hold much larger values. If you need to pack 64-bit integers tightly, see [PackedInt64Array]." }, { "name": "PackedInt64Array", @@ -21220,12 +23438,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -21244,17 +23464,20 @@ { "name": "==", "right_type": "PackedInt64Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal ints at the corresponding indices." }, { "name": "!=", "right_type": "PackedInt64Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedInt64Array", - "return_type": "PackedInt64Array" + "return_type": "PackedInt64Array", + "documentation": "Returns a new [PackedInt64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -21264,7 +23487,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -21272,7 +23496,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -21289,7 +23514,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Changes the integer at the given index." }, { "name": "push_back", @@ -21303,7 +23529,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends a value to the array." }, { "name": "append", @@ -21317,7 +23544,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -21330,7 +23558,8 @@ "name": "array", "type": "PackedInt64Array" } - ] + ], + "documentation": "Appends a [PackedInt64Array] at the end of this array." }, { "name": "remove_at", @@ -21343,7 +23572,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -21361,7 +23591,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -21374,7 +23605,8 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -21388,14 +23620,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -21409,14 +23643,16 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value]." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -21435,7 +23671,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedInt64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedInt64Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -21443,14 +23680,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 8 bytes.\nThe size of the new array will be [code]int64_array.size() * 8[/code]." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order." }, { "name": "bsearch", @@ -21469,7 +23708,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "duplicate", @@ -21477,7 +23717,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 2376370016 + "hash": 2376370016, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -21496,7 +23737,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -21515,7 +23757,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -21529,12 +23772,14 @@ "name": "value", "type": "int" } - ] + ], + "documentation": "Returns the number of times an element is in the array." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedInt64Array]." }, { "index": 1, @@ -21543,7 +23788,8 @@ "name": "from", "type": "PackedInt64Array" } - ] + ], + "documentation": "Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array]." }, { "index": 2, @@ -21552,10 +23798,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold 64-bit integer values. Packs data tightly, so it saves memory for large array sizes.\n[b]Note:[/b] This type stores signed 64-bit integers, which means it can take values in the interval [code][-2^63, 2^63 - 1][/code], i.e. [code][-9223372036854775808, 9223372036854775807][/code]. Exceeding those bounds will wrap around. If you only need to pack 32-bit integers tightly, see [PackedInt32Array] for a more memory-friendly alternative." }, { "name": "PackedFloat32Array", @@ -21565,12 +23813,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -21589,17 +23839,20 @@ { "name": "==", "right_type": "PackedFloat32Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal floats at the corresponding indices." }, { "name": "!=", "right_type": "PackedFloat32Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedFloat32Array", - "return_type": "PackedFloat32Array" + "return_type": "PackedFloat32Array", + "documentation": "Returns a new [PackedFloat32Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -21609,7 +23862,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -21617,7 +23871,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -21634,7 +23889,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Changes the float at the given index." }, { "name": "push_back", @@ -21648,7 +23904,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Appends an element at the end of the array." }, { "name": "append", @@ -21662,7 +23919,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -21675,7 +23933,8 @@ "name": "array", "type": "PackedFloat32Array" } - ] + ], + "documentation": "Appends a [PackedFloat32Array] at the end of this array." }, { "name": "remove_at", @@ -21688,7 +23947,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -21706,7 +23966,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -21719,7 +23980,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -21733,14 +23995,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -21754,14 +24018,16 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value].\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -21780,7 +24046,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedFloat32Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat32Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -21788,14 +24055,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 4 bytes.\nThe size of the new array will be [code]float32_array.size() * 4[/code]." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "bsearch", @@ -21814,7 +24083,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "duplicate", @@ -21822,7 +24092,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 831114784 + "hash": 831114784, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -21841,7 +24112,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "rfind", @@ -21860,7 +24132,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "count", @@ -21874,12 +24147,14 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Returns the number of times an element is in the array.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedFloat32Array]." }, { "index": 1, @@ -21888,7 +24163,8 @@ "name": "from", "type": "PackedFloat32Array" } - ] + ], + "documentation": "Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array]." }, { "index": 2, @@ -21897,10 +24173,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold 32-bit floating-point values (float). Packs data tightly, so it saves memory for large array sizes.\nIf you need to pack 64-bit floats tightly, see [PackedFloat64Array]." }, { "name": "PackedFloat64Array", @@ -21910,12 +24188,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -21934,17 +24214,20 @@ { "name": "==", "right_type": "PackedFloat64Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal doubles at the corresponding indices." }, { "name": "!=", "right_type": "PackedFloat64Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedFloat64Array", - "return_type": "PackedFloat64Array" + "return_type": "PackedFloat64Array", + "documentation": "Returns a new [PackedFloat64Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -21954,7 +24237,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -21962,7 +24246,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -21979,7 +24264,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Changes the float at the given index." }, { "name": "push_back", @@ -21993,7 +24279,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Appends an element at the end of the array." }, { "name": "append", @@ -22007,7 +24294,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -22020,7 +24308,8 @@ "name": "array", "type": "PackedFloat64Array" } - ] + ], + "documentation": "Appends a [PackedFloat64Array] at the end of this array." }, { "name": "remove_at", @@ -22033,7 +24322,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -22051,7 +24341,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -22064,7 +24355,8 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -22078,14 +24370,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -22099,14 +24393,16 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value].\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -22125,7 +24421,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedFloat64Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedFloat64Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -22133,14 +24430,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 8 bytes.\nThe size of the new array will be [code]float64_array.size() * 8[/code]." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "bsearch", @@ -22159,7 +24458,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "duplicate", @@ -22167,7 +24467,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 949266573 + "hash": 949266573, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -22186,7 +24487,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "rfind", @@ -22205,7 +24507,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "count", @@ -22219,12 +24522,14 @@ "name": "value", "type": "float" } - ] + ], + "documentation": "Returns the number of times an element is in the array.\n[b]Note:[/b] [constant @GDScript.NAN] doesn't behave the same as other numbers. Therefore, the results from this method may not be accurate if NaNs are included." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedFloat64Array]." }, { "index": 1, @@ -22233,7 +24538,8 @@ "name": "from", "type": "PackedFloat64Array" } - ] + ], + "documentation": "Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array]." }, { "index": 2, @@ -22242,10 +24548,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold 64-bit floating-point values (double). Packs data tightly, so it saves memory for large array sizes.\nIf you only need to pack 32-bit floats tightly, see [PackedFloat32Array] for a more memory-friendly alternative." }, { "name": "PackedStringArray", @@ -22255,12 +24563,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -22279,17 +24589,20 @@ { "name": "==", "right_type": "PackedStringArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [String]s at the corresponding indices." }, { "name": "!=", "right_type": "PackedStringArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedStringArray", - "return_type": "PackedStringArray" + "return_type": "PackedStringArray", + "documentation": "Returns a new [PackedStringArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -22299,7 +24612,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -22307,7 +24621,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -22324,7 +24639,8 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Changes the [String] at the given index." }, { "name": "push_back", @@ -22338,7 +24654,8 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Appends a string element at end of the array." }, { "name": "append", @@ -22352,7 +24669,8 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -22365,7 +24683,8 @@ "name": "array", "type": "PackedStringArray" } - ] + ], + "documentation": "Appends a [PackedStringArray] at the end of this array." }, { "name": "remove_at", @@ -22378,7 +24697,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -22396,7 +24716,8 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -22409,7 +24730,8 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -22423,14 +24745,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -22444,14 +24768,16 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value]." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -22470,7 +24796,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedStringArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedStringArray].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -22478,14 +24805,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a [PackedByteArray] with each string encoded as bytes." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order." }, { "name": "bsearch", @@ -22504,7 +24833,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "duplicate", @@ -22512,7 +24842,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 2991231410 + "hash": 2991231410, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -22531,7 +24862,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -22550,7 +24882,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -22564,12 +24897,14 @@ "name": "value", "type": "String" } - ] + ], + "documentation": "Returns the number of times an element is in the array." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedStringArray]." }, { "index": 1, @@ -22578,7 +24913,8 @@ "name": "from", "type": "PackedStringArray" } - ] + ], + "documentation": "Constructs a [PackedStringArray] as a copy of the given [PackedStringArray]." }, { "index": 2, @@ -22587,10 +24923,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted." } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold [String]s. Packs data tightly, so it saves memory for large array sizes.\nIf you want to join the strings in the array, use [method String.join].\n[codeblock]\nvar string_array = PackedStringArray([\"hello\", \"world\"])\nvar string = \" \".join(string_array)\nprint(string) # \"hello world\"\n[/codeblock]" }, { "name": "PackedVector2Array", @@ -22600,12 +24938,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -22614,7 +24954,8 @@ { "name": "*", "right_type": "Transform2D", - "return_type": "PackedVector2Array" + "return_type": "PackedVector2Array", + "documentation": "Transforms (multiplies) all vectors in the array by the [Transform2D] matrix." }, { "name": "in", @@ -22629,17 +24970,20 @@ { "name": "==", "right_type": "PackedVector2Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector2]s at the corresponding indices." }, { "name": "!=", "right_type": "PackedVector2Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedVector2Array", - "return_type": "PackedVector2Array" + "return_type": "PackedVector2Array", + "documentation": "Returns a new [PackedVector2Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -22649,7 +24993,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -22657,7 +25002,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -22674,7 +25020,8 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Changes the [Vector2] at the given index." }, { "name": "push_back", @@ -22688,7 +25035,8 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Inserts a [Vector2] at the end." }, { "name": "append", @@ -22702,7 +25050,8 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -22715,7 +25064,8 @@ "name": "array", "type": "PackedVector2Array" } - ] + ], + "documentation": "Appends a [PackedVector2Array] at the end of this array." }, { "name": "remove_at", @@ -22728,7 +25078,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -22746,7 +25097,8 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -22759,7 +25111,8 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -22773,14 +25126,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -22794,14 +25149,16 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value].\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -22820,7 +25177,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedVector2Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector2Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -22828,14 +25186,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a [PackedByteArray] with each vector encoded as bytes." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "bsearch", @@ -22854,7 +25214,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "duplicate", @@ -22862,7 +25223,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3763646812 + "hash": 3763646812, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -22881,7 +25243,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "rfind", @@ -22900,7 +25263,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "count", @@ -22914,12 +25278,14 @@ "name": "value", "type": "Vector2" } - ] + ], + "documentation": "Returns the number of times an element is in the array.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedVector2Array]." }, { "index": 1, @@ -22928,7 +25294,8 @@ "name": "from", "type": "PackedVector2Array" } - ] + ], + "documentation": "Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array]." }, { "index": 2, @@ -22937,10 +25304,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted.\n[b]Note:[/b] When initializing a [PackedVector2Array] with elements, it must be initialized with an [Array] of [Vector2] values:\n[codeblock]\nvar array = PackedVector2Array([Vector2(12, 34), Vector2(56, 78)])\n[/codeblock]" } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold [Vector2]. Packs data tightly, so it saves memory for large array sizes." }, { "name": "PackedVector3Array", @@ -22950,12 +25319,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -22964,7 +25335,8 @@ { "name": "*", "right_type": "Transform3D", - "return_type": "PackedVector3Array" + "return_type": "PackedVector3Array", + "documentation": "Transforms (multiplies) all vectors in the array by the [Transform3D] matrix." }, { "name": "in", @@ -22979,17 +25351,20 @@ { "name": "==", "right_type": "PackedVector3Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector3]s at the corresponding indices." }, { "name": "!=", "right_type": "PackedVector3Array", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedVector3Array", - "return_type": "PackedVector3Array" + "return_type": "PackedVector3Array", + "documentation": "Returns a new [PackedVector3Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -22999,7 +25374,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -23007,7 +25383,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -23024,7 +25401,8 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Changes the [Vector3] at the given index." }, { "name": "push_back", @@ -23038,7 +25416,8 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Inserts a [Vector3] at the end." }, { "name": "append", @@ -23052,7 +25431,8 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -23065,7 +25445,8 @@ "name": "array", "type": "PackedVector3Array" } - ] + ], + "documentation": "Appends a [PackedVector3Array] at the end of this array." }, { "name": "remove_at", @@ -23078,7 +25459,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -23096,7 +25478,8 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -23109,7 +25492,8 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -23123,14 +25507,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -23144,14 +25530,16 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value].\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -23170,7 +25558,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedVector3Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector3Array].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -23178,14 +25567,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a [PackedByteArray] with each vector encoded as bytes." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "bsearch", @@ -23204,7 +25595,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "duplicate", @@ -23212,7 +25604,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 2754175465 + "hash": 2754175465, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -23231,7 +25624,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "rfind", @@ -23250,7 +25644,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." }, { "name": "count", @@ -23264,12 +25659,14 @@ "name": "value", "type": "Vector3" } - ] + ], + "documentation": "Returns the number of times an element is in the array.\n[b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedVector3Array]." }, { "index": 1, @@ -23278,7 +25675,8 @@ "name": "from", "type": "PackedVector3Array" } - ] + ], + "documentation": "Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array]." }, { "index": 2, @@ -23287,10 +25685,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted.\n[b]Note:[/b] When initializing a [PackedVector3Array] with elements, it must be initialized with an [Array] of [Vector3] values:\n[codeblock]\nvar array = PackedVector3Array([Vector3(12, 34, 56), Vector3(78, 90, 12)])\n[/codeblock]" } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold [Vector3]. Packs data tightly, so it saves memory for large array sizes." }, { "name": "PackedColorArray", @@ -23300,12 +25700,14 @@ { "name": "==", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices." }, { "name": "!=", "right_type": "Variant", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "not", @@ -23324,17 +25726,20 @@ { "name": "==", "right_type": "PackedColorArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Color]s at the corresponding indices." }, { "name": "!=", "right_type": "PackedColorArray", - "return_type": "bool" + "return_type": "bool", + "documentation": "Returns [code]true[/code] if contents of the arrays differ." }, { "name": "+", "right_type": "PackedColorArray", - "return_type": "PackedColorArray" + "return_type": "PackedColorArray", + "documentation": "Returns a new [PackedColorArray] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead." } ], "methods": [ @@ -23344,7 +25749,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3173160232 + "hash": 3173160232, + "documentation": "Returns the number of elements in the array." }, { "name": "is_empty", @@ -23352,7 +25758,8 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 3918633141 + "hash": 3918633141, + "documentation": "Returns [code]true[/code] if the array is empty." }, { "name": "set", @@ -23369,7 +25776,8 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Changes the [Color] at the given index." }, { "name": "push_back", @@ -23383,7 +25791,8 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Appends a value to the array." }, { "name": "append", @@ -23397,7 +25806,8 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Appends an element at the end of the array (alias of [method push_back])." }, { "name": "append_array", @@ -23410,7 +25820,8 @@ "name": "array", "type": "PackedColorArray" } - ] + ], + "documentation": "Appends a [PackedColorArray] at the end of this array." }, { "name": "remove_at", @@ -23423,7 +25834,8 @@ "name": "index", "type": "int" } - ] + ], + "documentation": "Removes an element from the array by index." }, { "name": "insert", @@ -23441,7 +25853,8 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code])." }, { "name": "fill", @@ -23454,7 +25867,8 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements." }, { "name": "resize", @@ -23468,14 +25882,16 @@ "name": "new_size", "type": "int" } - ] + ], + "documentation": "Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size." }, { "name": "clear", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]." }, { "name": "has", @@ -23489,14 +25905,16 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Returns [code]true[/code] if the array contains [param value]." }, { "name": "reverse", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Reverses the order of the elements in the array." }, { "name": "slice", @@ -23515,7 +25933,8 @@ "type": "int", "default_value": "2147483647" } - ] + ], + "documentation": "Returns the slice of the [PackedColorArray], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedColorArray].\nThe absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]).\nIf either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code])." }, { "name": "to_byte_array", @@ -23523,14 +25942,16 @@ "is_vararg": false, "is_const": true, "is_static": false, - "hash": 247621236 + "hash": 247621236, + "documentation": "Returns a [PackedByteArray] with each color encoded as bytes." }, { "name": "sort", "is_vararg": false, "is_const": false, "is_static": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sorts the elements of the array in ascending order." }, { "name": "bsearch", @@ -23549,7 +25970,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.\n[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior." }, { "name": "duplicate", @@ -23557,7 +25979,8 @@ "is_vararg": false, "is_const": false, "is_static": false, - "hash": 1011903421 + "hash": 1011903421, + "documentation": "Creates a copy of the array, and returns it." }, { "name": "find", @@ -23576,7 +25999,8 @@ "type": "int", "default_value": "0" } - ] + ], + "documentation": "Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed." }, { "name": "rfind", @@ -23595,7 +26019,8 @@ "type": "int", "default_value": "-1" } - ] + ], + "documentation": "Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array." }, { "name": "count", @@ -23609,12 +26034,14 @@ "name": "value", "type": "Color" } - ] + ], + "documentation": "Returns the number of times an element is in the array." } ], "constructors": [ { - "index": 0 + "index": 0, + "documentation": "Constructs an empty [PackedColorArray]." }, { "index": 1, @@ -23623,7 +26050,8 @@ "name": "from", "type": "PackedColorArray" } - ] + ], + "documentation": "Constructs a [PackedColorArray] as a copy of the given [PackedColorArray]." }, { "index": 2, @@ -23632,10 +26060,12 @@ "name": "from", "type": "Array" } - ] + ], + "documentation": "Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted.\n[b]Note:[/b] When initializing a [PackedColorArray] with elements, it must be initialized with an [Array] of [Color] values:\n[codeblock]\nvar array = PackedColorArray([Color(0.1, 0.2, 0.3), Color(0.4, 0.5, 0.6)])\n[/codeblock]" } ], - "has_destructor": true + "has_destructor": true, + "documentation": "An array specifically designed to hold [Color]. Packs data tightly, so it saves memory for large array sizes." } ], "classes": [ @@ -23652,23 +26082,28 @@ "values": [ { "name": "MODE_ECB_ENCRYPT", - "value": 0 + "value": 0, + "documentation": "AES electronic codebook encryption mode." }, { "name": "MODE_ECB_DECRYPT", - "value": 1 + "value": 1, + "documentation": "AES electronic codebook decryption mode." }, { "name": "MODE_CBC_ENCRYPT", - "value": 2 + "value": 2, + "documentation": "AES cipher blocker chaining encryption mode." }, { "name": "MODE_CBC_DECRYPT", - "value": 3 + "value": 3, + "documentation": "AES cipher blocker chaining decryption mode." }, { "name": "MODE_MAX", - "value": 4 + "value": 4, + "documentation": "Maximum value for the mode enum." } ] } @@ -23701,7 +26136,8 @@ "type": "PackedByteArray", "default_value": "PackedByteArray()" } - ] + ], + "documentation": "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]." }, { "name": "update", @@ -23718,7 +26154,8 @@ "name": "src", "type": "PackedByteArray" } - ] + ], + "documentation": "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.\n[b]Note:[/b] The size of [param src] must be a multiple of 16. Apply some padding if needed." }, { "name": "get_iv_state", @@ -23729,7 +26166,8 @@ "hash": 2115431945, "return_value": { "type": "PackedByteArray" - } + }, + "documentation": "Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function.\n[b]Note:[/b] This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]." }, { "name": "finish", @@ -23737,9 +26175,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Close this AES context so it can be started again. See [method start]." } - ] + ], + "documentation": "This class holds the context information required for encryption and decryption operations with AES (Advanced Encryption Standard). Both AES-ECB and AES-CBC modes are supported.\n[codeblocks]\n[gdscript]\nextends Node\n\nvar aes = AESContext.new()\n\nfunc _ready():\n var key = \"My secret key!!!\" # Key must be either 16 or 32 bytes.\n var data = \"My secret text!!\" # Data size must be multiple of 16 bytes, apply padding if needed.\n # Encrypt ECB\n aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())\n var encrypted = aes.update(data.to_utf8_buffer())\n aes.finish()\n # Decrypt ECB\n aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())\n var decrypted = aes.update(encrypted)\n aes.finish()\n # Check ECB\n assert(decrypted == data.to_utf8_buffer())\n\n var iv = \"My secret iv!!!!\" # IV must be of exactly 16 bytes.\n # Encrypt CBC\n aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())\n encrypted = aes.update(data.to_utf8_buffer())\n aes.finish()\n # Decrypt CBC\n aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())\n decrypted = aes.update(encrypted)\n aes.finish()\n # Check CBC\n assert(decrypted == data.to_utf8_buffer())\n[/gdscript]\n[csharp]\nusing Godot;\nusing System.Diagnostics;\n\npublic partial class MyNode : Node\n{\n private AesContext _aes = new AesContext();\n\n public override void _Ready()\n {\n string key = \"My secret key!!!\"; // Key must be either 16 or 32 bytes.\n string data = \"My secret text!!\"; // Data size must be multiple of 16 bytes, apply padding if needed.\n // Encrypt ECB\n _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());\n byte[] encrypted = _aes.Update(data.ToUtf8Buffer());\n _aes.Finish();\n // Decrypt ECB\n _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());\n byte[] decrypted = _aes.Update(encrypted);\n _aes.Finish();\n // Check ECB\n Debug.Assert(decrypted == data.ToUtf8Buffer());\n\n string iv = \"My secret iv!!!!\"; // IV must be of exactly 16 bytes.\n // Encrypt CBC\n _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());\n encrypted = _aes.Update(data.ToUtf8Buffer());\n _aes.Finish();\n // Decrypt CBC\n _aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());\n decrypted = _aes.Update(encrypted);\n _aes.Finish();\n // Check CBC\n Debug.Assert(decrypted == data.ToUtf8Buffer());\n }\n}\n[/csharp]\n[/codeblocks]" }, { "name": "AStar2D", @@ -23769,7 +26209,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Called when estimating the cost between a point and the path's ending point.\nNote that this function is hidden in the default [AStar2D] class." }, { "name": "_compute_cost", @@ -23792,7 +26233,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Called when computing the cost between two connected points.\nNote that this function is hidden in the default [AStar2D] class." }, { "name": "get_available_point_id", @@ -23804,7 +26246,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the next available point ID with no point associated to it." }, { "name": "add_point", @@ -23832,7 +26275,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "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.\nThe [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.\n[codeblocks]\n[gdscript]\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1\n[/gdscript]\n[csharp]\nvar astar = new AStar2D();\nastar.AddPoint(1, new Vector2(1, 0), 4); // Adds the point (1, 0) with weight_scale 4 and id 1\n[/csharp]\n[/codeblocks]\nIf there already exists a point for the given [param id], its position and weight scale are updated to the given values." }, { "name": "get_point_position", @@ -23850,7 +26294,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns the position of the point associated with the given [param id]." }, { "name": "set_point_position", @@ -23869,7 +26314,8 @@ "name": "position", "type": "Vector2" } - ] + ], + "documentation": "Sets the [param position] for the point with the given [param id]." }, { "name": "get_point_weight_scale", @@ -23888,7 +26334,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns the weight scale of the point associated with the given [param id]." }, { "name": "set_point_weight_scale", @@ -23908,7 +26355,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "remove_point", @@ -23923,7 +26371,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Removes the point associated with the given [param id] from the points pool." }, { "name": "has_point", @@ -23941,7 +26390,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns whether a point associated with the given [param id] exists." }, { "name": "get_point_connections", @@ -23959,7 +26409,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns an array with the IDs of the points that form the connection with the given point.\n[codeblocks]\n[gdscript]\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1))\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, true)\nastar.connect_points(1, 3, true)\n\nvar neighbors = astar.get_point_connections(1) # Returns [2, 3]\n[/gdscript]\n[csharp]\nvar astar = new AStar2D();\nastar.AddPoint(1, new Vector2(0, 0));\nastar.AddPoint(2, new Vector2(0, 1));\nastar.AddPoint(3, new Vector2(1, 1));\nastar.AddPoint(4, new Vector2(2, 0));\n\nastar.ConnectPoints(1, 2, true);\nastar.ConnectPoints(1, 3, true);\n\nint[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]\n[/csharp]\n[/codeblocks]" }, { "name": "get_point_ids", @@ -23970,7 +26421,8 @@ "hash": 3851388692, "return_value": { "type": "PackedInt64Array" - } + }, + "documentation": "Returns an array of all point IDs." }, { "name": "set_point_disabled", @@ -23993,7 +26445,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle." }, { "name": "is_point_disabled", @@ -24011,7 +26464,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns whether a point is disabled or not for pathfinding. By default, all points are enabled." }, { "name": "connect_points", @@ -24039,7 +26493,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction.\n[codeblocks]\n[gdscript]\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(1, 1))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2, false)\n[/gdscript]\n[csharp]\nvar astar = new AStar2D();\nastar.AddPoint(1, new Vector2(1, 1));\nastar.AddPoint(2, new Vector2(0, 5));\nastar.ConnectPoints(1, 2, false);\n[/csharp]\n[/codeblocks]" }, { "name": "disconnect_points", @@ -24067,7 +26522,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains." }, { "name": "are_points_connected", @@ -24098,7 +26554,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Returns whether there is a connection/segment between the given points. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment." }, { "name": "get_point_count", @@ -24110,7 +26567,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the number of points currently in the points pool." }, { "name": "get_point_capacity", @@ -24122,7 +26580,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space]." }, { "name": "reserve_space", @@ -24137,7 +26596,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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." }, { "name": "clear", @@ -24145,7 +26605,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all the points and segments." }, { "name": "get_closest_point", @@ -24168,7 +26629,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.\n[b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result." }, { "name": "get_closest_position_in_segment", @@ -24185,7 +26647,8 @@ "name": "to_position", "type": "Vector2" } - ] + ], + "documentation": "Returns the closest position to [param to_position] that resides inside a segment between two connected points.\n[codeblocks]\n[gdscript]\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 5))\nastar.connect_points(1, 2)\nvar res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)\n[/gdscript]\n[csharp]\nvar astar = new AStar2D();\nastar.AddPoint(1, new Vector2(0, 0));\nastar.AddPoint(2, new Vector2(0, 5));\nastar.ConnectPoints(1, 2);\nVector2 res = astar.GetClosestPositionInSegment(new Vector2(3, 3)); // Returns (0, 3)\n[/csharp]\n[/codeblocks]\nThe result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point." }, { "name": "get_point_path", @@ -24208,7 +26671,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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.\n[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector2Array] and will print an error message." }, { "name": "get_id_path", @@ -24231,9 +26695,11 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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.\n[codeblocks]\n[gdscript]\nvar astar = AStar2D.new()\nastar.add_point(1, Vector2(0, 0))\nastar.add_point(2, Vector2(0, 1), 1) # Default weight is 1\nastar.add_point(3, Vector2(1, 1))\nastar.add_point(4, Vector2(2, 0))\n\nastar.connect_points(1, 2, false)\nastar.connect_points(2, 3, false)\nastar.connect_points(4, 3, false)\nastar.connect_points(1, 4, false)\n\nvar res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n[/gdscript]\n[csharp]\nvar astar = new AStar2D();\nastar.AddPoint(1, new Vector2(0, 0));\nastar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1\nastar.AddPoint(3, new Vector2(1, 1));\nastar.AddPoint(4, new Vector2(2, 0));\n\nastar.ConnectPoints(1, 2, false);\nastar.ConnectPoints(2, 3, false);\nastar.ConnectPoints(4, 3, false);\nastar.ConnectPoints(1, 4, false);\nint[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]\n[/csharp]\n[/codeblocks]\nIf you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's \"easier\" to get through point 4 than through point 2." } - ] + ], + "documentation": "An implementation of the A* algorithm, used to find the shortest path between two vertices on a connected graph in 2D space.\nSee [AStar3D] for a more thorough explanation on how to use this class. [AStar2D] is a wrapper for [AStar3D] that enforces 2D coordinates." }, { "name": "AStar3D", @@ -24263,7 +26729,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Called when estimating the cost between a point and the path's ending point.\nNote that this function is hidden in the default [AStar3D] class." }, { "name": "_compute_cost", @@ -24286,7 +26753,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Called when computing the cost between two connected points.\nNote that this function is hidden in the default [AStar3D] class." }, { "name": "get_available_point_id", @@ -24298,7 +26766,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the next available point ID with no point associated to it." }, { "name": "add_point", @@ -24326,7 +26795,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "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.\nThe [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.\n[codeblocks]\n[gdscript]\nvar astar = AStar3D.new()\nastar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1\n[/gdscript]\n[csharp]\nvar astar = new AStar3D();\nastar.AddPoint(1, new Vector3(1, 0, 0), 4); // Adds the point (1, 0, 0) with weight_scale 4 and id 1\n[/csharp]\n[/codeblocks]\nIf there already exists a point for the given [param id], its position and weight scale are updated to the given values." }, { "name": "get_point_position", @@ -24344,7 +26814,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns the position of the point associated with the given [param id]." }, { "name": "set_point_position", @@ -24363,7 +26834,8 @@ "name": "position", "type": "Vector3" } - ] + ], + "documentation": "Sets the [param position] for the point with the given [param id]." }, { "name": "get_point_weight_scale", @@ -24382,7 +26854,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns the weight scale of the point associated with the given [param id]." }, { "name": "set_point_weight_scale", @@ -24402,7 +26875,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "remove_point", @@ -24417,7 +26891,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Removes the point associated with the given [param id] from the points pool." }, { "name": "has_point", @@ -24435,7 +26910,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns whether a point associated with the given [param id] exists." }, { "name": "get_point_connections", @@ -24453,7 +26929,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns an array with the IDs of the points that form the connection with the given point.\n[codeblocks]\n[gdscript]\nvar astar = AStar3D.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 1, 0))\nastar.add_point(3, Vector3(1, 1, 0))\nastar.add_point(4, Vector3(2, 0, 0))\n\nastar.connect_points(1, 2, true)\nastar.connect_points(1, 3, true)\n\nvar neighbors = astar.get_point_connections(1) # Returns [2, 3]\n[/gdscript]\n[csharp]\nvar astar = new AStar3D();\nastar.AddPoint(1, new Vector3(0, 0, 0));\nastar.AddPoint(2, new Vector3(0, 1, 0));\nastar.AddPoint(3, new Vector3(1, 1, 0));\nastar.AddPoint(4, new Vector3(2, 0, 0));\nastar.ConnectPoints(1, 2, true);\nastar.ConnectPoints(1, 3, true);\n\nint[] neighbors = astar.GetPointConnections(1); // Returns [2, 3]\n[/csharp]\n[/codeblocks]" }, { "name": "get_point_ids", @@ -24464,7 +26941,8 @@ "hash": 3851388692, "return_value": { "type": "PackedInt64Array" - } + }, + "documentation": "Returns an array of all point IDs." }, { "name": "set_point_disabled", @@ -24487,7 +26965,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle." }, { "name": "is_point_disabled", @@ -24505,7 +26984,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Returns whether a point is disabled or not for pathfinding. By default, all points are enabled." }, { "name": "connect_points", @@ -24533,7 +27013,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Creates a segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is allowed, not the reverse direction.\n[codeblocks]\n[gdscript]\nvar astar = AStar3D.new()\nastar.add_point(1, Vector3(1, 1, 0))\nastar.add_point(2, Vector3(0, 5, 0))\nastar.connect_points(1, 2, false)\n[/gdscript]\n[csharp]\nvar astar = new AStar3D();\nastar.AddPoint(1, new Vector3(1, 1, 0));\nastar.AddPoint(2, new Vector3(0, 5, 0));\nastar.ConnectPoints(1, 2, false);\n[/csharp]\n[/codeblocks]" }, { "name": "disconnect_points", @@ -24561,7 +27042,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Deletes the segment between the given points. If [param bidirectional] is [code]false[/code], only movement from [param id] to [param to_id] is prevented, and a unidirectional segment possibly remains." }, { "name": "are_points_connected", @@ -24592,7 +27074,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Returns whether the two given points are directly connected by a segment. If [param bidirectional] is [code]false[/code], returns whether movement from [param id] to [param to_id] is possible through this segment." }, { "name": "get_point_count", @@ -24604,7 +27087,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the number of points currently in the points pool." }, { "name": "get_point_capacity", @@ -24616,7 +27100,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space]." }, { "name": "reserve_space", @@ -24631,7 +27116,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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." }, { "name": "clear", @@ -24639,7 +27125,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all the points and segments." }, { "name": "get_closest_point", @@ -24662,7 +27149,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns the ID of the closest point to [param to_position], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool.\n[b]Note:[/b] If several points are the closest to [param to_position], the one with the smallest ID will be returned, ensuring a deterministic result." }, { "name": "get_closest_position_in_segment", @@ -24679,7 +27167,8 @@ "name": "to_position", "type": "Vector3" } - ] + ], + "documentation": "Returns the closest position to [param to_position] that resides inside a segment between two connected points.\n[codeblocks]\n[gdscript]\nvar astar = AStar3D.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 5, 0))\nastar.connect_points(1, 2)\nvar res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)\n[/gdscript]\n[csharp]\nvar astar = new AStar3D();\nastar.AddPoint(1, new Vector3(0, 0, 0));\nastar.AddPoint(2, new Vector3(0, 5, 0));\nastar.ConnectPoints(1, 2);\nVector3 res = astar.GetClosestPositionInSegment(new Vector3(3, 3, 0)); // Returns (0, 3, 0)\n[/csharp]\n[/codeblocks]\nThe result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point." }, { "name": "get_point_path", @@ -24702,7 +27191,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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.\n[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message." }, { "name": "get_id_path", @@ -24725,9 +27215,11 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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.\n[codeblocks]\n[gdscript]\nvar astar = AStar3D.new()\nastar.add_point(1, Vector3(0, 0, 0))\nastar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1\nastar.add_point(3, Vector3(1, 1, 0))\nastar.add_point(4, Vector3(2, 0, 0))\n\nastar.connect_points(1, 2, false)\nastar.connect_points(2, 3, false)\nastar.connect_points(4, 3, false)\nastar.connect_points(1, 4, false)\n\nvar res = astar.get_id_path(1, 3) # Returns [1, 2, 3]\n[/gdscript]\n[csharp]\nvar astar = new AStar3D();\nastar.AddPoint(1, new Vector3(0, 0, 0));\nastar.AddPoint(2, new Vector3(0, 1, 0), 1); // Default weight is 1\nastar.AddPoint(3, new Vector3(1, 1, 0));\nastar.AddPoint(4, new Vector3(2, 0, 0));\nastar.ConnectPoints(1, 2, false);\nastar.ConnectPoints(2, 3, false);\nastar.ConnectPoints(4, 3, false);\nastar.ConnectPoints(1, 4, false);\nint[] res = astar.GetIdPath(1, 3); // Returns [1, 2, 3]\n[/csharp]\n[/codeblocks]\nIf you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's \"easier\" to get through point 4 than through point 2." } - ] + ], + "documentation": "A* (A star) is a computer algorithm used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in 3D space and Euclidean distances by default.\nYou must add points manually with [method add_point] and create segments manually with [method connect_points]. Once done, you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path].\nIt is also possible to use non-Euclidean distances. To do so, create a class that extends [AStar3D] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.\n[codeblocks]\n[gdscript]\nclass MyAStar:\n extends AStar3D\n\n func _compute_cost(u, v):\n return abs(u - v)\n\n func _estimate_cost(u, v):\n return min(0, abs(u - v) - 1)\n[/gdscript]\n[csharp]\npublic partial class MyAStar : AStar3D\n{\n public override float _ComputeCost(long fromId, long toId)\n {\n return Mathf.Abs((int)(fromId - toId));\n }\n\n public override float _EstimateCost(long fromId, long toId)\n {\n return Mathf.Min(0, Mathf.Abs((int)(fromId - toId)) - 1);\n }\n}\n[/csharp]\n[/codeblocks]\n[method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [method _compute_cost] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.\nIf the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path." }, { "name": "AStarGrid2D", @@ -24742,23 +27234,28 @@ "values": [ { "name": "HEURISTIC_EUCLIDEAN", - "value": 0 + "value": 0, + "documentation": "The [url=https://en.wikipedia.org/wiki/Euclidean_distance]Euclidean heuristic[/url] to be used for the pathfinding using the following formula:\n[codeblock]\ndx = abs(to_id.x - from_id.x)\ndy = abs(to_id.y - from_id.y)\nresult = sqrt(dx * dx + dy * dy)\n[/codeblock]\n[b]Note:[/b] This is also the internal heuristic used in [AStar3D] and [AStar2D] by default (with the inclusion of possible z-axis coordinate)." }, { "name": "HEURISTIC_MANHATTAN", - "value": 1 + "value": 1, + "documentation": "The [url=https://en.wikipedia.org/wiki/Taxicab_geometry]Manhattan heuristic[/url] to be used for the pathfinding using the following formula:\n[codeblock]\ndx = abs(to_id.x - from_id.x)\ndy = abs(to_id.y - from_id.y)\nresult = dx + dy\n[/codeblock]\n[b]Note:[/b] This heuristic is intended to be used with 4-side orthogonal movements, provided by setting the [member diagonal_mode] to [constant DIAGONAL_MODE_NEVER]." }, { "name": "HEURISTIC_OCTILE", - "value": 2 + "value": 2, + "documentation": "The Octile heuristic to be used for the pathfinding using the following formula:\n[codeblock]\ndx = abs(to_id.x - from_id.x)\ndy = abs(to_id.y - from_id.y)\nf = sqrt(2) - 1\nresult = (dx < dy) ? f * dx + dy : f * dy + dx;\n[/codeblock]" }, { "name": "HEURISTIC_CHEBYSHEV", - "value": 3 + "value": 3, + "documentation": "The [url=https://en.wikipedia.org/wiki/Chebyshev_distance]Chebyshev heuristic[/url] to be used for the pathfinding using the following formula:\n[codeblock]\ndx = abs(to_id.x - from_id.x)\ndy = abs(to_id.y - from_id.y)\nresult = max(dx, dy)\n[/codeblock]" }, { "name": "HEURISTIC_MAX", - "value": 4 + "value": 4, + "documentation": "Represents the size of the [enum Heuristic] enum." } ] }, @@ -24768,23 +27265,28 @@ "values": [ { "name": "DIAGONAL_MODE_ALWAYS", - "value": 0 + "value": 0, + "documentation": "The pathfinding algorithm will ignore solid neighbors around the target cell and allow passing using diagonals." }, { "name": "DIAGONAL_MODE_NEVER", - "value": 1 + "value": 1, + "documentation": "The pathfinding algorithm will ignore all diagonals and the way will be always orthogonal." }, { "name": "DIAGONAL_MODE_AT_LEAST_ONE_WALKABLE", - "value": 2 + "value": 2, + "documentation": "The pathfinding algorithm will avoid using diagonals if at least two obstacles have been placed around the neighboring cells of the specific path segment." }, { "name": "DIAGONAL_MODE_ONLY_IF_NO_OBSTACLES", - "value": 3 + "value": 3, + "documentation": "The pathfinding algorithm will avoid using diagonals if any obstacle has been placed around the neighboring cells of the specific path segment." }, { "name": "DIAGONAL_MODE_MAX", - "value": 4 + "value": 4, + "documentation": "Represents the size of the [enum DiagonalMode] enum." } ] } @@ -24809,7 +27311,8 @@ "name": "to_id", "type": "Vector2i" } - ] + ], + "documentation": "Called when estimating the cost between a point and the path's ending point.\nNote that this function is hidden in the default [AStarGrid2D] class." }, { "name": "_compute_cost", @@ -24830,7 +27333,8 @@ "name": "to_id", "type": "Vector2i" } - ] + ], + "documentation": "Called when computing the cost between two connected points.\nNote that this function is hidden in the default [AStarGrid2D] class." }, { "name": "set_region", @@ -24953,7 +27457,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the [param x] and [param y] is a valid grid coordinate (id), i.e. if it is inside [member region]. Equivalent to [code]region.has_point(Vector2i(x, y))[/code]." }, { "name": "is_in_boundsv", @@ -24970,7 +27475,8 @@ "name": "id", "type": "Vector2i" } - ] + ], + "documentation": "Returns [code]true[/code] if the [param id] vector is a valid grid coordinate, i.e. if it is inside [member region]. Equivalent to [code]region.has_point(id)[/code]." }, { "name": "is_dirty", @@ -24981,7 +27487,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Indicates that the grid parameters were changed and [method update] needs to be called." }, { "name": "update", @@ -24989,7 +27496,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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 [code]true[/code] if this is the case and this needs to be called.\n[b]Note:[/b] All point data (solidity and weight scale) will be cleared." }, { "name": "set_jumping_enabled", @@ -25111,7 +27619,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled.\n[b]Note:[/b] Calling [method update] is not needed after the call of this function." }, { "name": "is_point_solid", @@ -25128,7 +27637,8 @@ "name": "id", "type": "Vector2i" } - ] + ], + "documentation": "Returns [code]true[/code] if a point is disabled for pathfinding. By default, all points are enabled." }, { "name": "set_point_weight_scale", @@ -25147,7 +27657,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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.\n[b]Note:[/b] Calling [method update] is not needed after the call of this function." }, { "name": "get_point_weight_scale", @@ -25165,7 +27676,8 @@ "name": "id", "type": "Vector2i" } - ] + ], + "documentation": "Returns the weight scale of the point associated with the given [param id]." }, { "name": "fill_solid_region", @@ -25187,7 +27699,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Fills the given [param region] on the grid with the specified value for the solid flag.\n[b]Note:[/b] Calling [method update] is not needed after the call of this function." }, { "name": "fill_weight_scale_region", @@ -25206,7 +27719,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Fills the given [param region] on the grid with the specified value for the weight scale.\n[b]Note:[/b] Calling [method update] is not needed after the call of this function." }, { "name": "clear", @@ -25214,7 +27728,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the grid and sets the [member region] to [code]Rect2i(0, 0, 0, 0)[/code]." }, { "name": "get_point_position", @@ -25231,7 +27746,8 @@ "name": "id", "type": "Vector2i" } - ] + ], + "documentation": "Returns the position of the point associated with the given [param id]." }, { "name": "get_point_path", @@ -25252,7 +27768,8 @@ "name": "to_id", "type": "Vector2i" } - ] + ], + "documentation": "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.\n[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message." }, { "name": "get_id_path", @@ -25273,7 +27790,8 @@ "name": "to_id", "type": "Vector2i" } - ] + ], + "documentation": "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." } ], "properties": [ @@ -25281,51 +27799,60 @@ "type": "Rect2i", "name": "region", "setter": "set_region", - "getter": "get_region" + "getter": "get_region", + "documentation": "The region of grid cells available for pathfinding. If changed, [method update] needs to be called before finding the next path." }, { "type": "Vector2i", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "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.\n[i]Deprecated.[/i] Use [member region] instead." }, { "type": "Vector2", "name": "offset", "setter": "set_offset", - "getter": "get_offset" + "getter": "get_offset", + "documentation": "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." }, { "type": "Vector2", "name": "cell_size", "setter": "set_cell_size", - "getter": "get_cell_size" + "getter": "get_cell_size", + "documentation": "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." }, { "type": "bool", "name": "jumping_enabled", "setter": "set_jumping_enabled", - "getter": "is_jumping_enabled" + "getter": "is_jumping_enabled", + "documentation": "Enables or disables jumping to skip up the intermediate points and speeds up the searching algorithm.\n[b]Note:[/b] Currently, toggling it on disables the consideration of weight scaling in pathfinding." }, { "type": "int", "name": "default_compute_heuristic", "setter": "set_default_compute_heuristic", - "getter": "get_default_compute_heuristic" + "getter": "get_default_compute_heuristic", + "documentation": "The default [enum Heuristic] which will be used to calculate the cost between two points if [method _compute_cost] was not overridden." }, { "type": "int", "name": "default_estimate_heuristic", "setter": "set_default_estimate_heuristic", - "getter": "get_default_estimate_heuristic" + "getter": "get_default_estimate_heuristic", + "documentation": "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." }, { "type": "int", "name": "diagonal_mode", "setter": "set_diagonal_mode", - "getter": "get_diagonal_mode" + "getter": "get_diagonal_mode", + "documentation": "A specific [enum DiagonalMode] mode which will force the path to avoid or accept the specified diagonals." } - ] + ], + "documentation": "[AStarGrid2D] is a variant of [AStar2D] that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations.\nTo use [AStarGrid2D], you only need to set the [member region] of the grid, optionally set the [member cell_size], and then call the [method update] method:\n[codeblocks]\n[gdscript]\nvar astar_grid = AStarGrid2D.new()\nastar_grid.region = Rect2i(0, 0, 32, 32)\nastar_grid.cell_size = Vector2(16, 16)\nastar_grid.update()\nprint(astar_grid.get_id_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)\nprint(astar_grid.get_point_path(Vector2i(0, 0), Vector2i(3, 4))) # prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)\n[/gdscript]\n[csharp]\nAStarGrid2D astarGrid = new AStarGrid2D();\nastarGrid.Region = new Rect2I(0, 0, 32, 32);\nastarGrid.CellSize = new Vector2I(16, 16);\nastarGrid.Update();\nGD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)\nGD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)\n[/csharp]\n[/codeblocks]\nTo remove a point from the pathfinding grid, it must be set as \"solid\" with [method set_point_solid]." }, { "name": "AcceptDialog", @@ -25343,7 +27870,8 @@ "hash": 1856205918, "return_value": { "type": "Button" - } + }, + "documentation": "Returns the OK [Button] instance.\n[b]Warning:[/b] 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." }, { "name": "get_label", @@ -25354,7 +27882,8 @@ "hash": 566733104, "return_value": { "type": "Label" - } + }, + "documentation": "Returns the label used for built-in text.\n[b]Warning:[/b] 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." }, { "name": "set_hide_on_ok", @@ -25434,7 +27963,8 @@ "type": "String", "default_value": "\"\"" } - ] + ], + "documentation": "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.\nIf [code]true[/code], [param right] will place the button to the right of any sibling buttons.\nYou can use [method remove_button] method to remove a button created with this method from the dialog." }, { "name": "add_cancel_button", @@ -25451,7 +27981,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Adds a button with label [param name] and a cancel action to the dialog and returns the created button.\nYou can use [method remove_button] method to remove a button created with this method from the dialog." }, { "name": "remove_button", @@ -25465,7 +27996,8 @@ "name": "button", "type": "Control" } - ] + ], + "documentation": "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." }, { "name": "register_text_enter", @@ -25479,7 +28011,8 @@ "name": "line_edit", "type": "Control" } - ] + ], + "documentation": "Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted." }, { "name": "set_text", @@ -25559,10 +28092,12 @@ ], "signals": [ { - "name": "confirmed" + "name": "confirmed", + "documentation": "Emitted when the dialog is accepted, i.e. the OK button is pressed." }, { - "name": "canceled" + "name": "canceled", + "documentation": "Emitted when the dialog is closed or the button created with [method add_cancel_button] is pressed." }, { "name": "custom_action", @@ -25571,7 +28106,8 @@ "name": "action", "type": "StringName" } - ] + ], + "documentation": "Emitted when a custom button is pressed. See [method add_button]." } ], "properties": [ @@ -25579,33 +28115,39 @@ "type": "String", "name": "ok_button_text", "setter": "set_ok_button_text", - "getter": "get_ok_button_text" + "getter": "get_ok_button_text", + "documentation": "The text displayed by the OK button (see [method get_ok_button])." }, { "type": "String", "name": "dialog_text", "setter": "set_text", - "getter": "get_text" + "getter": "get_text", + "documentation": "The text displayed by the dialog." }, { "type": "bool", "name": "dialog_hide_on_ok", "setter": "set_hide_on_ok", - "getter": "get_hide_on_ok" + "getter": "get_hide_on_ok", + "documentation": "If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic.\n[b]Note:[/b] 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 [code]false[/code], 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." }, { "type": "bool", "name": "dialog_close_on_escape", "setter": "set_close_on_escape", - "getter": "get_close_on_escape" + "getter": "get_close_on_escape", + "documentation": "If [code]true[/code], the dialog will be hidden when the escape key ([constant KEY_ESCAPE]) is pressed." }, { "type": "bool", "name": "dialog_autowrap", "setter": "set_autowrap", - "getter": "has_autowrap" + "getter": "has_autowrap", + "documentation": "Sets autowrapping for the text in the dialog." } - ] + ], + "documentation": "The default use of [AcceptDialog] is to allow it to only be accepted or closed, with the same result. However, the [signal confirmed] and [signal canceled] signals allow to make the two actions different, and the [method add_button] method allows to add custom buttons and actions." }, { "name": "AnimatableBody2D", @@ -25645,9 +28187,11 @@ "type": "bool", "name": "sync_to_physics", "setter": "set_sync_to_physics", - "getter": "is_sync_to_physics_enabled" + "getter": "is_sync_to_physics_enabled", + "documentation": "If [code]true[/code], 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 [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]." } - ] + ], + "documentation": "An animatable 2D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, [AnimationMixer]s (with [member AnimationMixer.callback_mode_process] set to [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]), and [RemoteTransform2D].\nWhen [AnimatableBody2D] is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects." }, { "name": "AnimatableBody3D", @@ -25687,9 +28231,11 @@ "type": "bool", "name": "sync_to_physics", "setter": "set_sync_to_physics", - "getter": "is_sync_to_physics_enabled" + "getter": "is_sync_to_physics_enabled", + "documentation": "If [code]true[/code], 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 [b]not[/b] use together with [method PhysicsBody3D.move_and_collide]." } - ] + ], + "documentation": "An animatable 3D physics body. It can't be moved by external forces or contacts, but can be moved manually by other means such as code, [AnimationMixer]s (with [member AnimationMixer.callback_mode_process] set to [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]), and [RemoteTransform3D].\nWhen [AnimatableBody3D] is moved, its linear and angular velocity are estimated and used to affect other physics bodies in its path. This makes it useful for moving platforms, doors, and other moving objects." }, { "name": "AnimatedSprite2D", @@ -25782,7 +28328,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if an animation is currently playing (even if [member speed_scale] and/or [code]custom_speed[/code] are [code]0[/code])." }, { "name": "play", @@ -25808,7 +28355,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).\nIf 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." }, { "name": "play_backwards", @@ -25823,7 +28371,8 @@ "type": "StringName", "default_value": "&\"\"" } - ] + ], + "documentation": "Plays the animation with key [param name] in reverse.\nThis method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information." }, { "name": "pause", @@ -25831,7 +28380,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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.\nSee also [method stop]." }, { "name": "stop", @@ -25839,7 +28389,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the currently playing animation. The animation position is reset to [code]0[/code] and the [code]custom_speed[/code] is reset to [code]1.0[/code]. See also [method pause]." }, { "name": "set_centered", @@ -26013,7 +28564,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "The setter of [member frame] resets the [member frame_progress] to [code]0.0[/code] implicitly, but this method avoids that.\nThis is useful when you want to carry over the current [member frame_progress] to another [member frame].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\n# Change the animation with keeping the frame index and progress.\nvar current_frame = animated_sprite.get_frame()\nvar current_progress = animated_sprite.get_frame_progress()\nanimated_sprite.play(\"walk_another_skin\")\nanimated_sprite.set_frame_and_progress(current_frame, current_progress)\n[/gdscript]\n[/codeblocks]" }, { "name": "set_speed_scale", @@ -26052,24 +28604,30 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the actual playing speed of current animation or [code]0[/code] if not playing. This speed is the [member speed_scale] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.\nReturns a negative value if the current animation is playing backwards." } ], "signals": [ { - "name": "sprite_frames_changed" + "name": "sprite_frames_changed", + "documentation": "Emitted when [member sprite_frames] changes." }, { - "name": "animation_changed" + "name": "animation_changed", + "documentation": "Emitted when [member animation] changes." }, { - "name": "frame_changed" + "name": "frame_changed", + "documentation": "Emitted when [member frame] changes." }, { - "name": "animation_looped" + "name": "animation_looped", + "documentation": "Emitted when the animation loops." }, { - "name": "animation_finished" + "name": "animation_finished", + "documentation": "Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback." } ], "properties": [ @@ -26077,63 +28635,74 @@ "type": "SpriteFrames", "name": "sprite_frames", "setter": "set_sprite_frames", - "getter": "get_sprite_frames" + "getter": "get_sprite_frames", + "documentation": "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." }, { "type": "StringName", "name": "animation", "setter": "set_animation", - "getter": "get_animation" + "getter": "get_animation", + "documentation": "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." }, { "type": "StringName", "name": "autoplay", "setter": "set_autoplay", - "getter": "get_autoplay" + "getter": "get_autoplay", + "documentation": "The key of the animation to play when the scene loads." }, { "type": "int", "name": "frame", "setter": "set_frame", - "getter": "get_frame" + "getter": "get_frame", + "documentation": "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]." }, { "type": "float", "name": "frame_progress", "setter": "set_frame_progress", - "getter": "get_frame_progress" + "getter": "get_frame_progress", + "documentation": "The progress value between [code]0.0[/code] and [code]1.0[/code] until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from [code]1.0[/code] to [code]0.0[/code]." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "The speed scaling ratio. For example, if this value is [code]1[/code], then the animation plays at normal speed. If it's [code]0.5[/code], then it plays at half speed. If it's [code]2[/code], then it plays at double speed.\nIf set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation will not advance." }, { "type": "bool", "name": "centered", "setter": "set_centered", - "getter": "is_centered" + "getter": "is_centered", + "documentation": "If [code]true[/code], texture will be centered." }, { "type": "Vector2", "name": "offset", "setter": "set_offset", - "getter": "get_offset" + "getter": "get_offset", + "documentation": "The texture's drawing offset." }, { "type": "bool", "name": "flip_h", "setter": "set_flip_h", - "getter": "is_flipped_h" + "getter": "is_flipped_h", + "documentation": "If [code]true[/code], texture is flipped horizontally." }, { "type": "bool", "name": "flip_v", "setter": "set_flip_v", - "getter": "is_flipped_v" + "getter": "is_flipped_v", + "documentation": "If [code]true[/code], texture is flipped vertically." } - ] + ], + "documentation": "[AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel." }, { "name": "AnimatedSprite3D", @@ -26226,7 +28795,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if an animation is currently playing (even if [member speed_scale] and/or [code]custom_speed[/code] are [code]0[/code])." }, { "name": "play", @@ -26252,7 +28822,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Plays the animation with key [param name]. If [param custom_speed] is negative and [param from_end] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).\nIf 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." }, { "name": "play_backwards", @@ -26267,7 +28838,8 @@ "type": "StringName", "default_value": "&\"\"" } - ] + ], + "documentation": "Plays the animation with key [param name] in reverse.\nThis method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information." }, { "name": "pause", @@ -26275,7 +28847,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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.\nSee also [method stop]." }, { "name": "stop", @@ -26283,7 +28856,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the currently playing animation. The animation position is reset to [code]0[/code] and the [code]custom_speed[/code] is reset to [code]1.0[/code]. See also [method pause]." }, { "name": "set_frame", @@ -26357,7 +28931,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "The setter of [member frame] resets the [member frame_progress] to [code]0.0[/code] implicitly, but this method avoids that.\nThis is useful when you want to carry over the current [member frame_progress] to another [member frame].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\n# Change the animation with keeping the frame index and progress.\nvar current_frame = animated_sprite.get_frame()\nvar current_progress = animated_sprite.get_frame_progress()\nanimated_sprite.play(\"walk_another_skin\")\nanimated_sprite.set_frame_and_progress(current_frame, current_progress)\n[/gdscript]\n[/codeblocks]" }, { "name": "set_speed_scale", @@ -26396,24 +28971,30 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the actual playing speed of current animation or [code]0[/code] if not playing. This speed is the [member speed_scale] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.\nReturns a negative value if the current animation is playing backwards." } ], "signals": [ { - "name": "sprite_frames_changed" + "name": "sprite_frames_changed", + "documentation": "Emitted when [member sprite_frames] changes." }, { - "name": "animation_changed" + "name": "animation_changed", + "documentation": "Emitted when [member animation] changes." }, { - "name": "frame_changed" + "name": "frame_changed", + "documentation": "Emitted when [member frame] changes." }, { - "name": "animation_looped" + "name": "animation_looped", + "documentation": "Emitted when the animation loops." }, { - "name": "animation_finished" + "name": "animation_finished", + "documentation": "Emitted when the animation reaches the end, or the start if it is played in reverse. When the animation finishes, it pauses the playback." } ], "properties": [ @@ -26421,39 +29002,46 @@ "type": "SpriteFrames", "name": "sprite_frames", "setter": "set_sprite_frames", - "getter": "get_sprite_frames" + "getter": "get_sprite_frames", + "documentation": "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." }, { "type": "StringName", "name": "animation", "setter": "set_animation", - "getter": "get_animation" + "getter": "get_animation", + "documentation": "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." }, { "type": "StringName", "name": "autoplay", "setter": "set_autoplay", - "getter": "get_autoplay" + "getter": "get_autoplay", + "documentation": "The key of the animation to play when the scene loads." }, { "type": "int", "name": "frame", "setter": "set_frame", - "getter": "get_frame" + "getter": "get_frame", + "documentation": "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]." }, { "type": "float", "name": "frame_progress", "setter": "set_frame_progress", - "getter": "get_frame_progress" + "getter": "get_frame_progress", + "documentation": "The progress value between [code]0.0[/code] and [code]1.0[/code] until the current frame transitions to the next frame. If the animation is playing backwards, the value transitions from [code]1.0[/code] to [code]0.0[/code]." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "The speed scaling ratio. For example, if this value is [code]1[/code], then the animation plays at normal speed. If it's [code]0.5[/code], then it plays at half speed. If it's [code]2[/code], then it plays at double speed.\nIf set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation will not advance." } - ] + ], + "documentation": "[AnimatedSprite3D] is similar to the [Sprite3D] node, except it carries multiple textures as animation [member sprite_frames]. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel." }, { "name": "AnimatedTexture", @@ -26464,7 +29052,8 @@ "constants": [ { "name": "MAX_FRAMES", - "value": 256 + "value": 256, + "documentation": "The maximum number of frames supported by [AnimatedTexture]. If you need more frames in your animation, use [AnimationPlayer] or [AnimatedSprite2D]." } ], "methods": [ @@ -26616,7 +29205,8 @@ "name": "texture", "type": "Texture2D" } - ] + ], + "documentation": "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.\nYou 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." }, { "name": "get_frame_texture", @@ -26634,7 +29224,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the given frame's [Texture2D]." }, { "name": "set_frame_duration", @@ -26654,7 +29245,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the duration of any given [param frame]. The final duration is affected by the [member speed_scale]. If set to [code]0[/code], the frame is skipped during playback." }, { "name": "get_frame_duration", @@ -26673,7 +29265,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the given [param frame]'s duration, in seconds." } ], "properties": [ @@ -26681,33 +29274,39 @@ "type": "int", "name": "frames", "setter": "set_frames", - "getter": "get_frames" + "getter": "get_frames", + "documentation": "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]." }, { "type": "int", "name": "current_frame", "setter": "set_current_frame", - "getter": "get_current_frame" + "getter": "get_current_frame", + "documentation": "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." }, { "type": "bool", "name": "pause", "setter": "set_pause", - "getter": "get_pause" + "getter": "get_pause", + "documentation": "If [code]true[/code], 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 [code]false[/code]." }, { "type": "bool", "name": "one_shot", "setter": "set_one_shot", - "getter": "get_one_shot" + "getter": "get_one_shot", + "documentation": "If [code]true[/code], 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 [code]true[/code]." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse." } - ] + ], + "documentation": "[AnimatedTexture] is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike [AnimationPlayer] or [AnimatedSprite2D], it isn't a [Node], but has the advantage of being usable anywhere a [Texture2D] resource can be used, e.g. in a [TileSet].\nThe playback of the animation is controlled by the [member speed_scale] property, as well as each frame's duration (see [method set_frame_duration]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame.\n[AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one.\n[b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each frame needs to be a separate [Texture2D].\n[b]Warning:[/b] The current implementation is not efficient for the modern renderers.\n[i]Deprecated.[/i] This class is deprecated, and might be removed in a future release." }, { "name": "Animation", @@ -26722,39 +29321,48 @@ "values": [ { "name": "TYPE_VALUE", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "TYPE_POSITION_3D", - "value": 1 + "value": 1, + "documentation": "3D position track (values are stored in [Vector3]s)." }, { "name": "TYPE_ROTATION_3D", - "value": 2 + "value": 2, + "documentation": "3D rotation track (values are stored in [Quaternion]s)." }, { "name": "TYPE_SCALE_3D", - "value": 3 + "value": 3, + "documentation": "3D scale track (values are stored in [Vector3]s)." }, { "name": "TYPE_BLEND_SHAPE", - "value": 4 + "value": 4, + "documentation": "Blend shape track." }, { "name": "TYPE_METHOD", - "value": 5 + "value": 5, + "documentation": "Method tracks call functions with given arguments per key." }, { "name": "TYPE_BEZIER", - "value": 6 + "value": 6, + "documentation": "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])." }, { "name": "TYPE_AUDIO", - "value": 7 + "value": 7, + "documentation": "Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation." }, { "name": "TYPE_ANIMATION", - "value": 8 + "value": 8, + "documentation": "Animation tracks play animations in other [AnimationPlayer] nodes." } ] }, @@ -26764,23 +29372,28 @@ "values": [ { "name": "INTERPOLATION_NEAREST", - "value": 0 + "value": 0, + "documentation": "No interpolation (nearest value)." }, { "name": "INTERPOLATION_LINEAR", - "value": 1 + "value": 1, + "documentation": "Linear interpolation." }, { "name": "INTERPOLATION_CUBIC", - "value": 2 + "value": 2, + "documentation": "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." }, { "name": "INTERPOLATION_LINEAR_ANGLE", - "value": 3 + "value": 3, + "documentation": "Linear interpolation with shortest path rotation.\n[b]Note:[/b] The result value is always normalized and may not match the key value." }, { "name": "INTERPOLATION_CUBIC_ANGLE", - "value": 4 + "value": 4, + "documentation": "Cubic interpolation with shortest path rotation.\n[b]Note:[/b] The result value is always normalized and may not match the key value." } ] }, @@ -26790,15 +29403,18 @@ "values": [ { "name": "UPDATE_CONTINUOUS", - "value": 0 + "value": 0, + "documentation": "Update between keyframes and hold the value." }, { "name": "UPDATE_DISCRETE", - "value": 1 + "value": 1, + "documentation": "Update at the keyframes." }, { "name": "UPDATE_CAPTURE", - "value": 2 + "value": 2, + "documentation": "Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds." } ] }, @@ -26808,15 +29424,18 @@ "values": [ { "name": "LOOP_NONE", - "value": 0 + "value": 0, + "documentation": "At both ends of the animation, the animation will stop playing." }, { "name": "LOOP_LINEAR", - "value": 1 + "value": 1, + "documentation": "At both ends of the animation, the animation will be repeated without changing the playback direction." }, { "name": "LOOP_PINGPONG", - "value": 2 + "value": 2, + "documentation": "Repeats playback and reverse playback at both ends of the animation." } ] }, @@ -26826,15 +29445,18 @@ "values": [ { "name": "LOOPED_FLAG_NONE", - "value": 0 + "value": 0, + "documentation": "This flag indicates that the animation proceeds without any looping." }, { "name": "LOOPED_FLAG_END", - "value": 1 + "value": 1, + "documentation": "This flag indicates that the animation has reached the end of the animation and just after loop processed." }, { "name": "LOOPED_FLAG_START", - "value": 2 + "value": 2, + "documentation": "This flag indicates that the animation has reached the start of the animation and just after loop processed." } ] }, @@ -26844,15 +29466,18 @@ "values": [ { "name": "FIND_MODE_NEAREST", - "value": 0 + "value": 0, + "documentation": "Finds the nearest time key." }, { "name": "FIND_MODE_APPROX", - "value": 1 + "value": 1, + "documentation": "Finds only the key with approximating the time." }, { "name": "FIND_MODE_EXACT", - "value": 2 + "value": 2, + "documentation": "Finds only the key with matching the time." } ] } @@ -26883,7 +29508,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "Adds a track to the Animation." }, { "name": "remove_track", @@ -26898,7 +29524,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes a track by specifying the track index." }, { "name": "get_track_count", @@ -26910,7 +29537,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the amount of tracks in the animation." }, { "name": "track_get_type", @@ -26928,7 +29556,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the type of a track." }, { "name": "track_get_path", @@ -26946,7 +29575,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the path of a track. For more information on the path format, see [method track_set_path]." }, { "name": "track_set_path", @@ -26965,7 +29595,8 @@ "name": "path", "type": "NodePath" } - ] + ], + "documentation": "Sets the path of a track. 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. Tracks that control properties or bones must append their name after the path, separated by [code]\":\"[/code].\nFor example, [code]\"character/skeleton:ankle\"[/code] or [code]\"character/mesh:transform/local\"[/code]." }, { "name": "find_track", @@ -26987,7 +29618,8 @@ "name": "type", "type": "enum::Animation.TrackType" } - ] + ], + "documentation": "Returns the index of the specified track. If the track is not found, return -1." }, { "name": "track_move_up", @@ -27002,7 +29634,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Moves a track up." }, { "name": "track_move_down", @@ -27017,7 +29650,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Moves a track down." }, { "name": "track_move_to", @@ -27037,7 +29671,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Changes the index position of track [param track_idx] to the one defined in [param to_idx]." }, { "name": "track_swap", @@ -27057,7 +29692,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Swaps the track [param track_idx]'s index position with the track [param with_idx]." }, { "name": "track_set_imported", @@ -27076,7 +29712,8 @@ "name": "imported", "type": "bool" } - ] + ], + "documentation": "Sets the given track as imported or not." }, { "name": "track_is_imported", @@ -27094,7 +29731,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code]." }, { "name": "track_set_enabled", @@ -27113,7 +29751,8 @@ "name": "enabled", "type": "bool" } - ] + ], + "documentation": "Enables/disables the given track. Tracks are enabled by default." }, { "name": "track_is_enabled", @@ -27131,7 +29770,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the track at index [param track_idx] is enabled." }, { "name": "position_track_insert_key", @@ -27159,7 +29799,8 @@ "name": "position", "type": "Vector3" } - ] + ], + "documentation": "Inserts a key in a given 3D position track. Returns the key index." }, { "name": "rotation_track_insert_key", @@ -27187,7 +29828,8 @@ "name": "rotation", "type": "Quaternion" } - ] + ], + "documentation": "Inserts a key in a given 3D rotation track. Returns the key index." }, { "name": "scale_track_insert_key", @@ -27215,7 +29857,8 @@ "name": "scale", "type": "Vector3" } - ] + ], + "documentation": "Inserts a key in a given 3D scale track. Returns the key index." }, { "name": "blend_shape_track_insert_key", @@ -27244,7 +29887,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Inserts a key in a given blend shape track. Returns the key index." }, { "name": "position_track_interpolate", @@ -27267,7 +29911,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Returns the interpolated position value at the given time (in seconds). The [param track_idx] must be the index of a 3D position track." }, { "name": "rotation_track_interpolate", @@ -27290,7 +29935,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Returns the interpolated rotation value at the given time (in seconds). The [param track_idx] must be the index of a 3D rotation track." }, { "name": "scale_track_interpolate", @@ -27313,7 +29959,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Returns the interpolated scale value at the given time (in seconds). The [param track_idx] must be the index of a 3D scale track." }, { "name": "blend_shape_track_interpolate", @@ -27337,7 +29984,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "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." }, { "name": "track_insert_key", @@ -27374,7 +30022,8 @@ "meta": "float", "default_value": "1" } - ] + ], + "documentation": "Inserts a generic key in a given track. Returns the key index." }, { "name": "track_remove_key", @@ -27394,7 +30043,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes a key by index in a given track." }, { "name": "track_remove_key_at_time", @@ -27414,7 +30064,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Removes a key at [param time] in a given track." }, { "name": "track_set_key_value", @@ -27438,7 +30089,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Sets the value of an existing key." }, { "name": "track_set_key_transition", @@ -27463,7 +30115,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease])." }, { "name": "track_set_key_time", @@ -27488,7 +30141,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Sets the time of an existing key." }, { "name": "track_get_key_transition", @@ -27512,7 +30166,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease])." }, { "name": "track_get_key_count", @@ -27531,7 +30186,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the number of keys in a given track." }, { "name": "track_get_key_value", @@ -27554,7 +30210,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the value of a given key in a given track." }, { "name": "track_get_key_time", @@ -27578,7 +30235,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the time at which the key is located." }, { "name": "track_find_key", @@ -27610,7 +30268,8 @@ "type": "enum::Animation.FindMode", "default_value": "0" } - ] + ], + "documentation": "Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given." }, { "name": "track_set_interpolation_type", @@ -27629,7 +30288,8 @@ "name": "interpolation", "type": "enum::Animation.InterpolationType" } - ] + ], + "documentation": "Sets the interpolation type of a given track." }, { "name": "track_get_interpolation_type", @@ -27647,7 +30307,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the interpolation type of a given track." }, { "name": "track_set_interpolation_loop_wrap", @@ -27666,7 +30327,8 @@ "name": "interpolation", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the track at [param track_idx] wraps the interpolation loop." }, { "name": "track_get_interpolation_loop_wrap", @@ -27684,7 +30346,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the track at [param track_idx] wraps the interpolation loop. New tracks wrap the interpolation loop by default." }, { "name": "track_is_compressed", @@ -27702,7 +30365,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the track is compressed, [code]false[/code] otherwise. See also [method compress]." }, { "name": "value_track_set_update_mode", @@ -27721,7 +30385,8 @@ "name": "mode", "type": "enum::Animation.UpdateMode" } - ] + ], + "documentation": "Sets the update mode (see [enum UpdateMode]) of a value track." }, { "name": "value_track_get_update_mode", @@ -27739,7 +30404,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the update mode of a value track." }, { "name": "value_track_interpolate", @@ -27762,7 +30428,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Returns the interpolated value at the given time (in seconds). The [param track_idx] must be the index of a value track." }, { "name": "method_track_get_name", @@ -27785,7 +30452,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the method name of a method track." }, { "name": "method_track_get_params", @@ -27808,7 +30476,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the arguments values to be called on a method track for a given key in a given track." }, { "name": "bezier_track_insert_key", @@ -27850,7 +30519,8 @@ "type": "Vector2", "default_value": "Vector2(0, 0)" } - ] + ], + "documentation": "Inserts a Bezier Track key at the given [param time] in seconds. The [param track_idx] must be the index of a Bezier Track.\n[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." }, { "name": "bezier_track_set_key_value", @@ -27875,7 +30545,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "bezier_track_set_key_in_handle", @@ -27908,7 +30579,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "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." }, { "name": "bezier_track_set_key_out_handle", @@ -27941,7 +30613,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "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." }, { "name": "bezier_track_get_key_value", @@ -27965,7 +30638,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the value of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track." }, { "name": "bezier_track_get_key_in_handle", @@ -27988,7 +30662,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the in handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track." }, { "name": "bezier_track_get_key_out_handle", @@ -28011,7 +30686,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the out handle of the key identified by [param key_idx]. The [param track_idx] must be the index of a Bezier Track." }, { "name": "bezier_track_interpolate", @@ -28035,7 +30711,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Returns the interpolated value at the given [param time] (in seconds). The [param track_idx] must be the index of a Bezier Track." }, { "name": "audio_track_insert_key", @@ -28078,7 +30755,8 @@ "meta": "float", "default_value": "0" } - ] + ], + "documentation": "Inserts an Audio Track key at the given [param time] in seconds. The [param track_idx] must be the index of an Audio Track.\n[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." }, { "name": "audio_track_set_key_stream", @@ -28102,7 +30780,8 @@ "name": "stream", "type": "Resource" } - ] + ], + "documentation": "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." }, { "name": "audio_track_set_key_start_offset", @@ -28127,7 +30806,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "audio_track_set_key_end_offset", @@ -28152,7 +30832,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "audio_track_get_key_stream", @@ -28175,7 +30856,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the audio stream of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track." }, { "name": "audio_track_get_key_start_offset", @@ -28199,7 +30881,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the start offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.\nStart offset is the number of seconds cut off at the beginning of the audio stream." }, { "name": "audio_track_get_key_end_offset", @@ -28223,7 +30906,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the end offset of the key identified by [param key_idx]. The [param track_idx] must be the index of an Audio Track.\nEnd offset is the number of seconds cut off at the ending of the audio stream." }, { "name": "audio_track_set_use_blend", @@ -28242,7 +30926,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "Sets whether the track will be blended with other animations. If [code]true[/code], the audio playback volume changes depending on the blend value." }, { "name": "audio_track_is_use_blend", @@ -28260,7 +30945,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if the track at [param track_idx] will be blended with other animations." }, { "name": "animation_track_insert_key", @@ -28288,7 +30974,8 @@ "name": "animation", "type": "StringName" } - ] + ], + "documentation": "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." }, { "name": "animation_track_set_key_animation", @@ -28312,7 +30999,8 @@ "name": "animation", "type": "StringName" } - ] + ], + "documentation": "Sets the key identified by [param key_idx] to value [param animation]. The [param track_idx] must be the index of an Animation Track." }, { "name": "animation_track_get_key_animation", @@ -28335,7 +31023,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the animation name at the key identified by [param key_idx]. The [param track_idx] must be the index of an Animation Track." }, { "name": "set_length", @@ -28422,7 +31111,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clear the animation (clear all tracks and reset all)." }, { "name": "copy_track", @@ -28441,7 +31131,8 @@ "name": "to_animation", "type": "Animation" } - ] + ], + "documentation": "Adds a new track that is a copy of the given track from [param to_animation]." }, { "name": "compress", @@ -28469,7 +31160,8 @@ "meta": "float", "default_value": "4.0" } - ] + ], + "documentation": "Compress the animation and all its tracks in-place. This will make [method track_is_compressed] return [code]true[/code] 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.\n[b]Note:[/b] Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them." } ], "properties": [ @@ -28477,21 +31169,25 @@ "type": "float", "name": "length", "setter": "set_length", - "getter": "get_length" + "getter": "get_length", + "documentation": "The total length of the animation (in seconds).\n[b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping." }, { "type": "int", "name": "loop_mode", "setter": "set_loop_mode", - "getter": "get_loop_mode" + "getter": "get_loop_mode", + "documentation": "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." }, { "type": "float", "name": "step", "setter": "set_step", - "getter": "get_step" + "getter": "get_step", + "documentation": "The animation step value." } - ] + ], + "documentation": "This resource holds data that can be used to animate anything in the engine. Animations are divided into tracks and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.\n[codeblocks]\n[gdscript]\n# This creates an animation that makes the node \"Enemy\" move to the right by\n# 100 pixels in 0.5 seconds.\nvar animation = Animation.new()\nvar track_index = animation.add_track(Animation.TYPE_VALUE)\nanimation.track_set_path(track_index, \"Enemy:position:x\")\nanimation.track_insert_key(track_index, 0.0, 0)\nanimation.track_insert_key(track_index, 0.5, 100)\n[/gdscript]\n[csharp]\n// This creates an animation that makes the node \"Enemy\" move to the right by\n// 100 pixels in 0.5 seconds.\nvar animation = new Animation();\nint trackIndex = animation.AddTrack(Animation.TrackType.Value);\nanimation.TrackSetPath(trackIndex, \"Enemy:position:x\");\nanimation.TrackInsertKey(trackIndex, 0.0f, 0);\nanimation.TrackInsertKey(trackIndex, 0.5f, 100);\n[/csharp]\n[/codeblocks]\nAnimations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.\n[b]Note:[/b] 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." }, { "name": "AnimationLibrary", @@ -28519,7 +31215,8 @@ "name": "animation", "type": "Animation" } - ] + ], + "documentation": "Adds the [param animation] to the library, accessible by the key [param name]." }, { "name": "remove_animation", @@ -28533,7 +31230,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Removes the [Animation] with the key [param name]." }, { "name": "rename_animation", @@ -28551,7 +31249,8 @@ "name": "newname", "type": "StringName" } - ] + ], + "documentation": "Changes the key of the [Animation] associated with the key [param name] to [param newname]." }, { "name": "has_animation", @@ -28568,7 +31267,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if the library stores an [Animation] with [param name] as the key." }, { "name": "get_animation", @@ -28585,7 +31285,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged." }, { "name": "get_animation_list", @@ -28596,7 +31297,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::StringName" - } + }, + "documentation": "Returns the keys for the [Animation]s stored in the library." } ], "signals": [ @@ -28607,7 +31309,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Emitted when an [Animation] is added, under the key [param name]." }, { "name": "animation_removed", @@ -28616,7 +31319,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Emitted when an [Animation] stored with the key [param name] is removed." }, { "name": "animation_renamed", @@ -28629,7 +31333,8 @@ "name": "to_name", "type": "StringName" } - ] + ], + "documentation": "Emitted when the key for an [Animation] is changed, from [param name] to [param to_name]." }, { "name": "animation_changed", @@ -28638,9 +31343,11 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "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.\nSee also [signal Resource.changed], which this acts as a relay for." } - ] + ], + "documentation": "An animation library stores a set of animations accessible through [StringName] keys, for use with [AnimationPlayer] nodes." }, { "name": "AnimationMixer", @@ -28655,15 +31362,18 @@ "values": [ { "name": "ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS", - "value": 0 + "value": 0, + "documentation": "Process animation during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS]). This is especially useful when animating physics bodies." }, { "name": "ANIMATION_CALLBACK_MODE_PROCESS_IDLE", - "value": 1 + "value": 1, + "documentation": "Process animation during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS])." }, { "name": "ANIMATION_CALLBACK_MODE_PROCESS_MANUAL", - "value": 2 + "value": 2, + "documentation": "Do not process animation. Use [method advance] to process the animation manually." } ] }, @@ -28673,11 +31383,13 @@ "values": [ { "name": "ANIMATION_CALLBACK_MODE_METHOD_DEFERRED", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE", - "value": 1 + "value": 1, + "documentation": "Make method calls immediately when reached in the animation." } ] } @@ -28715,7 +31427,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "A virtual function for processing after key getting during playback." }, { "name": "add_animation_library", @@ -28736,7 +31449,8 @@ "name": "library", "type": "AnimationLibrary" } - ] + ], + "documentation": "Adds [param library] to the animation player, under the key [param name]." }, { "name": "remove_animation_library", @@ -28750,7 +31464,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Removes the [AnimationLibrary] associated with the key [param name]." }, { "name": "rename_animation_library", @@ -28768,7 +31483,8 @@ "name": "newname", "type": "StringName" } - ] + ], + "documentation": "Moves the [AnimationLibrary] associated with the key [param name] to the key [param newname]." }, { "name": "has_animation_library", @@ -28785,7 +31501,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if the [AnimationPlayer] stores an [AnimationLibrary] with key [param name]." }, { "name": "get_animation_library", @@ -28802,7 +31519,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the first [AnimationLibrary] with key [param name] or [code]null[/code] if not found.\nTo get the [AnimationPlayer]'s global animation library, use [code]get_animation_library(\"\")[/code]." }, { "name": "get_animation_library_list", @@ -28813,7 +31531,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::StringName" - } + }, + "documentation": "Returns the list of stored library keys." }, { "name": "has_animation", @@ -28830,7 +31549,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [param name]." }, { "name": "get_animation", @@ -28847,7 +31567,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged." }, { "name": "get_animation_list", @@ -28858,7 +31579,8 @@ "hash": 1139954409, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns the list of stored animation keys." }, { "name": "set_active", @@ -29046,7 +31768,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Retrieve the motion delta of position with the [member root_motion_track] as a [Vector3] that can be used elsewhere.\nIf [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_POSITION_3D], returns [code]Vector3(0, 0, 0)[/code].\nSee also [member root_motion_track] and [RootMotionView].\nThe most basic example is applying position to [CharacterBody3D]:\n[codeblocks]\n[gdscript]\nvar current_rotation: Quaternion\n\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n current_rotation = get_quaternion()\n state_machine.travel(\"Animate\")\n var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta\n set_velocity(velocity)\n move_and_slide()\n[/gdscript]\n[/codeblocks]\nBy using this in combination with [method get_root_motion_position_accumulator], you can apply the root motion position more correctly to account for the rotation of the node.\n[codeblocks]\n[gdscript]\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n state_machine.travel(\"Animate\")\n set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())\n var velocity: Vector3 = (animation_tree.get_root_motion_rotation_accumulator().inverse() * get_quaternion()) * animation_tree.get_root_motion_position() / delta\n set_velocity(velocity)\n move_and_slide()\n[/gdscript]\n[/codeblocks]" }, { "name": "get_root_motion_rotation", @@ -29057,7 +31780,8 @@ "hash": 1222331677, "return_value": { "type": "Quaternion" - } + }, + "documentation": "Retrieve the motion delta of rotation with the [member root_motion_track] as a [Quaternion] that can be used elsewhere.\nIf [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_ROTATION_3D], returns [code]Quaternion(0, 0, 0, 1)[/code].\nSee also [member root_motion_track] and [RootMotionView].\nThe most basic example is applying rotation to [CharacterBody3D]:\n[codeblocks]\n[gdscript]\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n state_machine.travel(\"Animate\")\n set_quaternion(get_quaternion() * animation_tree.get_root_motion_rotation())\n[/gdscript]\n[/codeblocks]" }, { "name": "get_root_motion_scale", @@ -29068,7 +31792,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Retrieve the motion delta of scale with the [member root_motion_track] as a [Vector3] that can be used elsewhere.\nIf [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_SCALE_3D], returns [code]Vector3(0, 0, 0)[/code].\nSee also [member root_motion_track] and [RootMotionView].\nThe most basic example is applying scale to [CharacterBody3D]:\n[codeblocks]\n[gdscript]\nvar current_scale: Vector3 = Vector3(1, 1, 1)\nvar scale_accum: Vector3 = Vector3(1, 1, 1)\n\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n current_scale = get_scale()\n scale_accum = Vector3(1, 1, 1)\n state_machine.travel(\"Animate\")\n scale_accum += animation_tree.get_root_motion_scale()\n set_scale(current_scale * scale_accum)\n[/gdscript]\n[/codeblocks]" }, { "name": "get_root_motion_position_accumulator", @@ -29079,7 +31804,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Retrieve the blended value of the position tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere.\nThis is useful in cases where you want to respect the initial key values of the animation.\nFor example, if an animation with only one key [code]Vector3(0, 0, 0)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(1, 0, 1)[/code] is played in the next frame, the difference can be calculated as follows:\n[codeblocks]\n[gdscript]\nvar prev_root_motion_position_accumulator: Vector3\n\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n state_machine.travel(\"Animate\")\n var current_root_motion_position_accumulator: Vector3 = animation_tree.get_root_motion_position_accumulator()\n var difference: Vector3 = current_root_motion_position_accumulator - prev_root_motion_position_accumulator\n prev_root_motion_position_accumulator = current_root_motion_position_accumulator\n transform.origin += difference\n[/gdscript]\n[/codeblocks]\nHowever, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases." }, { "name": "get_root_motion_rotation_accumulator", @@ -29090,7 +31816,8 @@ "hash": 1222331677, "return_value": { "type": "Quaternion" - } + }, + "documentation": "Retrieve the blended value of the rotation tracks with the [member root_motion_track] as a [Quaternion] that can be used elsewhere.\nThis is necessary to apply the root motion position correctly, taking rotation into account. See also [method get_root_motion_position].\nAlso, this is useful in cases where you want to respect the initial key values of the animation.\nFor example, if an animation with only one key [code]Quaternion(0, 0, 0, 1)[/code] is played in the previous frame and then an animation with only one key [code]Quaternion(0, 0.707, 0, 0.707)[/code] is played in the next frame, the difference can be calculated as follows:\n[codeblocks]\n[gdscript]\nvar prev_root_motion_rotation_accumulator: Quaternion\n\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n state_machine.travel(\"Animate\")\n var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator()\n var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator\n prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator\n transform.basis *= difference\n[/gdscript]\n[/codeblocks]\nHowever, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases." }, { "name": "get_root_motion_scale_accumulator", @@ -29101,7 +31828,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Retrieve the blended value of the scale tracks with the [member root_motion_track] as a [Vector3] that can be used elsewhere.\nFor example, if an animation with only one key [code]Vector3(1, 1, 1)[/code] is played in the previous frame and then an animation with only one key [code]Vector3(2, 2, 2)[/code] is played in the next frame, the difference can be calculated as follows:\n[codeblocks]\n[gdscript]\nvar prev_root_motion_scale_accumulator: Vector3\n\nfunc _process(delta):\n if Input.is_action_just_pressed(\"animate\"):\n state_machine.travel(\"Animate\")\n var current_root_motion_scale_accumulator: Vector3 = animation_tree.get_root_motion_scale_accumulator()\n var difference: Vector3 = current_root_motion_scale_accumulator - prev_root_motion_scale_accumulator\n prev_root_motion_scale_accumulator = current_root_motion_scale_accumulator\n transform.basis = transform.basis.scaled(difference)\n[/gdscript]\n[/codeblocks]\nHowever, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases." }, { "name": "clear_caches", @@ -29109,7 +31837,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "[AnimationMixer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again." }, { "name": "advance", @@ -29124,7 +31853,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Manually advance the animations by the specified time (in seconds)." }, { "name": "set_reset_on_save_enabled", @@ -29166,7 +31896,8 @@ "name": "animation", "type": "Animation" } - ] + ], + "documentation": "Returns the key of [param animation] or an empty [StringName] if not found." }, { "name": "find_animation_library", @@ -29183,18 +31914,22 @@ "name": "animation", "type": "Animation" } - ] + ], + "documentation": "Returns the key for the [AnimationLibrary] that contains [param animation] or an empty [StringName] if not found." } ], "signals": [ { - "name": "mixer_updated" + "name": "mixer_updated", + "documentation": "Editor only. Notifies when the property have been updated to update dummy [AnimationPlayer] in animation player editor." }, { - "name": "animation_list_changed" + "name": "animation_list_changed", + "documentation": "Notifies when an animation list is changed." }, { - "name": "animation_libraries_updated" + "name": "animation_libraries_updated", + "documentation": "Notifies when the animation libraries have changed." }, { "name": "animation_finished", @@ -29203,7 +31938,8 @@ "name": "anim_name", "type": "StringName" } - ] + ], + "documentation": "Notifies when an animation finished playing.\n[b]Note:[/b] This signal is not emitted if an animation is looping." }, { "name": "animation_started", @@ -29212,10 +31948,12 @@ "name": "anim_name", "type": "StringName" } - ] + ], + "documentation": "Notifies when an animation starts playing." }, { - "name": "caches_cleared" + "name": "caches_cleared", + "documentation": "Notifies when the caches have been cleared, either automatically, or manually via [method clear_caches]." } ], "properties": [ @@ -29223,51 +31961,60 @@ "type": "bool", "name": "active", "setter": "set_active", - "getter": "is_active" + "getter": "is_active", + "documentation": "If [code]true[/code], the [AnimationMixer] will be processing." }, { "type": "bool", "name": "deterministic", "setter": "set_deterministic", - "getter": "is_deterministic" + "getter": "is_deterministic", + "documentation": "If [code]true[/code], the blending uses the deterministic algorithm. The total weight is not normalized and the result is accumulated with an initial value ([code]0[/code] or a [code]\"RESET\"[/code] animation if present).\nThis means that if the total amount of blending is [code]0.0[/code], the result is equal to the [code]\"RESET\"[/code] animation.\nIf 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.\nIf [code]false[/code], The blend does not use the deterministic algorithm. The total weight is normalized and always [code]1.0[/code]. If the number of tracks between the blended animations is different, nothing is done about the animation that is missing a track.\n[b]Note:[/b] In [AnimationTree], the blending with [AnimationNodeAdd2], [AnimationNodeAdd3], [AnimationNodeSub2] or the weight greater than [code]1.0[/code] may produce unexpected results.\nFor example, if [AnimationNodeAdd2] blends two nodes with the amount [code]1.0[/code], then total weight is [code]2.0[/code] but it will be normalized to make the total amount [code]1.0[/code] and the result will be equal to [AnimationNodeBlend2] with the amount [code]0.5[/code]." }, { "type": "bool", "name": "reset_on_save", "setter": "set_reset_on_save_enabled", - "getter": "is_reset_on_save_enabled" + "getter": "is_reset_on_save_enabled", + "documentation": "This is used by the editor. If set to [code]true[/code], the scene will be saved with the effects of the reset animation (the animation with the key [code]\"RESET\"[/code]) applied as if it had been seeked to time 0, with the editor keeping the values that the scene had before saving.\nThis 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." }, { "type": "NodePath", "name": "root_node", "setter": "set_root_node", - "getter": "get_root_node" + "getter": "get_root_node", + "documentation": "The node from which node path references will travel." }, { "type": "NodePath", "name": "root_motion_track", "setter": "set_root_motion_track", - "getter": "get_root_motion_track" + "getter": "get_root_motion_track", + "documentation": "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. To specify a track that controls properties or bones, append its name after the path, separated by [code]\":\"[/code]. For example, [code]\"character/skeleton:ankle\"[/code] or [code]\"character/mesh:transform/local\"[/code].\nIf 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]." }, { "type": "int", "name": "audio_max_polyphony", "setter": "set_audio_max_polyphony", - "getter": "get_audio_max_polyphony" + "getter": "get_audio_max_polyphony", + "documentation": "The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers.\nFor example, if this value is [code]32[/code] and the animation has two audio tracks, the two [AudioStreamPlayer]s assigned can play simultaneously up to [code]32[/code] voices each." }, { "type": "int", "name": "callback_mode_process", "setter": "set_callback_mode_process", - "getter": "get_callback_mode_process" + "getter": "get_callback_mode_process", + "documentation": "The process notification in which to update animations." }, { "type": "int", "name": "callback_mode_method", "setter": "set_callback_mode_method", - "getter": "get_callback_mode_method" + "getter": "get_callback_mode_method", + "documentation": "The call mode to use for Call Method tracks." } - ] + ], + "documentation": "Base class for [AnimationPlayer] and [AnimationTree] to manage animation lists. It also has general properties and methods for playback and blending.\nAfter instantiating the playback information data within the extended class, the blending is processed by the [AnimationMixer]." }, { "name": "AnimationNode", @@ -29282,19 +32029,23 @@ "values": [ { "name": "FILTER_IGNORE", - "value": 0 + "value": 0, + "documentation": "Do not use filtering." }, { "name": "FILTER_PASS", - "value": 1 + "value": 1, + "documentation": "Paths matching the filter will be allowed to pass." }, { "name": "FILTER_STOP", - "value": 2 + "value": 2, + "documentation": "Paths matching the filter will be discarded." }, { "name": "FILTER_BLEND", - "value": 3 + "value": 3, + "documentation": "Paths matching the filter will be blended (by the blend value)." } ] } @@ -29308,7 +32059,8 @@ "is_virtual": true, "return_value": { "type": "Dictionary" - } + }, + "documentation": "When inheriting from [AnimationRootNode], implement this virtual method to return all children animation nodes in order as a [code]name: node[/code] dictionary." }, { "name": "_get_parameter_list", @@ -29318,7 +32070,8 @@ "is_virtual": true, "return_value": { "type": "Array" - } + }, + "documentation": "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]." }, { "name": "_get_child_by_name", @@ -29334,7 +32087,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "When inheriting from [AnimationRootNode], implement this virtual method to return a child animation node by its [param name]." }, { "name": "_get_parameter_default_value", @@ -29350,7 +32104,8 @@ "name": "parameter", "type": "StringName" } - ] + ], + "documentation": "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." }, { "name": "_is_parameter_read_only", @@ -29366,7 +32121,8 @@ "name": "parameter", "type": "StringName" } - ] + ], + "documentation": "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." }, { "name": "_process", @@ -29396,7 +32152,8 @@ "name": "test_only", "type": "bool" } - ] + ], + "documentation": "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 [code]true[/code], in which case it is absolute.\nHere, 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.\nThis function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called)." }, { "name": "_get_caption", @@ -29406,7 +32163,8 @@ "is_virtual": true, "return_value": { "type": "String" - } + }, + "documentation": "When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this animation node." }, { "name": "_has_filter", @@ -29416,7 +32174,8 @@ "is_virtual": true, "return_value": { "type": "bool" - } + }, + "documentation": "When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this animation node." }, { "name": "add_input", @@ -29433,7 +32192,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "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 [code]false[/code]." }, { "name": "remove_input", @@ -29448,7 +32208,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes an input, call this only when inactive." }, { "name": "set_input_name", @@ -29470,7 +32231,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Sets the name of the input at the given [param input] index. If the setting fails, returns [code]false[/code]." }, { "name": "get_input_name", @@ -29488,7 +32250,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the name of an input by index." }, { "name": "get_input_count", @@ -29500,7 +32263,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Amount of inputs in this animation node, only useful for animation nodes that go into [AnimationNodeBlendTree]." }, { "name": "find_input", @@ -29518,7 +32282,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Returns the input index which corresponds to [param name]. If not found, returns [code]-1[/code]." }, { "name": "set_filter_path", @@ -29536,7 +32301,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "Adds or removes a path for the filter." }, { "name": "is_path_filtered", @@ -29553,7 +32319,8 @@ "name": "path", "type": "NodePath" } - ] + ], + "documentation": "Returns whether the given path is filtered." }, { "name": "set_filter_enabled", @@ -29623,7 +32390,8 @@ "type": "enum::Animation.LoopedFlag", "default_value": "0" } - ] + ], + "documentation": "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.\nA [param looped_flag] is used by internal processing immediately after the loop. See also [enum Animation.LoopedFlag]." }, { "name": "blend_node", @@ -29681,7 +32449,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your animation node for addition." }, { "name": "blend_input", @@ -29736,7 +32505,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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 [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options)." }, { "name": "set_parameter", @@ -29754,7 +32524,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes." }, { "name": "get_parameter", @@ -29771,12 +32542,14 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "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." } ], "signals": [ { - "name": "tree_changed" + "name": "tree_changed", + "documentation": "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]." }, { "name": "animation_node_renamed", @@ -29793,7 +32566,8 @@ "name": "new_name", "type": "String" } - ] + ], + "documentation": "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]." }, { "name": "animation_node_removed", @@ -29806,7 +32580,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "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]." } ], "properties": [ @@ -29814,7 +32589,8 @@ "type": "bool", "name": "filter_enabled", "setter": "set_filter_enabled", - "getter": "is_filter_enabled" + "getter": "is_filter_enabled", + "documentation": "If [code]true[/code], filtering is enabled." }, { "type": "Array", @@ -29822,21 +32598,24 @@ "setter": "_set_filters", "getter": "_get_filters" } - ] + ], + "documentation": "Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.\nInherit this when creating animation nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead." }, { "name": "AnimationNodeAdd2", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNodeSync", - "api_type": "core" + "api_type": "core", + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on the amount value.\nIf the amount is greater than [code]1.0[/code], the animation connected to \"in\" port is blended with the amplified animation connected to \"add\" port.\nIf the amount is less than [code]0.0[/code], the animation connected to \"in\" port is blended with the inverted animation connected to \"add\" port." }, { "name": "AnimationNodeAdd3", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNodeSync", - "api_type": "core" + "api_type": "core", + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three additively out of three based on the amount value.\nThis animation node has three inputs:\n- The base animation to add to\n- A \"-add\" animation to blend with when the blend amount is negative\n- A \"+add\" animation to blend with when the blend amount is positive\nIf the absolute value of the amount is greater than [code]1.0[/code], the animation connected to \"in\" port is blended with the amplified animation connected to \"-add\"/\"+add\" port." }, { "name": "AnimationNodeAnimation", @@ -29851,11 +32630,13 @@ "values": [ { "name": "PLAY_MODE_FORWARD", - "value": 0 + "value": 0, + "documentation": "Plays animation in forward direction." }, { "name": "PLAY_MODE_BACKWARD", - "value": 1 + "value": 1, + "documentation": "Plays animation in backward direction." } ] } @@ -29917,29 +32698,34 @@ "type": "StringName", "name": "animation", "setter": "set_animation", - "getter": "get_animation" + "getter": "get_animation", + "documentation": "Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]." }, { "type": "int", "name": "play_mode", "setter": "set_play_mode", - "getter": "get_play_mode" + "getter": "get_play_mode", + "documentation": "Determines the playback direction of the animation." } - ] + ], + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Only has one output port using the [member animation] property. Used as an input for [AnimationNode]s that blend animations together." }, { "name": "AnimationNodeBlend2", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNodeSync", - "api_type": "core" + "api_type": "core", + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on the amount value.\nIn general, the blend value should be in the [code][0.0, 1.0][/code] range. Values outside of this range can blend amplified or inverted animations, however, [AnimationNodeAdd2] works better for this purpose." }, { "name": "AnimationNodeBlend3", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNodeSync", - "api_type": "core" + "api_type": "core", + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three linearly out of three based on the amount value.\nThis animation node has three inputs:\n- The base animation to blend with\n- A \"-blend\" animation to blend with when the blend amount is negative value\n- A \"+blend\" animation to blend with when the blend amount is positive value\nIn general, the blend value should be in the [code][-1.0, 1.0][/code] range. Values outside of this range can blend amplified animations, however, [AnimationNodeAdd3] works better for this purpose." }, { "name": "AnimationNodeBlendSpace1D", @@ -29954,15 +32740,18 @@ "values": [ { "name": "BLEND_MODE_INTERPOLATED", - "value": 0 + "value": 0, + "documentation": "The interpolation between animations is linear." }, { "name": "BLEND_MODE_DISCRETE", - "value": 1 + "value": 1, + "documentation": "The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations." }, { "name": "BLEND_MODE_DISCRETE_CARRY", - "value": 2 + "value": 2, + "documentation": "Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position." } ] } @@ -29994,7 +32783,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "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." }, { "name": "set_blend_point_position", @@ -30014,7 +32804,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Updates the position of the point at index [param point] on the blend axis." }, { "name": "get_blend_point_position", @@ -30033,7 +32824,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the position of the point at index [param point]." }, { "name": "set_blend_point_node", @@ -30052,7 +32844,8 @@ "name": "node", "type": "AnimationRootNode" } - ] + ], + "documentation": "Changes the [AnimationNode] referenced by the point at index [param point]." }, { "name": "get_blend_point_node", @@ -30070,7 +32863,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [AnimationNode] referenced by the point at index [param point]." }, { "name": "remove_blend_point", @@ -30085,7 +32879,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes the point at index [param point] from the blend axis." }, { "name": "get_blend_point_count", @@ -30097,7 +32892,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of points on the blend axis." }, { "name": "set_min_space", @@ -30261,39 +33057,46 @@ "type": "float", "name": "min_space", "setter": "set_min_space", - "getter": "get_min_space" + "getter": "get_min_space", + "documentation": "The blend space's axis's lower limit for the points' position. See [method add_blend_point]." }, { "type": "float", "name": "max_space", "setter": "set_max_space", - "getter": "get_max_space" + "getter": "get_max_space", + "documentation": "The blend space's axis's upper limit for the points' position. See [method add_blend_point]." }, { "type": "float", "name": "snap", "setter": "set_snap", - "getter": "get_snap" + "getter": "get_snap", + "documentation": "Position increment to snap to when moving a point on the axis." }, { "type": "String", "name": "value_label", "setter": "set_value_label", - "getter": "get_value_label" + "getter": "get_value_label", + "documentation": "Label of the virtual axis of the blend space." }, { "type": "int", "name": "blend_mode", "setter": "set_blend_mode", - "getter": "get_blend_mode" + "getter": "get_blend_mode", + "documentation": "Controls the interpolation between animations. See [enum BlendMode] constants." }, { "type": "bool", "name": "sync", "setter": "set_use_sync", - "getter": "is_using_sync" + "getter": "is_using_sync", + "documentation": "If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].\nIf [code]true[/code], forcing the blended animations to advance frame." } - ] + ], + "documentation": "A resource used by [AnimationNodeBlendTree].\n[AnimationNodeBlendSpace1D] represents a virtual axis on which any type of [AnimationRootNode]s can be added using [method add_blend_point]. Outputs the linear blend of the two [AnimationRootNode]s adjacent to the current value.\nYou can set the extents of the axis with [member min_space] and [member max_space]." }, { "name": "AnimationNodeBlendSpace2D", @@ -30308,15 +33111,18 @@ "values": [ { "name": "BLEND_MODE_INTERPOLATED", - "value": 0 + "value": 0, + "documentation": "The interpolation between animations is linear." }, { "name": "BLEND_MODE_DISCRETE", - "value": 1 + "value": 1, + "documentation": "The blend space plays the animation of the animation node which blending position is closest to. Useful for frame-by-frame 2D animations." }, { "name": "BLEND_MODE_DISCRETE_CARRY", - "value": 2 + "value": 2, + "documentation": "Similar to [constant BLEND_MODE_DISCRETE], but starts the new animation at the last animation's playback position." } ] } @@ -30347,7 +33153,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "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." }, { "name": "set_blend_point_position", @@ -30366,7 +33173,8 @@ "name": "pos", "type": "Vector2" } - ] + ], + "documentation": "Updates the position of the point at index [param point] on the blend axis." }, { "name": "get_blend_point_position", @@ -30384,7 +33192,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the position of the point at index [param point]." }, { "name": "set_blend_point_node", @@ -30403,7 +33212,8 @@ "name": "node", "type": "AnimationRootNode" } - ] + ], + "documentation": "Changes the [AnimationNode] referenced by the point at index [param point]." }, { "name": "get_blend_point_node", @@ -30421,7 +33231,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [AnimationRootNode] referenced by the point at index [param point]." }, { "name": "remove_blend_point", @@ -30436,7 +33247,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes the point at index [param point] from the blend space." }, { "name": "get_blend_point_count", @@ -30448,7 +33260,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of points in the blend space." }, { "name": "add_triangle", @@ -30482,7 +33295,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "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." }, { "name": "get_triangle_point", @@ -30506,7 +33320,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the position of the point at index [param point] in the triangle of index [param triangle]." }, { "name": "remove_triangle", @@ -30521,7 +33336,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes the triangle at index [param triangle] from the blend space." }, { "name": "get_triangle_count", @@ -30533,7 +33349,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of triangles in the blend space." }, { "name": "set_min_space", @@ -30738,7 +33555,8 @@ ], "signals": [ { - "name": "triangles_updated" + "name": "triangles_updated", + "documentation": "Emitted every time the blend space's triangles are created, removed, or when one of their vertices changes position." } ], "properties": [ @@ -30746,7 +33564,8 @@ "type": "bool", "name": "auto_triangles", "setter": "set_auto_triangles", - "getter": "get_auto_triangles" + "getter": "get_auto_triangles", + "documentation": "If [code]true[/code], 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]." }, { "type": "PackedInt32Array", @@ -30758,45 +33577,53 @@ "type": "Vector2", "name": "min_space", "setter": "set_min_space", - "getter": "get_min_space" + "getter": "get_min_space", + "documentation": "The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]." }, { "type": "Vector2", "name": "max_space", "setter": "set_max_space", - "getter": "get_max_space" + "getter": "get_max_space", + "documentation": "The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]." }, { "type": "Vector2", "name": "snap", "setter": "set_snap", - "getter": "get_snap" + "getter": "get_snap", + "documentation": "Position increment to snap to when moving a point." }, { "type": "String", "name": "x_label", "setter": "set_x_label", - "getter": "get_x_label" + "getter": "get_x_label", + "documentation": "Name of the blend space's X axis." }, { "type": "String", "name": "y_label", "setter": "set_y_label", - "getter": "get_y_label" + "getter": "get_y_label", + "documentation": "Name of the blend space's Y axis." }, { "type": "int", "name": "blend_mode", "setter": "set_blend_mode", - "getter": "get_blend_mode" + "getter": "get_blend_mode", + "documentation": "Controls the interpolation between animations. See [enum BlendMode] constants." }, { "type": "bool", "name": "sync", "setter": "set_use_sync", - "getter": "is_using_sync" + "getter": "is_using_sync", + "documentation": "If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].\nIf [code]true[/code], forcing the blended animations to advance frame." } - ] + ], + "documentation": "A resource used by [AnimationNodeBlendTree].\n[AnimationNodeBlendSpace1D] represents a virtual 2D space on which [AnimationRootNode]s are placed. Outputs the linear blend of the three adjacent animations using a [Vector2] weight. Adjacent in this context means the three [AnimationRootNode]s making up the triangle that contains the current value.\nYou can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to triangulate the blend space by hand." }, { "name": "AnimationNodeBlendTree", @@ -30807,27 +33634,33 @@ "constants": [ { "name": "CONNECTION_OK", - "value": 0 + "value": 0, + "documentation": "The connection was successful." }, { "name": "CONNECTION_ERROR_NO_INPUT", - "value": 1 + "value": 1, + "documentation": "The input node is [code]null[/code]." }, { "name": "CONNECTION_ERROR_NO_INPUT_INDEX", - "value": 2 + "value": 2, + "documentation": "The specified input port is out of range." }, { "name": "CONNECTION_ERROR_NO_OUTPUT", - "value": 3 + "value": 3, + "documentation": "The output node is [code]null[/code]." }, { "name": "CONNECTION_ERROR_SAME_NODE", - "value": 4 + "value": 4, + "documentation": "Input and output nodes are the same." }, { "name": "CONNECTION_ERROR_CONNECTION_EXISTS", - "value": 5 + "value": 5, + "documentation": "The specified connection already exists." } ], "methods": [ @@ -30855,7 +33688,8 @@ "type": "Vector2", "default_value": "Vector2(0, 0)" } - ] + ], + "documentation": "Adds an [AnimationNode] at the given [param position]. The [param name] is used to identify the created sub animation node later." }, { "name": "get_node", @@ -30872,7 +33706,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the sub animation node with the specified [param name]." }, { "name": "remove_node", @@ -30886,7 +33721,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Removes a sub animation node." }, { "name": "rename_node", @@ -30904,7 +33740,8 @@ "name": "new_name", "type": "StringName" } - ] + ], + "documentation": "Changes the name of a sub animation node." }, { "name": "has_node", @@ -30921,7 +33758,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if a sub animation node with specified [param name] exists." }, { "name": "connect_node", @@ -30944,7 +33782,8 @@ "name": "output_node", "type": "StringName" } - ] + ], + "documentation": "Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [param input_index]." }, { "name": "disconnect_node", @@ -30963,7 +33802,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Disconnects the animation node connected to the specified input." }, { "name": "set_node_position", @@ -30981,7 +33821,8 @@ "name": "position", "type": "Vector2" } - ] + ], + "documentation": "Modifies the position of a sub animation node." }, { "name": "get_node_position", @@ -30998,7 +33839,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the position of the sub animation node with the specified [param name]." }, { "name": "set_graph_offset", @@ -31034,7 +33876,8 @@ "name": "node_name", "type": "StringName" } - ] + ], + "documentation": "Emitted when the input port information is changed." } ], "properties": [ @@ -31042,9 +33885,11 @@ "type": "Vector2", "name": "graph_offset", "setter": "set_graph_offset", - "getter": "get_graph_offset" + "getter": "get_graph_offset", + "documentation": "The global offset of all sub animation nodes." } - ] + ], + "documentation": "This animation node may contain a sub-tree of any other type animation nodes, such as [AnimationNodeTransition], [AnimationNodeBlend2], [AnimationNodeBlend3], [AnimationNodeOneShot], etc. This is one of the most commonly used animation node roots.\nAn [AnimationNodeOutput] node named [code]output[/code] is created by default." }, { "name": "AnimationNodeOneShot", @@ -31059,19 +33904,23 @@ "values": [ { "name": "ONE_SHOT_REQUEST_NONE", - "value": 0 + "value": 0, + "documentation": "The default state of the request. Nothing is done." }, { "name": "ONE_SHOT_REQUEST_FIRE", - "value": 1 + "value": 1, + "documentation": "The request to play the animation connected to \"shot\" port." }, { "name": "ONE_SHOT_REQUEST_ABORT", - "value": 2 + "value": 2, + "documentation": "The request to stop the animation connected to \"shot\" port." }, { "name": "ONE_SHOT_REQUEST_FADE_OUT", - "value": 3 + "value": 3, + "documentation": "The request to fade out the animation connected to \"shot\" port." } ] }, @@ -31081,11 +33930,13 @@ "values": [ { "name": "MIX_MODE_BLEND", - "value": 0 + "value": 0, + "documentation": "Blends two animations. See also [AnimationNodeBlend2]." }, { "name": "MIX_MODE_ADD", - "value": 1 + "value": 1, + "documentation": "Blends two animations additively. See also [AnimationNodeAdd2]." } ] } @@ -31305,58 +34156,68 @@ "type": "int", "name": "mix_mode", "setter": "set_mix_mode", - "getter": "get_mix_mode" + "getter": "get_mix_mode", + "documentation": "The blend type." }, { "type": "float", "name": "fadein_time", "setter": "set_fadein_time", - "getter": "get_fadein_time" + "getter": "get_fadein_time", + "documentation": "The fade-in duration. For example, setting this to [code]1.0[/code] for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation." }, { "type": "Curve", "name": "fadein_curve", "setter": "set_fadein_curve", - "getter": "get_fadein_curve" + "getter": "get_fadein_curve", + "documentation": "Determines how cross-fading between animations is eased. If empty, the transition will be linear." }, { "type": "float", "name": "fadeout_time", "setter": "set_fadeout_time", - "getter": "get_fadeout_time" + "getter": "get_fadeout_time", + "documentation": "The fade-out duration. For example, setting this to [code]1.0[/code] for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation." }, { "type": "Curve", "name": "fadeout_curve", "setter": "set_fadeout_curve", - "getter": "get_fadeout_curve" + "getter": "get_fadeout_curve", + "documentation": "Determines how cross-fading between animations is eased. If empty, the transition will be linear." }, { "type": "bool", "name": "autorestart", "setter": "set_autorestart", - "getter": "has_autorestart" + "getter": "has_autorestart", + "documentation": "If [code]true[/code], the sub-animation will restart automatically after finishing.\nIn 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." }, { "type": "float", "name": "autorestart_delay", "setter": "set_autorestart_delay", - "getter": "get_autorestart_delay" + "getter": "get_autorestart_delay", + "documentation": "The delay after which the automatic restart is triggered, in seconds." }, { "type": "float", "name": "autorestart_random_delay", "setter": "set_autorestart_random_delay", - "getter": "get_autorestart_random_delay" + "getter": "get_autorestart_random_delay", + "documentation": "If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay]." } - ] + ], + "documentation": "A resource to add to an [AnimationNodeBlendTree]. This animation node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.\nAfter setting the request and changing the animation playback, the one-shot node automatically clears the request on the next process frame by setting its [code]request[/code] value to [constant ONE_SHOT_REQUEST_NONE].\n[codeblocks]\n[gdscript]\n# Play child animation connected to \"shot\" port.\nanimation_tree.set(\"parameters/OneShot/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/OneShot/request\"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE\n\n# Abort child animation connected to \"shot\" port.\nanimation_tree.set(\"parameters/OneShot/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/OneShot/request\"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT\n\n# Abort child animation with fading out connected to \"shot\" port.\nanimation_tree.set(\"parameters/OneShot/request\", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT)\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/OneShot/request\"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT\n\n# Get current state (read-only).\nanimation_tree.get(\"parameters/OneShot/active\")\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/OneShot/active\"]\n\n# Get current internal state (read-only).\nanimation_tree.get(\"parameters/OneShot/internal_active\")\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/OneShot/internal_active\"]\n[/gdscript]\n[csharp]\n// Play child animation connected to \"shot\" port.\nanimationTree.Set(\"parameters/OneShot/request\", (int)AnimationNodeOneShot.OneShotRequest.Fire);\n\n// Abort child animation connected to \"shot\" port.\nanimationTree.Set(\"parameters/OneShot/request\", (int)AnimationNodeOneShot.OneShotRequest.Abort);\n\n// Abort child animation with fading out connected to \"shot\" port.\nanimationTree.Set(\"parameters/OneShot/request\", (int)AnimationNodeOneShot.OneShotRequest.FadeOut);\n\n// Get current state (read-only).\nanimationTree.Get(\"parameters/OneShot/active\");\n\n// Get current internal state (read-only).\nanimationTree.Get(\"parameters/OneShot/internal_active\");\n[/csharp]\n[/codeblocks]" }, { "name": "AnimationNodeOutput", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNode", - "api_type": "core" + "api_type": "core", + "documentation": "A node created automatically in an [AnimationNodeBlendTree] that outputs the final animation." }, { "name": "AnimationNodeStateMachine", @@ -31371,15 +34232,18 @@ "values": [ { "name": "STATE_MACHINE_TYPE_ROOT", - "value": 0 + "value": 0, + "documentation": "Seeking to the beginning is treated as playing from the start state. Transition to the end state is treated as exiting the state machine." }, { "name": "STATE_MACHINE_TYPE_NESTED", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "STATE_MACHINE_TYPE_GROUPED", - "value": 2 + "value": 2, + "documentation": "This is a grouped state machine that can be controlled from a parent state machine. It does not work on standalone. 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." } ] } @@ -31409,7 +34273,8 @@ "type": "Vector2", "default_value": "Vector2(0, 0)" } - ] + ], + "documentation": "Adds a new animation node to the graph. The [param position] is used for display in the editor." }, { "name": "replace_node", @@ -31427,7 +34292,8 @@ "name": "node", "type": "AnimationNode" } - ] + ], + "documentation": "" }, { "name": "get_node", @@ -31444,7 +34310,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the animation node with the given name." }, { "name": "remove_node", @@ -31458,7 +34325,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Deletes the given animation node from the graph." }, { "name": "rename_node", @@ -31476,7 +34344,8 @@ "name": "new_name", "type": "StringName" } - ] + ], + "documentation": "Renames the given animation node." }, { "name": "has_node", @@ -31493,7 +34362,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if the graph contains the given animation node." }, { "name": "get_node_name", @@ -31510,7 +34380,8 @@ "name": "node", "type": "AnimationNode" } - ] + ], + "documentation": "Returns the given animation node's name." }, { "name": "set_node_position", @@ -31528,7 +34399,8 @@ "name": "position", "type": "Vector2" } - ] + ], + "documentation": "Sets the animation node's coordinates. Used for display in the editor." }, { "name": "get_node_position", @@ -31545,7 +34417,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns the given animation node's coordinates. Used for display in the editor." }, { "name": "has_transition", @@ -31566,7 +34439,8 @@ "name": "to", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if there is a transition between the given animation nodes." }, { "name": "add_transition", @@ -31588,7 +34462,8 @@ "name": "transition", "type": "AnimationNodeStateMachineTransition" } - ] + ], + "documentation": "Adds a transition between the given animation nodes." }, { "name": "get_transition", @@ -31606,7 +34481,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the given transition." }, { "name": "get_transition_from", @@ -31624,7 +34500,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the given transition's start node." }, { "name": "get_transition_to", @@ -31642,7 +34519,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the given transition's end node." }, { "name": "get_transition_count", @@ -31654,7 +34532,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of connections in the graph." }, { "name": "remove_transition_by_index", @@ -31669,7 +34548,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Deletes the given transition by index." }, { "name": "remove_transition", @@ -31687,7 +34567,8 @@ "name": "to", "type": "StringName" } - ] + ], + "documentation": "Deletes the transition between the two specified animation nodes." }, { "name": "set_graph_offset", @@ -31701,7 +34582,8 @@ "name": "offset", "type": "Vector2" } - ] + ], + "documentation": "Sets the draw offset of the graph. Used for display in the editor." }, { "name": "get_graph_offset", @@ -31712,7 +34594,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the draw offset of the graph. Used for display in the editor." }, { "name": "set_state_machine_type", @@ -31795,21 +34678,25 @@ "type": "int", "name": "state_machine_type", "setter": "set_state_machine_type", - "getter": "get_state_machine_type" + "getter": "get_state_machine_type", + "documentation": "This property can define the process of transitions for different use cases. See also [enum AnimationNodeStateMachine.StateMachineType]." }, { "type": "bool", "name": "allow_transition_to_self", "setter": "set_allow_transition_to_self", - "getter": "is_allow_transition_to_self" + "getter": "is_allow_transition_to_self", + "documentation": "If [code]true[/code], 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 [code]false[/code], nothing happens on the teleportation to the self state." }, { "type": "bool", "name": "reset_ends", "setter": "set_reset_ends", - "getter": "are_ends_reset" + "getter": "are_ends_reset", + "documentation": "If [code]true[/code], treat the cross-fade to the start and end nodes as a blend with the RESET animation.\nIn most cases, when additional cross-fades are performed in the parent [AnimationNode] of the state machine, setting this property to [code]false[/code] and matching the cross-fade time of the parent [AnimationNode] and the state machine's start node and end node gives good results." } - ] + ], + "documentation": "Contains multiple [AnimationRootNode]s representing animation states, connected in a graph. State transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the [AnimationNodeStateMachinePlayback] object from the [AnimationTree] node to control it programmatically.\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar state_machine = $AnimationTree.get(\"parameters/playback\")\nstate_machine.travel(\"some_state\")\n[/gdscript]\n[csharp]\nvar stateMachine = GetNode(\"AnimationTree\").Get(\"parameters/playback\") as AnimationNodeStateMachinePlayback;\nstateMachine.Travel(\"some_state\");\n[/csharp]\n[/codeblocks]" }, { "name": "AnimationNodeStateMachinePlayback", @@ -31838,7 +34725,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Transitions from the current state to another one, following the shortest path.\nIf the path does not connect from the current state, the animation will play after the state teleports.\nIf [param reset_on_teleport] is [code]true[/code], the animation is played from the beginning when the travel cause a teleportation." }, { "name": "start", @@ -31860,7 +34748,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "Starts playing the given animation.\nIf [param reset] is [code]true[/code], the animation is played from the beginning." }, { "name": "next", @@ -31868,7 +34757,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "If there is a next path by travel or auto advance, immediately transitions from the current state to the next state." }, { "name": "stop", @@ -31876,7 +34766,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the currently playing animation." }, { "name": "is_playing", @@ -31887,7 +34778,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if an animation is playing." }, { "name": "get_current_node", @@ -31898,7 +34790,8 @@ "hash": 2002593661, "return_value": { "type": "StringName" - } + }, + "documentation": "Returns the currently playing animation state.\n[b]Note:[/b] When using a cross-fade, the current state changes to the next state immediately after the cross-fade begins." }, { "name": "get_current_play_position", @@ -31910,7 +34803,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the playback position within the current animation state." }, { "name": "get_current_length", @@ -31922,7 +34816,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the current state length.\n[b]Note:[/b] 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." }, { "name": "get_fading_from_node", @@ -31933,7 +34828,8 @@ "hash": 2002593661, "return_value": { "type": "StringName" - } + }, + "documentation": "Returns the starting state of currently fading animation." }, { "name": "get_travel_path", @@ -31944,9 +34840,11 @@ "hash": 3995934104, "return_value": { "type": "typedarray::StringName" - } + }, + "documentation": "Returns the current travel path as computed internally by the A* algorithm." } - ] + ], + "documentation": "Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get(\"parameters/playback\")[/code].\n[b]Example:[/b]\n[codeblocks]\n[gdscript]\nvar state_machine = $AnimationTree.get(\"parameters/playback\")\nstate_machine.travel(\"some_state\")\n[/gdscript]\n[csharp]\nvar stateMachine = GetNode(\"AnimationTree\").Get(\"parameters/playback\").As();\nstateMachine.Travel(\"some_state\");\n[/csharp]\n[/codeblocks]" }, { "name": "AnimationNodeStateMachineTransition", @@ -31961,15 +34859,18 @@ "values": [ { "name": "SWITCH_MODE_IMMEDIATE", - "value": 0 + "value": 0, + "documentation": "Switch to the next state immediately. The current state will end and blend into the beginning of the new one." }, { "name": "SWITCH_MODE_SYNC", - "value": 1 + "value": 1, + "documentation": "Switch to the next state immediately, but will seek the new state to the playback position of the old state." }, { "name": "SWITCH_MODE_AT_END", - "value": 2 + "value": 2, + "documentation": "Wait for the current state playback to end, then switch to the beginning of the next state animation." } ] }, @@ -31979,15 +34880,18 @@ "values": [ { "name": "ADVANCE_MODE_DISABLED", - "value": 0 + "value": 0, + "documentation": "Don't use this transition." }, { "name": "ADVANCE_MODE_ENABLED", - "value": 1 + "value": 1, + "documentation": "Only use this transition during [method AnimationNodeStateMachinePlayback.travel]." }, { "name": "ADVANCE_MODE_AUTO", - "value": 2 + "value": 2, + "documentation": "Automatically use this transition if the [member advance_condition] and [member advance_expression] checks are true (if assigned)." } ] } @@ -32200,7 +35104,8 @@ ], "signals": [ { - "name": "advance_condition_changed" + "name": "advance_condition_changed", + "documentation": "Emitted when [member advance_condition] is changed." } ], "properties": [ @@ -32208,58 +35113,68 @@ "type": "float", "name": "xfade_time", "setter": "set_xfade_time", - "getter": "get_xfade_time" + "getter": "get_xfade_time", + "documentation": "The time to cross-fade between this state and the next." }, { "type": "Curve", "name": "xfade_curve", "setter": "set_xfade_curve", - "getter": "get_xfade_curve" + "getter": "get_xfade_curve", + "documentation": "Ease curve for better control over cross-fade between this state and the next." }, { "type": "bool", "name": "reset", "setter": "set_reset", - "getter": "is_reset" + "getter": "is_reset", + "documentation": "If [code]true[/code], the destination animation is played back from the beginning when switched." }, { "type": "int", "name": "priority", "setter": "set_priority", - "getter": "get_priority" + "getter": "get_priority", + "documentation": "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]." }, { "type": "int", "name": "switch_mode", "setter": "set_switch_mode", - "getter": "get_switch_mode" + "getter": "get_switch_mode", + "documentation": "The transition type." }, { "type": "int", "name": "advance_mode", "setter": "set_advance_mode", - "getter": "get_advance_mode" + "getter": "get_advance_mode", + "documentation": "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)." }, { "type": "StringName", "name": "advance_condition", "setter": "set_advance_condition", - "getter": "get_advance_condition" + "getter": "get_advance_condition", + "documentation": "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=$DOCS_URL/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 [code]\"idle\"[/code]:\n[codeblocks]\n[gdscript]\n$animation_tree.set(\"parameters/conditions/idle\", is_on_floor and (linear_velocity.x == 0))\n[/gdscript]\n[csharp]\nGetNode(\"animation_tree\").Set(\"parameters/conditions/idle\", IsOnFloor && (LinearVelocity.X == 0));\n[/csharp]\n[/codeblocks]" }, { "type": "String", "name": "advance_expression", "setter": "set_advance_expression", - "getter": "get_advance_expression" + "getter": "get_advance_expression", + "documentation": "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." } - ] + ], + "documentation": "The path generated when using [method AnimationNodeStateMachinePlayback.travel] is limited to the nodes connected by [AnimationNodeStateMachineTransition].\nYou can set the timing and conditions of the transition in detail." }, { "name": "AnimationNodeSub2", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNodeSync", - "api_type": "core" + "api_type": "core", + "documentation": "A resource to add to an [AnimationNodeBlendTree]. Blends two animations subtractively based on the amount value.\nThis animation node is usually used for pre-calculation to cancel out any extra poses from the animation for the \"add\" animation source in [AnimationNodeAdd2] or [AnimationNodeAdd3].\nIn general, the blend value should be in the [code][0.0, 1.0][/code] range, but values outside of this range can be used for amplified or inverted animations.\n[b]Note:[/b] This calculation is different from using a negative value in [AnimationNodeAdd2], since the transformation matrices do not satisfy the commutative law. [AnimationNodeSub2] multiplies the transformation matrix of the inverted animation from the left side, while negative [AnimationNodeAdd2] multiplies it from the right side." }, { "name": "AnimationNodeSync", @@ -32299,23 +35214,27 @@ "type": "bool", "name": "sync", "setter": "set_use_sync", - "getter": "is_using_sync" + "getter": "is_using_sync", + "documentation": "If [code]false[/code], the blended animations' frame are stopped when the blend value is [code]0[/code].\nIf [code]true[/code], forcing the blended animations to advance frame." } - ] + ], + "documentation": "An animation node used to combine, mix, or blend two or more animations together while keeping them synchronized within an [AnimationTree]." }, { "name": "AnimationNodeTimeScale", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNode", - "api_type": "core" + "api_type": "core", + "documentation": "Allows to scale the speed of the animation (or reverse it) in any children [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation." }, { "name": "AnimationNodeTimeSeek", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNode", - "api_type": "core" + "api_type": "core", + "documentation": "This animation node can be used to cause a seek command to happen to any sub-children of the animation graph. Use to play an [Animation] from the start or a certain playback position inside the [AnimationNodeBlendTree].\nAfter setting the time and changing the animation playback, the time seek node automatically goes into sleep mode on the next process frame by setting its [code]seek_request[/code] value to [code]-1.0[/code].\n[codeblocks]\n[gdscript]\n# Play child animation from the start.\nanimation_tree.set(\"parameters/TimeSeek/seek_request\", 0.0)\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/TimeSeek/seek_request\"] = 0.0\n\n# Play child animation from 12 second timestamp.\nanimation_tree.set(\"parameters/TimeSeek/seek_request\", 12.0)\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/TimeSeek/seek_request\"] = 12.0\n[/gdscript]\n[csharp]\n// Play child animation from the start.\nanimationTree.Set(\"parameters/TimeSeek/seek_request\", 0.0);\n\n// Play child animation from 12 second timestamp.\nanimationTree.Set(\"parameters/TimeSeek/seek_request\", 12.0);\n[/csharp]\n[/codeblocks]" }, { "name": "AnimationNodeTransition", @@ -32356,7 +35275,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "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." }, { "name": "is_input_set_as_auto_advance", @@ -32374,7 +35294,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if auto-advance is enabled for the given [param input] index." }, { "name": "set_input_reset", @@ -32393,7 +35314,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the destination animation is restarted when the animation transitions." }, { "name": "is_input_reset", @@ -32411,7 +35333,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the animation restarts when the animation transitions from the other animation." }, { "name": "set_xfade_time", @@ -32496,27 +35419,32 @@ "type": "float", "name": "xfade_time", "setter": "set_xfade_time", - "getter": "get_xfade_time" + "getter": "get_xfade_time", + "documentation": "Cross-fading time (in seconds) between each animation connected to the inputs." }, { "type": "Curve", "name": "xfade_curve", "setter": "set_xfade_curve", - "getter": "get_xfade_curve" + "getter": "get_xfade_curve", + "documentation": "Determines how cross-fading between animations is eased. If empty, the transition will be linear." }, { "type": "bool", "name": "allow_transition_to_self", "setter": "set_allow_transition_to_self", - "getter": "is_allow_transition_to_self" + "getter": "is_allow_transition_to_self", + "documentation": "If [code]true[/code], allows transition to the self state. When the reset option is enabled in input, the animation is restarted. If [code]false[/code], nothing happens on the transition to the self state." }, { "type": "int", "name": "input_count", "setter": "set_input_count", - "getter": "get_input_count" + "getter": "get_input_count", + "documentation": "The number of enabled input ports for this animation node." } - ] + ], + "documentation": "Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.\nAfter setting the request and changing the animation playback, the transition node automatically clears the request on the next process frame by setting its [code]transition_request[/code] value to empty.\n[b]Note:[/b] When using a cross-fade, [code]current_state[/code] and [code]current_index[/code] change to the next state immediately after the cross-fade begins.\n[codeblocks]\n[gdscript]\n# Play child animation connected to \"state_2\" port.\nanimation_tree.set(\"parameters/Transition/transition_request\", \"state_2\")\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/Transition/transition_request\"] = \"state_2\"\n\n# Get current state name (read-only).\nanimation_tree.get(\"parameters/Transition/current_state\")\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/Transition/current_state\"]\n\n# Get current state index (read-only).\nanimation_tree.get(\"parameters/Transition/current_index\")\n# Alternative syntax (same result as above).\nanimation_tree[\"parameters/Transition/current_index\"]\n[/gdscript]\n[csharp]\n// Play child animation connected to \"state_2\" port.\nanimationTree.Set(\"parameters/Transition/transition_request\", \"state_2\");\n\n// Get current state name (read-only).\nanimationTree.Get(\"parameters/Transition/current_state\");\n\n// Get current state index (read-only).\nanimationTree.Get(\"parameters/Transition/current_index\");\n[/csharp]\n[/codeblocks]" }, { "name": "AnimationPlayer", @@ -32531,15 +35459,18 @@ "values": [ { "name": "ANIMATION_PROCESS_PHYSICS", - "value": 0 + "value": 0, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]." }, { "name": "ANIMATION_PROCESS_IDLE", - "value": 1 + "value": 1, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE]." }, { "name": "ANIMATION_PROCESS_MANUAL", - "value": 2 + "value": 2, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL]." } ] }, @@ -32549,11 +35480,13 @@ "values": [ { "name": "ANIMATION_METHOD_CALL_DEFERRED", - "value": 0 + "value": 0, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_DEFERRED]." }, { "name": "ANIMATION_METHOD_CALL_IMMEDIATE", - "value": 1 + "value": 1, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_METHOD_IMMEDIATE]." } ] } @@ -32575,7 +35508,8 @@ "name": "animation_to", "type": "StringName" } - ] + ], + "documentation": "Triggers the [param animation_to] animation when the [param animation_from] animation completes." }, { "name": "animation_get_next", @@ -32592,7 +35526,8 @@ "name": "animation_from", "type": "StringName" } - ] + ], + "documentation": "Returns the key of the animation which is queued to play after the [param animation_from] animation." }, { "name": "set_blend_time", @@ -32615,7 +35550,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Specifies a blend time (in seconds) between two animations, referenced by their keys." }, { "name": "get_blend_time", @@ -32637,7 +35573,8 @@ "name": "animation_to", "type": "StringName" } - ] + ], + "documentation": "Returns the blend time (in seconds) between two animations, referenced by their keys." }, { "name": "set_default_blend_time", @@ -32696,7 +35633,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Plays the animation with key [param name]. Custom blend times and speed can be set.\nThe [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 [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]).\nThe [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.\n[b]Note:[/b] 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 [code]advance(0)[/code]." }, { "name": "play_backwards", @@ -32717,7 +35655,8 @@ "meta": "double", "default_value": "-1" } - ] + ], + "documentation": "Plays the animation with key [param name] in reverse.\nThis method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information." }, { "name": "pause", @@ -32725,7 +35664,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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.\nSee also [method stop]." }, { "name": "stop", @@ -32740,7 +35680,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Stops the currently playing animation. The animation position is reset to [code]0[/code] and the [code]custom_speed[/code] is reset to [code]1.0[/code]. See also [method pause].\nIf [param keep_state] is [code]true[/code], the animation state is not updated visually.\n[b]Note:[/b] The method / audio / animation playback tracks will not be processed by this method." }, { "name": "is_playing", @@ -32751,7 +35692,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if an animation is currently playing (even if [member speed_scale] and/or [code]custom_speed[/code] are [code]0[/code])." }, { "name": "set_current_animation", @@ -32815,7 +35757,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Queues an animation for playback once the current one is done.\n[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow." }, { "name": "get_queue", @@ -32826,7 +35769,8 @@ "hash": 2981934095, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns a list of the animation keys that are currently queued to play." }, { "name": "clear_queue", @@ -32834,7 +35778,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all queued, unplayed animations." }, { "name": "set_speed_scale", @@ -32873,7 +35818,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the actual playing speed of current animation or [code]0[/code] if not playing. This speed is the [member speed_scale] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method.\nReturns a negative value if the current animation is playing backwards." }, { "name": "set_autoplay", @@ -32975,7 +35921,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Seeks the animation to the [param seconds] point in time (in seconds). If [param update] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [param seconds] are skipped.\nIf [param update_only] is true, the method / audio / animation playback tracks will not be processed.\n[b]Note:[/b] 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]." }, { "name": "set_process_callback", @@ -32989,7 +35936,8 @@ "name": "mode", "type": "enum::AnimationPlayer.AnimationProcessCallback" } - ] + ], + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeProcess]." }, { "name": "get_process_callback", @@ -33000,7 +35948,8 @@ "hash": 4207496604, "return_value": { "type": "enum::AnimationPlayer.AnimationProcessCallback" - } + }, + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeProcess]." }, { "name": "set_method_call_mode", @@ -33014,7 +35963,8 @@ "name": "mode", "type": "enum::AnimationPlayer.AnimationMethodCallMode" } - ] + ], + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeMethod]." }, { "name": "get_method_call_mode", @@ -33025,7 +35975,8 @@ "hash": 3583380054, "return_value": { "type": "enum::AnimationPlayer.AnimationMethodCallMode" - } + }, + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeMethod]." }, { "name": "set_root", @@ -33039,7 +35990,8 @@ "name": "path", "type": "NodePath" } - ] + ], + "documentation": "For backward compatibility. See [member AnimationMixer.root_node]." }, { "name": "get_root", @@ -33050,7 +36002,8 @@ "hash": 4075236667, "return_value": { "type": "NodePath" - } + }, + "documentation": "For backward compatibility. See [member AnimationMixer.root_node]." } ], "signals": [ @@ -33061,7 +36014,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Emitted when [member current_animation] changes." }, { "name": "animation_changed", @@ -33074,7 +36028,8 @@ "name": "new_name", "type": "StringName" } - ] + ], + "documentation": "Emitted when a queued animation plays after the previous animation finished. See also [method AnimationPlayer.queue].\n[b]Note:[/b] The signal is not emitted when the animation is changed via [method AnimationPlayer.play] or by an [AnimationTree]." } ], "properties": [ @@ -33082,56 +36037,66 @@ "type": "StringName", "name": "current_animation", "setter": "set_current_animation", - "getter": "get_current_animation" + "getter": "get_current_animation", + "documentation": "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.\n[b]Note:[/b] 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]." }, { "type": "StringName", "name": "assigned_animation", "setter": "set_assigned_animation", - "getter": "get_assigned_animation" + "getter": "get_assigned_animation", + "documentation": "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]." }, { "type": "StringName", "name": "autoplay", "setter": "set_autoplay", - "getter": "get_autoplay" + "getter": "get_autoplay", + "documentation": "The key of the animation to play when the scene loads." }, { "type": "float", "name": "current_animation_length", - "getter": "get_current_animation_length" + "getter": "get_current_animation_length", + "documentation": "The length (in seconds) of the currently playing animation." }, { "type": "float", "name": "current_animation_position", - "getter": "get_current_animation_position" + "getter": "get_current_animation_position", + "documentation": "The position (in seconds) of the currently playing animation." }, { "type": "float", "name": "playback_default_blend_time", "setter": "set_default_blend_time", - "getter": "get_default_blend_time" + "getter": "get_default_blend_time", + "documentation": "The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "The speed scaling ratio. For example, if this value is [code]1[/code], then the animation plays at normal speed. If it's [code]0.5[/code], then it plays at half speed. If it's [code]2[/code], then it plays at double speed.\nIf set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation will not advance." }, { "type": "bool", "name": "movie_quit_on_finish", "setter": "set_movie_quit_on_finish_enabled", - "getter": "is_movie_quit_on_finish_enabled" + "getter": "is_movie_quit_on_finish_enabled", + "documentation": "If [code]true[/code] 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.\n[b]Note:[/b] 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." } - ] + ], + "documentation": "An animation player is used for general-purpose playback of animations. It contains a dictionary of [AnimationLibrary] resources and custom blend times between animation transitions.\nSome methods and properties use a single key to reference an animation directly. These keys are formatted as the key for the library, followed by a forward slash, then the key for the animation within the library, for example [code]\"movement/run\"[/code]. If the library's key is an empty string (known as the default library), the forward slash is omitted, being the same key used by the library.\n[AnimationPlayer] is better-suited than [Tween] for more complex animations, for example ones with non-trivial timings. It can also be used over [Tween] if the animation track editor is more convenient than doing it in code.\nUpdating the target properties of animations occurs at the process frame." }, { "name": "AnimationRootNode", "is_refcounted": true, "is_instantiable": true, "inherits": "AnimationNode", - "api_type": "core" + "api_type": "core", + "documentation": "[AnimationRootNode] is a base class for [AnimationNode]s that hold a complete animation. A complete animation refers to the output of an [AnimationNodeOutput] in an [AnimationNodeBlendTree] or the output of another [AnimationRootNode]. Used for [member AnimationTree.tree_root] or in other [AnimationRootNode]s.\nExamples of built-in root nodes include [AnimationNodeBlendTree] (allows blending nodes between each other using various modes), [AnimationNodeStateMachine] (allows to configure blending and transitions between nodes using a state machine pattern), [AnimationNodeBlendSpace2D] (allows linear blending between [b]three[/b] [AnimationNode]s), [AnimationNodeBlendSpace1D] (allows linear blending only between [b]two[/b] [AnimationNode]s)." }, { "name": "AnimationTree", @@ -33146,15 +36111,18 @@ "values": [ { "name": "ANIMATION_PROCESS_PHYSICS", - "value": 0 + "value": 0, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_PHYSICS]." }, { "name": "ANIMATION_PROCESS_IDLE", - "value": 1 + "value": 1, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_IDLE]." }, { "name": "ANIMATION_PROCESS_MANUAL", - "value": 2 + "value": 2, + "documentation": "For backward compatibility. See [constant AnimationMixer.ANIMATION_CALLBACK_MODE_PROCESS_MANUAL]." } ] } @@ -33253,7 +36221,8 @@ "name": "mode", "type": "enum::AnimationTree.AnimationProcessCallback" } - ] + ], + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeProcess]." }, { "name": "get_process_callback", @@ -33264,12 +36233,14 @@ "hash": 891317132, "return_value": { "type": "enum::AnimationTree.AnimationProcessCallback" - } + }, + "documentation": "For backward compatibility. See [enum AnimationMixer.AnimationCallbackModeProcess]." } ], "signals": [ { - "name": "animation_player_changed" + "name": "animation_player_changed", + "documentation": "Emitted when the [member anim_player] is changed." } ], "properties": [ @@ -33277,21 +36248,25 @@ "type": "AnimationRootNode", "name": "tree_root", "setter": "set_tree_root", - "getter": "get_tree_root" + "getter": "get_tree_root", + "documentation": "The root animation node of this [AnimationTree]. See [AnimationRootNode]." }, { "type": "NodePath", "name": "advance_expression_base_node", "setter": "set_advance_expression_base_node", - "getter": "get_advance_expression_base_node" + "getter": "get_advance_expression_base_node", + "documentation": "The path to the [Node] used to evaluate the [AnimationNode] [Expression] if one is not explicitly specified internally." }, { "type": "NodePath", "name": "anim_player", "setter": "set_animation_player", - "getter": "get_animation_player" + "getter": "get_animation_player", + "documentation": "The path to the [AnimationPlayer] used for animating." } - ] + ], + "documentation": "A node used for advanced animation transitions in an [AnimationPlayer].\n[b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations." }, { "name": "Area2D", @@ -33306,23 +36281,28 @@ "values": [ { "name": "SPACE_OVERRIDE_DISABLED", - "value": 0 + "value": 0, + "documentation": "This area does not affect gravity/damping." }, { "name": "SPACE_OVERRIDE_COMBINE", - "value": 1 + "value": 1, + "documentation": "This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order)." }, { "name": "SPACE_OVERRIDE_COMBINE_REPLACE", - "value": 2 + "value": 2, + "documentation": "This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas." }, { "name": "SPACE_OVERRIDE_REPLACE", - "value": 3 + "value": 3, + "documentation": "This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas." }, { "name": "SPACE_OVERRIDE_REPLACE_COMBINE", - "value": 4 + "value": 4, + "documentation": "This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas." } ] } @@ -33672,7 +36652,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Node2D" - } + }, + "documentation": "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.\nFor 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." }, { "name": "get_overlapping_areas", @@ -33683,7 +36664,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Area2D" - } + }, + "documentation": "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.\nFor 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." }, { "name": "has_overlapping_bodies", @@ -33694,7 +36676,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if intersecting any [PhysicsBody2D]s or [TileMap]s, otherwise returns [code]false[/code]. The overlapping body's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.\nFor 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." }, { "name": "has_overlapping_areas", @@ -33705,7 +36688,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if intersecting any [Area2D]s, otherwise returns [code]false[/code]. The overlapping area's [member CollisionObject2D.collision_layer] must be part of this area's [member CollisionObject2D.collision_mask] in order to be detected.\nFor 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." }, { "name": "overlaps_body", @@ -33722,7 +36706,8 @@ "name": "body", "type": "Node" } - ] + ], + "documentation": "Returns [code]true[/code] if the given physics body intersects or overlaps this [Area2D], [code]false[/code] otherwise.\n[b]Note:[/b] 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.\nThe [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." }, { "name": "overlaps_area", @@ -33739,7 +36724,8 @@ "name": "area", "type": "Node" } - ] + ], + "documentation": "Returns [code]true[/code] if the given [Area2D] intersects or overlaps this [Area2D], [code]false[/code] otherwise.\n[b]Note:[/b] 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." }, { "name": "set_audio_bus_name", @@ -33812,7 +36798,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code].\n[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].\n[b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b]\n[codeblocks]\n[gdscript]\nvar body_shape_owner = body.shape_find_owner(body_shape_index)\nvar body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n\nvar local_shape_owner = shape_find_owner(local_shape_index)\nvar local_shape_node = shape_owner_get_owner(local_shape_owner)\n[/gdscript]\n[/codeblocks]" }, { "name": "body_shape_exited", @@ -33833,7 +36820,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code].\nSee also [signal body_shape_entered]." }, { "name": "body_entered", @@ -33842,7 +36830,8 @@ "name": "body", "type": "Node2D" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "body_exited", @@ -33851,7 +36840,8 @@ "name": "body", "type": "Node2D" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "area_shape_entered", @@ -33872,7 +36862,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "Emitted when a [Shape2D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code].\n[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].\n[b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b]\n[codeblocks]\n[gdscript]\nvar other_shape_owner = area.shape_find_owner(area_shape_index)\nvar other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n\nvar local_shape_owner = shape_find_owner(local_shape_index)\nvar local_shape_node = shape_owner_get_owner(local_shape_owner)\n[/gdscript]\n[/codeblocks]" }, { "name": "area_shape_exited", @@ -33893,7 +36884,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "Emitted when a [Shape2D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code].\nSee also [signal area_shape_entered]." }, { "name": "area_entered", @@ -33902,7 +36894,8 @@ "name": "area", "type": "Area2D" } - ] + ], + "documentation": "Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]." }, { "name": "area_exited", @@ -33911,7 +36904,8 @@ "name": "area", "type": "Area2D" } - ] + ], + "documentation": "Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]." } ], "properties": [ @@ -33919,93 +36913,109 @@ "type": "bool", "name": "monitoring", "setter": "set_monitoring", - "getter": "is_monitoring" + "getter": "is_monitoring", + "documentation": "If [code]true[/code], the area detects bodies or areas entering and exiting it." }, { "type": "bool", "name": "monitorable", "setter": "set_monitorable", - "getter": "is_monitorable" + "getter": "is_monitorable", + "documentation": "If [code]true[/code], other monitoring areas can detect this area." }, { "type": "int", "name": "priority", "setter": "set_priority", - "getter": "get_priority" + "getter": "get_priority", + "documentation": "The area's priority. Higher priority areas are processed first. The [World2D]'s physics is always processed last, after all areas." }, { "type": "int", "name": "gravity_space_override", "setter": "set_gravity_space_override_mode", - "getter": "get_gravity_space_override_mode" + "getter": "get_gravity_space_override_mode", + "documentation": "Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "bool", "name": "gravity_point", "setter": "set_gravity_is_point", - "getter": "is_gravity_a_point" + "getter": "is_gravity_a_point", + "documentation": "If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override]." }, { "type": "float", "name": "gravity_point_unit_distance", "setter": "set_gravity_point_unit_distance", - "getter": "get_gravity_point_unit_distance" + "getter": "get_gravity_point_unit_distance", + "documentation": "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.\nThe 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." }, { "type": "Vector2", "name": "gravity_point_center", "setter": "set_gravity_point_center", - "getter": "get_gravity_point_center" + "getter": "get_gravity_point_center", + "documentation": "If gravity is a point (see [member gravity_point]), this will be the point of attraction." }, { "type": "Vector2", "name": "gravity_direction", "setter": "set_gravity_direction", - "getter": "get_gravity_direction" + "getter": "get_gravity_direction", + "documentation": "The area's gravity vector (not normalized)." }, { "type": "float", "name": "gravity", "setter": "set_gravity", - "getter": "get_gravity" + "getter": "get_gravity", + "documentation": "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." }, { "type": "int", "name": "linear_damp_space_override", "setter": "set_linear_damp_space_override_mode", - "getter": "get_linear_damp_space_override_mode" + "getter": "get_linear_damp_space_override_mode", + "documentation": "Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "float", "name": "linear_damp", "setter": "set_linear_damp", - "getter": "get_linear_damp" + "getter": "get_linear_damp", + "documentation": "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping." }, { "type": "int", "name": "angular_damp_space_override", "setter": "set_angular_damp_space_override_mode", - "getter": "get_angular_damp_space_override_mode" + "getter": "get_angular_damp_space_override_mode", + "documentation": "Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "float", "name": "angular_damp", "setter": "set_angular_damp", - "getter": "get_angular_damp" + "getter": "get_angular_damp", + "documentation": "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping." }, { "type": "bool", "name": "audio_bus_override", "setter": "set_audio_bus_override", - "getter": "is_overriding_audio_bus" + "getter": "is_overriding_audio_bus", + "documentation": "If [code]true[/code], the area's audio bus overrides the default audio bus." }, { "type": "StringName", "name": "audio_bus_name", "setter": "set_audio_bus_name", - "getter": "get_audio_bus_name" + "getter": "get_audio_bus_name", + "documentation": "The name of the area's audio bus." } - ] + ], + "documentation": "[Area2D] is a region of 2D space defined by one or multiple [CollisionShape2D] or [CollisionPolygon2D] child nodes. It detects when other [CollisionObject2D]s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it).\nThis node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses." }, { "name": "Area3D", @@ -34020,23 +37030,28 @@ "values": [ { "name": "SPACE_OVERRIDE_DISABLED", - "value": 0 + "value": 0, + "documentation": "This area does not affect gravity/damping." }, { "name": "SPACE_OVERRIDE_COMBINE", - "value": 1 + "value": 1, + "documentation": "This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order)." }, { "name": "SPACE_OVERRIDE_COMBINE_REPLACE", - "value": 2 + "value": 2, + "documentation": "This area adds its gravity/damping values to whatever has been calculated so far (in [member priority] order), ignoring any lower priority areas." }, { "name": "SPACE_OVERRIDE_REPLACE", - "value": 3 + "value": 3, + "documentation": "This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas." }, { "name": "SPACE_OVERRIDE_REPLACE_COMBINE", - "value": 4 + "value": 4, + "documentation": "This area replaces any gravity/damping calculated so far (in [member priority] order), but keeps calculating the rest of the areas." } ] } @@ -34465,7 +37480,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Node3D" - } + }, + "documentation": "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.\nFor 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." }, { "name": "get_overlapping_areas", @@ -34476,7 +37492,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Area3D" - } + }, + "documentation": "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.\nFor 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." }, { "name": "has_overlapping_bodies", @@ -34487,7 +37504,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if intersecting any [PhysicsBody3D]s or [GridMap]s, otherwise returns [code]false[/code]. The overlapping body's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.\nFor 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." }, { "name": "has_overlapping_areas", @@ -34498,7 +37516,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if intersecting any [Area3D]s, otherwise returns [code]false[/code]. The overlapping area's [member CollisionObject3D.collision_layer] must be part of this area's [member CollisionObject3D.collision_mask] in order to be detected.\nFor 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." }, { "name": "overlaps_body", @@ -34515,7 +37534,8 @@ "name": "body", "type": "Node" } - ] + ], + "documentation": "Returns [code]true[/code] if the given physics body intersects or overlaps this [Area3D], [code]false[/code] otherwise.\n[b]Note:[/b] 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.\nThe [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." }, { "name": "overlaps_area", @@ -34532,7 +37552,8 @@ "name": "area", "type": "Node" } - ] + ], + "documentation": "Returns [code]true[/code] if the given [Area3D] intersects or overlaps this [Area3D], [code]false[/code] otherwise.\n[b]Note:[/b] 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." }, { "name": "set_audio_bus_override", @@ -34709,7 +37730,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code].\n[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].\n[b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b]\n[codeblocks]\n[gdscript]\nvar body_shape_owner = body.shape_find_owner(body_shape_index)\nvar body_shape_node = body.shape_owner_get_owner(body_shape_owner)\n\nvar local_shape_owner = shape_find_owner(local_shape_index)\nvar local_shape_node = shape_owner_get_owner(local_shape_owner)\n[/gdscript]\n[/codeblocks]" }, { "name": "body_shape_exited", @@ -34730,7 +37752,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code].\nSee also [signal body_shape_entered]." }, { "name": "body_entered", @@ -34739,7 +37762,8 @@ "name": "body", "type": "Node3D" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "body_exited", @@ -34748,7 +37772,8 @@ "name": "body", "type": "Node3D" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "area_shape_entered", @@ -34769,7 +37794,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "Emitted when a [Shape3D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code].\n[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].\n[b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b]\n[codeblocks]\n[gdscript]\nvar other_shape_owner = area.shape_find_owner(area_shape_index)\nvar other_shape_node = area.shape_owner_get_owner(other_shape_owner)\n\nvar local_shape_owner = shape_find_owner(local_shape_index)\nvar local_shape_node = shape_owner_get_owner(local_shape_owner)\n[/gdscript]\n[/codeblocks]" }, { "name": "area_shape_exited", @@ -34790,7 +37816,8 @@ "name": "local_shape_index", "type": "int" } - ] + ], + "documentation": "Emitted when a [Shape3D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code].\nSee also [signal area_shape_entered]." }, { "name": "area_entered", @@ -34799,7 +37826,8 @@ "name": "area", "type": "Area3D" } - ] + ], + "documentation": "Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]." }, { "name": "area_exited", @@ -34808,7 +37836,8 @@ "name": "area", "type": "Area3D" } - ] + ], + "documentation": "Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]." } ], "properties": [ @@ -34816,135 +37845,158 @@ "type": "bool", "name": "monitoring", "setter": "set_monitoring", - "getter": "is_monitoring" + "getter": "is_monitoring", + "documentation": "If [code]true[/code], the area detects bodies or areas entering and exiting it." }, { "type": "bool", "name": "monitorable", "setter": "set_monitorable", - "getter": "is_monitorable" + "getter": "is_monitorable", + "documentation": "If [code]true[/code], other monitoring areas can detect this area." }, { "type": "int", "name": "priority", "setter": "set_priority", - "getter": "get_priority" + "getter": "get_priority", + "documentation": "The area's priority. Higher priority areas are processed first. The [World3D]'s physics is always processed last, after all areas." }, { "type": "int", "name": "gravity_space_override", "setter": "set_gravity_space_override_mode", - "getter": "get_gravity_space_override_mode" + "getter": "get_gravity_space_override_mode", + "documentation": "Override mode for gravity calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "bool", "name": "gravity_point", "setter": "set_gravity_is_point", - "getter": "is_gravity_a_point" + "getter": "is_gravity_a_point", + "documentation": "If [code]true[/code], gravity is calculated from a point (set via [member gravity_point_center]). See also [member gravity_space_override]." }, { "type": "float", "name": "gravity_point_unit_distance", "setter": "set_gravity_point_unit_distance", - "getter": "get_gravity_point_unit_distance" + "getter": "get_gravity_point_unit_distance", + "documentation": "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.\nThe 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." }, { "type": "Vector3", "name": "gravity_point_center", "setter": "set_gravity_point_center", - "getter": "get_gravity_point_center" + "getter": "get_gravity_point_center", + "documentation": "If gravity is a point (see [member gravity_point]), this will be the point of attraction." }, { "type": "Vector3", "name": "gravity_direction", "setter": "set_gravity_direction", - "getter": "get_gravity_direction" + "getter": "get_gravity_direction", + "documentation": "The area's gravity vector (not normalized)." }, { "type": "float", "name": "gravity", "setter": "set_gravity", - "getter": "get_gravity" + "getter": "get_gravity", + "documentation": "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." }, { "type": "int", "name": "linear_damp_space_override", "setter": "set_linear_damp_space_override_mode", - "getter": "get_linear_damp_space_override_mode" + "getter": "get_linear_damp_space_override_mode", + "documentation": "Override mode for linear damping calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "float", "name": "linear_damp", "setter": "set_linear_damp", - "getter": "get_linear_damp" + "getter": "get_linear_damp", + "documentation": "The rate at which objects stop moving in this area. Represents the linear velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping." }, { "type": "int", "name": "angular_damp_space_override", "setter": "set_angular_damp_space_override_mode", - "getter": "get_angular_damp_space_override_mode" + "getter": "get_angular_damp_space_override_mode", + "documentation": "Override mode for angular damping calculations within this area. See [enum SpaceOverride] for possible values." }, { "type": "float", "name": "angular_damp", "setter": "set_angular_damp", - "getter": "get_angular_damp" + "getter": "get_angular_damp", + "documentation": "The rate at which objects stop spinning in this area. Represents the angular velocity lost per second.\nSee [member ProjectSettings.physics/3d/default_angular_damp] for more details about damping." }, { "type": "float", "name": "wind_force_magnitude", "setter": "set_wind_force_magnitude", - "getter": "get_wind_force_magnitude" + "getter": "get_wind_force_magnitude", + "documentation": "The magnitude of area-specific wind force." }, { "type": "float", "name": "wind_attenuation_factor", "setter": "set_wind_attenuation_factor", - "getter": "get_wind_attenuation_factor" + "getter": "get_wind_attenuation_factor", + "documentation": "The exponential rate at which wind force decreases with distance from its origin." }, { "type": "NodePath", "name": "wind_source_path", "setter": "set_wind_source_path", - "getter": "get_wind_source_path" + "getter": "get_wind_source_path", + "documentation": "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." }, { "type": "bool", "name": "audio_bus_override", "setter": "set_audio_bus_override", - "getter": "is_overriding_audio_bus" + "getter": "is_overriding_audio_bus", + "documentation": "If [code]true[/code], the area's audio bus overrides the default audio bus." }, { "type": "StringName", "name": "audio_bus_name", "setter": "set_audio_bus_name", - "getter": "get_audio_bus_name" + "getter": "get_audio_bus_name", + "documentation": "The name of the area's audio bus." }, { "type": "bool", "name": "reverb_bus_enabled", "setter": "set_use_reverb_bus", - "getter": "is_using_reverb_bus" + "getter": "is_using_reverb_bus", + "documentation": "If [code]true[/code], the area applies reverb to its associated audio." }, { "type": "StringName", "name": "reverb_bus_name", "setter": "set_reverb_bus_name", - "getter": "get_reverb_bus_name" + "getter": "get_reverb_bus_name", + "documentation": "The name of the reverb bus to use for this area's associated audio." }, { "type": "float", "name": "reverb_bus_amount", "setter": "set_reverb_amount", - "getter": "get_reverb_amount" + "getter": "get_reverb_amount", + "documentation": "The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision." }, { "type": "float", "name": "reverb_bus_uniformity", "setter": "set_reverb_uniformity", - "getter": "get_reverb_uniformity" + "getter": "get_reverb_uniformity", + "documentation": "The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision." } - ] + ], + "documentation": "[Area3D] is a region of 3D space defined by one or multiple [CollisionShape3D] or [CollisionPolygon3D] child nodes. It detects when other [CollisionObject3D]s enter or exit it, and it also keeps track of which collision objects haven't exited it yet (i.e. which one are overlapping it).\nThis node can also locally alter or override physics parameters (gravity, damping) and route audio to custom audio buses.\n[b]Warning:[/b] Using a [ConcavePolygonShape3D] inside a [CollisionShape3D] child of this node (created e.g. by using the [b]Create Trimesh Collision Sibling[/b] option in the [b]Mesh[/b] menu that appears when selecting a [MeshInstance3D] node) may give unexpected results, since this collision shape is hollow. If this is not desired, it has to be split into multiple [ConvexPolygonShape3D]s or primitive shapes like [BoxShape3D], or in some cases it may be replaceable by a [CollisionPolygon3D]." }, { "name": "ArrayMesh", @@ -34965,7 +38017,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added." }, { "name": "get_blend_shape_count", @@ -34977,7 +38030,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of blend shapes that the [ArrayMesh] holds." }, { "name": "get_blend_shape_name", @@ -34995,7 +38049,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the name of the blend shape at this index." }, { "name": "set_blend_shape_name", @@ -35014,7 +38069,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Sets the name of the blend shape at this index." }, { "name": "clear_blend_shapes", @@ -35022,7 +38078,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all blend shapes from this [ArrayMesh]." }, { "name": "set_blend_shape_mode", @@ -35083,7 +38140,8 @@ "type": "bitfield::Mesh.ArrayFormat", "default_value": "0" } - ] + ], + "documentation": "Creates a new surface. [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface.\nSurfaces are created to be rendered using a [param primitive], which may be any of the values defined in [enum Mesh.PrimitiveType].\nThe [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 [code]null[/code] if it is not used by the surface. For example, [code]arrays[0][/code] 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.\nThe [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 [code]null[/code].\nThe [param lods] argument is a dictionary with [float] keys and [PackedInt32Array] values. Each entry in the dictionary represents a 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 a LOD also increases the distance that the objects has to be from the camera before the LOD is used.\nThe [param flags] argument is the bitwise or of, as required: One value of [enum Mesh.ArrayCustomFormat] left shifted by [code]ARRAY_FORMAT_CUSTOMn_SHIFT[/code] 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].\n[b]Note:[/b] When using indices, it is recommended to only use points, lines, or triangles." }, { "name": "clear_surfaces", @@ -35091,7 +38149,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all surfaces from this [ArrayMesh]." }, { "name": "surface_update_vertex_region", @@ -35115,7 +38174,8 @@ "name": "data", "type": "PackedByteArray" } - ] + ], + "documentation": "" }, { "name": "surface_update_attribute_region", @@ -35139,7 +38199,8 @@ "name": "data", "type": "PackedByteArray" } - ] + ], + "documentation": "" }, { "name": "surface_update_skin_region", @@ -35163,7 +38224,8 @@ "name": "data", "type": "PackedByteArray" } - ] + ], + "documentation": "" }, { "name": "surface_get_array_len", @@ -35182,7 +38244,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays])." }, { "name": "surface_get_array_index_len", @@ -35201,7 +38264,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays])." }, { "name": "surface_get_format", @@ -35219,7 +38283,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the format mask of the requested surface (see [method add_surface_from_arrays])." }, { "name": "surface_get_primitive_type", @@ -35237,7 +38302,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the primitive type of the requested surface (see [method add_surface_from_arrays])." }, { "name": "surface_find_by_name", @@ -35255,7 +38321,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned." }, { "name": "surface_set_name", @@ -35274,7 +38341,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Sets a name for a given surface." }, { "name": "surface_get_name", @@ -35292,7 +38360,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the name assigned to this surface." }, { "name": "regen_normal_maps", @@ -35300,7 +38369,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Regenerates tangents for each of the [ArrayMesh]'s surfaces." }, { "name": "lightmap_unwrap", @@ -35322,7 +38392,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping." }, { "name": "set_custom_aabb", @@ -35380,21 +38451,25 @@ "type": "int", "name": "blend_shape_mode", "setter": "set_blend_shape_mode", - "getter": "get_blend_shape_mode" + "getter": "get_blend_shape_mode", + "documentation": "Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]." }, { "type": "AABB", "name": "custom_aabb", "setter": "set_custom_aabb", - "getter": "get_custom_aabb" + "getter": "get_custom_aabb", + "documentation": "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." }, { "type": "ArrayMesh", "name": "shadow_mesh", "setter": "set_shadow_mesh", - "getter": "get_shadow_mesh" + "getter": "get_shadow_mesh", + "documentation": "An optional mesh which is used for rendering shadows and can be used for the depth prepass. Can be used to increase performance of shadow rendering by using a mesh that only contains vertex position data (without normals, UVs, colors, etc.)." } - ] + ], + "documentation": "The [ArrayMesh] is used to construct a [Mesh] by specifying the attributes as arrays.\nThe most basic example is the creation of a single triangle:\n[codeblocks]\n[gdscript]\nvar vertices = PackedVector3Array()\nvertices.push_back(Vector3(0, 1, 0))\nvertices.push_back(Vector3(1, 0, 0))\nvertices.push_back(Vector3(0, 0, 1))\n\n# Initialize the ArrayMesh.\nvar arr_mesh = ArrayMesh.new()\nvar arrays = []\narrays.resize(Mesh.ARRAY_MAX)\narrays[Mesh.ARRAY_VERTEX] = vertices\n\n# Create the Mesh.\narr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays)\nvar m = MeshInstance3D.new()\nm.mesh = arr_mesh\n[/gdscript]\n[csharp]\nvar vertices = new Vector3[]\n{\n new Vector3(0, 1, 0),\n new Vector3(1, 0, 0),\n new Vector3(0, 0, 1),\n};\n\n// Initialize the ArrayMesh.\nvar arrMesh = new ArrayMesh();\nvar arrays = new Godot.Collections.Array();\narrays.Resize((int)Mesh.ArrayType.Max);\narrays[(int)Mesh.ArrayType.Vertex] = vertices;\n\n// Create the Mesh.\narrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays);\nvar m = new MeshInstance3D();\nm.Mesh = arrMesh;\n[/csharp]\n[/codeblocks]\nThe [MeshInstance3D] is ready to be added to the [SceneTree] to be shown.\nSee also [ImmediateMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation.\n[b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes." }, { "name": "ArrayOccluder3D", @@ -35419,7 +38494,8 @@ "name": "indices", "type": "PackedInt32Array" } - ] + ], + "documentation": "Sets [member indices] and [member vertices], while updating the final occluder only once after both values are set." }, { "name": "set_vertices", @@ -35455,15 +38531,18 @@ "type": "PackedVector3Array", "name": "vertices", "setter": "set_vertices", - "getter": "get_vertices" + "getter": "get_vertices", + "documentation": "The occluder's vertex positions in local 3D coordinates.\n[b]Note:[/b] 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." }, { "type": "PackedInt32Array", "name": "indices", "setter": "set_indices", - "getter": "get_indices" + "getter": "get_indices", + "documentation": "The occluder's index position. Indices determine which points from the [member vertices] array should be drawn, and in which order.\n[b]Note:[/b] 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." } - ] + ], + "documentation": "[ArrayOccluder3D] stores an arbitrary 3D polygon shape that can be used by the engine's occlusion culling system. This is analogous to [ArrayMesh], but for occluders.\nSee [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling." }, { "name": "AspectRatioContainer", @@ -35478,19 +38557,23 @@ "values": [ { "name": "STRETCH_WIDTH_CONTROLS_HEIGHT", - "value": 0 + "value": 0, + "documentation": "The height of child controls is automatically adjusted based on the width of the container." }, { "name": "STRETCH_HEIGHT_CONTROLS_WIDTH", - "value": 1 + "value": 1, + "documentation": "The width of child controls is automatically adjusted based on the height of the container." }, { "name": "STRETCH_FIT", - "value": 2 + "value": 2, + "documentation": "The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio." }, { "name": "STRETCH_COVER", - "value": 3 + "value": 3, + "documentation": "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.\nWhen 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." } ] }, @@ -35500,15 +38583,18 @@ "values": [ { "name": "ALIGNMENT_BEGIN", - "value": 0 + "value": 0, + "documentation": "Aligns child controls with the beginning (left or top) of the container." }, { "name": "ALIGNMENT_CENTER", - "value": 1 + "value": 1, + "documentation": "Aligns child controls with the center of the container." }, { "name": "ALIGNMENT_END", - "value": 2 + "value": 2, + "documentation": "Aligns child controls with the end (right or bottom) of the container." } ] } @@ -35622,27 +38708,32 @@ "type": "float", "name": "ratio", "setter": "set_ratio", - "getter": "get_ratio" + "getter": "get_ratio", + "documentation": "The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the [member stretch_mode]." }, { "type": "int", "name": "stretch_mode", "setter": "set_stretch_mode", - "getter": "get_stretch_mode" + "getter": "get_stretch_mode", + "documentation": "The stretch mode used to align child controls." }, { "type": "int", "name": "alignment_horizontal", "setter": "set_alignment_horizontal", - "getter": "get_alignment_horizontal" + "getter": "get_alignment_horizontal", + "documentation": "Specifies the horizontal relative position of child controls." }, { "type": "int", "name": "alignment_vertical", "setter": "set_alignment_vertical", - "getter": "get_alignment_vertical" + "getter": "get_alignment_vertical", + "documentation": "Specifies the vertical relative position of child controls." } - ] + ], + "documentation": "A container type that arranges its child controls in a way that preserves their proportions automatically when the container is resized. Useful when a container has a dynamic size and the child nodes must adjust their sizes accordingly without losing their aspect ratios." }, { "name": "AtlasTexture", @@ -35757,34 +38848,40 @@ "type": "Texture2D", "name": "atlas", "setter": "set_atlas", - "getter": "get_atlas" + "getter": "get_atlas", + "documentation": "The texture that contains the atlas. Can be any type inheriting from [Texture2D], including another [AtlasTexture]." }, { "type": "Rect2", "name": "region", "setter": "set_region", - "getter": "get_region" + "getter": "get_region", + "documentation": "The region used to draw the [member atlas]." }, { "type": "Rect2", "name": "margin", "setter": "set_margin", - "getter": "get_margin" + "getter": "get_margin", + "documentation": "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." }, { "type": "bool", "name": "filter_clip", "setter": "set_filter_clip", - "getter": "has_filter_clip" + "getter": "has_filter_clip", + "documentation": "If [code]true[/code], the area outside of the [member region] is clipped to avoid bleeding of the surrounding texture pixels." } - ] + ], + "documentation": "[Texture2D] resource that draws only part of its [member atlas] texture, as defined by the [member region]. An additional [member margin] can also be set, which is useful for small adjustments.\nMultiple [AtlasTexture] resources can be cropped from the same [member atlas]. Packing many smaller textures into a singular large texture helps to optimize video memory costs and render calls.\n[b]Note:[/b] [AtlasTexture] cannot be used in an [AnimatedTexture], and may not tile properly in nodes such as [TextureRect], when inside other [AtlasTexture] resources." }, { "name": "AudioBusLayout", "is_refcounted": true, "is_instantiable": true, "inherits": "Resource", - "api_type": "core" + "api_type": "core", + "documentation": "Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage." }, { "name": "AudioEffect", @@ -35801,9 +38898,11 @@ "is_virtual": true, "return_value": { "type": "AudioEffectInstance" - } + }, + "documentation": "" } - ] + ], + "documentation": "Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on." }, { "name": "AudioEffectAmplify", @@ -35845,23 +38944,27 @@ "type": "float", "name": "volume_db", "setter": "set_volume_db", - "getter": "get_volume_db" + "getter": "get_volume_db", + "documentation": "Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24." } - ] + ], + "documentation": "Increases or decreases the volume being routed through the audio bus." }, { "name": "AudioEffectBandLimitFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass." }, { "name": "AudioEffectBandPassFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band." }, { "name": "AudioEffectCapture", @@ -35886,7 +38989,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if at least [param frames] audio frames are available to read in the internal ring buffer." }, { "name": "get_buffer", @@ -35904,7 +39008,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the next [param frames] audio samples from the internal ring buffer.\nReturns a [PackedVector2Array] containing exactly [param frames] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available." }, { "name": "clear_buffer", @@ -35912,7 +39017,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the internal ring buffer." }, { "name": "set_buffer_length", @@ -35951,7 +39057,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of frames available to read using [method get_buffer]." }, { "name": "get_discarded_frames", @@ -35963,7 +39070,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the number of audio frames discarded from the audio bus due to full buffer." }, { "name": "get_buffer_length_frames", @@ -35975,7 +39083,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the total size of the internal ring buffer in frames." }, { "name": "get_pushed_frames", @@ -35987,7 +39096,8 @@ "return_value": { "type": "int", "meta": "int64" - } + }, + "documentation": "Returns the number of audio frames inserted from the audio bus." } ], "properties": [ @@ -35995,9 +39105,11 @@ "type": "float", "name": "buffer_length", "setter": "set_buffer_length", - "getter": "get_buffer_length" + "getter": "get_buffer_length", + "documentation": "Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized." } - ] + ], + "documentation": "AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.\nApplication code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from an [AudioStreamMicrophone], implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.\n[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings." }, { "name": "AudioEffectChorus", @@ -36051,7 +39163,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_delay_ms", @@ -36070,7 +39183,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_voice_rate_hz", @@ -36090,7 +39204,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_rate_hz", @@ -36109,7 +39224,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_voice_depth_ms", @@ -36129,7 +39245,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_depth_ms", @@ -36148,7 +39265,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_voice_level_db", @@ -36168,7 +39286,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_level_db", @@ -36187,7 +39306,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_voice_cutoff_hz", @@ -36207,7 +39327,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_cutoff_hz", @@ -36226,7 +39347,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_voice_pan", @@ -36246,7 +39368,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "" }, { "name": "get_voice_pan", @@ -36265,7 +39388,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "set_wet", @@ -36327,21 +39451,25 @@ "type": "int", "name": "voice_count", "setter": "set_voice_count", - "getter": "get_voice_count" + "getter": "get_voice_count", + "documentation": "The number of voices in the effect." }, { "type": "float", "name": "dry", "setter": "set_dry", - "getter": "get_dry" + "getter": "get_dry", + "documentation": "The effect's raw signal." }, { "type": "float", "name": "wet", "setter": "set_wet", - "getter": "get_wet" + "getter": "get_wet", + "documentation": "The effect's processed signal." } - ] + ], + "documentation": "Adds a chorus audio effect. The effect applies a filter with voices to duplicate the audio source and manipulate it through the filter." }, { "name": "AudioEffectCompressor", @@ -36543,45 +39671,53 @@ "type": "float", "name": "threshold", "setter": "set_threshold", - "getter": "get_threshold" + "getter": "get_threshold", + "documentation": "The level above which compression is applied to the audio. Value can range from -60 to 0." }, { "type": "float", "name": "ratio", "setter": "set_ratio", - "getter": "get_ratio" + "getter": "get_ratio", + "documentation": "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." }, { "type": "float", "name": "gain", "setter": "set_gain", - "getter": "get_gain" + "getter": "get_gain", + "documentation": "Gain applied to the output signal." }, { "type": "float", "name": "attack_us", "setter": "set_attack_us", - "getter": "get_attack_us" + "getter": "get_attack_us", + "documentation": "Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000." }, { "type": "float", "name": "release_ms", "setter": "set_release_ms", - "getter": "get_release_ms" + "getter": "get_release_ms", + "documentation": "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." }, { "type": "float", "name": "mix", "setter": "set_mix", - "getter": "get_mix" + "getter": "get_mix", + "documentation": "Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet)." }, { "type": "StringName", "name": "sidechain", "setter": "set_sidechain", - "getter": "get_sidechain" + "getter": "get_sidechain", + "documentation": "Reduce the sound level using another audio bus for threshold detection." } - ] + ], + "documentation": "Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB).\nCompressor has many uses in the mix:\n- In the Master bus to compress the whole output (although an [AudioEffectLimiter] is probably better).\n- In voice channels to ensure they sound as balanced as possible.\n- Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard.\n- Accentuates transients by using a wider attack, making effects sound more punchy." }, { "name": "AudioEffectDelay", @@ -36941,81 +40077,95 @@ "type": "float", "name": "dry", "setter": "set_dry", - "getter": "get_dry" + "getter": "get_dry", + "documentation": "Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1." }, { "type": "bool", "name": "tap1_active", "setter": "set_tap1_active", - "getter": "is_tap1_active" + "getter": "is_tap1_active", + "documentation": "If [code]true[/code], the first tap will be enabled." }, { "type": "float", "name": "tap1_delay_ms", "setter": "set_tap1_delay_ms", - "getter": "get_tap1_delay_ms" + "getter": "get_tap1_delay_ms", + "documentation": "First tap delay time in milliseconds." }, { "type": "float", "name": "tap1_level_db", "setter": "set_tap1_level_db", - "getter": "get_tap1_level_db" + "getter": "get_tap1_level_db", + "documentation": "Sound level for the first tap." }, { "type": "float", "name": "tap1_pan", "setter": "set_tap1_pan", - "getter": "get_tap1_pan" + "getter": "get_tap1_pan", + "documentation": "Pan position for the first tap. Value can range from -1 (fully left) to 1 (fully right)." }, { "type": "bool", "name": "tap2_active", "setter": "set_tap2_active", - "getter": "is_tap2_active" + "getter": "is_tap2_active", + "documentation": "If [code]true[/code], the second tap will be enabled." }, { "type": "float", "name": "tap2_delay_ms", "setter": "set_tap2_delay_ms", - "getter": "get_tap2_delay_ms" + "getter": "get_tap2_delay_ms", + "documentation": "Second tap delay time in milliseconds." }, { "type": "float", "name": "tap2_level_db", "setter": "set_tap2_level_db", - "getter": "get_tap2_level_db" + "getter": "get_tap2_level_db", + "documentation": "Sound level for the second tap." }, { "type": "float", "name": "tap2_pan", "setter": "set_tap2_pan", - "getter": "get_tap2_pan" + "getter": "get_tap2_pan", + "documentation": "Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right)." }, { "type": "bool", "name": "feedback_active", "setter": "set_feedback_active", - "getter": "is_feedback_active" + "getter": "is_feedback_active", + "documentation": "If [code]true[/code], feedback is enabled." }, { "type": "float", "name": "feedback_delay_ms", "setter": "set_feedback_delay_ms", - "getter": "get_feedback_delay_ms" + "getter": "get_feedback_delay_ms", + "documentation": "Feedback delay time in milliseconds." }, { "type": "float", "name": "feedback_level_db", "setter": "set_feedback_level_db", - "getter": "get_feedback_level_db" + "getter": "get_feedback_level_db", + "documentation": "Sound level for feedback." }, { "type": "float", "name": "feedback_lowpass", "setter": "set_feedback_lowpass", - "getter": "get_feedback_lowpass" + "getter": "get_feedback_lowpass", + "documentation": "Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal." } - ] + ], + "documentation": "Plays input signal back after a period of time. The delayed signal may be played back multiple times to create the sound of a repeating, decaying echo. Delay effects range from a subtle echo effect to a pronounced blending of previous sounds with new sounds." }, { "name": "AudioEffectDistortion", @@ -37030,23 +40180,28 @@ "values": [ { "name": "MODE_CLIP", - "value": 0 + "value": 0, + "documentation": "Digital distortion effect which cuts off peaks at the top and bottom of the waveform." }, { "name": "MODE_ATAN", - "value": 1 + "value": 1, + "documentation": "" }, { "name": "MODE_LOFI", - "value": 2 + "value": 2, + "documentation": "Low-resolution digital distortion effect (bit depth reduction). You can use it to emulate the sound of early digital audio devices." }, { "name": "MODE_OVERDRIVE", - "value": 3 + "value": 3, + "documentation": "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." }, { "name": "MODE_WAVESHAPE", - "value": 4 + "value": 4, + "documentation": "Waveshaper distortions are used mainly by electronic musicians to achieve an extra-abrasive sound." } ] } @@ -37191,33 +40346,39 @@ "type": "int", "name": "mode", "setter": "set_mode", - "getter": "get_mode" + "getter": "get_mode", + "documentation": "Distortion type." }, { "type": "float", "name": "pre_gain", "setter": "set_pre_gain", - "getter": "get_pre_gain" + "getter": "get_pre_gain", + "documentation": "Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60." }, { "type": "float", "name": "keep_hf_hz", "setter": "set_keep_hf_hz", - "getter": "get_keep_hf_hz" + "getter": "get_keep_hf_hz", + "documentation": "High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000." }, { "type": "float", "name": "drive", "setter": "set_drive", - "getter": "get_drive" + "getter": "get_drive", + "documentation": "Distortion power. Value can range from 0 to 1." }, { "type": "float", "name": "post_gain", "setter": "set_post_gain", - "getter": "get_post_gain" + "getter": "get_post_gain", + "documentation": "Increases or decreases the volume after the effect, in decibels. Value can range from -80 to 24." } - ] + ], + "documentation": "Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape.\nBy distorting the waveform the frequency content changes, which will often make the sound \"crunchy\" or \"abrasive\". For games, it can simulate sound coming from some saturated device or speaker very efficiently." }, { "name": "AudioEffectEQ", @@ -37244,7 +40405,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets band's gain at the specified index, in dB." }, { "name": "get_band_gain_db", @@ -37263,7 +40425,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the band's gain at the specified index, in dB." }, { "name": "get_band_count", @@ -37275,30 +40438,35 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of bands of the equalizer." } - ] + ], + "documentation": "AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged)." }, { "name": "AudioEffectEQ10", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectEQ", - "api_type": "core" + "api_type": "core", + "documentation": "Frequency bands:\nBand 1: 31 Hz\nBand 2: 62 Hz\nBand 3: 125 Hz\nBand 4: 250 Hz\nBand 5: 500 Hz\nBand 6: 1000 Hz\nBand 7: 2000 Hz\nBand 8: 4000 Hz\nBand 9: 8000 Hz\nBand 10: 16000 Hz\nSee also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21]." }, { "name": "AudioEffectEQ21", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectEQ", - "api_type": "core" + "api_type": "core", + "documentation": "Frequency bands:\nBand 1: 22 Hz\nBand 2: 32 Hz\nBand 3: 44 Hz\nBand 4: 63 Hz\nBand 5: 90 Hz\nBand 6: 125 Hz\nBand 7: 175 Hz\nBand 8: 250 Hz\nBand 9: 350 Hz\nBand 10: 500 Hz\nBand 11: 700 Hz\nBand 12: 1000 Hz\nBand 13: 1400 Hz\nBand 14: 2000 Hz\nBand 15: 2800 Hz\nBand 16: 4000 Hz\nBand 17: 5600 Hz\nBand 18: 8000 Hz\nBand 19: 11000 Hz\nBand 20: 16000 Hz\nBand 21: 22000 Hz\nSee also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10]." }, { "name": "AudioEffectEQ6", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectEQ", - "api_type": "core" + "api_type": "core", + "documentation": "Frequency bands:\nBand 1: 32 Hz\nBand 2: 100 Hz\nBand 3: 320 Hz\nBand 4: 1000 Hz\nBand 5: 3200 Hz\nBand 6: 10000 Hz\nSee also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21]." }, { "name": "AudioEffectFilter", @@ -37313,19 +40481,23 @@ "values": [ { "name": "FILTER_6DB", - "value": 0 + "value": 0, + "documentation": "" }, { "name": "FILTER_12DB", - "value": 1 + "value": 1, + "documentation": "" }, { "name": "FILTER_18DB", - "value": 2 + "value": 2, + "documentation": "" }, { "name": "FILTER_24DB", - "value": 3 + "value": 3, + "documentation": "" } ] } @@ -37443,41 +40615,48 @@ "type": "float", "name": "cutoff_hz", "setter": "set_cutoff", - "getter": "get_cutoff" + "getter": "get_cutoff", + "documentation": "Threshold frequency for the filter, in Hz." }, { "type": "float", "name": "resonance", "setter": "set_resonance", - "getter": "get_resonance" + "getter": "get_resonance", + "documentation": "Amount of boost in the frequency range near the cutoff frequency." }, { "type": "float", "name": "gain", "setter": "set_gain", - "getter": "get_gain" + "getter": "get_gain", + "documentation": "Gain amount of the frequencies after the filter." }, { "type": "int", "name": "db", "setter": "set_db", - "getter": "get_db" + "getter": "get_db", + "documentation": "" } - ] + ], + "documentation": "Allows frequencies other than the [member cutoff_hz] to pass." }, { "name": "AudioEffectHighPassFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass." }, { "name": "AudioEffectHighShelfFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Reduces all frequencies above the [member AudioEffectFilter.cutoff_hz]." }, { "name": "AudioEffectInstance", @@ -37506,7 +40685,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "_process_silence", @@ -37516,9 +40696,11 @@ "is_virtual": true, "return_value": { "type": "bool" - } + }, + "documentation": "" } - ] + ], + "documentation": "" }, { "name": "AudioEffectLimiter", @@ -37641,48 +40823,56 @@ "type": "float", "name": "ceiling_db", "setter": "set_ceiling_db", - "getter": "get_ceiling_db" + "getter": "get_ceiling_db", + "documentation": "The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1." }, { "type": "float", "name": "threshold_db", "setter": "set_threshold_db", - "getter": "get_threshold_db" + "getter": "get_threshold_db", + "documentation": "Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0." }, { "type": "float", "name": "soft_clip_db", "setter": "set_soft_clip_db", - "getter": "get_soft_clip_db" + "getter": "get_soft_clip_db", + "documentation": "Applies a gain to the limited waves, in decibels. Value can range from 0 to 6." }, { "type": "float", "name": "soft_clip_ratio", "setter": "set_soft_clip_ratio", - "getter": "get_soft_clip_ratio" + "getter": "get_soft_clip_ratio", + "documentation": "" } - ] + ], + "documentation": "A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping.\nSoft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded." }, { "name": "AudioEffectLowPassFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass." }, { "name": "AudioEffectLowShelfFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Reduces all frequencies below the [member AudioEffectFilter.cutoff_hz]." }, { "name": "AudioEffectNotchFilter", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioEffectFilter", - "api_type": "core" + "api_type": "core", + "documentation": "Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range." }, { "name": "AudioEffectPanner", @@ -37724,9 +40914,11 @@ "type": "float", "name": "pan", "setter": "set_pan", - "getter": "get_pan" + "getter": "get_pan", + "documentation": "Pan position. Value can range from -1 (fully left) to 1 (fully right)." } - ] + ], + "documentation": "Determines how much of an audio signal is sent to the left and right buses." }, { "name": "AudioEffectPhaser", @@ -37876,33 +41068,39 @@ "type": "float", "name": "range_min_hz", "setter": "set_range_min_hz", - "getter": "get_range_min_hz" + "getter": "get_range_min_hz", + "documentation": "Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000." }, { "type": "float", "name": "range_max_hz", "setter": "set_range_max_hz", - "getter": "get_range_max_hz" + "getter": "get_range_max_hz", + "documentation": "Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000." }, { "type": "float", "name": "rate_hz", "setter": "set_rate_hz", - "getter": "get_rate_hz" + "getter": "get_rate_hz", + "documentation": "Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range." }, { "type": "float", "name": "feedback", "setter": "set_feedback", - "getter": "get_feedback" + "getter": "get_feedback", + "documentation": "Output percent of modified sound. Value can range from 0.1 to 0.9." }, { "type": "float", "name": "depth", "setter": "set_depth", - "getter": "get_depth" + "getter": "get_depth", + "documentation": "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." } - ] + ], + "documentation": "Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator." }, { "name": "AudioEffectPitchShift", @@ -37917,27 +41115,33 @@ "values": [ { "name": "FFT_SIZE_256", - "value": 0 + "value": 0, + "documentation": "Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time." }, { "name": "FFT_SIZE_512", - "value": 1 + "value": 1, + "documentation": "Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time." }, { "name": "FFT_SIZE_1024", - "value": 2 + "value": 2, + "documentation": "Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time." }, { "name": "FFT_SIZE_2048", - "value": 3 + "value": 3, + "documentation": "Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time." }, { "name": "FFT_SIZE_4096", - "value": 4 + "value": 4, + "documentation": "Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time." }, { "name": "FFT_SIZE_MAX", - "value": 5 + "value": 5, + "documentation": "Represents the size of the [enum FFTSize] enum." } ] } @@ -38028,21 +41232,25 @@ "type": "float", "name": "pitch_scale", "setter": "set_pitch_scale", - "getter": "get_pitch_scale" + "getter": "get_pitch_scale", + "documentation": "The pitch scale to use. [code]1.0[/code] is the default pitch and plays sounds unaltered. [member pitch_scale] can range from [code]0.0[/code] (infinitely low pitch, inaudible) to [code]16[/code] (16 times higher than the initial pitch)." }, { "type": "float", "name": "oversampling", "setter": "set_oversampling", - "getter": "get_oversampling" + "getter": "get_oversampling", + "documentation": "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." }, { "type": "int", "name": "fft_size", "setter": "set_fft_size", - "getter": "get_fft_size" + "getter": "get_fft_size", + "documentation": "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." } - ] + ], + "documentation": "Allows modulation of pitch independently of tempo. All frequencies can be increased/decreased with minimal effect on transients." }, { "name": "AudioEffectRecord", @@ -38063,7 +41271,8 @@ "name": "record", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample." }, { "name": "is_recording_active", @@ -38074,7 +41283,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns whether the recording is active or not." }, { "name": "set_format", @@ -38110,7 +41320,8 @@ "hash": 2964110865, "return_value": { "type": "AudioStreamWAV" - } + }, + "documentation": "Returns the recorded sample." } ], "properties": [ @@ -38118,9 +41329,11 @@ "type": "int", "name": "format", "setter": "set_format", - "getter": "get_format" + "getter": "get_format", + "documentation": "Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats." } - ] + ], + "documentation": "Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the \"Master\" audio bus.\nCan be used (with an [AudioStreamMicrophone]) to record from a microphone.\nIt sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample." }, { "name": "AudioEffectReverb", @@ -38351,51 +41564,60 @@ "type": "float", "name": "predelay_msec", "setter": "set_predelay_msec", - "getter": "get_predelay_msec" + "getter": "get_predelay_msec", + "documentation": "Time between the original signal and the early reflections of the reverb signal, in milliseconds." }, { "type": "float", "name": "predelay_feedback", "setter": "set_predelay_feedback", - "getter": "get_predelay_feedback" + "getter": "get_predelay_feedback", + "documentation": "Output percent of predelay. Value can range from 0 to 1." }, { "type": "float", "name": "room_size", "setter": "set_room_size", - "getter": "get_room_size" + "getter": "get_room_size", + "documentation": "Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1." }, { "type": "float", "name": "damping", "setter": "set_damping", - "getter": "get_damping" + "getter": "get_damping", + "documentation": "Defines how reflective the imaginary room's walls are. Value can range from 0 to 1." }, { "type": "float", "name": "spread", "setter": "set_spread", - "getter": "get_spread" + "getter": "get_spread", + "documentation": "Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1." }, { "type": "float", "name": "hipass", "setter": "set_hpf", - "getter": "get_hpf" + "getter": "get_hpf", + "documentation": "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." }, { "type": "float", "name": "dry", "setter": "set_dry", - "getter": "get_dry" + "getter": "get_dry", + "documentation": "Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1." }, { "type": "float", "name": "wet", "setter": "set_wet", - "getter": "get_wet" + "getter": "get_wet", + "documentation": "Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1." } - ] + ], + "documentation": "Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces." }, { "name": "AudioEffectSpectrumAnalyzer", @@ -38410,27 +41632,33 @@ "values": [ { "name": "FFT_SIZE_256", - "value": 0 + "value": 0, + "documentation": "Use a buffer of 256 samples for the Fast Fourier transform. Lowest latency, but least stable over time." }, { "name": "FFT_SIZE_512", - "value": 1 + "value": 1, + "documentation": "Use a buffer of 512 samples for the Fast Fourier transform. Low latency, but less stable over time." }, { "name": "FFT_SIZE_1024", - "value": 2 + "value": 2, + "documentation": "Use a buffer of 1024 samples for the Fast Fourier transform. This is a compromise between latency and stability over time." }, { "name": "FFT_SIZE_2048", - "value": 3 + "value": 3, + "documentation": "Use a buffer of 2048 samples for the Fast Fourier transform. High latency, but stable over time." }, { "name": "FFT_SIZE_4096", - "value": 4 + "value": 4, + "documentation": "Use a buffer of 4096 samples for the Fast Fourier transform. Highest latency, but most stable over time." }, { "name": "FFT_SIZE_MAX", - "value": 5 + "value": 5, + "documentation": "Represents the size of the [enum FFTSize] enum." } ] } @@ -38521,21 +41749,25 @@ "type": "float", "name": "buffer_length", "setter": "set_buffer_length", - "getter": "get_buffer_length" + "getter": "get_buffer_length", + "documentation": "The length of the buffer to keep (in seconds). Higher values keep data around for longer, but require more memory." }, { "type": "float", "name": "tap_back_pos", "setter": "set_tap_back_pos", - "getter": "get_tap_back_pos" + "getter": "get_tap_back_pos", + "documentation": "" }, { "type": "int", "name": "fft_size", "setter": "set_fft_size", - "getter": "get_fft_size" + "getter": "get_fft_size", + "documentation": "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." } - ] + ], + "documentation": "This audio effect does not affect sound output, but can be used for real-time audio visualizations.\nSee also [AudioStreamGenerator] for procedurally generating sounds." }, { "name": "AudioEffectSpectrumAnalyzerInstance", @@ -38550,11 +41782,13 @@ "values": [ { "name": "MAGNITUDE_AVERAGE", - "value": 0 + "value": 0, + "documentation": "Use the average value as magnitude." }, { "name": "MAGNITUDE_MAX", - "value": 1 + "value": 1, + "documentation": "Use the maximum value as magnitude." } ] } @@ -38589,9 +41823,11 @@ "type": "enum::AudioEffectSpectrumAnalyzerInstance.MagnitudeMode", "default_value": "1" } - ] + ], + "documentation": "" } - ] + ], + "documentation": "" }, { "name": "AudioEffectStereoEnhance", @@ -38687,21 +41923,25 @@ "type": "float", "name": "pan_pullout", "setter": "set_pan_pullout", - "getter": "get_pan_pullout" + "getter": "get_pan_pullout", + "documentation": "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." }, { "type": "float", "name": "time_pullout_ms", "setter": "set_time_pullout", - "getter": "get_time_pullout" + "getter": "get_time_pullout", + "documentation": "" }, { "type": "float", "name": "surround", "setter": "set_surround", - "getter": "get_surround" + "getter": "get_surround", + "documentation": "" } - ] + ], + "documentation": "An audio effect that can be used to adjust the intensity of stereo panning." }, { "name": "AudioListener2D", @@ -38716,7 +41956,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Makes the [AudioListener2D] active, setting it as the hearing point for the sounds. If there is already another active [AudioListener2D], it will be disabled.\nThis method will have no effect if the [AudioListener2D] is not added to [SceneTree]." }, { "name": "clear_current", @@ -38724,7 +41965,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Disables the [AudioListener2D]. If it's not set as current, this method will have no effect." }, { "name": "is_current", @@ -38735,9 +41977,11 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if this [AudioListener2D] is currently active." } - ] + ], + "documentation": "Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. Only one [AudioListener2D] can be current. Using [method make_current] will disable the previous [AudioListener2D].\nIf there is no active [AudioListener2D] in the current [Viewport], center of the screen will be used as a hearing point for the audio. [AudioListener2D] needs to be inside [SceneTree] to function." }, { "name": "AudioListener3D", @@ -38752,7 +41996,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Enables the listener. This will override the current camera's listener." }, { "name": "clear_current", @@ -38760,7 +42005,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Disables the listener to use the current camera's listener instead." }, { "name": "is_current", @@ -38771,7 +42017,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise.\n[b]Note:[/b] 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." }, { "name": "get_listener_transform", @@ -38782,9 +42029,11 @@ "hash": 3229777777, "return_value": { "type": "Transform3D" - } + }, + "documentation": "Returns the listener's global orthonormalized [Transform3D]." } - ] + ], + "documentation": "Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera3D]." }, { "name": "AudioServer", @@ -38799,19 +42048,23 @@ "values": [ { "name": "SPEAKER_MODE_STEREO", - "value": 0 + "value": 0, + "documentation": "Two or fewer speakers were detected." }, { "name": "SPEAKER_SURROUND_31", - "value": 1 + "value": 1, + "documentation": "A 3.1 channel surround setup was detected." }, { "name": "SPEAKER_SURROUND_51", - "value": 2 + "value": 2, + "documentation": "A 5.1 channel surround setup was detected." }, { "name": "SPEAKER_SURROUND_71", - "value": 3 + "value": 3, + "documentation": "A 7.1 channel surround setup was detected." } ] } @@ -38857,7 +42110,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes the bus at index [param index]." }, { "name": "add_bus", @@ -38873,7 +42127,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "Adds a bus at [param at_position]." }, { "name": "move_bus", @@ -38893,7 +42148,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Moves the bus from index [param index] to index [param to_index]." }, { "name": "set_bus_name", @@ -38912,7 +42168,8 @@ "name": "name", "type": "String" } - ] + ], + "documentation": "Sets the name of the bus at index [param bus_idx] to [param name]." }, { "name": "get_bus_name", @@ -38930,7 +42187,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the name of the bus with the index [param bus_idx]." }, { "name": "get_bus_index", @@ -38948,7 +42206,8 @@ "name": "bus_name", "type": "StringName" } - ] + ], + "documentation": "Returns the index of the bus with the name [param bus_name]. Returns [code]-1[/code] if no bus with the specified name exist." }, { "name": "get_bus_channels", @@ -38967,7 +42226,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the number of channels of the bus at index [param bus_idx]." }, { "name": "set_bus_volume_db", @@ -38987,7 +42247,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the volume of the bus at index [param bus_idx] to [param volume_db]." }, { "name": "get_bus_volume_db", @@ -39006,7 +42267,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the volume of the bus at index [param bus_idx] in dB." }, { "name": "set_bus_send", @@ -39025,7 +42287,8 @@ "name": "send", "type": "StringName" } - ] + ], + "documentation": "Connects the output of the bus at [param bus_idx] to the bus named [param send]." }, { "name": "get_bus_send", @@ -39043,7 +42306,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the name of the bus that the bus at index [param bus_idx] sends to." }, { "name": "set_bus_solo", @@ -39062,7 +42326,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is in solo mode." }, { "name": "is_bus_solo", @@ -39080,7 +42345,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is in solo mode." }, { "name": "set_bus_mute", @@ -39099,7 +42365,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is muted." }, { "name": "is_bus_mute", @@ -39117,7 +42384,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is muted." }, { "name": "set_bus_bypass_effects", @@ -39136,7 +42404,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is bypassing effects." }, { "name": "is_bus_bypassing_effects", @@ -39154,7 +42423,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "If [code]true[/code], the bus at index [param bus_idx] is bypassing effects." }, { "name": "add_bus_effect", @@ -39182,7 +42452,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "Adds an [AudioEffect] effect to the bus [param bus_idx] at [param at_position]." }, { "name": "remove_bus_effect", @@ -39202,7 +42473,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes the effect at index [param effect_idx] from the bus at index [param bus_idx]." }, { "name": "get_bus_effect_count", @@ -39221,7 +42493,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the number of effects on the bus at [param bus_idx]." }, { "name": "get_bus_effect", @@ -39244,7 +42517,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [AudioEffect] at position [param effect_idx] in bus [param bus_idx]." }, { "name": "get_bus_effect_instance", @@ -39276,7 +42550,8 @@ "meta": "int32", "default_value": "0" } - ] + ], + "documentation": "Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel)." }, { "name": "swap_bus_effects", @@ -39301,7 +42576,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Swaps the position of two effects in bus [param bus_idx]." }, { "name": "set_bus_effect_enabled", @@ -39325,7 +42601,8 @@ "name": "enabled", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled." }, { "name": "is_bus_effect_enabled", @@ -39348,7 +42625,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "If [code]true[/code], the effect at index [param effect_idx] on the bus at index [param bus_idx] is enabled." }, { "name": "get_bus_peak_volume_left_db", @@ -39372,7 +42650,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the peak volume of the left speaker at bus index [param bus_idx] and channel index [param channel]." }, { "name": "get_bus_peak_volume_right_db", @@ -39396,7 +42675,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the peak volume of the right speaker at bus index [param bus_idx] and channel index [param channel]." }, { "name": "set_playback_speed_scale", @@ -39431,7 +42711,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Locks the audio driver's main loop.\n[b]Note:[/b] Remember to unlock it afterwards." }, { "name": "unlock", @@ -39439,7 +42720,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Unlocks the audio driver's main loop. (After locking it, you should always unlock it.)" }, { "name": "get_speaker_mode", @@ -39450,7 +42732,8 @@ "hash": 2549190337, "return_value": { "type": "enum::AudioServer.SpeakerMode" - } + }, + "documentation": "Returns the speaker configuration." }, { "name": "get_mix_rate", @@ -39462,7 +42745,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the sample rate at the output of the [AudioServer]." }, { "name": "get_output_device_list", @@ -39473,7 +42757,8 @@ "hash": 2981934095, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns the names of all audio output devices detected on the system." }, { "name": "get_output_device", @@ -39510,7 +42795,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "Returns the relative time until the next mix occurs." }, { "name": "get_time_since_last_mix", @@ -39522,7 +42808,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "Returns the relative time since the last mix occurred." }, { "name": "get_output_latency", @@ -39534,7 +42821,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "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.\n[b]Note:[/b] This can be expensive; it is not recommended to call [method get_output_latency] every frame." }, { "name": "get_input_device_list", @@ -39545,7 +42833,8 @@ "hash": 2981934095, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns the names of all audio input devices detected on the system.\n[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings." }, { "name": "get_input_device", @@ -39584,7 +42873,8 @@ "name": "bus_layout", "type": "AudioBusLayout" } - ] + ], + "documentation": "Overwrites the currently used [AudioBusLayout]." }, { "name": "generate_bus_layout", @@ -39595,7 +42885,8 @@ "hash": 3769973890, "return_value": { "type": "AudioBusLayout" - } + }, + "documentation": "Generates an [AudioBusLayout] using the available buses and effects." }, { "name": "set_enable_tagging_used_audio_streams", @@ -39609,12 +42900,14 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "" } ], "signals": [ { - "name": "bus_layout_changed" + "name": "bus_layout_changed", + "documentation": "Emitted when an audio bus is added, deleted, or moved." }, { "name": "bus_renamed", @@ -39631,7 +42924,8 @@ "name": "new_name", "type": "StringName" } - ] + ], + "documentation": "Emitted when the audio bus at [param bus_index] is renamed from [param old_name] to [param new_name]." } ], "properties": [ @@ -39639,27 +42933,32 @@ "type": "int", "name": "bus_count", "setter": "set_bus_count", - "getter": "get_bus_count" + "getter": "get_bus_count", + "documentation": "Number of available audio buses." }, { "type": "String", "name": "output_device", "setter": "set_output_device", - "getter": "get_output_device" + "getter": "get_output_device", + "documentation": "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 [code]\"Default\"[/code] will play audio on the system-wide default audio output. If an invalid device name is set, the value will be reverted back to [code]\"Default\"[/code]." }, { "type": "String", "name": "input_device", "setter": "set_input_device", - "getter": "get_input_device" + "getter": "get_input_device", + "documentation": "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 [code]\"Default\"[/code] will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to [code]\"Default\"[/code].\n[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings." }, { "type": "float", "name": "playback_speed_scale", "setter": "set_playback_speed_scale", - "getter": "get_playback_speed_scale" + "getter": "get_playback_speed_scale", + "documentation": "Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played at half its speed)." } - ] + ], + "documentation": "[AudioServer] is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface." }, { "name": "AudioStream", @@ -39676,7 +42975,8 @@ "is_virtual": true, "return_value": { "type": "AudioStreamPlayback" - } + }, + "documentation": "" }, { "name": "_get_stream_name", @@ -39686,7 +42986,8 @@ "is_virtual": true, "return_value": { "type": "String" - } + }, + "documentation": "" }, { "name": "_get_length", @@ -39697,7 +42998,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "" }, { "name": "_is_monophonic", @@ -39707,7 +43009,8 @@ "is_virtual": true, "return_value": { "type": "bool" - } + }, + "documentation": "" }, { "name": "_get_bpm", @@ -39718,7 +43021,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "" }, { "name": "_get_beat_count", @@ -39729,7 +43033,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "" }, { "name": "get_length", @@ -39741,7 +43046,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "Returns the length of the audio stream in seconds." }, { "name": "is_monophonic", @@ -39752,7 +43058,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony." }, { "name": "instantiate_playback", @@ -39763,9 +43070,11 @@ "hash": 210135309, "return_value": { "type": "AudioStreamPlayback" - } + }, + "documentation": "Returns an AudioStreamPlayback. 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 files for [code]AudioStreamRandomPitch::instantiate_playback[/code]." } - ] + ], + "documentation": "Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamWAV]) and Ogg (via [AudioStreamOggVorbis]) file formats." }, { "name": "AudioStreamGenerator", @@ -39834,15 +43143,18 @@ "type": "float", "name": "mix_rate", "setter": "set_mix_rate", - "getter": "get_mix_rate" + "getter": "get_mix_rate", + "documentation": "The sample rate to use (in Hz). Higher values are more demanding for the CPU to generate, but result in better quality.\nIn games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].\nAccording 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 [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality." }, { "type": "float", "name": "buffer_length", "setter": "set_buffer_length", - "getter": "get_buffer_length" + "getter": "get_buffer_length", + "documentation": "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." } - ] + ], + "documentation": "[AudioStreamGenerator] is a type of audio stream that does not play back sounds on its own; instead, it expects a script to generate audio data for it. See also [AudioStreamGeneratorPlayback].\nHere's a sample on how to use it to generate a sine wave:\n[codeblock]\nvar playback # Will hold the AudioStreamGeneratorPlayback.\n@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate\nvar pulse_hz = 440.0 # The frequency of the sound wave.\n\nfunc _ready():\n $AudioStreamPlayer.play()\n playback = $AudioStreamPlayer.get_stream_playback()\n fill_buffer()\n\nfunc fill_buffer():\n var phase = 0.0\n var increment = pulse_hz / sample_hz\n var frames_available = playback.get_frames_available()\n\n for i in range(frames_available):\n playback.push_frame(Vector2.ONE * sin(phase * TAU))\n phase = fmod(phase + increment, 1.0)\n[/codeblock]\nIn the example above, the \"AudioStreamPlayer\" node must use an [AudioStreamGenerator] as its stream. The [code]fill_buffer[/code] function provides audio data for approximating a sine wave.\nSee also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.\n[b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz." }, { "name": "AudioStreamGeneratorPlayback", @@ -39866,7 +43178,8 @@ "name": "frame", "type": "Vector2" } - ] + ], + "documentation": "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 [i]more[/i] efficient in GDScript." }, { "name": "can_push_buffer", @@ -39884,7 +43197,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns [code]true[/code] if a buffer of the size [param amount] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise." }, { "name": "push_buffer", @@ -39901,7 +43215,8 @@ "name": "frames", "type": "PackedVector2Array" } - ] + ], + "documentation": "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 [i]less[/i] efficient in GDScript." }, { "name": "get_frames_available", @@ -39913,7 +43228,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full." }, { "name": "get_skips", @@ -39925,7 +43241,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "" }, { "name": "clear_buffer", @@ -39933,9 +43250,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears the audio sample data buffer." } - ] + ], + "documentation": "This class is meant to be used with [AudioStreamGenerator] to play back the generated audio in real-time." }, { "name": "AudioStreamMP3", @@ -40108,46 +43427,54 @@ "type": "PackedByteArray", "name": "data", "setter": "set_data", - "getter": "get_data" + "getter": "get_data", + "documentation": "Contains the audio data in bytes.\nYou 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).\n[codeblocks]\n[gdscript]\nfunc load_mp3(path):\n var file = FileAccess.open(path, FileAccess.READ)\n var sound = AudioStreamMP3.new()\n sound.data = file.get_buffer(file.get_length())\n return sound\n[/gdscript]\n[csharp]\npublic AudioStreamMP3 LoadMP3(string path)\n{\n using var file = FileAccess.Open(path, FileAccess.ModeFlags.Read);\n var sound = new AudioStreamMP3();\n sound.Data = file.GetBuffer(file.GetLength());\n return sound;\n}\n[/csharp]\n[/codeblocks]" }, { "type": "float", "name": "bpm", "setter": "set_bpm", - "getter": "get_bpm" + "getter": "get_bpm", + "documentation": "" }, { "type": "int", "name": "beat_count", "setter": "set_beat_count", - "getter": "get_beat_count" + "getter": "get_beat_count", + "documentation": "" }, { "type": "int", "name": "bar_beats", "setter": "set_bar_beats", - "getter": "get_bar_beats" + "getter": "get_bar_beats", + "documentation": "" }, { "type": "bool", "name": "loop", "setter": "set_loop", - "getter": "has_loop" + "getter": "has_loop", + "documentation": "If [code]true[/code], the stream will automatically loop when it reaches the end." }, { "type": "float", "name": "loop_offset", "setter": "set_loop_offset", - "getter": "get_loop_offset" + "getter": "get_loop_offset", + "documentation": "Time in seconds at which the stream starts after being looped." } - ] + ], + "documentation": "MP3 audio stream driver. See [member data] if you want to load an MP3 file at run-time." }, { "name": "AudioStreamMicrophone", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioStream", - "api_type": "core" + "api_type": "core", + "documentation": "When used directly in an [AudioStreamPlayer] node, [AudioStreamMicrophone] plays back microphone input in real-time. This can be used in conjunction with [AudioEffectCapture] to process the data or save it.\n[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings." }, { "name": "AudioStreamOggVorbis", @@ -40171,7 +43498,8 @@ "name": "buffer", "type": "PackedByteArray" } - ] + ], + "documentation": "Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data." }, { "name": "load_from_file", @@ -40188,7 +43516,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format." }, { "name": "set_packet_sequence", @@ -40354,39 +43683,46 @@ "type": "Object", "name": "packet_sequence", "setter": "set_packet_sequence", - "getter": "get_packet_sequence" + "getter": "get_packet_sequence", + "documentation": "Contains the raw Ogg data for this stream." }, { "type": "float", "name": "bpm", "setter": "set_bpm", - "getter": "get_bpm" + "getter": "get_bpm", + "documentation": "" }, { "type": "int", "name": "beat_count", "setter": "set_beat_count", - "getter": "get_beat_count" + "getter": "get_beat_count", + "documentation": "" }, { "type": "int", "name": "bar_beats", "setter": "set_bar_beats", - "getter": "get_bar_beats" + "getter": "get_bar_beats", + "documentation": "" }, { "type": "bool", "name": "loop", "setter": "set_loop", - "getter": "has_loop" + "getter": "has_loop", + "documentation": "If [code]true[/code], the audio will play again from the specified [member loop_offset] once it is done playing. Useful for ambient sounds and background music." }, { "type": "float", "name": "loop_offset", "setter": "set_loop_offset", - "getter": "get_loop_offset" + "getter": "get_loop_offset", + "documentation": "Time in seconds at which the stream starts after being looped." } - ] + ], + "documentation": "The AudioStreamOggVorbis class is a specialized [AudioStream] for handling Ogg Vorbis file formats. It offers functionality for loading and playing back Ogg Vorbis files, as well as managing looping and other playback properties. This class is part of the audio stream system, which also supports WAV files through the [AudioStreamWAV] class." }, { "name": "AudioStreamPlayback", @@ -40407,14 +43743,16 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "" }, { "name": "_stop", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "" }, { "name": "_is_playing", @@ -40424,7 +43762,8 @@ "is_virtual": true, "return_value": { "type": "bool" - } + }, + "documentation": "" }, { "name": "_get_loop_count", @@ -40435,7 +43774,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "" }, { "name": "_get_playback_position", @@ -40446,7 +43786,8 @@ "return_value": { "type": "float", "meta": "double" - } + }, + "documentation": "" }, { "name": "_seek", @@ -40460,7 +43801,8 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "" }, { "name": "_mix", @@ -40487,23 +43829,27 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "_tag_used_streams", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "" } - ] + ], + "documentation": "Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOggVorbis] for usage." }, { "name": "AudioStreamPlaybackOggVorbis", "is_refcounted": true, "is_instantiable": true, "inherits": "AudioStreamPlaybackResampled", - "api_type": "core" + "api_type": "core", + "documentation": "" }, { "name": "AudioStreamPlaybackPolyphonic", @@ -40514,7 +43860,8 @@ "constants": [ { "name": "INVALID_ID", - "value": -1 + "value": -1, + "documentation": "Returned by [method play_stream] in case it could not allocate a stream for playback." } ], "methods": [ @@ -40555,7 +43902,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "Play an [AudioStream] at a given offset, volume and pitch scale. Playback starts immediately.\nThe return value is a unique integer ID that is associated to this playback stream and which can be used to control it.\nThis ID becomes invalid when the stream ends (if it does not loop), when the [AudioStreamPlaybackPolyphonic] is stopped, or when [method stop_stream] is called.\nThis 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." }, { "name": "set_stream_volume", @@ -40575,7 +43923,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Change the stream volume (in db). The [param stream] argument is an integer ID returned by [method play_stream]." }, { "name": "set_stream_pitch_scale", @@ -40595,7 +43944,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Change the stream pitch scale. The [param stream] argument is an integer ID returned by [method play_stream]." }, { "name": "is_stream_playing", @@ -40613,7 +43963,8 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "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." }, { "name": "stop_stream", @@ -40628,9 +43979,11 @@ "type": "int", "meta": "int64" } - ] + ], + "documentation": "Stop a stream. The [param stream] argument is an integer ID returned by [method play_stream], which becomes invalid after calling this function." } - ] + ], + "documentation": "Playback instance for [AudioStreamPolyphonic]. After setting the [code]stream[/code] property of [AudioStreamPlayer], [AudioStreamPlayer2D], or [AudioStreamPlayer3D], the playback instance can be obtained by calling [method AudioStreamPlayer.get_stream_playback], [method AudioStreamPlayer2D.get_stream_playback] or [method AudioStreamPlayer3D.get_stream_playback] methods." }, { "name": "AudioStreamPlaybackResampled", @@ -40659,7 +44012,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "" }, { "name": "_get_stream_sampling_rate", @@ -40670,7 +44024,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "" }, { "name": "begin_resample", @@ -40678,9 +44033,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "" } - ] + ], + "documentation": "" }, { "name": "AudioStreamPlayer", @@ -40695,15 +44052,18 @@ "values": [ { "name": "MIX_TARGET_STEREO", - "value": 0 + "value": 0, + "documentation": "The audio will be played only on the first channel." }, { "name": "MIX_TARGET_SURROUND", - "value": 1 + "value": 1, + "documentation": "The audio will be played on all surround channels." }, { "name": "MIX_TARGET_CENTER", - "value": 2 + "value": 2, + "documentation": "The audio will be played on the second channel, which is usually the center." } ] } @@ -40802,7 +44162,8 @@ "meta": "float", "default_value": "0.0" } - ] + ], + "documentation": "Plays the audio from the given [param from_position], in seconds." }, { "name": "seek", @@ -40817,7 +44178,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the position from which audio will be played, in seconds." }, { "name": "stop", @@ -40825,7 +44187,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the audio." }, { "name": "is_playing", @@ -40848,7 +44211,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the position in the [AudioStream] in seconds." }, { "name": "set_bus", @@ -40986,7 +44350,8 @@ "hash": 2240911060, "return_value": { "type": "bool" - } + }, + "documentation": "Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not." }, { "name": "get_stream_playback", @@ -40997,12 +44362,14 @@ "hash": 210135309, "return_value": { "type": "AudioStreamPlayback" - } + }, + "documentation": "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]." } ], "signals": [ { - "name": "finished" + "name": "finished", + "documentation": "Emitted when the audio stops playing." } ], "properties": [ @@ -41010,57 +44377,67 @@ "type": "AudioStream", "name": "stream", "setter": "set_stream", - "getter": "get_stream" + "getter": "get_stream", + "documentation": "The [AudioStream] object to be played." }, { "type": "float", "name": "volume_db", "setter": "set_volume_db", - "getter": "get_volume_db" + "getter": "get_volume_db", + "documentation": "Volume of sound, in dB." }, { "type": "float", "name": "pitch_scale", "setter": "set_pitch_scale", - "getter": "get_pitch_scale" + "getter": "get_pitch_scale", + "documentation": "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate." }, { "type": "bool", "name": "playing", "setter": "_set_playing", - "getter": "is_playing" + "getter": "is_playing", + "documentation": "If [code]true[/code], audio is playing." }, { "type": "bool", "name": "autoplay", "setter": "set_autoplay", - "getter": "is_autoplay_enabled" + "getter": "is_autoplay_enabled", + "documentation": "If [code]true[/code], audio plays when added to scene tree." }, { "type": "bool", "name": "stream_paused", "setter": "set_stream_paused", - "getter": "get_stream_paused" + "getter": "get_stream_paused", + "documentation": "If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code]." }, { "type": "int", "name": "mix_target", "setter": "set_mix_target", - "getter": "get_mix_target" + "getter": "get_mix_target", + "documentation": "If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants." }, { "type": "int", "name": "max_polyphony", "setter": "set_max_polyphony", - "getter": "get_max_polyphony" + "getter": "get_max_polyphony", + "documentation": "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." }, { "type": "StringName", "name": "bus", "setter": "set_bus", - "getter": "get_bus" + "getter": "get_bus", + "documentation": "Bus on which this audio is playing.\n[b]Note:[/b] 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 [code]\"Master\"[/code]." } - ] + ], + "documentation": "Plays an audio stream non-positionally.\nTo play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer]." }, { "name": "AudioStreamPlayer2D", @@ -41162,7 +44539,8 @@ "meta": "float", "default_value": "0.0" } - ] + ], + "documentation": "Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds." }, { "name": "seek", @@ -41177,7 +44555,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the position from which audio will be played, in seconds." }, { "name": "stop", @@ -41185,7 +44564,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the audio." }, { "name": "is_playing", @@ -41208,7 +44588,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the position in the [AudioStream]." }, { "name": "set_bus", @@ -41429,7 +44810,8 @@ "hash": 2240911060, "return_value": { "type": "bool" - } + }, + "documentation": "Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not." }, { "name": "get_stream_playback", @@ -41440,12 +44822,14 @@ "hash": 210135309, "return_value": { "type": "AudioStreamPlayback" - } + }, + "documentation": "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]." } ], "signals": [ { - "name": "finished" + "name": "finished", + "documentation": "Emitted when the audio stops playing." } ], "properties": [ @@ -41453,75 +44837,88 @@ "type": "AudioStream", "name": "stream", "setter": "set_stream", - "getter": "get_stream" + "getter": "get_stream", + "documentation": "The [AudioStream] object to be played." }, { "type": "float", "name": "volume_db", "setter": "set_volume_db", - "getter": "get_volume_db" + "getter": "get_volume_db", + "documentation": "Base volume before attenuation." }, { "type": "float", "name": "pitch_scale", "setter": "set_pitch_scale", - "getter": "get_pitch_scale" + "getter": "get_pitch_scale", + "documentation": "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate." }, { "type": "bool", "name": "playing", "setter": "_set_playing", - "getter": "is_playing" + "getter": "is_playing", + "documentation": "If [code]true[/code], audio is playing or is queued to be played (see [method play])." }, { "type": "bool", "name": "autoplay", "setter": "set_autoplay", - "getter": "is_autoplay_enabled" + "getter": "is_autoplay_enabled", + "documentation": "If [code]true[/code], audio plays when added to scene tree." }, { "type": "bool", "name": "stream_paused", "setter": "set_stream_paused", - "getter": "get_stream_paused" + "getter": "get_stream_paused", + "documentation": "If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code]." }, { "type": "float", "name": "max_distance", "setter": "set_max_distance", - "getter": "get_max_distance" + "getter": "get_max_distance", + "documentation": "Maximum distance from which audio is still hearable." }, { "type": "float", "name": "attenuation", "setter": "set_attenuation", - "getter": "get_attenuation" + "getter": "get_attenuation", + "documentation": "The volume is attenuated over distance with this as an exponent." }, { "type": "int", "name": "max_polyphony", "setter": "set_max_polyphony", - "getter": "get_max_polyphony" + "getter": "get_max_polyphony", + "documentation": "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." }, { "type": "float", "name": "panning_strength", "setter": "set_panning_strength", - "getter": "get_panning_strength" + "getter": "get_panning_strength", + "documentation": "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." }, { "type": "StringName", "name": "bus", "setter": "set_bus", - "getter": "get_bus" + "getter": "get_bus", + "documentation": "Bus on which this audio is playing.\n[b]Note:[/b] 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 [code]\"Master\"[/code]." }, { "type": "int", "name": "area_mask", "setter": "set_area_mask", - "getter": "get_area_mask" + "getter": "get_area_mask", + "documentation": "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." } - ] + ], + "documentation": "Plays audio that is attenuated with distance to the listener.\nBy default, audio is heard from the screen center. This can be changed by adding an [AudioListener2D] node to the scene and enabling it by calling [method AudioListener2D.make_current] on it.\nSee also [AudioStreamPlayer] to play a sound non-positionally.\n[b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing)." }, { "name": "AudioStreamPlayer3D", @@ -41536,19 +44933,23 @@ "values": [ { "name": "ATTENUATION_INVERSE_DISTANCE", - "value": 0 + "value": 0, + "documentation": "Attenuation of loudness according to linear distance." }, { "name": "ATTENUATION_INVERSE_SQUARE_DISTANCE", - "value": 1 + "value": 1, + "documentation": "Attenuation of loudness according to squared distance." }, { "name": "ATTENUATION_LOGARITHMIC", - "value": 2 + "value": 2, + "documentation": "Attenuation of loudness according to logarithmic distance." }, { "name": "ATTENUATION_DISABLED", - "value": 3 + "value": 3, + "documentation": "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 [code]0.0[/code] to achieve linear attenuation clamped to a sphere of a defined size." } ] }, @@ -41558,15 +44959,18 @@ "values": [ { "name": "DOPPLER_TRACKING_DISABLED", - "value": 0 + "value": 0, + "documentation": "Disables doppler tracking." }, { "name": "DOPPLER_TRACKING_IDLE_STEP", - "value": 1 + "value": 1, + "documentation": "Executes doppler tracking during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS])." }, { "name": "DOPPLER_TRACKING_PHYSICS_STEP", - "value": 2 + "value": 2, + "documentation": "Executes doppler tracking during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])." } ] } @@ -41719,7 +45123,8 @@ "meta": "float", "default_value": "0.0" } - ] + ], + "documentation": "Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds." }, { "name": "seek", @@ -41734,7 +45139,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the position from which audio will be played, in seconds." }, { "name": "stop", @@ -41742,7 +45148,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stops the audio." }, { "name": "is_playing", @@ -41765,7 +45172,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the position in the [AudioStream]." }, { "name": "set_bus", @@ -42142,7 +45550,8 @@ "hash": 2240911060, "return_value": { "type": "bool" - } + }, + "documentation": "Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not." }, { "name": "get_stream_playback", @@ -42153,12 +45562,14 @@ "hash": 210135309, "return_value": { "type": "AudioStreamPlayback" - } + }, + "documentation": "Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]." } ], "signals": [ { - "name": "finished" + "name": "finished", + "documentation": "Emitted when the audio stops playing." } ], "properties": [ @@ -42166,123 +45577,144 @@ "type": "AudioStream", "name": "stream", "setter": "set_stream", - "getter": "get_stream" + "getter": "get_stream", + "documentation": "The [AudioStream] resource to be played." }, { "type": "int", "name": "attenuation_model", "setter": "set_attenuation_model", - "getter": "get_attenuation_model" + "getter": "get_attenuation_model", + "documentation": "Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation." }, { "type": "float", "name": "volume_db", "setter": "set_volume_db", - "getter": "get_volume_db" + "getter": "get_volume_db", + "documentation": "The base sound level before attenuation, in decibels." }, { "type": "float", "name": "unit_size", "setter": "set_unit_size", - "getter": "get_unit_size" + "getter": "get_unit_size", + "documentation": "The factor for the attenuation effect. Higher values make the sound audible over a larger distance." }, { "type": "float", "name": "max_db", "setter": "set_max_db", - "getter": "get_max_db" + "getter": "get_max_db", + "documentation": "Sets the absolute maximum of the sound level, in decibels." }, { "type": "float", "name": "pitch_scale", "setter": "set_pitch_scale", - "getter": "get_pitch_scale" + "getter": "get_pitch_scale", + "documentation": "The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate." }, { "type": "bool", "name": "playing", "setter": "_set_playing", - "getter": "is_playing" + "getter": "is_playing", + "documentation": "If [code]true[/code], audio is playing or is queued to be played (see [method play])." }, { "type": "bool", "name": "autoplay", "setter": "set_autoplay", - "getter": "is_autoplay_enabled" + "getter": "is_autoplay_enabled", + "documentation": "If [code]true[/code], audio plays when the AudioStreamPlayer3D node is added to scene tree." }, { "type": "bool", "name": "stream_paused", "setter": "set_stream_paused", - "getter": "get_stream_paused" + "getter": "get_stream_paused", + "documentation": "If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code]." }, { "type": "float", "name": "max_distance", "setter": "set_max_distance", - "getter": "get_max_distance" + "getter": "get_max_distance", + "documentation": "The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than [code]0.0[/code]. [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." }, { "type": "int", "name": "max_polyphony", "setter": "set_max_polyphony", - "getter": "get_max_polyphony" + "getter": "get_max_polyphony", + "documentation": "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." }, { "type": "float", "name": "panning_strength", "setter": "set_panning_strength", - "getter": "get_panning_strength" + "getter": "get_panning_strength", + "documentation": "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." }, { "type": "StringName", "name": "bus", "setter": "set_bus", - "getter": "get_bus" + "getter": "get_bus", + "documentation": "The bus on which this audio is playing.\n[b]Note:[/b] 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 [code]\"Master\"[/code]." }, { "type": "int", "name": "area_mask", "setter": "set_area_mask", - "getter": "get_area_mask" + "getter": "get_area_mask", + "documentation": "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." }, { "type": "bool", "name": "emission_angle_enabled", "setter": "set_emission_angle_enabled", - "getter": "is_emission_angle_enabled" + "getter": "is_emission_angle_enabled", + "documentation": "If [code]true[/code], the audio should be attenuated according to the direction of the sound." }, { "type": "float", "name": "emission_angle_degrees", "setter": "set_emission_angle", - "getter": "get_emission_angle" + "getter": "get_emission_angle", + "documentation": "The angle in which the audio reaches a listener unattenuated." }, { "type": "float", "name": "emission_angle_filter_attenuation_db", "setter": "set_emission_angle_filter_attenuation_db", - "getter": "get_emission_angle_filter_attenuation_db" + "getter": "get_emission_angle_filter_attenuation_db", + "documentation": "Attenuation factor used if listener is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set, in decibels." }, { "type": "float", "name": "attenuation_filter_cutoff_hz", "setter": "set_attenuation_filter_cutoff_hz", - "getter": "get_attenuation_filter_cutoff_hz" + "getter": "get_attenuation_filter_cutoff_hz", + "documentation": "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 [code]20500[/code] as this frequency is above the human hearing limit." }, { "type": "float", "name": "attenuation_filter_db", "setter": "set_attenuation_filter_db", - "getter": "get_attenuation_filter_db" + "getter": "get_attenuation_filter_db", + "documentation": "Amount how much the filter affects the loudness, in decibels." }, { "type": "int", "name": "doppler_tracking", "setter": "set_doppler_tracking", - "getter": "get_doppler_tracking" + "getter": "get_doppler_tracking", + "documentation": "Decides in which step the Doppler effect should be calculated." } - ] + ], + "documentation": "Plays audio with positional sound effects, based on the relative position of the audio listener. Positional effects include distance attenuation, directionality, and the Doppler effect. For greater realism, a low-pass filter is applied to distant sounds. This can be disabled by setting [member attenuation_filter_cutoff_hz] to [code]20500[/code].\nBy default, audio is heard from the camera position. This can be changed by adding an [AudioListener3D] node to the scene and enabling it by calling [method AudioListener3D.make_current] on it.\nSee also [AudioStreamPlayer] to play a sound non-positionally.\n[b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing)." }, { "name": "AudioStreamPolyphonic", @@ -42324,9 +45756,11 @@ "type": "int", "name": "polyphony", "setter": "set_polyphony", - "getter": "get_polyphony" + "getter": "get_polyphony", + "documentation": "Maximum amount of simultaneous streams that can be played." } - ] + ], + "documentation": "AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player.\nPlayback control is done via the [AudioStreamPlaybackPolyphonic] instance set inside the player, which can be obtained via [method AudioStreamPlayer.get_stream_playback], [method AudioStreamPlayer2D.get_stream_playback] or [method AudioStreamPlayer3D.get_stream_playback] methods. Obtaining the playback instance is only valid after the [code]stream[/code] property is set as an [AudioStreamPolyphonic] in those players." }, { "name": "AudioStreamRandomizer", @@ -42341,15 +45775,18 @@ "values": [ { "name": "PLAYBACK_RANDOM_NO_REPEATS", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "PLAYBACK_RANDOM", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "PLAYBACK_SEQUENTIAL", - "value": 2 + "value": 2, + "documentation": "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." } ] } @@ -42381,7 +45818,8 @@ "meta": "float", "default_value": "1.0" } - ] + ], + "documentation": "Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool." }, { "name": "move_stream", @@ -42401,7 +45839,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Move a stream from one index to another." }, { "name": "remove_stream", @@ -42416,7 +45855,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Remove the stream at the specified index." }, { "name": "set_stream", @@ -42435,7 +45875,8 @@ "name": "stream", "type": "AudioStream" } - ] + ], + "documentation": "Set the AudioStream at the specified index." }, { "name": "get_stream", @@ -42453,7 +45894,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the stream at the specified index." }, { "name": "set_stream_probability_weight", @@ -42473,7 +45915,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "get_stream_probability_weight", @@ -42492,7 +45935,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the probability weight associated with the stream at the given index." }, { "name": "set_streams_count", @@ -42606,27 +46050,32 @@ "type": "int", "name": "playback_mode", "setter": "set_playback_mode", - "getter": "get_playback_mode" + "getter": "get_playback_mode", + "documentation": "Controls how this AudioStreamRandomizer picks which AudioStream to play next." }, { "type": "float", "name": "random_pitch", "setter": "set_random_pitch", - "getter": "get_random_pitch" + "getter": "get_random_pitch", + "documentation": "The intensity of random pitch variation. A value of 1 means no variation." }, { "type": "float", "name": "random_volume_offset_db", "setter": "set_random_volume_offset_db", - "getter": "get_random_volume_offset_db" + "getter": "get_random_volume_offset_db", + "documentation": "The intensity of random volume variation. A value of 0 means no variation." }, { "type": "int", "name": "streams_count", "setter": "set_streams_count", - "getter": "get_streams_count" + "getter": "get_streams_count", + "documentation": "The number of streams in the stream pool." } - ] + ], + "documentation": "Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback." }, { "name": "AudioStreamWAV", @@ -42641,15 +46090,18 @@ "values": [ { "name": "FORMAT_8_BITS", - "value": 0 + "value": 0, + "documentation": "8-bit audio codec." }, { "name": "FORMAT_16_BITS", - "value": 1 + "value": 1, + "documentation": "16-bit audio codec." }, { "name": "FORMAT_IMA_ADPCM", - "value": 2 + "value": 2, + "documentation": "Audio is compressed using IMA ADPCM." } ] }, @@ -42659,19 +46111,23 @@ "values": [ { "name": "LOOP_DISABLED", - "value": 0 + "value": 0, + "documentation": "Audio does not loop." }, { "name": "LOOP_FORWARD", - "value": 1 + "value": 1, + "documentation": "Audio loops the data between [member loop_begin] and [member loop_end], playing forward only." }, { "name": "LOOP_PINGPONG", - "value": 2 + "value": 2, + "documentation": "Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth." }, { "name": "LOOP_BACKWARD", - "value": 3 + "value": 3, + "documentation": "Audio loops the data between [member loop_begin] and [member loop_end], playing backward only." } ] } @@ -42873,7 +46329,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM format can't be saved.\n[b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing." } ], "properties": [ @@ -42881,45 +46338,53 @@ "type": "PackedByteArray", "name": "data", "setter": "set_data", - "getter": "get_data" + "getter": "get_data", + "documentation": "Contains the audio data in bytes.\n[b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte." }, { "type": "int", "name": "format", "setter": "set_format", - "getter": "get_format" + "getter": "get_format", + "documentation": "Audio format. See [enum Format] constants for values." }, { "type": "int", "name": "loop_mode", "setter": "set_loop_mode", - "getter": "get_loop_mode" + "getter": "get_loop_mode", + "documentation": "The loop mode. This information will be imported automatically from the WAV file if present. See [enum LoopMode] constants for values." }, { "type": "int", "name": "loop_begin", "setter": "set_loop_begin", - "getter": "get_loop_begin" + "getter": "get_loop_begin", + "documentation": "The loop start point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present." }, { "type": "int", "name": "loop_end", "setter": "set_loop_end", - "getter": "get_loop_end" + "getter": "get_loop_end", + "documentation": "The loop end point (in number of samples, relative to the beginning of the sample). This information will be imported automatically from the WAV file if present." }, { "type": "int", "name": "mix_rate", "setter": "set_mix_rate", - "getter": "get_mix_rate" + "getter": "get_mix_rate", + "documentation": "The sample rate for mixing this audio. Higher values require more storage space, but result in better quality.\nIn games, common sample rates in use are [code]11025[/code], [code]16000[/code], [code]22050[/code], [code]32000[/code], [code]44100[/code], and [code]48000[/code].\nAccording 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 [code]32000[/code] or [code]22050[/code] may be usable with no loss in quality." }, { "type": "bool", "name": "stereo", "setter": "set_stereo", - "getter": "is_stereo" + "getter": "is_stereo", + "documentation": "If [code]true[/code], audio is stereo." } - ] + ], + "documentation": "AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped.\nThis class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation." }, { "name": "BackBufferCopy", @@ -42934,15 +46399,18 @@ "values": [ { "name": "COPY_MODE_DISABLED", - "value": 0 + "value": 0, + "documentation": "Disables the buffering mode. This means the [BackBufferCopy] node will directly use the portion of screen it covers." }, { "name": "COPY_MODE_RECT", - "value": 1 + "value": 1, + "documentation": "[BackBufferCopy] buffers a rectangular region." }, { "name": "COPY_MODE_VIEWPORT", - "value": 2 + "value": 2, + "documentation": "[BackBufferCopy] buffers the entire screen." } ] } @@ -43004,15 +46472,18 @@ "type": "int", "name": "copy_mode", "setter": "set_copy_mode", - "getter": "get_copy_mode" + "getter": "get_copy_mode", + "documentation": "Buffer mode. See [enum CopyMode] constants." }, { "type": "Rect2", "name": "rect", "setter": "set_rect", - "getter": "get_rect" + "getter": "get_rect", + "documentation": "The area covered by the [BackBufferCopy]. Only used if [member copy_mode] is [constant COPY_MODE_RECT]." } - ] + ], + "documentation": "Node for back-buffering the currently-displayed screen. The region defined in the [BackBufferCopy] node is buffered with the content of the screen it covers, or the entire screen according to the [member copy_mode]. It can be accessed in shader scripts using the screen texture (i.e. a uniform sampler with [code]hint_screen_texture[/code]).\n[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of adding them as children." }, { "name": "BaseButton", @@ -43027,23 +46498,28 @@ "values": [ { "name": "DRAW_NORMAL", - "value": 0 + "value": 0, + "documentation": "The normal state (i.e. not pressed, not hovered, not toggled and enabled) of buttons." }, { "name": "DRAW_PRESSED", - "value": 1 + "value": 1, + "documentation": "The state of buttons are pressed." }, { "name": "DRAW_HOVER", - "value": 2 + "value": 2, + "documentation": "The state of buttons are hovered." }, { "name": "DRAW_DISABLED", - "value": 3 + "value": 3, + "documentation": "The state of buttons are disabled." }, { "name": "DRAW_HOVER_PRESSED", - "value": 4 + "value": 4, + "documentation": "The state of buttons are both hovered and pressed." } ] }, @@ -43053,11 +46529,13 @@ "values": [ { "name": "ACTION_MODE_BUTTON_PRESS", - "value": 0 + "value": 0, + "documentation": "Require just a press to consider the button clicked." }, { "name": "ACTION_MODE_BUTTON_RELEASE", - "value": 1 + "value": 1, + "documentation": "Require a press and a subsequent release before considering the button clicked." } ] } @@ -43068,7 +46546,8 @@ "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "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." }, { "name": "_toggled", @@ -43081,7 +46560,8 @@ "name": "toggled_on", "type": "bool" } - ] + ], + "documentation": "Called when the button is toggled (only if [member toggle_mode] is active)." }, { "name": "set_pressed", @@ -43120,7 +46600,8 @@ "name": "pressed", "type": "bool" } - ] + ], + "documentation": "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 [code]true[/code].\n[b]Note:[/b] This method doesn't unpress other buttons in [member button_group]." }, { "name": "is_hovered", @@ -43131,7 +46612,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the mouse has entered the button and has not left it yet." }, { "name": "set_toggle_mode", @@ -43267,7 +46749,8 @@ "hash": 2492721305, "return_value": { "type": "enum::BaseButton.DrawMode" - } + }, + "documentation": "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." }, { "name": "set_keep_pressed_outside", @@ -43372,13 +46855,16 @@ ], "signals": [ { - "name": "pressed" + "name": "pressed", + "documentation": "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.\nIf you need to know the button's pressed state (and [member toggle_mode] is active), use [signal toggled] instead." }, { - "name": "button_up" + "name": "button_up", + "documentation": "Emitted when the button stops being held down." }, { - "name": "button_down" + "name": "button_down", + "documentation": "Emitted when the button starts being held down." }, { "name": "toggled", @@ -43387,7 +46873,8 @@ "name": "toggled_on", "type": "bool" } - ] + ], + "documentation": "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." } ], "properties": [ @@ -43395,63 +46882,74 @@ "type": "bool", "name": "disabled", "setter": "set_disabled", - "getter": "is_disabled" + "getter": "is_disabled", + "documentation": "If [code]true[/code], the button is in disabled state and can't be clicked or toggled." }, { "type": "bool", "name": "toggle_mode", "setter": "set_toggle_mode", - "getter": "is_toggle_mode" + "getter": "is_toggle_mode", + "documentation": "If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked." }, { "type": "bool", "name": "button_pressed", "setter": "set_pressed", - "getter": "is_pressed" + "getter": "is_pressed", + "documentation": "If [code]true[/code], 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 [code]true[/code].\n[b]Note:[/b] 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]." }, { "type": "int", "name": "action_mode", "setter": "set_action_mode", - "getter": "get_action_mode" + "getter": "get_action_mode", + "documentation": "Determines when the button is considered clicked, one of the [enum ActionMode] constants." }, { "type": "int", "name": "button_mask", "setter": "set_button_mask", - "getter": "get_button_mask" + "getter": "get_button_mask", + "documentation": "Binary mask to choose which mouse buttons this button will respond to.\nTo allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code]." }, { "type": "bool", "name": "keep_pressed_outside", "setter": "set_keep_pressed_outside", - "getter": "is_keep_pressed_outside" + "getter": "is_keep_pressed_outside", + "documentation": "If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it.\n[b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value." }, { "type": "ButtonGroup", "name": "button_group", "setter": "set_button_group", - "getter": "get_button_group" + "getter": "get_button_group", + "documentation": "The [ButtonGroup] associated with the button. Not to be confused with node groups.\n[b]Note:[/b] The button will be configured as a radio button if a [ButtonGroup] is assigned to it." }, { "type": "Shortcut", "name": "shortcut", "setter": "set_shortcut", - "getter": "get_shortcut" + "getter": "get_shortcut", + "documentation": "[Shortcut] associated to the button." }, { "type": "bool", "name": "shortcut_feedback", "setter": "set_shortcut_feedback", - "getter": "is_shortcut_feedback" + "getter": "is_shortcut_feedback", + "documentation": "If [code]true[/code], the button will highlight for a short amount of time when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate without any visual feedback." }, { "type": "bool", "name": "shortcut_in_tooltip", "setter": "set_shortcut_in_tooltip", - "getter": "is_shortcut_in_tooltip_enabled" + "getter": "is_shortcut_in_tooltip_enabled", + "documentation": "If [code]true[/code], the button will add information about its shortcut in the tooltip." } - ] + ], + "documentation": "[BaseButton] is an abstract base class for GUI buttons. It doesn't display anything by itself." }, { "name": "BaseMaterial3D", @@ -43466,79 +46964,98 @@ "values": [ { "name": "TEXTURE_ALBEDO", - "value": 0 + "value": 0, + "documentation": "Texture specifying per-pixel color." }, { "name": "TEXTURE_METALLIC", - "value": 1 + "value": 1, + "documentation": "Texture specifying per-pixel metallic value." }, { "name": "TEXTURE_ROUGHNESS", - "value": 2 + "value": 2, + "documentation": "Texture specifying per-pixel roughness value." }, { "name": "TEXTURE_EMISSION", - "value": 3 + "value": 3, + "documentation": "Texture specifying per-pixel emission color." }, { "name": "TEXTURE_NORMAL", - "value": 4 + "value": 4, + "documentation": "Texture specifying per-pixel normal vector." }, { "name": "TEXTURE_RIM", - "value": 5 + "value": 5, + "documentation": "Texture specifying per-pixel rim value." }, { "name": "TEXTURE_CLEARCOAT", - "value": 6 + "value": 6, + "documentation": "Texture specifying per-pixel clearcoat value." }, { "name": "TEXTURE_FLOWMAP", - "value": 7 + "value": 7, + "documentation": "Texture specifying per-pixel flowmap direction for use with [member anisotropy]." }, { "name": "TEXTURE_AMBIENT_OCCLUSION", - "value": 8 + "value": 8, + "documentation": "Texture specifying per-pixel ambient occlusion value." }, { "name": "TEXTURE_HEIGHTMAP", - "value": 9 + "value": 9, + "documentation": "Texture specifying per-pixel height." }, { "name": "TEXTURE_SUBSURFACE_SCATTERING", - "value": 10 + "value": 10, + "documentation": "Texture specifying per-pixel subsurface scattering." }, { "name": "TEXTURE_SUBSURFACE_TRANSMITTANCE", - "value": 11 + "value": 11, + "documentation": "Texture specifying per-pixel transmittance for subsurface scattering." }, { "name": "TEXTURE_BACKLIGHT", - "value": 12 + "value": 12, + "documentation": "Texture specifying per-pixel backlight color." }, { "name": "TEXTURE_REFRACTION", - "value": 13 + "value": 13, + "documentation": "Texture specifying per-pixel refraction strength." }, { "name": "TEXTURE_DETAIL_MASK", - "value": 14 + "value": 14, + "documentation": "Texture specifying per-pixel detail mask blending value." }, { "name": "TEXTURE_DETAIL_ALBEDO", - "value": 15 + "value": 15, + "documentation": "Texture specifying per-pixel detail color." }, { "name": "TEXTURE_DETAIL_NORMAL", - "value": 16 + "value": 16, + "documentation": "Texture specifying per-pixel detail normal." }, { "name": "TEXTURE_ORM", - "value": 17 + "value": 17, + "documentation": "Texture holding ambient occlusion, roughness, and metallic." }, { "name": "TEXTURE_MAX", - "value": 18 + "value": 18, + "documentation": "Represents the size of the [enum TextureParam] enum." } ] }, @@ -43548,31 +47065,38 @@ "values": [ { "name": "TEXTURE_FILTER_NEAREST", - "value": 0 + "value": 0, + "documentation": "The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized." }, { "name": "TEXTURE_FILTER_LINEAR", - "value": 1 + "value": 1, + "documentation": "The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps." }, { "name": "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS", - "value": 2 + "value": 2, + "documentation": "The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps." }, { "name": "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS", - "value": 3 + "value": 3, + "documentation": "The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera." }, { "name": "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC", - "value": 4 + "value": 4, + "documentation": "The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]." }, { "name": "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC", - "value": 5 + "value": 5, + "documentation": "The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level]." }, { "name": "TEXTURE_FILTER_MAX", - "value": 6 + "value": 6, + "documentation": "Represents the size of the [enum TextureFilter] enum." } ] }, @@ -43582,11 +47106,13 @@ "values": [ { "name": "DETAIL_UV_1", - "value": 0 + "value": 0, + "documentation": "Use [code]UV[/code] with the detail texture." }, { "name": "DETAIL_UV_2", - "value": 1 + "value": 1, + "documentation": "Use [code]UV2[/code] with the detail texture." } ] }, @@ -43596,27 +47122,33 @@ "values": [ { "name": "TRANSPARENCY_DISABLED", - "value": 0 + "value": 0, + "documentation": "The material will not use transparency. This is the fastest to render." }, { "name": "TRANSPARENCY_ALPHA", - "value": 1 + "value": 1, + "documentation": "The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting." }, { "name": "TRANSPARENCY_ALPHA_SCISSOR", - "value": 2 + "value": 2, + "documentation": "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." }, { "name": "TRANSPARENCY_ALPHA_HASH", - "value": 3 + "value": 3, + "documentation": "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." }, { "name": "TRANSPARENCY_ALPHA_DEPTH_PRE_PASS", - "value": 4 + "value": 4, + "documentation": "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." }, { "name": "TRANSPARENCY_MAX", - "value": 5 + "value": 5, + "documentation": "Represents the size of the [enum Transparency] enum." } ] }, @@ -43626,19 +47158,23 @@ "values": [ { "name": "SHADING_MODE_UNSHADED", - "value": 0 + "value": 0, + "documentation": "The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights." }, { "name": "SHADING_MODE_PER_PIXEL", - "value": 1 + "value": 1, + "documentation": "The object will be shaded per pixel. Useful for realistic shading effects." }, { "name": "SHADING_MODE_PER_VERTEX", - "value": 2 + "value": 2, + "documentation": "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])." }, { "name": "SHADING_MODE_MAX", - "value": 3 + "value": 3, + "documentation": "Represents the size of the [enum ShadingMode] enum." } ] }, @@ -43648,55 +47184,68 @@ "values": [ { "name": "FEATURE_EMISSION", - "value": 0 + "value": 0, + "documentation": "Constant for setting [member emission_enabled]." }, { "name": "FEATURE_NORMAL_MAPPING", - "value": 1 + "value": 1, + "documentation": "Constant for setting [member normal_enabled]." }, { "name": "FEATURE_RIM", - "value": 2 + "value": 2, + "documentation": "Constant for setting [member rim_enabled]." }, { "name": "FEATURE_CLEARCOAT", - "value": 3 + "value": 3, + "documentation": "Constant for setting [member clearcoat_enabled]." }, { "name": "FEATURE_ANISOTROPY", - "value": 4 + "value": 4, + "documentation": "Constant for setting [member anisotropy_enabled]." }, { "name": "FEATURE_AMBIENT_OCCLUSION", - "value": 5 + "value": 5, + "documentation": "Constant for setting [member ao_enabled]." }, { "name": "FEATURE_HEIGHT_MAPPING", - "value": 6 + "value": 6, + "documentation": "Constant for setting [member heightmap_enabled]." }, { "name": "FEATURE_SUBSURFACE_SCATTERING", - "value": 7 + "value": 7, + "documentation": "Constant for setting [member subsurf_scatter_enabled]." }, { "name": "FEATURE_SUBSURFACE_TRANSMITTANCE", - "value": 8 + "value": 8, + "documentation": "Constant for setting [member subsurf_scatter_transmittance_enabled]." }, { "name": "FEATURE_BACKLIGHT", - "value": 9 + "value": 9, + "documentation": "Constant for setting [member backlight_enabled]." }, { "name": "FEATURE_REFRACTION", - "value": 10 + "value": 10, + "documentation": "Constant for setting [member refraction_enabled]." }, { "name": "FEATURE_DETAIL", - "value": 11 + "value": 11, + "documentation": "Constant for setting [member detail_enabled]." }, { "name": "FEATURE_MAX", - "value": 12 + "value": 12, + "documentation": "Represents the size of the [enum Feature] enum." } ] }, @@ -43706,19 +47255,23 @@ "values": [ { "name": "BLEND_MODE_MIX", - "value": 0 + "value": 0, + "documentation": "Default blend mode. The color of the object is blended over the background based on the object's alpha value." }, { "name": "BLEND_MODE_ADD", - "value": 1 + "value": 1, + "documentation": "The color of the object is added to the background." }, { "name": "BLEND_MODE_SUB", - "value": 2 + "value": 2, + "documentation": "The color of the object is subtracted from the background." }, { "name": "BLEND_MODE_MUL", - "value": 3 + "value": 3, + "documentation": "The color of the object is multiplied by the background." } ] }, @@ -43728,15 +47281,18 @@ "values": [ { "name": "ALPHA_ANTIALIASING_OFF", - "value": 0 + "value": 0, + "documentation": "Disables Alpha AntiAliasing for the material." }, { "name": "ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE", - "value": 1 + "value": 1, + "documentation": "Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask." }, { "name": "ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE", - "value": 2 + "value": 2, + "documentation": "Enables AlphaToCoverage and forces all non-zero alpha values to [code]1[/code]. Alpha values in the material are passed to the AntiAliasing sample mask." } ] }, @@ -43746,15 +47302,18 @@ "values": [ { "name": "DEPTH_DRAW_OPAQUE_ONLY", - "value": 0 + "value": 0, + "documentation": "Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass." }, { "name": "DEPTH_DRAW_ALWAYS", - "value": 1 + "value": 1, + "documentation": "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.\n[b]Note:[/b] This does not influence whether transparent objects are included in the depth prepass or not. For that, see [enum Transparency]." }, { "name": "DEPTH_DRAW_DISABLED", - "value": 2 + "value": 2, + "documentation": "Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled)." } ] }, @@ -43764,15 +47323,18 @@ "values": [ { "name": "CULL_BACK", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "CULL_FRONT", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "CULL_DISABLED", - "value": 2 + "value": 2, + "documentation": "No face culling is performed; both the front face and back face will be visible." } ] }, @@ -43782,95 +47344,118 @@ "values": [ { "name": "FLAG_DISABLE_DEPTH_TEST", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "FLAG_ALBEDO_FROM_VERTEX_COLOR", - "value": 1 + "value": 1, + "documentation": "Set [code]ALBEDO[/code] to the per-vertex color specified in the mesh." }, { "name": "FLAG_SRGB_VERTEX_COLOR", - "value": 2 + "value": 2, + "documentation": "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].\n[b]Note:[/b] Only effective when using the Forward+ and Mobile rendering methods." }, { "name": "FLAG_USE_POINT_SIZE", - "value": 3 + "value": 3, + "documentation": "Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use [code]POINT_COORD[/code] instead of [code]UV[/code]." }, { "name": "FLAG_FIXED_SIZE", - "value": 4 + "value": 4, + "documentation": "Object is scaled by depth so that it always appears the same size on screen." }, { "name": "FLAG_BILLBOARD_KEEP_SCALE", - "value": 5 + "value": 5, + "documentation": "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]." }, { "name": "FLAG_UV1_USE_TRIPLANAR", - "value": 6 + "value": 6, + "documentation": "Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]." }, { "name": "FLAG_UV2_USE_TRIPLANAR", - "value": 7 + "value": 7, + "documentation": "Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]." }, { "name": "FLAG_UV1_USE_WORLD_TRIPLANAR", - "value": 8 + "value": 8, + "documentation": "Use triplanar texture lookup for all texture lookups that would normally use [code]UV[/code]." }, { "name": "FLAG_UV2_USE_WORLD_TRIPLANAR", - "value": 9 + "value": 9, + "documentation": "Use triplanar texture lookup for all texture lookups that would normally use [code]UV2[/code]." }, { "name": "FLAG_AO_ON_UV2", - "value": 10 + "value": 10, + "documentation": "Use [code]UV2[/code] coordinates to look up from the [member ao_texture]." }, { "name": "FLAG_EMISSION_ON_UV2", - "value": 11 + "value": 11, + "documentation": "Use [code]UV2[/code] coordinates to look up from the [member emission_texture]." }, { "name": "FLAG_ALBEDO_TEXTURE_FORCE_SRGB", - "value": 12 + "value": 12, + "documentation": "Forces the shader to convert albedo from sRGB space to linear space. See also [member albedo_texture_force_srgb]." }, { "name": "FLAG_DONT_RECEIVE_SHADOWS", - "value": 13 + "value": 13, + "documentation": "Disables receiving shadows from other objects." }, { "name": "FLAG_DISABLE_AMBIENT_LIGHT", - "value": 14 + "value": 14, + "documentation": "Disables receiving ambient light." }, { "name": "FLAG_USE_SHADOW_TO_OPACITY", - "value": 15 + "value": 15, + "documentation": "Enables the shadow to opacity feature." }, { "name": "FLAG_USE_TEXTURE_REPEAT", - "value": 16 + "value": 16, + "documentation": "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." }, { "name": "FLAG_INVERT_HEIGHTMAP", - "value": 17 + "value": 17, + "documentation": "Invert values read from a depth texture to convert them to height values (heightmap)." }, { "name": "FLAG_SUBSURFACE_MODE_SKIN", - "value": 18 + "value": 18, + "documentation": "Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin." }, { "name": "FLAG_PARTICLE_TRAILS_MODE", - "value": 19 + "value": 19, + "documentation": "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." }, { "name": "FLAG_ALBEDO_TEXTURE_MSDF", - "value": 20 + "value": 20, + "documentation": "Enables multichannel signed distance field rendering shader." }, { "name": "FLAG_DISABLE_FOG", - "value": 21 + "value": 21, + "documentation": "Disables receiving depth-based or volumetric fog." }, { "name": "FLAG_MAX", - "value": 22 + "value": 22, + "documentation": "Represents the size of the [enum Flags] enum." } ] }, @@ -43880,19 +47465,23 @@ "values": [ { "name": "DIFFUSE_BURLEY", - "value": 0 + "value": 0, + "documentation": "Default diffuse scattering algorithm." }, { "name": "DIFFUSE_LAMBERT", - "value": 1 + "value": 1, + "documentation": "Diffuse scattering ignores roughness." }, { "name": "DIFFUSE_LAMBERT_WRAP", - "value": 2 + "value": 2, + "documentation": "Extends Lambert to cover more than 90 degrees when roughness increases." }, { "name": "DIFFUSE_TOON", - "value": 3 + "value": 3, + "documentation": "Uses a hard cut for lighting, with smoothing affected by roughness." } ] }, @@ -43902,15 +47491,18 @@ "values": [ { "name": "SPECULAR_SCHLICK_GGX", - "value": 0 + "value": 0, + "documentation": "Default specular blob." }, { "name": "SPECULAR_TOON", - "value": 1 + "value": 1, + "documentation": "Toon blob which changes size based on roughness." }, { "name": "SPECULAR_DISABLED", - "value": 2 + "value": 2, + "documentation": "No specular blob. This is slightly faster to render than other specular modes." } ] }, @@ -43920,19 +47512,23 @@ "values": [ { "name": "BILLBOARD_DISABLED", - "value": 0 + "value": 0, + "documentation": "Billboard mode is disabled." }, { "name": "BILLBOARD_ENABLED", - "value": 1 + "value": 1, + "documentation": "The object's Z axis will always face the camera." }, { "name": "BILLBOARD_FIXED_Y", - "value": 2 + "value": 2, + "documentation": "The object's X axis will always face the camera." }, { "name": "BILLBOARD_PARTICLES", - "value": 3 + "value": 3, + "documentation": "Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties.\nThe [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." } ] }, @@ -43942,23 +47538,28 @@ "values": [ { "name": "TEXTURE_CHANNEL_RED", - "value": 0 + "value": 0, + "documentation": "Used to read from the red channel of a texture." }, { "name": "TEXTURE_CHANNEL_GREEN", - "value": 1 + "value": 1, + "documentation": "Used to read from the green channel of a texture." }, { "name": "TEXTURE_CHANNEL_BLUE", - "value": 2 + "value": 2, + "documentation": "Used to read from the blue channel of a texture." }, { "name": "TEXTURE_CHANNEL_ALPHA", - "value": 3 + "value": 3, + "documentation": "Used to read from the alpha channel of a texture." }, { "name": "TEXTURE_CHANNEL_GRAYSCALE", - "value": 4 + "value": 4, + "documentation": "Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture." } ] }, @@ -43968,11 +47569,13 @@ "values": [ { "name": "EMISSION_OP_ADD", - "value": 0 + "value": 0, + "documentation": "Adds the emission color to the color from the emission texture." }, { "name": "EMISSION_OP_MULTIPLY", - "value": 1 + "value": 1, + "documentation": "Multiplies the emission color by the color from the emission texture." } ] }, @@ -43982,19 +47585,23 @@ "values": [ { "name": "DISTANCE_FADE_DISABLED", - "value": 0 + "value": 0, + "documentation": "Do not use distance fade." }, { "name": "DISTANCE_FADE_PIXEL_ALPHA", - "value": 1 + "value": 1, + "documentation": "Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel." }, { "name": "DISTANCE_FADE_PIXEL_DITHER", - "value": 2 + "value": 2, + "documentation": "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]." }, { "name": "DISTANCE_FADE_OBJECT_DITHER", - "value": 3 + "value": 3, + "documentation": "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]." } ] } @@ -44827,7 +48434,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], 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 [code]true[/code]. See [enum Flags] enumerator for options." }, { "name": "get_flag", @@ -44844,7 +48452,8 @@ "name": "flag", "type": "enum::BaseMaterial3D.Flags" } - ] + ], + "documentation": "Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options." }, { "name": "set_texture_filter", @@ -44887,7 +48496,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], 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 [code]true[/code]." }, { "name": "get_feature", @@ -44904,7 +48514,8 @@ "name": "feature", "type": "enum::BaseMaterial3D.Feature" } - ] + ], + "documentation": "Returns [code]true[/code], if the specified [enum Feature] is enabled." }, { "name": "set_texture", @@ -44922,7 +48533,8 @@ "name": "texture", "type": "Texture2D" } - ] + ], + "documentation": "Sets the texture for the slot specified by [param param]. See [enum TextureParam] for available slots." }, { "name": "get_texture", @@ -44939,7 +48551,8 @@ "name": "param", "type": "enum::BaseMaterial3D.TextureParam" } - ] + ], + "documentation": "Returns the [Texture2D] associated with the specified [enum TextureParam]." }, { "name": "set_detail_blend_mode", @@ -45802,757 +49415,875 @@ "type": "int", "name": "transparency", "setter": "set_transparency", - "getter": "get_transparency" + "getter": "get_transparency", + "documentation": "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]." }, { "type": "float", "name": "alpha_scissor_threshold", "setter": "set_alpha_scissor_threshold", - "getter": "get_alpha_scissor_threshold" + "getter": "get_alpha_scissor_threshold", + "documentation": "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]." }, { "type": "float", "name": "alpha_hash_scale", "setter": "set_alpha_hash_scale", - "getter": "get_alpha_hash_scale" + "getter": "get_alpha_hash_scale", + "documentation": "The hashing scale for Alpha Hash. Recommended values between [code]0[/code] and [code]2[/code]." }, { "type": "int", "name": "alpha_antialiasing_mode", "setter": "set_alpha_antialiasing", - "getter": "get_alpha_antialiasing" + "getter": "get_alpha_antialiasing", + "documentation": "The type of alpha antialiasing to apply. See [enum AlphaAntiAliasing]." }, { "type": "float", "name": "alpha_antialiasing_edge", "setter": "set_alpha_antialiasing_edge", - "getter": "get_alpha_antialiasing_edge" + "getter": "get_alpha_antialiasing_edge", + "documentation": "Threshold at which antialiasing will be applied on the alpha channel." }, { "type": "int", "name": "blend_mode", "setter": "set_blend_mode", - "getter": "get_blend_mode" + "getter": "get_blend_mode", + "documentation": "The material's blend mode.\n[b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]." }, { "type": "int", "name": "cull_mode", "setter": "set_cull_mode", - "getter": "get_cull_mode" + "getter": "get_cull_mode", + "documentation": "Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See [enum CullMode]." }, { "type": "int", "name": "depth_draw_mode", "setter": "set_depth_draw_mode", - "getter": "get_depth_draw_mode" + "getter": "get_depth_draw_mode", + "documentation": "Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member transparency]." }, { "type": "bool", "name": "no_depth_test", "setter": "set_flag", "getter": "get_flag", - "index": 0 + "index": 0, + "documentation": "If [code]true[/code], depth testing is disabled and the object will be drawn in render order." }, { "type": "int", "name": "shading_mode", "setter": "set_shading_mode", - "getter": "get_shading_mode" + "getter": "get_shading_mode", + "documentation": "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.\n[b]Note:[/b] Setting the shading mode vertex shading currently has no effect, as vertex shading is not implemented yet." }, { "type": "int", "name": "diffuse_mode", "setter": "set_diffuse_mode", - "getter": "get_diffuse_mode" + "getter": "get_diffuse_mode", + "documentation": "The algorithm used for diffuse light scattering. See [enum DiffuseMode]." }, { "type": "int", "name": "specular_mode", "setter": "set_specular_mode", - "getter": "get_specular_mode" + "getter": "get_specular_mode", + "documentation": "The method for rendering the specular blob. See [enum SpecularMode].\n[b]Note:[/b] [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 [code]0.0[/code] instead." }, { "type": "bool", "name": "disable_ambient_light", "setter": "set_flag", "getter": "get_flag", - "index": 14 + "index": 14, + "documentation": "If [code]true[/code], the object receives no ambient light." }, { "type": "bool", "name": "disable_fog", "setter": "set_flag", "getter": "get_flag", - "index": 21 + "index": 21, + "documentation": "If [code]true[/code], 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." }, { "type": "bool", "name": "vertex_color_use_as_albedo", "setter": "set_flag", "getter": "get_flag", - "index": 1 + "index": 1, + "documentation": "If [code]true[/code], the vertex color is used as albedo color." }, { "type": "bool", "name": "vertex_color_is_srgb", "setter": "set_flag", "getter": "get_flag", - "index": 2 + "index": 2, + "documentation": "If [code]true[/code], vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If [code]false[/code], vertex colors are considered to be stored in linear color space and are rendered as-is. See also [member albedo_texture_force_srgb].\n[b]Note:[/b] Only effective when using the Forward+ and Mobile rendering methods, not Compatibility." }, { "type": "Color", "name": "albedo_color", "setter": "set_albedo", - "getter": "get_albedo" + "getter": "get_albedo", + "documentation": "The material's base color.\n[b]Note:[/b] If [member detail_enabled] is [code]true[/code] and a [member detail_albedo] texture is specified, [member albedo_color] will [i]not[/i] 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." }, { "type": "Texture2D", "name": "albedo_texture", "setter": "set_texture", "getter": "get_texture", - "index": 0 + "index": 0, + "documentation": "Texture to multiply by [member albedo_color]. Used for basic texturing of objects.\nIf the texture appears unexpectedly too dark or too bright, check [member albedo_texture_force_srgb]." }, { "type": "bool", "name": "albedo_texture_force_srgb", "setter": "set_flag", "getter": "get_flag", - "index": 12 + "index": 12, + "documentation": "If [code]true[/code], forces a conversion of the [member albedo_texture] from sRGB color space to linear color space. See also [member vertex_color_is_srgb].\nThis should only be enabled when needed (typically when using a [ViewportTexture] as [member albedo_texture]). If [member albedo_texture_force_srgb] is [code]true[/code] when it shouldn't be, the texture will appear to be too dark. If [member albedo_texture_force_srgb] is [code]false[/code] when it shouldn't be, the texture will appear to be too bright." }, { "type": "bool", "name": "albedo_texture_msdf", "setter": "set_flag", "getter": "get_flag", - "index": 20 + "index": 20, + "documentation": "Enables multichannel signed distance field rendering shader. Use [member msdf_pixel_range] and [member msdf_outline_size] to configure MSDF parameters." }, { "type": "Texture2D", "name": "orm_texture", "setter": "set_texture", "getter": "get_texture", - "index": 17 + "index": 17, + "documentation": "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." }, { "type": "float", "name": "metallic", "setter": "set_metallic", - "getter": "get_metallic" + "getter": "get_metallic", + "documentation": "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 [code]0[/code] and [code]1[/code] should only be used for blending between metal and non-metal sections. To alter the amount of reflection use [member roughness]." }, { "type": "float", "name": "metallic_specular", "setter": "set_specular", - "getter": "get_specular" + "getter": "get_specular", + "documentation": "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 [code]0.0[/code], 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.\n[b]Note:[/b] Unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]." }, { "type": "Texture2D", "name": "metallic_texture", "setter": "set_texture", "getter": "get_texture", - "index": 1 + "index": 1, + "documentation": "Texture used to specify metallic for an object. This is multiplied by [member metallic]." }, { "type": "int", "name": "metallic_texture_channel", "setter": "set_metallic_texture_channel", - "getter": "get_metallic_texture_channel" + "getter": "get_metallic_texture_channel", + "documentation": "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." }, { "type": "float", "name": "roughness", "setter": "set_roughness", - "getter": "get_roughness" + "getter": "get_roughness", + "documentation": "Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]." }, { "type": "Texture2D", "name": "roughness_texture", "setter": "set_texture", "getter": "get_texture", - "index": 2 + "index": 2, + "documentation": "Texture used to control the roughness per-pixel. Multiplied by [member roughness]." }, { "type": "int", "name": "roughness_texture_channel", "setter": "set_roughness_texture_channel", - "getter": "get_roughness_texture_channel" + "getter": "get_roughness_texture_channel", + "documentation": "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." }, { "type": "bool", "name": "emission_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 0 + "index": 0, + "documentation": "If [code]true[/code], 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." }, { "type": "Color", "name": "emission", "setter": "set_emission", - "getter": "get_emission" + "getter": "get_emission", + "documentation": "The emitted light's color. See [member emission_enabled]." }, { "type": "float", "name": "emission_energy_multiplier", "setter": "set_emission_energy_multiplier", - "getter": "get_emission_energy_multiplier" + "getter": "get_emission_energy_multiplier", + "documentation": "Multiplier for emitted light. See [member emission_enabled]." }, { "type": "float", "name": "emission_intensity", "setter": "set_emission_intensity", - "getter": "get_emission_intensity" + "getter": "get_emission_intensity", + "documentation": "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." }, { "type": "int", "name": "emission_operator", "setter": "set_emission_operator", - "getter": "get_emission_operator" + "getter": "get_emission_operator", + "documentation": "Sets how [member emission] interacts with [member emission_texture]. Can either add or multiply. See [enum EmissionOperator] for options." }, { "type": "bool", "name": "emission_on_uv2", "setter": "set_flag", "getter": "get_flag", - "index": 11 + "index": 11, + "documentation": "Use [code]UV2[/code] to read from the [member emission_texture]." }, { "type": "Texture2D", "name": "emission_texture", "setter": "set_texture", "getter": "get_texture", - "index": 3 + "index": 3, + "documentation": "Texture that specifies how much surface emits light at a given point." }, { "type": "bool", "name": "normal_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 1 + "index": 1, + "documentation": "If [code]true[/code], normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs." }, { "type": "float", "name": "normal_scale", "setter": "set_normal_scale", - "getter": "get_normal_scale" + "getter": "get_normal_scale", + "documentation": "The strength of the normal map's effect." }, { "type": "Texture2D", "name": "normal_texture", "setter": "set_texture", "getter": "get_texture", - "index": 4 + "index": 4, + "documentation": "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].\n[b]Note:[/b] 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.\n[b]Note:[/b] 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.\n[b]Note:[/b] If [member detail_enabled] is [code]true[/code], the [member detail_albedo] texture is drawn [i]below[/i] the [member normal_texture]. To display a normal map [i]above[/i] the [member detail_albedo] texture, use [member detail_normal] instead." }, { "type": "bool", "name": "rim_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 2 + "index": 2, + "documentation": "If [code]true[/code], rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.\n[b]Note:[/b] Rim lighting is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]." }, { "type": "float", "name": "rim", "setter": "set_rim", - "getter": "get_rim" + "getter": "get_rim", + "documentation": "Sets the strength of the rim lighting effect." }, { "type": "float", "name": "rim_tint", "setter": "set_rim_tint", - "getter": "get_rim_tint" + "getter": "get_rim_tint", + "documentation": "The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best." }, { "type": "Texture2D", "name": "rim_texture", "setter": "set_texture", "getter": "get_texture", - "index": 5 + "index": 5, + "documentation": "Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by [member rim]." }, { "type": "bool", "name": "clearcoat_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 3 + "index": 3, + "documentation": "If [code]true[/code], 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.\n[b]Note:[/b] Clearcoat rendering is not visible if the material's [member shading_mode] is [constant SHADING_MODE_UNSHADED]." }, { "type": "float", "name": "clearcoat", "setter": "set_clearcoat", - "getter": "get_clearcoat" + "getter": "get_clearcoat", + "documentation": "Sets the strength of the clearcoat effect. Setting to [code]0[/code] looks the same as disabling the clearcoat effect." }, { "type": "float", "name": "clearcoat_roughness", "setter": "set_clearcoat_roughness", - "getter": "get_clearcoat_roughness" + "getter": "get_clearcoat_roughness", + "documentation": "Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat." }, { "type": "Texture2D", "name": "clearcoat_texture", "setter": "set_texture", "getter": "get_texture", - "index": 6 + "index": 6, + "documentation": "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." }, { "type": "bool", "name": "anisotropy_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 4 + "index": 4, + "documentation": "If [code]true[/code], 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.\n[b]Note:[/b] Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.\n[b]Note:[/b] 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]." }, { "type": "float", "name": "anisotropy", "setter": "set_anisotropy", - "getter": "get_anisotropy" + "getter": "get_anisotropy", + "documentation": "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." }, { "type": "Texture2D", "name": "anisotropy_flowmap", "setter": "set_texture", "getter": "get_texture", - "index": 7 + "index": 7, + "documentation": "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.\nIf 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." }, { "type": "bool", "name": "ao_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 5 + "index": 5, + "documentation": "If [code]true[/code], ambient occlusion is enabled. Ambient occlusion darkens areas based on the [member ao_texture]." }, { "type": "float", "name": "ao_light_affect", "setter": "set_ao_light_affect", - "getter": "get_ao_light_affect" + "getter": "get_ao_light_affect", + "documentation": "Amount that ambient occlusion affects lighting from lights. If [code]0[/code], ambient occlusion only affects ambient light. If [code]1[/code], 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." }, { "type": "Texture2D", "name": "ao_texture", "setter": "set_texture", "getter": "get_texture", - "index": 8 + "index": 8, + "documentation": "Texture that defines the amount of ambient occlusion for a given point on the object." }, { "type": "bool", "name": "ao_on_uv2", "setter": "set_flag", "getter": "get_flag", - "index": 10 + "index": 10, + "documentation": "If [code]true[/code], use [code]UV2[/code] coordinates to look up from the [member ao_texture]." }, { "type": "int", "name": "ao_texture_channel", "setter": "set_ao_texture_channel", - "getter": "get_ao_texture_channel" + "getter": "get_ao_texture_channel", + "documentation": "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." }, { "type": "bool", "name": "heightmap_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 6 + "index": 6, + "documentation": "If [code]true[/code], 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.\n[b]Note:[/b] 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." }, { "type": "float", "name": "heightmap_scale", "setter": "set_heightmap_scale", - "getter": "get_heightmap_scale" + "getter": "get_heightmap_scale", + "documentation": "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.\n[b]Note:[/b] 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." }, { "type": "bool", "name": "heightmap_deep_parallax", "setter": "set_heightmap_deep_parallax", - "getter": "is_heightmap_deep_parallax_enabled" + "getter": "is_heightmap_deep_parallax_enabled", + "documentation": "If [code]true[/code], 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." }, { "type": "int", "name": "heightmap_min_layers", "setter": "set_heightmap_deep_parallax_min_layers", - "getter": "get_heightmap_deep_parallax_min_layers" + "getter": "get_heightmap_deep_parallax_min_layers", + "documentation": "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.\n[b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code]." }, { "type": "int", "name": "heightmap_max_layers", "setter": "set_heightmap_deep_parallax_max_layers", - "getter": "get_heightmap_deep_parallax_max_layers" + "getter": "get_heightmap_deep_parallax_max_layers", + "documentation": "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.\n[b]Note:[/b] Only effective if [member heightmap_deep_parallax] is [code]true[/code]." }, { "type": "bool", "name": "heightmap_flip_tangent", "setter": "set_heightmap_deep_parallax_flip_tangent", - "getter": "get_heightmap_deep_parallax_flip_tangent" + "getter": "get_heightmap_deep_parallax_flip_tangent", + "documentation": "If [code]true[/code], 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 [code]true[/code]." }, { "type": "bool", "name": "heightmap_flip_binormal", "setter": "set_heightmap_deep_parallax_flip_binormal", - "getter": "get_heightmap_deep_parallax_flip_binormal" + "getter": "get_heightmap_deep_parallax_flip_binormal", + "documentation": "If [code]true[/code], 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 [code]true[/code]." }, { "type": "Texture2D", "name": "heightmap_texture", "setter": "set_texture", "getter": "get_texture", - "index": 9 + "index": 9, + "documentation": "The texture to use as a height map. See also [member heightmap_enabled].\nFor 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 [b]Colors > Auto > Equalize[/b]. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves.\n[b]Note:[/b] 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." }, { "type": "bool", "name": "heightmap_flip_texture", "setter": "set_flag", "getter": "get_flag", - "index": 17 + "index": 17, + "documentation": "If [code]true[/code], interprets the height map texture as a depth map, with brighter values appearing to be \"lower\" in altitude compared to darker values.\nThis 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 [code]false[/code]." }, { "type": "bool", "name": "subsurf_scatter_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 7 + "index": 7, + "documentation": "If [code]true[/code], 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]." }, { "type": "float", "name": "subsurf_scatter_strength", "setter": "set_subsurface_scattering_strength", - "getter": "get_subsurface_scattering_strength" + "getter": "get_subsurface_scattering_strength", + "documentation": "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." }, { "type": "bool", "name": "subsurf_scatter_skin_mode", "setter": "set_flag", "getter": "get_flag", - "index": 18 + "index": 18, + "documentation": "If [code]true[/code], 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." }, { "type": "Texture2D", "name": "subsurf_scatter_texture", "setter": "set_texture", "getter": "get_texture", - "index": 10 + "index": 10, + "documentation": "Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength]." }, { "type": "bool", "name": "subsurf_scatter_transmittance_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 8 + "index": 8, + "documentation": "If [code]true[/code], enables subsurface scattering transmittance. Only effective if [member subsurf_scatter_enabled] is [code]true[/code]. See also [member backlight_enabled]." }, { "type": "Color", "name": "subsurf_scatter_transmittance_color", "setter": "set_transmittance_color", - "getter": "get_transmittance_color" + "getter": "get_transmittance_color", + "documentation": "The color to multiply the subsurface scattering transmittance effect with. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code]." }, { "type": "Texture2D", "name": "subsurf_scatter_transmittance_texture", "setter": "set_texture", "getter": "get_texture", - "index": 11 + "index": 11, + "documentation": "The texture to use for multiplying the intensity of the subsurface scattering transmitteance intensity. See also [member subsurf_scatter_texture]. Ignored if [member subsurf_scatter_skin_mode] is [code]true[/code]." }, { "type": "float", "name": "subsurf_scatter_transmittance_depth", "setter": "set_transmittance_depth", - "getter": "get_transmittance_depth" + "getter": "get_transmittance_depth", + "documentation": "The depth of the subsurface scattering transmittance effect." }, { "type": "float", "name": "subsurf_scatter_transmittance_boost", "setter": "set_transmittance_boost", - "getter": "get_transmittance_boost" + "getter": "get_transmittance_boost", + "documentation": "The intensity of the subsurface scattering transmittance effect." }, { "type": "bool", "name": "backlight_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 9 + "index": 9, + "documentation": "If [code]true[/code], the backlight effect is enabled. See also [member subsurf_scatter_transmittance_enabled]." }, { "type": "Color", "name": "backlight", "setter": "set_backlight", - "getter": "get_backlight" + "getter": "get_backlight", + "documentation": "The color used by the backlight effect. Represents the light passing through an object." }, { "type": "Texture2D", "name": "backlight_texture", "setter": "set_texture", "getter": "get_texture", - "index": 12 + "index": 12, + "documentation": "Texture used to control the backlight effect per-pixel. Added to [member backlight]." }, { "type": "bool", "name": "refraction_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 10 + "index": 10, + "documentation": "If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object." }, { "type": "float", "name": "refraction_scale", "setter": "set_refraction", - "getter": "get_refraction" + "getter": "get_refraction", + "documentation": "The strength of the refraction effect." }, { "type": "Texture2D", "name": "refraction_texture", "setter": "set_texture", "getter": "get_texture", - "index": 13 + "index": 13, + "documentation": "Texture that controls the strength of the refraction per-pixel. Multiplied by [member refraction_scale]." }, { "type": "int", "name": "refraction_texture_channel", "setter": "set_refraction_texture_channel", - "getter": "get_refraction_texture_channel" + "getter": "get_refraction_texture_channel", + "documentation": "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." }, { "type": "bool", "name": "detail_enabled", "setter": "set_feature", "getter": "get_feature", - "index": 11 + "index": 11, + "documentation": "If [code]true[/code], 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." }, { "type": "Texture2D", "name": "detail_mask", "setter": "set_texture", "getter": "get_texture", - "index": 14 + "index": 14, + "documentation": "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)." }, { "type": "int", "name": "detail_blend_mode", "setter": "set_detail_blend_mode", - "getter": "get_detail_blend_mode" + "getter": "get_detail_blend_mode", + "documentation": "Specifies how the [member detail_albedo] should blend with the current [code]ALBEDO[/code]. See [enum BlendMode] for options." }, { "type": "int", "name": "detail_uv_layer", "setter": "set_detail_uv", - "getter": "get_detail_uv" + "getter": "get_detail_uv", + "documentation": "Specifies whether to use [code]UV[/code] or [code]UV2[/code] for the detail layer. See [enum DetailUV] for options." }, { "type": "Texture2D", "name": "detail_albedo", "setter": "set_texture", "getter": "get_texture", - "index": 15 + "index": 15, + "documentation": "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].\n[b]Note:[/b] [member detail_albedo] is [i]not[/i] modulated by [member albedo_color]." }, { "type": "Texture2D", "name": "detail_normal", "setter": "set_texture", "getter": "get_texture", - "index": 16 + "index": 16, + "documentation": "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].\n[b]Note:[/b] 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." }, { "type": "Vector3", "name": "uv1_scale", "setter": "set_uv1_scale", - "getter": "get_uv1_scale" + "getter": "get_uv1_scale", + "documentation": "How much to scale the [code]UV[/code] coordinates. This is multiplied by [code]UV[/code] in the vertex function. The Z component is used when [member uv1_triplanar] is enabled, but it is not used anywhere else." }, { "type": "Vector3", "name": "uv1_offset", "setter": "set_uv1_offset", - "getter": "get_uv1_offset" + "getter": "get_uv1_offset", + "documentation": "How much to offset the [code]UV[/code] coordinates. This amount will be added to [code]UV[/code] 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." }, { "type": "bool", "name": "uv1_triplanar", "setter": "set_flag", "getter": "get_flag", - "index": 6 + "index": 6, + "documentation": "If [code]true[/code], instead of using [code]UV[/code] 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." }, { "type": "float", "name": "uv1_triplanar_sharpness", "setter": "set_uv1_triplanar_blend_sharpness", - "getter": "get_uv1_triplanar_blend_sharpness" + "getter": "get_uv1_triplanar_blend_sharpness", + "documentation": "A lower number blends the texture more softly while a higher number blends the texture more sharply.\n[b]Note:[/b] [member uv1_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh." }, { "type": "bool", "name": "uv1_world_triplanar", "setter": "set_flag", "getter": "get_flag", - "index": 8 + "index": 8, + "documentation": "If [code]true[/code], triplanar mapping for [code]UV[/code] is calculated in world space rather than object local space. See also [member uv1_triplanar]." }, { "type": "Vector3", "name": "uv2_scale", "setter": "set_uv2_scale", - "getter": "get_uv2_scale" + "getter": "get_uv2_scale", + "documentation": "How much to scale the [code]UV2[/code] coordinates. This is multiplied by [code]UV2[/code] in the vertex function. The Z component is used when [member uv2_triplanar] is enabled, but it is not used anywhere else." }, { "type": "Vector3", "name": "uv2_offset", "setter": "set_uv2_offset", - "getter": "get_uv2_offset" + "getter": "get_uv2_offset", + "documentation": "How much to offset the [code]UV2[/code] coordinates. This amount will be added to [code]UV2[/code] 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." }, { "type": "bool", "name": "uv2_triplanar", "setter": "set_flag", "getter": "get_flag", - "index": 7 + "index": 7, + "documentation": "If [code]true[/code], instead of using [code]UV2[/code] 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." }, { "type": "float", "name": "uv2_triplanar_sharpness", "setter": "set_uv2_triplanar_blend_sharpness", - "getter": "get_uv2_triplanar_blend_sharpness" + "getter": "get_uv2_triplanar_blend_sharpness", + "documentation": "A lower number blends the texture more softly while a higher number blends the texture more sharply.\n[b]Note:[/b] [member uv2_triplanar_sharpness] is clamped between [code]0.0[/code] and [code]150.0[/code] (inclusive) as values outside that range can look broken depending on the mesh." }, { "type": "bool", "name": "uv2_world_triplanar", "setter": "set_flag", "getter": "get_flag", - "index": 9 + "index": 9, + "documentation": "If [code]true[/code], triplanar mapping for [code]UV2[/code] is calculated in world space rather than object local space. See also [member uv2_triplanar]." }, { "type": "int", "name": "texture_filter", "setter": "set_texture_filter", - "getter": "get_texture_filter" + "getter": "get_texture_filter", + "documentation": "Filter flags for the texture. See [enum TextureFilter] for options.\n[b]Note:[/b] [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." }, { "type": "bool", "name": "texture_repeat", "setter": "set_flag", "getter": "get_flag", - "index": 16 + "index": 16, + "documentation": "Repeat flags for the texture. See [enum TextureFilter] for options." }, { "type": "bool", "name": "disable_receive_shadows", "setter": "set_flag", "getter": "get_flag", - "index": 13 + "index": 13, + "documentation": "If [code]true[/code], the object receives no shadow that would otherwise be cast onto it." }, { "type": "bool", "name": "shadow_to_opacity", "setter": "set_flag", "getter": "get_flag", - "index": 15 + "index": 15, + "documentation": "If [code]true[/code], 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." }, { "type": "int", "name": "billboard_mode", "setter": "set_billboard_mode", - "getter": "get_billboard_mode" + "getter": "get_billboard_mode", + "documentation": "Controls how the object faces the camera. See [enum BillboardMode].\n[b]Note:[/b] 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." }, { "type": "bool", "name": "billboard_keep_scale", "setter": "set_flag", "getter": "get_flag", - "index": 5 + "index": 5, + "documentation": "If [code]true[/code], 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]." }, { "type": "int", "name": "particles_anim_h_frames", "setter": "set_particles_anim_h_frames", - "getter": "get_particles_anim_h_frames" + "getter": "get_particles_anim_h_frames", + "documentation": "The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." }, { "type": "int", "name": "particles_anim_v_frames", "setter": "set_particles_anim_v_frames", - "getter": "get_particles_anim_v_frames" + "getter": "get_particles_anim_v_frames", + "documentation": "The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." }, { "type": "bool", "name": "particles_anim_loop", "setter": "set_particles_anim_loop", - "getter": "get_particles_anim_loop" + "getter": "get_particles_anim_loop", + "documentation": "If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member billboard_mode]." }, { "type": "bool", "name": "grow", "setter": "set_grow_enabled", - "getter": "is_grow_enabled" + "getter": "is_grow_enabled", + "documentation": "If [code]true[/code], 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].\n[b]Note:[/b] 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." }, { "type": "float", "name": "grow_amount", "setter": "set_grow", - "getter": "get_grow" + "getter": "get_grow", + "documentation": "Grows object vertices in the direction of their normals. Only effective if [member grow] is [code]true[/code]." }, { "type": "bool", "name": "fixed_size", "setter": "set_flag", "getter": "get_flag", - "index": 4 + "index": 4, + "documentation": "If [code]true[/code], the object is rendered at the same size regardless of distance." }, { "type": "bool", "name": "use_point_size", "setter": "set_flag", "getter": "get_flag", - "index": 3 + "index": 3, + "documentation": "If [code]true[/code], render point size can be changed.\n[b]Note:[/b] This is only effective for objects whose geometry is point-based rather than triangle-based. See also [member point_size]." }, { "type": "float", "name": "point_size", "setter": "set_point_size", - "getter": "get_point_size" + "getter": "get_point_size", + "documentation": "The point size in pixels. See [member use_point_size]." }, { "type": "bool", "name": "use_particle_trails", "setter": "set_flag", "getter": "get_flag", - "index": 19 + "index": 19, + "documentation": "If [code]true[/code], 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." }, { "type": "bool", "name": "proximity_fade_enabled", "setter": "set_proximity_fade_enabled", - "getter": "is_proximity_fade_enabled" + "getter": "is_proximity_fade_enabled", + "documentation": "If [code]true[/code], the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object." }, { "type": "float", "name": "proximity_fade_distance", "setter": "set_proximity_fade_distance", - "getter": "get_proximity_fade_distance" + "getter": "get_proximity_fade_distance", + "documentation": "Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade." }, { "type": "float", "name": "msdf_pixel_range", "setter": "set_msdf_pixel_range", - "getter": "get_msdf_pixel_range" + "getter": "get_msdf_pixel_range", + "documentation": "The width of the range around the shape between the minimum and maximum representable signed distance." }, { "type": "float", "name": "msdf_outline_size", "setter": "set_msdf_outline_size", - "getter": "get_msdf_outline_size" + "getter": "get_msdf_outline_size", + "documentation": "The width of the shape outline." }, { "type": "int", "name": "distance_fade_mode", "setter": "set_distance_fade", - "getter": "get_distance_fade" + "getter": "get_distance_fade", + "documentation": "Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s." }, { "type": "float", "name": "distance_fade_min_distance", "setter": "set_distance_fade_min_distance", - "getter": "get_distance_fade_min_distance" + "getter": "get_distance_fade_min_distance", + "documentation": "Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.\n[b]Note:[/b] 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]." }, { "type": "float", "name": "distance_fade_max_distance", "setter": "set_distance_fade_max_distance", - "getter": "get_distance_fade_max_distance" + "getter": "get_distance_fade_max_distance", + "documentation": "Distance at which the object appears fully opaque.\n[b]Note:[/b] 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]." } - ] + ], + "documentation": "This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details." }, { "name": "BitMap", @@ -46573,7 +50304,8 @@ "name": "size", "type": "Vector2i" } - ] + ], + "documentation": "Creates a bitmap with the specified size, filled with [code]false[/code]." }, { "name": "create_from_image_alpha", @@ -46596,7 +50328,8 @@ "meta": "float", "default_value": "0.1" } - ] + ], + "documentation": "Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [param threshold] or less, and [code]true[/code] in other case." }, { "name": "set_bitv", @@ -46614,7 +50347,8 @@ "name": "bit", "type": "bool" } - ] + ], + "documentation": "Sets the bitmap's element at the specified position, to the specified value." }, { "name": "set_bit", @@ -46638,7 +50372,8 @@ "name": "bit", "type": "bool" } - ] + ], + "documentation": "Sets the bitmap's element at the specified position, to the specified value." }, { "name": "get_bitv", @@ -46655,7 +50390,8 @@ "name": "position", "type": "Vector2i" } - ] + ], + "documentation": "Returns bitmap's value at the specified position." }, { "name": "get_bit", @@ -46678,7 +50414,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns bitmap's value at the specified position." }, { "name": "set_bit_rect", @@ -46696,7 +50433,8 @@ "name": "bit", "type": "bool" } - ] + ], + "documentation": "Sets a rectangular portion of the bitmap to the specified value." }, { "name": "get_true_bit_count", @@ -46708,7 +50446,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of bitmap elements that are set to [code]true[/code]." }, { "name": "get_size", @@ -46719,7 +50458,8 @@ "hash": 3690982128, "return_value": { "type": "Vector2i" - } + }, + "documentation": "Returns bitmap's dimensions." }, { "name": "resize", @@ -46733,7 +50473,8 @@ "name": "new_size", "type": "Vector2i" } - ] + ], + "documentation": "Resizes the image to [param new_size]." }, { "name": "grow_mask", @@ -46752,7 +50493,8 @@ "name": "rect", "type": "Rect2i" } - ] + ], + "documentation": "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]." }, { "name": "convert_to_image", @@ -46763,7 +50505,8 @@ "hash": 4190603485, "return_value": { "type": "Image" - } + }, + "documentation": "Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black." }, { "name": "opaque_to_polygons", @@ -46789,7 +50532,8 @@ "meta": "float", "default_value": "2.0" } - ] + ], + "documentation": "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.\nTo get polygons covering the whole bitmap, pass:\n[codeblock]\nRect2(Vector2(), get_size())\n[/codeblock]\n[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." } ], "properties": [ @@ -46799,7 +50543,8 @@ "setter": "_set_data", "getter": "_get_data" } - ] + ], + "documentation": "A two-dimensional array of boolean values, can be used to efficiently store a binary matrix (every matrix element takes only one bit) and query the values using natural cartesian coordinates." }, { "name": "Bone2D", @@ -46839,7 +50584,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Stores the node's current transforms in [member rest]." }, { "name": "get_skeleton_rest", @@ -46850,7 +50596,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the node's [member rest] [Transform2D] if it doesn't have a parent, or its rest pose relative to its parent." }, { "name": "get_index_in_skeleton", @@ -46862,7 +50609,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the node's index as part of the entire skeleton. See [Skeleton2D]." }, { "name": "set_autocalculate_length_and_angle", @@ -46876,7 +50624,8 @@ "name": "auto_calculate", "type": "bool" } - ] + ], + "documentation": "When set to [code]true[/code], 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." }, { "name": "get_autocalculate_length_and_angle", @@ -46887,7 +50636,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "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." }, { "name": "set_length", @@ -46902,7 +50652,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the length of the bone in the [Bone2D]." }, { "name": "get_length", @@ -46914,7 +50665,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the length of the bone in the [Bone2D] node." }, { "name": "set_bone_angle", @@ -46929,7 +50681,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the bone angle for the [Bone2D]. This is typically set to the rotation from the [Bone2D] to a child [Bone2D] node.\n[b]Note:[/b] 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]." }, { "name": "get_bone_angle", @@ -46941,7 +50694,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "Returns the angle of the bone in the [Bone2D].\n[b]Note:[/b] 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]." } ], "properties": [ @@ -46949,9 +50703,11 @@ "type": "Transform2D", "name": "rest", "setter": "set_rest", - "getter": "get_rest" + "getter": "get_rest", + "documentation": "Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]." } - ] + ], + "documentation": "A hierarchy of [Bone2D]s can be bound to a [Skeleton2D] to control and animate other [Node2D] nodes.\nYou can use [Bone2D] and [Skeleton2D] nodes to animate 2D meshes created with the [Polygon2D] UV editor.\nEach bone has a [member rest] transform that you can reset to with [method apply_rest]. These rest poses are relative to the bone's parent.\nIf in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses." }, { "name": "BoneAttachment3D", @@ -47025,7 +50781,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "A function that is called automatically when the [Skeleton3D] the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose." }, { "name": "set_override_pose", @@ -47064,7 +50821,8 @@ "name": "use_external_skeleton", "type": "bool" } - ] + ], + "documentation": "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 [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton]." }, { "name": "get_use_external_skeleton", @@ -47075,7 +50833,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns whether the BoneAttachment3D node is using an external [Skeleton3D] rather than attempting to use its parent node as the [Skeleton3D]." }, { "name": "set_external_skeleton", @@ -47089,7 +50848,8 @@ "name": "external_skeleton", "type": "NodePath" } - ] + ], + "documentation": "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." }, { "name": "get_external_skeleton", @@ -47100,7 +50860,8 @@ "hash": 4075236667, "return_value": { "type": "NodePath" - } + }, + "documentation": "Returns the [NodePath] to the external [Skeleton3D] node, if one has been set." } ], "properties": [ @@ -47108,21 +50869,25 @@ "type": "StringName", "name": "bone_name", "setter": "set_bone_name", - "getter": "get_bone_name" + "getter": "get_bone_name", + "documentation": "The name of the attached bone." }, { "type": "int", "name": "bone_idx", "setter": "set_bone_idx", - "getter": "get_bone_idx" + "getter": "get_bone_idx", + "documentation": "The index of the attached bone." }, { "type": "bool", "name": "override_pose", "setter": "set_override_pose", - "getter": "get_override_pose" + "getter": "get_override_pose", + "documentation": "Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone. When set to [code]false[/code], the BoneAttachment3D will always be set to the bone's transform." } - ] + ], + "documentation": "This node selects a bone in a [Skeleton3D] and attaches to it. This means that the [BoneAttachment3D] node will either dynamically copy or override the 3D transform of the selected bone." }, { "name": "BoneMap", @@ -47171,7 +50936,8 @@ "name": "profile_bone_name", "type": "StringName" } - ] + ], + "documentation": "Returns a skeleton bone name is mapped to [param profile_bone_name].\nIn the retargeting process, the returned bone name is the bone name of the source skeleton." }, { "name": "set_skeleton_bone_name", @@ -47189,7 +50955,8 @@ "name": "skeleton_bone_name", "type": "StringName" } - ] + ], + "documentation": "Maps a skeleton bone name to [param profile_bone_name].\nIn the retargeting process, the setting bone name is the bone name of the source skeleton." }, { "name": "find_profile_bone_name", @@ -47206,15 +50973,18 @@ "name": "skeleton_bone_name", "type": "StringName" } - ] + ], + "documentation": "Returns a profile bone name having [param skeleton_bone_name]. If not found, an empty [StringName] will be returned.\nIn the retargeting process, the returned bone name is the bone name of the target skeleton." } ], "signals": [ { - "name": "bone_map_updated" + "name": "bone_map_updated", + "documentation": "This signal is emitted when change the key value in the [BoneMap]. This is used to validate mapping and to update [BoneMap] editor." }, { - "name": "profile_updated" + "name": "profile_updated", + "documentation": "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." } ], "properties": [ @@ -47222,9 +50992,11 @@ "type": "SkeletonProfile", "name": "profile", "setter": "set_profile", - "getter": "get_profile" + "getter": "get_profile", + "documentation": "A [SkeletonProfile] of the mapping target. Key names in the [BoneMap] are synchronized with it." } - ] + ], + "documentation": "This class contains a dictionary that uses a list of bone names in [SkeletonProfile] as key names.\nBy assigning the actual [Skeleton3D] bone name as the key value, it maps the [Skeleton3D] to the [SkeletonProfile]." }, { "name": "BoxContainer", @@ -47239,15 +51011,18 @@ "values": [ { "name": "ALIGNMENT_BEGIN", - "value": 0 + "value": 0, + "documentation": "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)." }, { "name": "ALIGNMENT_CENTER", - "value": 1 + "value": 1, + "documentation": "The child controls will be centered in the container." }, { "name": "ALIGNMENT_END", - "value": 2 + "value": 2, + "documentation": "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)." } ] } @@ -47268,7 +51043,8 @@ "name": "begin", "type": "bool" } - ] + ], + "documentation": "Adds a [Control] node to the box as a spacer. If [param begin] is [code]true[/code], it will insert the [Control] node in front of all other children." }, { "name": "set_alignment", @@ -47326,15 +51102,18 @@ "type": "int", "name": "alignment", "setter": "set_alignment", - "getter": "get_alignment" + "getter": "get_alignment", + "documentation": "The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END])." }, { "type": "bool", "name": "vertical", "setter": "set_vertical", - "getter": "is_vertical" + "getter": "is_vertical", + "documentation": "If [code]true[/code], the [BoxContainer] will arrange its children vertically, rather than horizontally.\nCan't be changed when using [HBoxContainer] and [VBoxContainer]." } - ] + ], + "documentation": "A container that arranges its child controls horizontally or vertically, rearranging them automatically when their minimum size changes." }, { "name": "BoxMesh", @@ -47455,27 +51234,32 @@ "type": "Vector3", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "The box's width, height and depth." }, { "type": "int", "name": "subdivide_width", "setter": "set_subdivide_width", - "getter": "get_subdivide_width" + "getter": "get_subdivide_width", + "documentation": "Number of extra edge loops inserted along the X axis." }, { "type": "int", "name": "subdivide_height", "setter": "set_subdivide_height", - "getter": "get_subdivide_height" + "getter": "get_subdivide_height", + "documentation": "Number of extra edge loops inserted along the Y axis." }, { "type": "int", "name": "subdivide_depth", "setter": "set_subdivide_depth", - "getter": "get_subdivide_depth" + "getter": "get_subdivide_depth", + "documentation": "Number of extra edge loops inserted along the Z axis." } - ] + ], + "documentation": "Generate an axis-aligned box [PrimitiveMesh].\nThe box's UV layout is arranged in a 3×2 layout that allows texturing each face individually. To apply the same texture on all faces, change the material's UV property to [code]Vector3(3, 2, 1)[/code]. This is equivalent to adding [code]UV *= vec2(3.0, 2.0)[/code] in a vertex shader.\n[b]Note:[/b] When using a large textured [BoxMesh] (e.g. as a floor), you may stumble upon UV jittering issues depending on the camera angle. To solve this, increase [member subdivide_depth], [member subdivide_height] and [member subdivide_width] until you no longer notice UV jittering." }, { "name": "BoxOccluder3D", @@ -47515,9 +51299,11 @@ "type": "Vector3", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "The box's size in 3D units." } - ] + ], + "documentation": "[BoxOccluder3D] stores a cuboid shape that can be used by the engine's occlusion culling system.\nSee [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling." }, { "name": "BoxShape3D", @@ -47557,9 +51343,11 @@ "type": "Vector3", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "The box's width, height and depth." } - ] + ], + "documentation": "A 3D box shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape3D].\n[b]Performance:[/b] [BoxShape3D] is fast to check collisions against. It is faster than [CapsuleShape3D] and [CylinderShape3D], but slower than [SphereShape3D]." }, { "name": "Button", @@ -47849,69 +51637,81 @@ "type": "String", "name": "text", "setter": "set_text", - "getter": "get_text" + "getter": "get_text", + "documentation": "The button's text that will be displayed inside the button's area." }, { "type": "Texture2D", "name": "icon", "setter": "set_button_icon", - "getter": "get_button_icon" + "getter": "get_button_icon", + "documentation": "Button's icon, if text is present the icon will be placed before the text.\nTo edit margin and spacing of the icon, use [theme_item h_separation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es." }, { "type": "bool", "name": "flat", "setter": "set_flat", - "getter": "is_flat" + "getter": "is_flat", + "documentation": "Flat buttons don't display decoration." }, { "type": "int", "name": "alignment", "setter": "set_text_alignment", - "getter": "get_text_alignment" + "getter": "get_text_alignment", + "documentation": "Text alignment policy for the button's text, use one of the [enum HorizontalAlignment] constants." }, { "type": "int", "name": "text_overrun_behavior", "setter": "set_text_overrun_behavior", - "getter": "get_text_overrun_behavior" + "getter": "get_text_overrun_behavior", + "documentation": "Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum TextServer.OverrunBehavior] for a description of all modes." }, { "type": "bool", "name": "clip_text", "setter": "set_clip_text", - "getter": "get_clip_text" + "getter": "get_clip_text", + "documentation": "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." }, { "type": "int", "name": "icon_alignment", "setter": "set_icon_alignment", - "getter": "get_icon_alignment" + "getter": "get_icon_alignment", + "documentation": "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." }, { "type": "int", "name": "vertical_icon_alignment", "setter": "set_vertical_icon_alignment", - "getter": "get_vertical_icon_alignment" + "getter": "get_vertical_icon_alignment", + "documentation": "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." }, { "type": "bool", "name": "expand_icon", "setter": "set_expand_icon", - "getter": "is_expand_icon" + "getter": "is_expand_icon", + "documentation": "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]." }, { "type": "int", "name": "text_direction", "setter": "set_text_direction", - "getter": "get_text_direction" + "getter": "get_text_direction", + "documentation": "Base text writing direction." }, { "type": "String", "name": "language", "setter": "set_language", - "getter": "get_language" + "getter": "get_language", + "documentation": "Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead." } - ] + ], + "documentation": "[Button] is the standard themed button. It can contain text and an icon, and it will display them according to the current [Theme].\n[b]Example of creating a button and assigning an action when pressed by code:[/b]\n[codeblocks]\n[gdscript]\nfunc _ready():\n var button = Button.new()\n button.text = \"Click me\"\n button.pressed.connect(self._button_pressed)\n add_child(button)\n\nfunc _button_pressed():\n print(\"Hello world!\")\n[/gdscript]\n[csharp]\npublic override void _Ready()\n{\n var button = new Button();\n button.Text = \"Click me\";\n button.Pressed += ButtonPressed;\n AddChild(button);\n}\n\nprivate void ButtonPressed()\n{\n GD.Print(\"Hello world!\");\n}\n[/csharp]\n[/codeblocks]\nSee also [BaseButton] which contains common properties and methods associated with this node.\n[b]Note:[/b] Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use [TouchScreenButton] for buttons that trigger gameplay movement or actions." }, { "name": "ButtonGroup", @@ -47929,7 +51729,8 @@ "hash": 3886434893, "return_value": { "type": "BaseButton" - } + }, + "documentation": "Returns the current pressed button." }, { "name": "get_buttons", @@ -47940,7 +51741,8 @@ "hash": 2915620761, "return_value": { "type": "typedarray::BaseButton" - } + }, + "documentation": "Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group])." }, { "name": "set_allow_unpress", @@ -47976,7 +51778,8 @@ "name": "button", "type": "BaseButton" } - ] + ], + "documentation": "Emitted when one of the buttons of the group is pressed." } ], "properties": [ @@ -47984,9 +51787,11 @@ "type": "bool", "name": "allow_unpress", "setter": "set_allow_unpress", - "getter": "is_allow_unpress" + "getter": "is_allow_unpress", + "documentation": "If [code]true[/code], it is possible to unpress all buttons in this [ButtonGroup]." } - ] + ], + "documentation": "A group of [BaseButton]-derived buttons. The buttons in a [ButtonGroup] are treated like radio buttons: No more than one button can be pressed at a time. Some types of buttons (such as [CheckBox]) may have a special appearance in this state.\nEvery member of a [ButtonGroup] should have [member BaseButton.toggle_mode] set to [code]true[/code]." }, { "name": "CPUParticles2D", @@ -48001,11 +51806,13 @@ "values": [ { "name": "DRAW_ORDER_INDEX", - "value": 0 + "value": 0, + "documentation": "Particles are drawn in the order emitted." }, { "name": "DRAW_ORDER_LIFETIME", - "value": 1 + "value": 1, + "documentation": "Particles are drawn in order of remaining lifetime." } ] }, @@ -48015,55 +51822,68 @@ "values": [ { "name": "PARAM_INITIAL_LINEAR_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties." }, { "name": "PARAM_ANGULAR_VELOCITY", - "value": 1 + "value": 1, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties." }, { "name": "PARAM_ORBIT_VELOCITY", - "value": 2 + "value": 2, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties." }, { "name": "PARAM_LINEAR_ACCEL", - "value": 3 + "value": 3, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties." }, { "name": "PARAM_RADIAL_ACCEL", - "value": 4 + "value": 4, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties." }, { "name": "PARAM_TANGENTIAL_ACCEL", - "value": 5 + "value": 5, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties." }, { "name": "PARAM_DAMPING", - "value": 6 + "value": 6, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties." }, { "name": "PARAM_ANGLE", - "value": 7 + "value": 7, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties." }, { "name": "PARAM_SCALE", - "value": 8 + "value": 8, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties." }, { "name": "PARAM_HUE_VARIATION", - "value": 9 + "value": 9, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties." }, { "name": "PARAM_ANIM_SPEED", - "value": 10 + "value": 10, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties." }, { "name": "PARAM_ANIM_OFFSET", - "value": 11 + "value": 11, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties." }, { "name": "PARAM_MAX", - "value": 12 + "value": 12, + "documentation": "Represents the size of the [enum Parameter] enum." } ] }, @@ -48073,19 +51893,23 @@ "values": [ { "name": "PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Use with [method set_particle_flag] to set [member particle_flag_align_y]." }, { "name": "PARTICLE_FLAG_ROTATE_Y", - "value": 1 + "value": 1, + "documentation": "Present for consistency with 3D particle nodes, not used in 2D." }, { "name": "PARTICLE_FLAG_DISABLE_Z", - "value": 2 + "value": 2, + "documentation": "Present for consistency with 3D particle nodes, not used in 2D." }, { "name": "PARTICLE_FLAG_MAX", - "value": 3 + "value": 3, + "documentation": "Represents the size of the [enum ParticleFlags] enum." } ] }, @@ -48095,31 +51919,38 @@ "values": [ { "name": "EMISSION_SHAPE_POINT", - "value": 0 + "value": 0, + "documentation": "All particles will be emitted from a single point." }, { "name": "EMISSION_SHAPE_SPHERE", - "value": 1 + "value": 1, + "documentation": "Particles will be emitted in the volume of a sphere flattened to two dimensions." }, { "name": "EMISSION_SHAPE_SPHERE_SURFACE", - "value": 2 + "value": 2, + "documentation": "Particles will be emitted on the surface of a sphere flattened to two dimensions." }, { "name": "EMISSION_SHAPE_RECTANGLE", - "value": 3 + "value": 3, + "documentation": "Particles will be emitted in the area of a rectangle." }, { "name": "EMISSION_SHAPE_POINTS", - "value": 4 + "value": 4, + "documentation": "Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]." }, { "name": "EMISSION_SHAPE_DIRECTED_POINTS", - "value": 5 + "value": 5, + "documentation": "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]." }, { "name": "EMISSION_SHAPE_MAX", - "value": 6 + "value": 6, + "documentation": "Represents the size of the [enum EmissionShape] enum." } ] } @@ -48497,7 +52328,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Restarts the particle emitter." }, { "name": "set_direction", @@ -48568,7 +52400,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the minimum value for the given parameter." }, { "name": "get_param_min", @@ -48586,7 +52419,8 @@ "name": "param", "type": "enum::CPUParticles2D.Parameter" } - ] + ], + "documentation": "Returns the minimum value range for the given parameter." }, { "name": "set_param_max", @@ -48605,7 +52439,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the maximum value for the given parameter." }, { "name": "get_param_max", @@ -48623,7 +52458,8 @@ "name": "param", "type": "enum::CPUParticles2D.Parameter" } - ] + ], + "documentation": "Returns the maximum value range for the given parameter." }, { "name": "set_param_curve", @@ -48641,7 +52477,8 @@ "name": "curve", "type": "Curve" } - ] + ], + "documentation": "Sets the [Curve] of the parameter specified by [enum Parameter]." }, { "name": "get_param_curve", @@ -48658,7 +52495,8 @@ "name": "param", "type": "enum::CPUParticles2D.Parameter" } - ] + ], + "documentation": "Returns the [Curve] of the parameter specified by [enum Parameter]." }, { "name": "set_color", @@ -48751,7 +52589,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "Enables or disables the given flag (see [enum ParticleFlags] for options)." }, { "name": "get_particle_flag", @@ -48768,7 +52607,8 @@ "name": "particle_flag", "type": "enum::CPUParticles2D.ParticleFlags" } - ] + ], + "documentation": "Returns the enabled state of the given flag (see [enum ParticleFlags] for options)." }, { "name": "set_emission_shape", @@ -49034,12 +52874,14 @@ "name": "particles", "type": "Node" } - ] + ], + "documentation": "Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticleProcessMaterial]." } ], "signals": [ { - "name": "finished" + "name": "finished", + "documentation": "Emitted when all active particles have finished processing. When [member one_shot] is disabled, particles will process continuously, so this is never emitted." } ], "properties": [ @@ -49047,429 +52889,495 @@ "type": "bool", "name": "emitting", "setter": "set_emitting", - "getter": "is_emitting" + "getter": "is_emitting", + "documentation": "If [code]true[/code], particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is [code]true[/code] setting [member emitting] to [code]true[/code] 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." }, { "type": "int", "name": "amount", "setter": "set_amount", - "getter": "get_amount" + "getter": "get_amount", + "documentation": "Number of particles emitted in one emission cycle." }, { "type": "float", "name": "lifetime", "setter": "set_lifetime", - "getter": "get_lifetime" + "getter": "get_lifetime", + "documentation": "Amount of time each particle will exist." }, { "type": "bool", "name": "one_shot", "setter": "set_one_shot", - "getter": "get_one_shot" + "getter": "get_one_shot", + "documentation": "If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end." }, { "type": "float", "name": "preprocess", "setter": "set_pre_process_time", - "getter": "get_pre_process_time" + "getter": "get_pre_process_time", + "documentation": "Particle system starts as if it had already run for this many seconds." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles." }, { "type": "float", "name": "explosiveness", "setter": "set_explosiveness_ratio", - "getter": "get_explosiveness_ratio" + "getter": "get_explosiveness_ratio", + "documentation": "How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins." }, { "type": "float", "name": "randomness", "setter": "set_randomness_ratio", - "getter": "get_randomness_ratio" + "getter": "get_randomness_ratio", + "documentation": "Emission lifetime randomness ratio." }, { "type": "float", "name": "lifetime_randomness", "setter": "set_lifetime_randomness", - "getter": "get_lifetime_randomness" + "getter": "get_lifetime_randomness", + "documentation": "Particle lifetime randomness ratio." }, { "type": "int", "name": "fixed_fps", "setter": "set_fixed_fps", - "getter": "get_fixed_fps" + "getter": "get_fixed_fps", + "documentation": "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." }, { "type": "bool", "name": "fract_delta", "setter": "set_fractional_delta", - "getter": "get_fractional_delta" + "getter": "get_fractional_delta", + "documentation": "If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect." }, { "type": "bool", "name": "local_coords", "setter": "set_use_local_coordinates", - "getter": "get_use_local_coordinates" + "getter": "get_use_local_coordinates", + "documentation": "If [code]true[/code], 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 [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles2D] node (and its parents) when it is moved or rotated." }, { "type": "int", "name": "draw_order", "setter": "set_draw_order", - "getter": "get_draw_order" + "getter": "get_draw_order", + "documentation": "Particle draw order. Uses [enum DrawOrder] values." }, { "type": "Texture2D", "name": "texture", "setter": "set_texture", - "getter": "get_texture" + "getter": "get_texture", + "documentation": "Particle texture. If [code]null[/code], particles will be squares." }, { "type": "int", "name": "emission_shape", "setter": "set_emission_shape", - "getter": "get_emission_shape" + "getter": "get_emission_shape", + "documentation": "Particles will be emitted inside this region. See [enum EmissionShape] for possible values." }, { "type": "float", "name": "emission_sphere_radius", "setter": "set_emission_sphere_radius", - "getter": "get_emission_sphere_radius" + "getter": "get_emission_sphere_radius", + "documentation": "The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]." }, { "type": "Vector2", "name": "emission_rect_extents", "setter": "set_emission_rect_extents", - "getter": "get_emission_rect_extents" + "getter": "get_emission_rect_extents", + "documentation": "The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]." }, { "type": "PackedVector2Array", "name": "emission_points", "setter": "set_emission_points", - "getter": "get_emission_points" + "getter": "get_emission_points", + "documentation": "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]." }, { "type": "PackedVector2Array", "name": "emission_normals", "setter": "set_emission_normals", - "getter": "get_emission_normals" + "getter": "get_emission_normals", + "documentation": "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]." }, { "type": "PackedColorArray", "name": "emission_colors", "setter": "set_emission_colors", - "getter": "get_emission_colors" + "getter": "get_emission_colors", + "documentation": "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]." }, { "type": "bool", "name": "particle_flag_align_y", "setter": "set_particle_flag", "getter": "get_particle_flag", - "index": 0 + "index": 0, + "documentation": "Align Y axis of particle with the direction of its velocity." }, { "type": "Vector2", "name": "direction", "setter": "set_direction", - "getter": "get_direction" + "getter": "get_direction", + "documentation": "Unit vector specifying the particles' emission direction." }, { "type": "float", "name": "spread", "setter": "set_spread", - "getter": "get_spread" + "getter": "get_spread", + "documentation": "Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees." }, { "type": "Vector2", "name": "gravity", "setter": "set_gravity", - "getter": "get_gravity" + "getter": "get_gravity", + "documentation": "Gravity applied to every particle." }, { "type": "float", "name": "initial_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 0 + "index": 0, + "documentation": "Minimum equivalent of [member initial_velocity_max]." }, { "type": "float", "name": "initial_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 0 + "index": 0, + "documentation": "Maximum initial velocity magnitude for each particle. Direction comes from [member direction] and [member spread]." }, { "type": "float", "name": "angular_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 1 + "index": 1, + "documentation": "Minimum equivalent of [member angular_velocity_max]." }, { "type": "float", "name": "angular_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 1 + "index": 1, + "documentation": "Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second." }, { "type": "Curve", "name": "angular_velocity_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 1 + "index": 1, + "documentation": "Each particle's angular velocity will vary along this [Curve]." }, { "type": "float", "name": "orbit_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 2 + "index": 2, + "documentation": "Minimum equivalent of [member orbit_velocity_max]." }, { "type": "float", "name": "orbit_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 2 + "index": 2, + "documentation": "Maximum orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second." }, { "type": "Curve", "name": "orbit_velocity_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 2 + "index": 2, + "documentation": "Each particle's orbital velocity will vary along this [Curve]." }, { "type": "float", "name": "linear_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 3 + "index": 3, + "documentation": "Minimum equivalent of [member linear_accel_max]." }, { "type": "float", "name": "linear_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 3 + "index": 3, + "documentation": "Maximum linear acceleration applied to each particle in the direction of motion." }, { "type": "Curve", "name": "linear_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 3 + "index": 3, + "documentation": "Each particle's linear acceleration will vary along this [Curve]." }, { "type": "float", "name": "radial_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 4 + "index": 4, + "documentation": "Minimum equivalent of [member radial_accel_max]." }, { "type": "float", "name": "radial_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 4 + "index": 4, + "documentation": "Maximum radial acceleration applied to each particle. Makes particle accelerate away from the origin or towards it if negative." }, { "type": "Curve", "name": "radial_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 4 + "index": 4, + "documentation": "Each particle's radial acceleration will vary along this [Curve]." }, { "type": "float", "name": "tangential_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 5 + "index": 5, + "documentation": "Minimum equivalent of [member tangential_accel_max]." }, { "type": "float", "name": "tangential_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 5 + "index": 5, + "documentation": "Maximum tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion." }, { "type": "Curve", "name": "tangential_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 5 + "index": 5, + "documentation": "Each particle's tangential acceleration will vary along this [Curve]." }, { "type": "float", "name": "damping_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 6 + "index": 6, + "documentation": "Minimum equivalent of [member damping_max]." }, { "type": "float", "name": "damping_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 6 + "index": 6, + "documentation": "The maximum rate at which particles lose velocity. For example value of [code]100[/code] means that the particle will go from [code]100[/code] velocity to [code]0[/code] in [code]1[/code] second." }, { "type": "Curve", "name": "damping_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 6 + "index": 6, + "documentation": "Damping will vary along this [Curve]." }, { "type": "float", "name": "angle_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 7 + "index": 7, + "documentation": "Minimum equivalent of [member angle_max]." }, { "type": "float", "name": "angle_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 7 + "index": 7, + "documentation": "Maximum initial rotation applied to each particle, in degrees." }, { "type": "Curve", "name": "angle_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 7 + "index": 7, + "documentation": "Each particle's rotation will be animated along this [Curve]." }, { "type": "float", "name": "scale_amount_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 8 + "index": 8, + "documentation": "Minimum equivalent of [member scale_amount_max]." }, { "type": "float", "name": "scale_amount_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 8 + "index": 8, + "documentation": "Maximum initial scale applied to each particle." }, { "type": "Curve", "name": "scale_amount_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 8 + "index": 8, + "documentation": "Each particle's scale will vary along this [Curve]." }, { "type": "bool", "name": "split_scale", "setter": "set_split_scale", - "getter": "get_split_scale" + "getter": "get_split_scale", + "documentation": "If [code]true[/code], the scale curve will be split into x and y components. See [member scale_curve_x] and [member scale_curve_y]." }, { "type": "Curve", "name": "scale_curve_x", "setter": "set_scale_curve_x", - "getter": "get_scale_curve_x" + "getter": "get_scale_curve_x", + "documentation": "Each particle's horizontal scale will vary along this [Curve].\n[member split_scale] must be enabled." }, { "type": "Curve", "name": "scale_curve_y", "setter": "set_scale_curve_y", - "getter": "get_scale_curve_y" + "getter": "get_scale_curve_y", + "documentation": "Each particle's vertical scale will vary along this [Curve].\n[member split_scale] must be enabled." }, { "type": "Color", "name": "color", "setter": "set_color", - "getter": "get_color" + "getter": "get_color", + "documentation": "Each particle's initial color. If [member texture] is defined, it will be multiplied by this color." }, { "type": "Gradient", "name": "color_ramp", "setter": "set_color_ramp", - "getter": "get_color_ramp" + "getter": "get_color_ramp", + "documentation": "Each particle's color will vary along this [Gradient] (multiplied with [member color])." }, { "type": "Gradient", "name": "color_initial_ramp", "setter": "set_color_initial_ramp", - "getter": "get_color_initial_ramp" + "getter": "get_color_initial_ramp", + "documentation": "Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color])." }, { "type": "float", "name": "hue_variation_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 9 + "index": 9, + "documentation": "Minimum equivalent of [member hue_variation_max]." }, { "type": "float", "name": "hue_variation_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 9 + "index": 9, + "documentation": "Maximum initial hue variation applied to each particle. It will shift the particle color's hue." }, { "type": "Curve", "name": "hue_variation_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 9 + "index": 9, + "documentation": "Each particle's hue will vary along this [Curve]." }, { "type": "float", "name": "anim_speed_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 10 + "index": 10, + "documentation": "Minimum equivalent of [member anim_speed_max]." }, { "type": "float", "name": "anim_speed_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 10 + "index": 10, + "documentation": "Maximum particle animation speed. Animation speed of [code]1[/code] means that the particles will make full [code]0[/code] to [code]1[/code] offset cycle during lifetime, [code]2[/code] means [code]2[/code] cycles etc.\nWith animation speed greater than [code]1[/code], remember to enable [member CanvasItemMaterial.particles_anim_loop] property if you want the animation to repeat." }, { "type": "Curve", "name": "anim_speed_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 10 + "index": 10, + "documentation": "Each particle's animation speed will vary along this [Curve]." }, { "type": "float", "name": "anim_offset_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 11 + "index": 11, + "documentation": "Minimum equivalent of [member anim_offset_max]." }, { "type": "float", "name": "anim_offset_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 11 + "index": 11, + "documentation": "Maximum animation offset that corresponds to frame index in the texture. [code]0[/code] is the first frame, [code]1[/code] is the last one. See [member CanvasItemMaterial.particles_animation]." }, { "type": "Curve", "name": "anim_offset_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 11 + "index": 11, + "documentation": "Each particle's animation offset will vary along this [Curve]." } - ] + ], + "documentation": "CPU-based 2D particle node used to create a variety of particle systems and effects.\nSee also [GPUParticles2D], which provides the same functionality with hardware acceleration, but may not run on older devices." }, { "name": "CPUParticles3D", @@ -49484,15 +53392,18 @@ "values": [ { "name": "DRAW_ORDER_INDEX", - "value": 0 + "value": 0, + "documentation": "Particles are drawn in the order emitted." }, { "name": "DRAW_ORDER_LIFETIME", - "value": 1 + "value": 1, + "documentation": "Particles are drawn in order of remaining lifetime." }, { "name": "DRAW_ORDER_VIEW_DEPTH", - "value": 2 + "value": 2, + "documentation": "Particles are drawn in order of depth." } ] }, @@ -49502,55 +53413,68 @@ "values": [ { "name": "PARAM_INITIAL_LINEAR_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties." }, { "name": "PARAM_ANGULAR_VELOCITY", - "value": 1 + "value": 1, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties." }, { "name": "PARAM_ORBIT_VELOCITY", - "value": 2 + "value": 2, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties." }, { "name": "PARAM_LINEAR_ACCEL", - "value": 3 + "value": 3, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties." }, { "name": "PARAM_RADIAL_ACCEL", - "value": 4 + "value": 4, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties." }, { "name": "PARAM_TANGENTIAL_ACCEL", - "value": 5 + "value": 5, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties." }, { "name": "PARAM_DAMPING", - "value": 6 + "value": 6, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties." }, { "name": "PARAM_ANGLE", - "value": 7 + "value": 7, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties." }, { "name": "PARAM_SCALE", - "value": 8 + "value": 8, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties." }, { "name": "PARAM_HUE_VARIATION", - "value": 9 + "value": 9, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties." }, { "name": "PARAM_ANIM_SPEED", - "value": 10 + "value": 10, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties." }, { "name": "PARAM_ANIM_OFFSET", - "value": 11 + "value": 11, + "documentation": "Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties." }, { "name": "PARAM_MAX", - "value": 12 + "value": 12, + "documentation": "Represents the size of the [enum Parameter] enum." } ] }, @@ -49560,19 +53484,23 @@ "values": [ { "name": "PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Use with [method set_particle_flag] to set [member particle_flag_align_y]." }, { "name": "PARTICLE_FLAG_ROTATE_Y", - "value": 1 + "value": 1, + "documentation": "Use with [method set_particle_flag] to set [member particle_flag_rotate_y]." }, { "name": "PARTICLE_FLAG_DISABLE_Z", - "value": 2 + "value": 2, + "documentation": "Use with [method set_particle_flag] to set [member particle_flag_disable_z]." }, { "name": "PARTICLE_FLAG_MAX", - "value": 3 + "value": 3, + "documentation": "Represents the size of the [enum ParticleFlags] enum." } ] }, @@ -49582,35 +53510,43 @@ "values": [ { "name": "EMISSION_SHAPE_POINT", - "value": 0 + "value": 0, + "documentation": "All particles will be emitted from a single point." }, { "name": "EMISSION_SHAPE_SPHERE", - "value": 1 + "value": 1, + "documentation": "Particles will be emitted in the volume of a sphere." }, { "name": "EMISSION_SHAPE_SPHERE_SURFACE", - "value": 2 + "value": 2, + "documentation": "Particles will be emitted on the surface of a sphere." }, { "name": "EMISSION_SHAPE_BOX", - "value": 3 + "value": 3, + "documentation": "Particles will be emitted in the volume of a box." }, { "name": "EMISSION_SHAPE_POINTS", - "value": 4 + "value": 4, + "documentation": "Particles will be emitted at a position chosen randomly among [member emission_points]. Particle color will be modulated by [member emission_colors]." }, { "name": "EMISSION_SHAPE_DIRECTED_POINTS", - "value": 5 + "value": 5, + "documentation": "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]." }, { "name": "EMISSION_SHAPE_RING", - "value": 6 + "value": 6, + "documentation": "Particles will be emitted in a ring or cylinder." }, { "name": "EMISSION_SHAPE_MAX", - "value": 7 + "value": 7, + "documentation": "Represents the size of the [enum EmissionShape] enum." } ] } @@ -49988,7 +53924,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Restarts the particle emitter." }, { "name": "set_direction", @@ -50086,7 +54023,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the minimum value for the given parameter." }, { "name": "get_param_min", @@ -50104,7 +54042,8 @@ "name": "param", "type": "enum::CPUParticles3D.Parameter" } - ] + ], + "documentation": "Returns the minimum value range for the given parameter." }, { "name": "set_param_max", @@ -50123,7 +54062,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the maximum value for the given parameter." }, { "name": "get_param_max", @@ -50141,7 +54081,8 @@ "name": "param", "type": "enum::CPUParticles3D.Parameter" } - ] + ], + "documentation": "Returns the maximum value range for the given parameter." }, { "name": "set_param_curve", @@ -50159,7 +54100,8 @@ "name": "curve", "type": "Curve" } - ] + ], + "documentation": "Sets the [Curve] of the parameter specified by [enum Parameter]." }, { "name": "get_param_curve", @@ -50176,7 +54118,8 @@ "name": "param", "type": "enum::CPUParticles3D.Parameter" } - ] + ], + "documentation": "Returns the [Curve] of the parameter specified by [enum Parameter]." }, { "name": "set_color", @@ -50269,7 +54212,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "Enables or disables the given particle flag (see [enum ParticleFlags] for options)." }, { "name": "get_particle_flag", @@ -50286,7 +54230,8 @@ "name": "particle_flag", "type": "enum::CPUParticles3D.ParticleFlags" } - ] + ], + "documentation": "Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options)." }, { "name": "set_emission_shape", @@ -50683,12 +54628,14 @@ "name": "particles", "type": "Node" } - ] + ], + "documentation": "Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticleProcessMaterial]." } ], "signals": [ { - "name": "finished" + "name": "finished", + "documentation": "Emitted when all active particles have finished processing. When [member one_shot] is disabled, particles will process continuously, so this is never emitted." } ], "properties": [ @@ -50696,479 +54643,553 @@ "type": "bool", "name": "emitting", "setter": "set_emitting", - "getter": "is_emitting" + "getter": "is_emitting", + "documentation": "If [code]true[/code], particles are being emitted. [member emitting] can be used to start and stop particles from emitting. However, if [member one_shot] is [code]true[/code] setting [member emitting] to [code]true[/code] 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." }, { "type": "int", "name": "amount", "setter": "set_amount", - "getter": "get_amount" + "getter": "get_amount", + "documentation": "Number of particles emitted in one emission cycle." }, { "type": "float", "name": "lifetime", "setter": "set_lifetime", - "getter": "get_lifetime" + "getter": "get_lifetime", + "documentation": "Amount of time each particle will exist." }, { "type": "bool", "name": "one_shot", "setter": "set_one_shot", - "getter": "get_one_shot" + "getter": "get_one_shot", + "documentation": "If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end." }, { "type": "float", "name": "preprocess", "setter": "set_pre_process_time", - "getter": "get_pre_process_time" + "getter": "get_pre_process_time", + "documentation": "Particle system starts as if it had already run for this many seconds." }, { "type": "float", "name": "speed_scale", "setter": "set_speed_scale", - "getter": "get_speed_scale" + "getter": "get_speed_scale", + "documentation": "Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles." }, { "type": "float", "name": "explosiveness", "setter": "set_explosiveness_ratio", - "getter": "get_explosiveness_ratio" + "getter": "get_explosiveness_ratio", + "documentation": "How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins." }, { "type": "float", "name": "randomness", "setter": "set_randomness_ratio", - "getter": "get_randomness_ratio" + "getter": "get_randomness_ratio", + "documentation": "Emission lifetime randomness ratio." }, { "type": "float", "name": "lifetime_randomness", "setter": "set_lifetime_randomness", - "getter": "get_lifetime_randomness" + "getter": "get_lifetime_randomness", + "documentation": "Particle lifetime randomness ratio." }, { "type": "int", "name": "fixed_fps", "setter": "set_fixed_fps", - "getter": "get_fixed_fps" + "getter": "get_fixed_fps", + "documentation": "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." }, { "type": "bool", "name": "fract_delta", "setter": "set_fractional_delta", - "getter": "get_fractional_delta" + "getter": "get_fractional_delta", + "documentation": "If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect." }, { "type": "bool", "name": "local_coords", "setter": "set_use_local_coordinates", - "getter": "get_use_local_coordinates" + "getter": "get_use_local_coordinates", + "documentation": "If [code]true[/code], 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 [code]false[/code], particles use global coordinates; they will not move or rotate along the [CPUParticles3D] node (and its parents) when it is moved or rotated." }, { "type": "int", "name": "draw_order", "setter": "set_draw_order", - "getter": "get_draw_order" + "getter": "get_draw_order", + "documentation": "Particle draw order. Uses [enum DrawOrder] values." }, { "type": "Mesh", "name": "mesh", "setter": "set_mesh", - "getter": "get_mesh" + "getter": "get_mesh", + "documentation": "The [Mesh] used for each particle. If [code]null[/code], particles will be spheres." }, { "type": "int", "name": "emission_shape", "setter": "set_emission_shape", - "getter": "get_emission_shape" + "getter": "get_emission_shape", + "documentation": "Particles will be emitted inside this region. See [enum EmissionShape] for possible values." }, { "type": "float", "name": "emission_sphere_radius", "setter": "set_emission_sphere_radius", - "getter": "get_emission_sphere_radius" + "getter": "get_emission_sphere_radius", + "documentation": "The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]." }, { "type": "Vector3", "name": "emission_box_extents", "setter": "set_emission_box_extents", - "getter": "get_emission_box_extents" + "getter": "get_emission_box_extents", + "documentation": "The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]." }, { "type": "PackedVector3Array", "name": "emission_points", "setter": "set_emission_points", - "getter": "get_emission_points" + "getter": "get_emission_points", + "documentation": "Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]." }, { "type": "PackedVector3Array", "name": "emission_normals", "setter": "set_emission_normals", - "getter": "get_emission_normals" + "getter": "get_emission_normals", + "documentation": "Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]." }, { "type": "PackedColorArray", "name": "emission_colors", "setter": "set_emission_colors", - "getter": "get_emission_colors" + "getter": "get_emission_colors", + "documentation": "Sets the [Color]s to modulate particles by when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].\n[b]Note:[/b] [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] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member emission_colors] will have no visible effect." }, { "type": "Vector3", "name": "emission_ring_axis", "setter": "set_emission_ring_axis", - "getter": "get_emission_ring_axis" + "getter": "get_emission_ring_axis", + "documentation": "The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]." }, { "type": "float", "name": "emission_ring_height", "setter": "set_emission_ring_height", - "getter": "get_emission_ring_height" + "getter": "get_emission_ring_height", + "documentation": "The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]." }, { "type": "float", "name": "emission_ring_radius", "setter": "set_emission_ring_radius", - "getter": "get_emission_ring_radius" + "getter": "get_emission_ring_radius", + "documentation": "The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]." }, { "type": "float", "name": "emission_ring_inner_radius", "setter": "set_emission_ring_inner_radius", - "getter": "get_emission_ring_inner_radius" + "getter": "get_emission_ring_inner_radius", + "documentation": "The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]." }, { "type": "bool", "name": "particle_flag_align_y", "setter": "set_particle_flag", "getter": "get_particle_flag", - "index": 0 + "index": 0, + "documentation": "Align Y axis of particle with the direction of its velocity." }, { "type": "bool", "name": "particle_flag_rotate_y", "setter": "set_particle_flag", "getter": "get_particle_flag", - "index": 1 + "index": 1, + "documentation": "If [code]true[/code], particles rotate around Y axis by [member angle_min]." }, { "type": "bool", "name": "particle_flag_disable_z", "setter": "set_particle_flag", "getter": "get_particle_flag", - "index": 2 + "index": 2, + "documentation": "If [code]true[/code], particles will not move on the Z axis." }, { "type": "Vector3", "name": "direction", "setter": "set_direction", - "getter": "get_direction" + "getter": "get_direction", + "documentation": "Unit vector specifying the particles' emission direction." }, { "type": "float", "name": "spread", "setter": "set_spread", - "getter": "get_spread" + "getter": "get_spread", + "documentation": "Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes." }, { "type": "float", "name": "flatness", "setter": "set_flatness", - "getter": "get_flatness" + "getter": "get_flatness", + "documentation": "Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane." }, { "type": "Vector3", "name": "gravity", "setter": "set_gravity", - "getter": "get_gravity" + "getter": "get_gravity", + "documentation": "Gravity applied to every particle." }, { "type": "float", "name": "initial_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 0 + "index": 0, + "documentation": "Minimum value of the initial velocity." }, { "type": "float", "name": "initial_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 0 + "index": 0, + "documentation": "Maximum value of the initial velocity." }, { "type": "float", "name": "angular_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 1 + "index": 1, + "documentation": "Minimum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second." }, { "type": "float", "name": "angular_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 1 + "index": 1, + "documentation": "Maximum initial angular velocity (rotation speed) applied to each particle in [i]degrees[/i] per second." }, { "type": "Curve", "name": "angular_velocity_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 1 + "index": 1, + "documentation": "Each particle's angular velocity (rotation speed) will vary along this [Curve] over its lifetime." }, { "type": "float", "name": "orbit_velocity_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 2 + "index": 2, + "documentation": "Minimum orbit velocity." }, { "type": "float", "name": "orbit_velocity_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 2 + "index": 2, + "documentation": "Maximum orbit velocity." }, { "type": "Curve", "name": "orbit_velocity_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 2 + "index": 2, + "documentation": "Each particle's orbital velocity will vary along this [Curve]." }, { "type": "float", "name": "linear_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 3 + "index": 3, + "documentation": "Minimum linear acceleration." }, { "type": "float", "name": "linear_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 3 + "index": 3, + "documentation": "Maximum linear acceleration." }, { "type": "Curve", "name": "linear_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 3 + "index": 3, + "documentation": "Each particle's linear acceleration will vary along this [Curve]." }, { "type": "float", "name": "radial_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 4 + "index": 4, + "documentation": "Minimum radial acceleration." }, { "type": "float", "name": "radial_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 4 + "index": 4, + "documentation": "Maximum radial acceleration." }, { "type": "Curve", "name": "radial_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 4 + "index": 4, + "documentation": "Each particle's radial acceleration will vary along this [Curve]." }, { "type": "float", "name": "tangential_accel_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 5 + "index": 5, + "documentation": "Minimum tangent acceleration." }, { "type": "float", "name": "tangential_accel_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 5 + "index": 5, + "documentation": "Maximum tangent acceleration." }, { "type": "Curve", "name": "tangential_accel_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 5 + "index": 5, + "documentation": "Each particle's tangential acceleration will vary along this [Curve]." }, { "type": "float", "name": "damping_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 6 + "index": 6, + "documentation": "Minimum damping." }, { "type": "float", "name": "damping_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 6 + "index": 6, + "documentation": "Maximum damping." }, { "type": "Curve", "name": "damping_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 6 + "index": 6, + "documentation": "Damping will vary along this [Curve]." }, { "type": "float", "name": "angle_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 7 + "index": 7, + "documentation": "Minimum angle." }, { "type": "float", "name": "angle_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 7 + "index": 7, + "documentation": "Maximum angle." }, { "type": "Curve", "name": "angle_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 7 + "index": 7, + "documentation": "Each particle's rotation will be animated along this [Curve]." }, { "type": "float", "name": "scale_amount_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 8 + "index": 8, + "documentation": "Minimum scale." }, { "type": "float", "name": "scale_amount_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 8 + "index": 8, + "documentation": "Maximum scale." }, { "type": "Curve", "name": "scale_amount_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 8 + "index": 8, + "documentation": "Each particle's scale will vary along this [Curve]." }, { "type": "bool", "name": "split_scale", "setter": "set_split_scale", - "getter": "get_split_scale" + "getter": "get_split_scale", + "documentation": "If set to [code]true[/code], three different scale curves can be specified, one per scale axis." }, { "type": "Curve", "name": "scale_curve_x", "setter": "set_scale_curve_x", - "getter": "get_scale_curve_x" + "getter": "get_scale_curve_x", + "documentation": "Curve for the scale over life, along the x axis." }, { "type": "Curve", "name": "scale_curve_y", "setter": "set_scale_curve_y", - "getter": "get_scale_curve_y" + "getter": "get_scale_curve_y", + "documentation": "Curve for the scale over life, along the y axis." }, { "type": "Curve", "name": "scale_curve_z", "setter": "set_scale_curve_z", - "getter": "get_scale_curve_z" + "getter": "get_scale_curve_z", + "documentation": "Curve for the scale over life, along the z axis." }, { "type": "Color", "name": "color", "setter": "set_color", - "getter": "get_color" + "getter": "get_color", + "documentation": "Each particle's initial color.\n[b]Note:[/b] [member color] multiplies the particle mesh's vertex colors. To have a visible effect on a [BaseMaterial3D], [member BaseMaterial3D.vertex_color_use_as_albedo] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color] will have no visible effect." }, { "type": "Gradient", "name": "color_ramp", "setter": "set_color_ramp", - "getter": "get_color_ramp" + "getter": "get_color_ramp", + "documentation": "Each particle's color will vary along this [GradientTexture1D] over its lifetime (multiplied with [member color]).\n[b]Note:[/b] [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] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_ramp] will have no visible effect." }, { "type": "Gradient", "name": "color_initial_ramp", "setter": "set_color_initial_ramp", - "getter": "get_color_initial_ramp" + "getter": "get_color_initial_ramp", + "documentation": "Each particle's initial color will vary along this [GradientTexture1D] (multiplied with [member color]).\n[b]Note:[/b] [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] [i]must[/i] be [code]true[/code]. For a [ShaderMaterial], [code]ALBEDO *= COLOR.rgb;[/code] must be inserted in the shader's [code]fragment()[/code] function. Otherwise, [member color_initial_ramp] will have no visible effect." }, { "type": "float", "name": "hue_variation_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 9 + "index": 9, + "documentation": "Minimum hue variation." }, { "type": "float", "name": "hue_variation_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 9 + "index": 9, + "documentation": "Maximum hue variation." }, { "type": "Curve", "name": "hue_variation_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 9 + "index": 9, + "documentation": "Each particle's hue will vary along this [Curve]." }, { "type": "float", "name": "anim_speed_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 10 + "index": 10, + "documentation": "Minimum particle animation speed." }, { "type": "float", "name": "anim_speed_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 10 + "index": 10, + "documentation": "Maximum particle animation speed." }, { "type": "Curve", "name": "anim_speed_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 10 + "index": 10, + "documentation": "Each particle's animation speed will vary along this [Curve]." }, { "type": "float", "name": "anim_offset_min", "setter": "set_param_min", "getter": "get_param_min", - "index": 11 + "index": 11, + "documentation": "Minimum animation offset." }, { "type": "float", "name": "anim_offset_max", "setter": "set_param_max", "getter": "get_param_max", - "index": 11 + "index": 11, + "documentation": "Maximum animation offset." }, { "type": "Curve", "name": "anim_offset_curve", "setter": "set_param_curve", "getter": "get_param_curve", - "index": 11 + "index": 11, + "documentation": "Each particle's animation offset will vary along this [Curve]." } - ] + ], + "documentation": "CPU-based 3D particle node used to create a variety of particle systems and effects.\nSee also [GPUParticles3D], which provides the same functionality with hardware acceleration, but may not run on older devices." }, { "name": "CSGBox3D", @@ -51233,22 +55254,26 @@ "type": "Vector3", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "The box's width, height and depth." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The material used to render the box." } - ] + ], + "documentation": "This node allows you to create a box for use with the CSG system.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGCombiner3D", "is_refcounted": false, "is_instantiable": true, "inherits": "CSGShape3D", - "api_type": "core" + "api_type": "core", + "documentation": "For complex arrangements of shapes, it is sometimes needed to add structure to your CSG nodes. The CSGCombiner3D node allows you to create this structure. The node encapsulates the result of the CSG operations of its children. In this way, it is possible to do operations on one set of shapes that are children of one CSGCombiner3D node, and a set of separate operations on a second set of shapes that are children of a second CSGCombiner3D node, and then do an operation that takes the two end results as its input to create the final shape.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGCylinder3D", @@ -51419,39 +55444,46 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "The radius of the cylinder." }, { "type": "float", "name": "height", "setter": "set_height", - "getter": "get_height" + "getter": "get_height", + "documentation": "The height of the cylinder." }, { "type": "int", "name": "sides", "setter": "set_sides", - "getter": "get_sides" + "getter": "get_sides", + "documentation": "The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder." }, { "type": "bool", "name": "cone", "setter": "set_cone", - "getter": "is_cone" + "getter": "is_cone", + "documentation": "If [code]true[/code] a cone is created, the [member radius] will only apply to one side." }, { "type": "bool", "name": "smooth_faces", "setter": "set_smooth_faces", - "getter": "get_smooth_faces" + "getter": "get_smooth_faces", + "documentation": "If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The material used to render the cylinder." } - ] + ], + "documentation": "This node allows you to create a cylinder (or cone) for use with the CSG system.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGMesh3D", @@ -51516,15 +55548,18 @@ "type": "Mesh", "name": "mesh", "setter": "set_mesh", - "getter": "get_mesh" + "getter": "get_mesh", + "documentation": "The [Mesh] resource to use as a CSG shape.\n[b]Note:[/b] 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.\n[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." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The [Material] used in drawing the CSG shape." } - ] + ], + "documentation": "This CSG node allows you to use any mesh resource as a CSG shape, provided it is closed, does not self-intersect, does not contain internal faces and has no edges that connect to more than two faces. See also [CSGPolygon3D] for drawing 2D extruded polygons to be used as CSG nodes.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGPolygon3D", @@ -51539,15 +55574,18 @@ "values": [ { "name": "MODE_DEPTH", - "value": 0 + "value": 0, + "documentation": "The [member polygon] shape is extruded along the negative Z axis." }, { "name": "MODE_SPIN", - "value": 1 + "value": 1, + "documentation": "The [member polygon] shape is extruded by rotating it around the Y axis." }, { "name": "MODE_PATH", - "value": 2 + "value": 2, + "documentation": "The [member polygon] shape is extruded along the [Path3D] specified in [member path_node]." } ] }, @@ -51557,15 +55595,18 @@ "values": [ { "name": "PATH_ROTATION_POLYGON", - "value": 0 + "value": 0, + "documentation": "The [member polygon] shape is not rotated.\n[b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes." }, { "name": "PATH_ROTATION_PATH", - "value": 1 + "value": 1, + "documentation": "The [member polygon] shape is rotated along the path, but it is not rotated around the path axis.\n[b]Note:[/b] Requires the path Z coordinates to continually decrease to ensure viable shapes." }, { "name": "PATH_ROTATION_PATH_FOLLOW", - "value": 2 + "value": 2, + "documentation": "The [member polygon] shape follows the path and its rotations around the path axis." } ] }, @@ -51575,11 +55616,13 @@ "values": [ { "name": "PATH_INTERVAL_DISTANCE", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "PATH_INTERVAL_SUBDIVIDE", - "value": 1 + "value": 1, + "documentation": "When [member mode] is set to [constant MODE_PATH], [member path_interval] will subdivide the polygons along the path." } ] } @@ -52003,99 +56046,116 @@ "type": "PackedVector2Array", "name": "polygon", "setter": "set_polygon", - "getter": "get_polygon" + "getter": "get_polygon", + "documentation": "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 [i]not[/i] have any intersecting edges. Otherwise, triangulation will fail and no mesh will be generated.\n[b]Note:[/b] If only 1 or 2 points are defined in [member polygon], no mesh will be generated." }, { "type": "int", "name": "mode", "setter": "set_mode", - "getter": "get_mode" + "getter": "get_mode", + "documentation": "The [member mode] used to extrude the [member polygon]." }, { "type": "float", "name": "depth", "setter": "set_depth", - "getter": "get_depth" + "getter": "get_depth", + "documentation": "When [member mode] is [constant MODE_DEPTH], the depth of the extrusion." }, { "type": "float", "name": "spin_degrees", "setter": "set_spin_degrees", - "getter": "get_spin_degrees" + "getter": "get_spin_degrees", + "documentation": "When [member mode] is [constant MODE_SPIN], the total number of degrees the [member polygon] is rotated when extruding." }, { "type": "int", "name": "spin_sides", "setter": "set_spin_sides", - "getter": "get_spin_sides" + "getter": "get_spin_sides", + "documentation": "When [member mode] is [constant MODE_SPIN], the number of extrusions made." }, { "type": "NodePath", "name": "path_node", "setter": "set_path_node", - "getter": "get_path_node" + "getter": "get_path_node", + "documentation": "When [member mode] is [constant MODE_PATH], the location of the [Path3D] object used to extrude the [member polygon]." }, { "type": "int", "name": "path_interval_type", "setter": "set_path_interval_type", - "getter": "get_path_interval_type" + "getter": "get_path_interval_type", + "documentation": "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])." }, { "type": "float", "name": "path_interval", "setter": "set_path_interval", - "getter": "get_path_interval" + "getter": "get_path_interval", + "documentation": "When [member mode] is [constant MODE_PATH], the path interval or ratio of path points to extrusions." }, { "type": "float", "name": "path_simplify_angle", "setter": "set_path_simplify_angle", - "getter": "get_path_simplify_angle" + "getter": "get_path_simplify_angle", + "documentation": "When [member mode] is [constant MODE_PATH], extrusions that are less than this angle, will be merged together to reduce polygon count." }, { "type": "int", "name": "path_rotation", "setter": "set_path_rotation", - "getter": "get_path_rotation" + "getter": "get_path_rotation", + "documentation": "When [member mode] is [constant MODE_PATH], the [enum PathRotation] method used to rotate the [member polygon] as it is extruded." }, { "type": "bool", "name": "path_local", "setter": "set_path_local", - "getter": "is_path_local" + "getter": "is_path_local", + "documentation": "When [member mode] is [constant MODE_PATH], if [code]true[/code] the [Transform3D] of the [CSGPolygon3D] is used as the starting point for the extrusions, not the [Transform3D] of the [member path_node]." }, { "type": "bool", "name": "path_continuous_u", "setter": "set_path_continuous_u", - "getter": "is_path_continuous_u" + "getter": "is_path_continuous_u", + "documentation": "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 [code]false[/code] the top half of the material is repeated every step of the extrusion." }, { "type": "float", "name": "path_u_distance", "setter": "set_path_u_distance", - "getter": "get_path_u_distance" + "getter": "get_path_u_distance", + "documentation": "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." }, { "type": "bool", "name": "path_joined", "setter": "set_path_joined", - "getter": "is_path_joined" + "getter": "is_path_joined", + "documentation": "When [member mode] is [constant MODE_PATH], if [code]true[/code] the ends of the path are joined, by adding an extrusion between the last and first points of the path." }, { "type": "bool", "name": "smooth_faces", "setter": "set_smooth_faces", - "getter": "get_smooth_faces" + "getter": "get_smooth_faces", + "documentation": "If [code]true[/code], applies smooth shading to the extrusions." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "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." } - ] + ], + "documentation": "An array of 2D points is extruded to quickly and easily create a variety of 3D meshes. See also [CSGMesh3D] for using 3D meshes as CSG nodes.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGPrimitive3D", @@ -52135,9 +56195,11 @@ "type": "bool", "name": "flip_faces", "setter": "set_flip_faces", - "getter": "get_flip_faces" + "getter": "get_flip_faces", + "documentation": "If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn." } - ] + ], + "documentation": "Parent class for various CSG primitives. It contains code and functionality that is common between them. It cannot be used directly. Instead use one of the various classes that inherit from it.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGShape3D", @@ -52152,15 +56214,18 @@ "values": [ { "name": "OPERATION_UNION", - "value": 0 + "value": 0, + "documentation": "Geometry of both primitives is merged, intersecting geometry is removed." }, { "name": "OPERATION_INTERSECTION", - "value": 1 + "value": 1, + "documentation": "Only intersecting geometry remains, the rest is removed." }, { "name": "OPERATION_SUBTRACTION", - "value": 2 + "value": 2, + "documentation": "The second shape is subtracted from the first, leaving a dent with its shape." } ] } @@ -52175,7 +56240,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if this is a root shape and is thus the object that is rendered." }, { "name": "set_operation", @@ -52325,7 +56391,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_mask_value", @@ -52343,7 +56410,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_layer_value", @@ -52362,7 +56430,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_layer_value", @@ -52380,7 +56449,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_priority", @@ -52443,7 +56513,8 @@ "hash": 3995934104, "return_value": { "type": "Array" - } + }, + "documentation": "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." } ], "properties": [ @@ -52451,45 +56522,53 @@ "type": "int", "name": "operation", "setter": "set_operation", - "getter": "get_operation" + "getter": "get_operation", + "documentation": "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." }, { "type": "float", "name": "snap", "setter": "set_snap", - "getter": "get_snap" + "getter": "get_snap", + "documentation": "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." }, { "type": "bool", "name": "calculate_tangents", "setter": "set_calculate_tangents", - "getter": "is_calculating_tangents" + "getter": "is_calculating_tangents", + "documentation": "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." }, { "type": "bool", "name": "use_collision", "setter": "set_use_collision", - "getter": "is_using_collision" + "getter": "is_using_collision", + "documentation": "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]." }, { "type": "int", "name": "collision_layer", "setter": "set_collision_layer", - "getter": "get_collision_layer" + "getter": "get_collision_layer", + "documentation": "The physics layers this area is in.\nCollidable 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.\nA 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=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "int", "name": "collision_mask", "setter": "set_collision_mask", - "getter": "get_collision_mask" + "getter": "get_collision_mask", + "documentation": "The physics layers this CSG shape scans for collisions. Only effective if [member use_collision] is [code]true[/code]. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "float", "name": "collision_priority", "setter": "set_collision_priority", - "getter": "get_collision_priority" + "getter": "get_collision_priority", + "documentation": "The priority used to solve colliding when occurring penetration. Only effective if [member use_collision] is [code]true[/code]. 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." } - ] + ], + "documentation": "This is the CSG base class that provides CSG operation support to the various CSG nodes in Godot.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGSphere3D", @@ -52635,33 +56714,39 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "Radius of the sphere." }, { "type": "int", "name": "radial_segments", "setter": "set_radial_segments", - "getter": "get_radial_segments" + "getter": "get_radial_segments", + "documentation": "Number of vertical slices for the sphere." }, { "type": "int", "name": "rings", "setter": "set_rings", - "getter": "get_rings" + "getter": "get_rings", + "documentation": "Number of horizontal slices for the sphere." }, { "type": "bool", "name": "smooth_faces", "setter": "set_smooth_faces", - "getter": "get_smooth_faces" + "getter": "get_smooth_faces", + "documentation": "If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The material used to render the sphere." } - ] + ], + "documentation": "This node allows you to create a sphere for use with the CSG system.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CSGTorus3D", @@ -52834,39 +56919,46 @@ "type": "float", "name": "inner_radius", "setter": "set_inner_radius", - "getter": "get_inner_radius" + "getter": "get_inner_radius", + "documentation": "The inner radius of the torus." }, { "type": "float", "name": "outer_radius", "setter": "set_outer_radius", - "getter": "get_outer_radius" + "getter": "get_outer_radius", + "documentation": "The outer radius of the torus." }, { "type": "int", "name": "sides", "setter": "set_sides", - "getter": "get_sides" + "getter": "get_sides", + "documentation": "The number of slices the torus is constructed of." }, { "type": "int", "name": "ring_sides", "setter": "set_ring_sides", - "getter": "get_ring_sides" + "getter": "get_ring_sides", + "documentation": "The number of edges each ring of the torus is constructed of." }, { "type": "bool", "name": "smooth_faces", "setter": "set_smooth_faces", - "getter": "get_smooth_faces" + "getter": "get_smooth_faces", + "documentation": "If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look." }, { "type": "BaseMaterial3D,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The material used to render the torus." } - ] + ], + "documentation": "This node allows you to create a torus for use with the CSG system.\n[b]Note:[/b] CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a [MeshInstance3D] with a [PrimitiveMesh]. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay." }, { "name": "CallbackTweener", @@ -52891,9 +56983,11 @@ "type": "float", "meta": "double" } - ] + ], + "documentation": "Makes the callback call delayed by given time in seconds.\n[b]Example:[/b]\n[codeblock]\nvar tween = get_tree().create_tween()\ntween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds\n[/codeblock]" } - ] + ], + "documentation": "[CallbackTweener] is used to call a method in a tweening sequence. See [method Tween.tween_callback] for more usage information.\nThe tweener will finish automatically if the callback's target object is freed.\n[b]Note:[/b] [method Tween.tween_callback] is the only correct way to create [CallbackTweener]. Any [CallbackTweener] created manually will not function correctly." }, { "name": "Camera2D", @@ -52908,11 +57002,13 @@ "values": [ { "name": "ANCHOR_MODE_FIXED_TOP_LEFT", - "value": 0 + "value": 0, + "documentation": "The camera's position is fixed so that the top-left corner is always at the origin." }, { "name": "ANCHOR_MODE_DRAG_CENTER", - "value": 1 + "value": 1, + "documentation": "The camera's position takes into account vertical/horizontal offsets and the screen size." } ] }, @@ -52922,11 +57018,13 @@ "values": [ { "name": "CAMERA2D_PROCESS_PHYSICS", - "value": 0 + "value": 0, + "documentation": "The camera updates during physics frames (see [constant Node.NOTIFICATION_INTERNAL_PHYSICS_PROCESS])." }, { "name": "CAMERA2D_PROCESS_IDLE", - "value": 1 + "value": 1, + "documentation": "The camera updates during process frames (see [constant Node.NOTIFICATION_INTERNAL_PROCESS])." } ] } @@ -53063,7 +57161,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Forces this [Camera2D] to become the current active one. [member enabled] must be [code]true[/code]." }, { "name": "is_current", @@ -53074,7 +57173,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if this [Camera2D] is the active camera (see [method Viewport.get_camera_2d])." }, { "name": "set_limit", @@ -53093,7 +57193,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]." }, { "name": "get_limit", @@ -53111,7 +57212,8 @@ "name": "margin", "type": "enum::Side" } - ] + ], + "documentation": "Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]." }, { "name": "set_limit_smoothing_enabled", @@ -53259,7 +57361,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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]." }, { "name": "get_drag_margin", @@ -53277,7 +57380,8 @@ "name": "margin", "type": "enum::Side" } - ] + ], + "documentation": "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]." }, { "name": "get_target_position", @@ -53288,7 +57392,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns this camera's target position, in global coordinates.\n[b]Note:[/b] 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 [code]true[/code] (see [method get_screen_center_position])." }, { "name": "get_screen_center_position", @@ -53299,7 +57404,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the center of the screen from this camera's point of view, in global coordinates.\n[b]Note:[/b] The exact targeted position of the camera may be different. See [method get_target_position]." }, { "name": "set_zoom", @@ -53461,7 +57567,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Forces the camera to update scroll immediately." }, { "name": "reset_smoothing", @@ -53469,7 +57576,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sets the camera's position immediately to its current smoothing destination.\nThis method has no effect if [member position_smoothing_enabled] is [code]false[/code]." }, { "name": "align", @@ -53477,7 +57585,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Aligns the camera to the tracked node." }, { "name": "set_screen_drawing_enabled", @@ -53560,173 +57669,201 @@ "type": "Vector2", "name": "offset", "setter": "set_offset", - "getter": "get_offset" + "getter": "get_offset", + "documentation": "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]." }, { "type": "int", "name": "anchor_mode", "setter": "set_anchor_mode", - "getter": "get_anchor_mode" + "getter": "get_anchor_mode", + "documentation": "The Camera2D's anchor point. See [enum AnchorMode] constants." }, { "type": "bool", "name": "ignore_rotation", "setter": "set_ignore_rotation", - "getter": "is_ignoring_rotation" + "getter": "is_ignoring_rotation", + "documentation": "If [code]true[/code], the camera's rendered view is not affected by its [member Node2D.rotation] and [member Node2D.global_rotation]." }, { "type": "bool", "name": "enabled", "setter": "set_enabled", - "getter": "is_enabled" + "getter": "is_enabled", + "documentation": "Controls whether the camera can be active or not. If [code]true[/code], 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]).\nWhen the camera is currently active and [member enabled] is set to [code]false[/code], the next enabled [Camera2D] in the scene tree will become active." }, { "type": "Vector2", "name": "zoom", "setter": "set_zoom", - "getter": "get_zoom" + "getter": "get_zoom", + "documentation": "The camera's zoom. A zoom of [code]Vector(2, 2)[/code] doubles the size seen in the viewport. A zoom of [code]Vector(0.5, 0.5)[/code] halves the size seen in the viewport.\n[b]Note:[/b] [member FontFile.oversampling] does [i]not[/i] 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 [b]Multichannel Signed Distance Field[/b] 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." }, { "type": "Viewport", "name": "custom_viewport", "setter": "set_custom_viewport", - "getter": "get_custom_viewport" + "getter": "get_custom_viewport", + "documentation": "The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead." }, { "type": "int", "name": "process_callback", "setter": "set_process_callback", - "getter": "get_process_callback" + "getter": "get_process_callback", + "documentation": "The camera's process callback. See [enum Camera2DProcessCallback]." }, { "type": "int", "name": "limit_left", "setter": "set_limit", "getter": "get_limit", - "index": 0 + "index": 0, + "documentation": "Left scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit." }, { "type": "int", "name": "limit_top", "setter": "set_limit", "getter": "get_limit", - "index": 1 + "index": 1, + "documentation": "Top scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit." }, { "type": "int", "name": "limit_right", "setter": "set_limit", "getter": "get_limit", - "index": 2 + "index": 2, + "documentation": "Right scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit." }, { "type": "int", "name": "limit_bottom", "setter": "set_limit", "getter": "get_limit", - "index": 3 + "index": 3, + "documentation": "Bottom scroll limit in pixels. The camera stops moving when reaching this value, but [member offset] can push the view past the limit." }, { "type": "bool", "name": "limit_smoothed", "setter": "set_limit_smoothing_enabled", - "getter": "is_limit_smoothing_enabled" + "getter": "is_limit_smoothing_enabled", + "documentation": "If [code]true[/code], the camera smoothly stops when reaches its limits.\nThis property has no effect if [member position_smoothing_enabled] is [code]false[/code].\n[b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing]." }, { "type": "bool", "name": "position_smoothing_enabled", "setter": "set_position_smoothing_enabled", - "getter": "is_position_smoothing_enabled" + "getter": "is_position_smoothing_enabled", + "documentation": "If [code]true[/code], the camera's view smoothly moves towards its target position at [member position_smoothing_speed]." }, { "type": "float", "name": "position_smoothing_speed", "setter": "set_position_smoothing_speed", - "getter": "get_position_smoothing_speed" + "getter": "get_position_smoothing_speed", + "documentation": "Speed in pixels per second of the camera's smoothing effect when [member position_smoothing_enabled] is [code]true[/code]." }, { "type": "bool", "name": "rotation_smoothing_enabled", "setter": "set_rotation_smoothing_enabled", - "getter": "is_rotation_smoothing_enabled" + "getter": "is_rotation_smoothing_enabled", + "documentation": "If [code]true[/code], the camera's view smoothly rotates, via asymptotic smoothing, to align with its target rotation at [member rotation_smoothing_speed].\n[b]Note:[/b] This property has no effect if [member ignore_rotation] is [code]true[/code]." }, { "type": "float", "name": "rotation_smoothing_speed", "setter": "set_rotation_smoothing_speed", - "getter": "get_rotation_smoothing_speed" + "getter": "get_rotation_smoothing_speed", + "documentation": "The angular, asymptotic speed of the camera's rotation smoothing effect when [member rotation_smoothing_enabled] is [code]true[/code]." }, { "type": "bool", "name": "drag_horizontal_enabled", "setter": "set_drag_horizontal_enabled", - "getter": "is_drag_horizontal_enabled" + "getter": "is_drag_horizontal_enabled", + "documentation": "If [code]true[/code], the camera only moves when reaching the horizontal (left and right) drag margins. If [code]false[/code], the camera moves horizontally regardless of margins." }, { "type": "bool", "name": "drag_vertical_enabled", "setter": "set_drag_vertical_enabled", - "getter": "is_drag_vertical_enabled" + "getter": "is_drag_vertical_enabled", + "documentation": "If [code]true[/code], the camera only moves when reaching the vertical (top and bottom) drag margins. If [code]false[/code], the camera moves vertically regardless of the drag margins." }, { "type": "float", "name": "drag_horizontal_offset", "setter": "set_drag_horizontal_offset", - "getter": "get_drag_horizontal_offset" + "getter": "get_drag_horizontal_offset", + "documentation": "The relative horizontal drag offset of the camera between the right ([code]-1[/code]) and left ([code]1[/code]) drag margins.\n[b]Note:[/b] 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 [code]true[/code] or the drag margins are changed." }, { "type": "float", "name": "drag_vertical_offset", "setter": "set_drag_vertical_offset", - "getter": "get_drag_vertical_offset" + "getter": "get_drag_vertical_offset", + "documentation": "The relative vertical drag offset of the camera between the bottom ([code]-1[/code]) and top ([code]1[/code]) drag margins.\n[b]Note:[/b] 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 [code]true[/code] or the drag margins are changed." }, { "type": "float", "name": "drag_left_margin", "setter": "set_drag_margin", "getter": "get_drag_margin", - "index": 0 + "index": 0, + "documentation": "Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the left edge of the screen." }, { "type": "float", "name": "drag_top_margin", "setter": "set_drag_margin", "getter": "get_drag_margin", - "index": 1 + "index": 1, + "documentation": "Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the top edge of the screen." }, { "type": "float", "name": "drag_right_margin", "setter": "set_drag_margin", "getter": "get_drag_margin", - "index": 2 + "index": 2, + "documentation": "Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the right edge of the screen." }, { "type": "float", "name": "drag_bottom_margin", "setter": "set_drag_margin", "getter": "get_drag_margin", - "index": 3 + "index": 3, + "documentation": "Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the bottom edge of the screen." }, { "type": "bool", "name": "editor_draw_screen", "setter": "set_screen_drawing_enabled", - "getter": "is_screen_drawing_enabled" + "getter": "is_screen_drawing_enabled", + "documentation": "If [code]true[/code], draws the camera's screen rectangle in the editor." }, { "type": "bool", "name": "editor_draw_limits", "setter": "set_limit_drawing_enabled", - "getter": "is_limit_drawing_enabled" + "getter": "is_limit_drawing_enabled", + "documentation": "If [code]true[/code], draws the camera's limits rectangle in the editor." }, { "type": "bool", "name": "editor_draw_drag_margin", "setter": "set_margin_drawing_enabled", - "getter": "is_margin_drawing_enabled" + "getter": "is_margin_drawing_enabled", + "documentation": "If [code]true[/code], draws the camera's drag margin rectangle in the editor." } - ] + ], + "documentation": "Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes.\nCameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport.\nThis node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]).\nNote that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_screen_center_position] to get the real position." }, { "name": "Camera3D", @@ -53741,15 +57878,18 @@ "values": [ { "name": "PROJECTION_PERSPECTIVE", - "value": 0 + "value": 0, + "documentation": "Perspective projection. Objects on the screen becomes smaller when they are far away." }, { "name": "PROJECTION_ORTHOGONAL", - "value": 1 + "value": 1, + "documentation": "Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are." }, { "name": "PROJECTION_FRUSTUM", - "value": 2 + "value": 2, + "documentation": "Frustum projection. This mode allows adjusting [member frustum_offset] to create \"tilted frustum\" effects." } ] }, @@ -53759,11 +57899,13 @@ "values": [ { "name": "KEEP_WIDTH", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "KEEP_HEIGHT", - "value": 1 + "value": 1, + "documentation": "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." } ] }, @@ -53773,15 +57915,18 @@ "values": [ { "name": "DOPPLER_TRACKING_DISABLED", - "value": 0 + "value": 0, + "documentation": "Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default)." }, { "name": "DOPPLER_TRACKING_IDLE_STEP", - "value": 1 + "value": 1, + "documentation": "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale])." }, { "name": "DOPPLER_TRACKING_PHYSICS_STEP", - "value": 2 + "value": 2, + "documentation": "Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how audio is perceived (changing the audio's [member AudioStreamPlayer3D.pitch_scale])." } ] } @@ -53802,7 +57947,8 @@ "name": "screen_point", "type": "Vector2" } - ] + ], + "documentation": "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." }, { "name": "project_local_ray_normal", @@ -53819,7 +57965,8 @@ "name": "screen_point", "type": "Vector2" } - ] + ], + "documentation": "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." }, { "name": "project_ray_origin", @@ -53836,7 +57983,8 @@ "name": "screen_point", "type": "Vector2" } - ] + ], + "documentation": "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." }, { "name": "unproject_position", @@ -53853,7 +58001,8 @@ "name": "world_point", "type": "Vector3" } - ] + ], + "documentation": "Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space.\n[b]Note:[/b] 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:\n[codeblock]\n# This code block is part of a script that inherits from Node3D.\n# `control` is a reference to a node inheriting from Control.\ncontrol.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin)\ncontrol.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin)\n[/codeblock]" }, { "name": "is_position_behind", @@ -53870,7 +58019,8 @@ "name": "world_point", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] 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.\n[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view." }, { "name": "project_position", @@ -53892,7 +58042,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "set_perspective", @@ -53917,7 +58068,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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." }, { "name": "set_orthogonal", @@ -53942,7 +58094,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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.)" }, { "name": "set_frustum", @@ -53971,7 +58124,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "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]." }, { "name": "make_current", @@ -53979,7 +58133,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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." }, { "name": "clear_current", @@ -53994,7 +58149,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "If this is the current camera, remove it from being current. If [param enable_next] is [code]true[/code], request to make the next camera current, if any." }, { "name": "set_current", @@ -54030,7 +58186,8 @@ "hash": 3229777777, "return_value": { "type": "Transform3D" - } + }, + "documentation": "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]." }, { "name": "get_camera_projection", @@ -54041,7 +58198,8 @@ "hash": 2910717950, "return_value": { "type": "Projection" - } + }, + "documentation": "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." }, { "name": "get_fov", @@ -54391,7 +58549,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Plane" - } + }, + "documentation": "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]." }, { "name": "is_position_in_frustum", @@ -54408,7 +58567,8 @@ "name": "world_point", "type": "Vector3" } - ] + ], + "documentation": "Returns [code]true[/code] 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." }, { "name": "get_camera_rid", @@ -54419,7 +58579,8 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the camera's RID from the [RenderingServer]." }, { "name": "get_pyramid_shape_rid", @@ -54430,7 +58591,8 @@ "hash": 529393457, "return_value": { "type": "RID" - } + }, + "documentation": "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." }, { "name": "set_cull_mask_value", @@ -54449,7 +58611,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member cull_mask], given a [param layer_number] between 1 and 20." }, { "name": "get_cull_mask_value", @@ -54467,7 +58630,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [param layer_number] between 1 and 20." } ], "properties": [ @@ -54475,87 +58639,102 @@ "type": "int", "name": "keep_aspect", "setter": "set_keep_aspect_mode", - "getter": "get_keep_aspect_mode" + "getter": "get_keep_aspect_mode", + "documentation": "The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]." }, { "type": "int", "name": "cull_mask", "setter": "set_cull_mask", - "getter": "get_cull_mask" + "getter": "get_cull_mask", + "documentation": "The culling mask that describes which [member VisualInstance3D.layers] are rendered by this camera. By default, all 20 user-visible layers are rendered.\n[b]Note:[/b] 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.\nTo adjust [member cull_mask] more easily using a script, use [method get_cull_mask_value] and [method set_cull_mask_value].\n[b]Note:[/b] [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." }, { "type": "Environment", "name": "environment", "setter": "set_environment", - "getter": "get_environment" + "getter": "get_environment", + "documentation": "The [Environment] to use for this camera." }, { "type": "CameraAttributesPractical,CameraAttributesPhysical", "name": "attributes", "setter": "set_attributes", - "getter": "get_attributes" + "getter": "get_attributes", + "documentation": "The [CameraAttributes] to use for this camera." }, { "type": "float", "name": "h_offset", "setter": "set_h_offset", - "getter": "get_h_offset" + "getter": "get_h_offset", + "documentation": "The horizontal (X) offset of the camera viewport." }, { "type": "float", "name": "v_offset", "setter": "set_v_offset", - "getter": "get_v_offset" + "getter": "get_v_offset", + "documentation": "The vertical (Y) offset of the camera viewport." }, { "type": "int", "name": "doppler_tracking", "setter": "set_doppler_tracking", - "getter": "get_doppler_tracking" + "getter": "get_doppler_tracking", + "documentation": "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 [code]_process[/code] methods. See [enum DopplerTracking] for possible values." }, { "type": "int", "name": "projection", "setter": "set_projection", - "getter": "get_projection" + "getter": "get_projection", + "documentation": "The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size." }, { "type": "bool", "name": "current", "setter": "set_current", - "getter": "is_current" + "getter": "is_current", + "documentation": "If [code]true[/code], the ancestor [Viewport] is currently using this camera.\nIf 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 [code]false[/code] will cause the other camera to be made current." }, { "type": "float", "name": "fov", "setter": "set_fov", - "getter": "get_fov" + "getter": "get_fov", + "documentation": "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.\nFor reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to a horizontal FOV of:\n- ~91.31 degrees in a 4:3 viewport\n- ~101.67 degrees in a 16:10 viewport\n- ~107.51 degrees in a 16:9 viewport\n- ~121.63 degrees in a 21:9 viewport" }, { "type": "float", "name": "size", "setter": "set_size", - "getter": "get_size" + "getter": "get_size", + "documentation": "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." }, { "type": "Vector2", "name": "frustum_offset", "setter": "set_frustum_offset", - "getter": "get_frustum_offset" + "getter": "get_frustum_offset", + "documentation": "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].\n[b]Note:[/b] Only effective if [member projection] is [constant PROJECTION_FRUSTUM]." }, { "type": "float", "name": "near", "setter": "set_near", - "getter": "get_near" + "getter": "get_near", + "documentation": "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 [i]entire[/i] range. Values lower than the default can lead to increased Z-fighting." }, { "type": "float", "name": "far", "setter": "set_far", - "getter": "get_far" + "getter": "get_far", + "documentation": "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." } - ] + ], + "documentation": "[Camera3D] is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed." }, { "name": "CameraAttributes", @@ -54703,33 +58882,39 @@ "type": "float", "name": "exposure_sensitivity", "setter": "set_exposure_sensitivity", - "getter": "get_exposure_sensitivity" + "getter": "get_exposure_sensitivity", + "documentation": "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." }, { "type": "float", "name": "exposure_multiplier", "setter": "set_exposure_multiplier", - "getter": "get_exposure_multiplier" + "getter": "get_exposure_multiplier", + "documentation": "Multiplier for the exposure amount. A higher value results in a brighter image." }, { "type": "bool", "name": "auto_exposure_enabled", "setter": "set_auto_exposure_enabled", - "getter": "is_auto_exposure_enabled" + "getter": "is_auto_exposure_enabled", + "documentation": "If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light." }, { "type": "float", "name": "auto_exposure_scale", "setter": "set_auto_exposure_scale", - "getter": "get_auto_exposure_scale" + "getter": "get_auto_exposure_scale", + "documentation": "The scale of the auto exposure effect. Affects the intensity of auto exposure." }, { "type": "float", "name": "auto_exposure_speed", "setter": "set_auto_exposure_speed", - "getter": "get_auto_exposure_speed" + "getter": "get_auto_exposure_speed", + "documentation": "The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure." } - ] + ], + "documentation": "Controls camera-specific attributes such as depth of field and exposure override.\nWhen used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used.\nSee also [Environment] for general 3D environment settings.\nThis is a pure virtual class that is inherited by [CameraAttributesPhysical] and [CameraAttributesPractical]." }, { "name": "CameraAttributesPhysical", @@ -54910,7 +59095,8 @@ "return_value": { "type": "float", "meta": "float" - } + }, + "documentation": "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." }, { "name": "set_auto_exposure_max_exposure_value", @@ -54972,51 +59158,60 @@ "type": "float", "name": "frustum_focus_distance", "setter": "set_focus_distance", - "getter": "get_focus_distance" + "getter": "get_focus_distance", + "documentation": "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]." }, { "type": "float", "name": "frustum_focal_length", "setter": "set_focal_length", - "getter": "get_focal_length" + "getter": "get_focal_length", + "documentation": "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." }, { "type": "float", "name": "frustum_near", "setter": "set_near", - "getter": "get_near" + "getter": "get_near", + "documentation": "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." }, { "type": "float", "name": "frustum_far", "setter": "set_far", - "getter": "get_far" + "getter": "get_far", + "documentation": "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." }, { "type": "float", "name": "exposure_aperture", "setter": "set_aperture", - "getter": "get_aperture" + "getter": "get_aperture", + "documentation": "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.\nOnly available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled." }, { "type": "float", "name": "exposure_shutter_speed", "setter": "set_shutter_speed", - "getter": "get_shutter_speed" + "getter": "get_shutter_speed", + "documentation": "Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image.\nOnly available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled." }, { "type": "float", "name": "auto_exposure_min_exposure_value", "setter": "set_auto_exposure_min_exposure_value", - "getter": "get_auto_exposure_min_exposure_value" + "getter": "get_auto_exposure_min_exposure_value", + "documentation": "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." }, { "type": "float", "name": "auto_exposure_max_exposure_value", "setter": "set_auto_exposure_max_exposure_value", - "getter": "get_auto_exposure_max_exposure_value" + "getter": "get_auto_exposure_max_exposure_value", + "documentation": "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." } - ] + ], + "documentation": "[CameraAttributesPhysical] is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field.\nWhen used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment] and will override the [Camera3D]s [member Camera3D.far], [member Camera3D.near], [member Camera3D.fov], and [member Camera3D.keep_aspect] properties. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used.\nThe default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation.\n[b]Note:[/b] Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility." }, { "name": "CameraAttributesPractical", @@ -55270,57 +59465,67 @@ "type": "bool", "name": "dof_blur_far_enabled", "setter": "set_dof_blur_far_enabled", - "getter": "is_dof_blur_far_enabled" + "getter": "is_dof_blur_far_enabled", + "documentation": "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].\n[b]Note:[/b] Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility." }, { "type": "float", "name": "dof_blur_far_distance", "setter": "set_dof_blur_far_distance", - "getter": "get_dof_blur_far_distance" + "getter": "get_dof_blur_far_distance", + "documentation": "Objects further from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters." }, { "type": "float", "name": "dof_blur_far_transition", "setter": "set_dof_blur_far_transition", - "getter": "get_dof_blur_far_transition" + "getter": "get_dof_blur_far_transition", + "documentation": "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]." }, { "type": "bool", "name": "dof_blur_near_enabled", "setter": "set_dof_blur_near_enabled", - "getter": "is_dof_blur_near_enabled" + "getter": "is_dof_blur_near_enabled", + "documentation": "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].\n[b]Note:[/b] Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility." }, { "type": "float", "name": "dof_blur_near_distance", "setter": "set_dof_blur_near_distance", - "getter": "get_dof_blur_near_distance" + "getter": "get_dof_blur_near_distance", + "documentation": "Objects closer from the [Camera3D] by this amount will be blurred by the depth of field effect. Measured in meters." }, { "type": "float", "name": "dof_blur_near_transition", "setter": "set_dof_blur_near_transition", - "getter": "get_dof_blur_near_transition" + "getter": "get_dof_blur_near_transition", + "documentation": "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]." }, { "type": "float", "name": "dof_blur_amount", "setter": "set_dof_blur_amount", - "getter": "get_dof_blur_amount" + "getter": "get_dof_blur_amount", + "documentation": "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 bluriness, but can be much more expensive to calculate. It is best to keep this as low as possible for a given art style." }, { "type": "float", "name": "auto_exposure_min_sensitivity", "setter": "set_auto_exposure_min_sensitivity", - "getter": "get_auto_exposure_min_sensitivity" + "getter": "get_auto_exposure_min_sensitivity", + "documentation": "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." }, { "type": "float", "name": "auto_exposure_max_sensitivity", "setter": "set_auto_exposure_max_sensitivity", - "getter": "get_auto_exposure_max_sensitivity" + "getter": "get_auto_exposure_max_sensitivity", + "documentation": "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." } - ] + ], + "documentation": "Controls camera-specific attributes such as auto-exposure, depth of field, and exposure override.\nWhen used in a [WorldEnvironment] it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own [CameraAttributes], including the editor camera. When used in a [Camera3D] it will override any [CameraAttributes] set in the [WorldEnvironment]. When used in [VoxelGI] or [LightmapGI], only the exposure settings will be used." }, { "name": "CameraFeed", @@ -55335,19 +59540,23 @@ "values": [ { "name": "FEED_NOIMAGE", - "value": 0 + "value": 0, + "documentation": "No image set for the feed." }, { "name": "FEED_RGB", - "value": 1 + "value": 1, + "documentation": "Feed supplies RGB images." }, { "name": "FEED_YCBCR", - "value": 2 + "value": 2, + "documentation": "Feed supplies YCbCr images that need to be converted to RGB." }, { "name": "FEED_YCBCR_SEP", - "value": 3 + "value": 3, + "documentation": "Feed supplies separate Y and CbCr images that need to be combined and converted to RGB." } ] }, @@ -55357,15 +59566,18 @@ "values": [ { "name": "FEED_UNSPECIFIED", - "value": 0 + "value": 0, + "documentation": "Unspecified position." }, { "name": "FEED_FRONT", - "value": 1 + "value": 1, + "documentation": "Camera is mounted at the front of the device." }, { "name": "FEED_BACK", - "value": 2 + "value": 2, + "documentation": "Camera is mounted at the back of the device." } ] } @@ -55381,7 +59593,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the unique ID for this feed." }, { "name": "is_active", @@ -55417,7 +59630,8 @@ "hash": 201670096, "return_value": { "type": "String" - } + }, + "documentation": "Returns the camera's name." }, { "name": "get_position", @@ -55428,7 +59642,8 @@ "hash": 2711679033, "return_value": { "type": "enum::CameraFeed.FeedPosition" - } + }, + "documentation": "Returns the position of camera on the device." }, { "name": "get_transform", @@ -55464,7 +59679,8 @@ "hash": 1477782850, "return_value": { "type": "enum::CameraFeed.FeedDataType" - } + }, + "documentation": "Returns feed image data type." } ], "properties": [ @@ -55472,15 +59688,18 @@ "type": "bool", "name": "feed_is_active", "setter": "set_active", - "getter": "is_active" + "getter": "is_active", + "documentation": "If [code]true[/code], the feed is active." }, { "type": "Transform2D", "name": "feed_transform", "setter": "set_transform", - "getter": "get_transform" + "getter": "get_transform", + "documentation": "The transform applied to the camera's image." } - ] + ], + "documentation": "A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. See also [CameraServer].\n[b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background." }, { "name": "CameraServer", @@ -55495,19 +59714,23 @@ "values": [ { "name": "FEED_RGBA_IMAGE", - "value": 0 + "value": 0, + "documentation": "The RGBA camera image." }, { "name": "FEED_YCBCR_IMAGE", - "value": 0 + "value": 0, + "documentation": "The [url=https://en.wikipedia.org/wiki/YCbCr]YCbCr[/url] camera image." }, { "name": "FEED_Y_IMAGE", - "value": 0 + "value": 0, + "documentation": "The Y component camera image." }, { "name": "FEED_CBCR_IMAGE", - "value": 1 + "value": 1, + "documentation": "The CbCr component camera image." } ] } @@ -55529,7 +59752,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [CameraFeed] corresponding to the camera with the given [param index]." }, { "name": "get_feed_count", @@ -55541,7 +59765,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of [CameraFeed]s registered." }, { "name": "feeds", @@ -55552,7 +59777,8 @@ "hash": 2915620761, "return_value": { "type": "typedarray::CameraFeed" - } + }, + "documentation": "Returns an array of [CameraFeed]s." }, { "name": "add_feed", @@ -55566,7 +59792,8 @@ "name": "feed", "type": "CameraFeed" } - ] + ], + "documentation": "Adds the camera [param feed] to the camera server." }, { "name": "remove_feed", @@ -55580,7 +59807,8 @@ "name": "feed", "type": "CameraFeed" } - ] + ], + "documentation": "Removes the specified camera [param feed]." } ], "signals": [ @@ -55591,7 +59819,8 @@ "name": "id", "type": "int" } - ] + ], + "documentation": "Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in)." }, { "name": "camera_feed_removed", @@ -55600,9 +59829,11 @@ "name": "id", "type": "int" } - ] + ], + "documentation": "Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged)." } - ] + ], + "documentation": "The [CameraServer] keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone.\nIt is notably used to provide AR modules with a video feed from the camera.\n[b]Note:[/b] This class is currently only implemented on macOS and iOS. On other platforms, no [CameraFeed]s will be available." }, { "name": "CameraTexture", @@ -55694,21 +59925,25 @@ "type": "int", "name": "camera_feed_id", "setter": "set_camera_feed_id", - "getter": "get_camera_feed_id" + "getter": "get_camera_feed_id", + "documentation": "The ID of the [CameraFeed] for which we want to display the image." }, { "type": "int", "name": "which_feed", "setter": "set_which_feed", - "getter": "get_which_feed" + "getter": "get_which_feed", + "documentation": "Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component." }, { "type": "bool", "name": "camera_is_active", "setter": "set_camera_active", - "getter": "get_camera_active" + "getter": "get_camera_active", + "documentation": "Convenience property that gives access to the active property of the [CameraFeed]." } - ] + ], + "documentation": "This texture gives access to the camera texture provided by a [CameraFeed].\n[b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader." }, { "name": "CanvasGroup", @@ -55802,21 +60037,25 @@ "type": "float", "name": "fit_margin", "setter": "set_fit_margin", - "getter": "get_fit_margin" + "getter": "get_fit_margin", + "documentation": "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)." }, { "type": "float", "name": "clear_margin", "setter": "set_clear_margin", - "getter": "get_clear_margin" + "getter": "get_clear_margin", + "documentation": "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." }, { "type": "bool", "name": "use_mipmaps", "setter": "set_use_mipmaps", - "getter": "is_using_mipmaps" + "getter": "is_using_mipmaps", + "documentation": "If [code]true[/code], 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." } - ] + ], + "documentation": "Child [CanvasItem] nodes of a [CanvasGroup] are drawn as a single object. It allows to e.g. draw overlapping translucent 2D nodes without blending (set [member CanvasItem.self_modulate] property of [CanvasGroup] to achieve this effect).\n[b]Note:[/b] The [CanvasGroup] uses a custom shader to read from the backbuffer to draw its children. Assigning a [Material] to the [CanvasGroup] overrides the builtin shader. To duplicate the behavior of the builtin shader in a custom [Shader] use the following:\n[codeblock]\nshader_type canvas_item;\nrender_mode unshaded;\n\nuniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;\n\nvoid fragment() {\n vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0);\n\n if (c.a > 0.0001) {\n c.rgb /= c.a;\n }\n\n COLOR *= c;\n}\n[/codeblock]\n[b]Note:[/b] Since [CanvasGroup] and [member CanvasItem.clip_children] both utilize the backbuffer, children of a [CanvasGroup] who have their [member CanvasItem.clip_children] set to anything other than [constant CanvasItem.CLIP_CHILDREN_DISABLED] will not function correctly." }, { "name": "CanvasItem", @@ -55827,31 +60066,38 @@ "constants": [ { "name": "NOTIFICATION_TRANSFORM_CHANGED", - "value": 2000 + "value": 2000, + "documentation": "The [CanvasItem]'s global transform has changed. This notification is only received if enabled by [method set_notify_transform]." }, { "name": "NOTIFICATION_LOCAL_TRANSFORM_CHANGED", - "value": 35 + "value": 35, + "documentation": "The [CanvasItem]'s local transform has changed. This notification is only received if enabled by [method set_notify_local_transform]." }, { "name": "NOTIFICATION_DRAW", - "value": 30 + "value": 30, + "documentation": "The [CanvasItem] is requested to draw (see [method _draw])." }, { "name": "NOTIFICATION_VISIBILITY_CHANGED", - "value": 31 + "value": 31, + "documentation": "The [CanvasItem]'s visibility has changed." }, { "name": "NOTIFICATION_ENTER_CANVAS", - "value": 32 + "value": 32, + "documentation": "The [CanvasItem] has entered the canvas." }, { "name": "NOTIFICATION_EXIT_CANVAS", - "value": 33 + "value": 33, + "documentation": "The [CanvasItem] has exited the canvas." }, { "name": "NOTIFICATION_WORLD_2D_CHANGED", - "value": 36 + "value": 36, + "documentation": "The [CanvasItem]'s active [World2D] changed." } ], "enums": [ @@ -55861,35 +60107,43 @@ "values": [ { "name": "TEXTURE_FILTER_PARENT_NODE", - "value": 0 + "value": 0, + "documentation": "The [CanvasItem] will inherit the filter from its parent." }, { "name": "TEXTURE_FILTER_NEAREST", - "value": 1 + "value": 1, + "documentation": "The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art." }, { "name": "TEXTURE_FILTER_LINEAR", - "value": 2 + "value": 2, + "documentation": "The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style." }, { "name": "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS", - "value": 3 + "value": 3, + "documentation": "The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps." }, { "name": "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS", - "value": 4 + "value": 4, + "documentation": "The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels." }, { "name": "TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC", - "value": 5 + "value": 5, + "documentation": "The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].\n[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate." }, { "name": "TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC", - "value": 6 + "value": 6, + "documentation": "The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].\n[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate." }, { "name": "TEXTURE_FILTER_MAX", - "value": 7 + "value": 7, + "documentation": "Represents the size of the [enum TextureFilter] enum." } ] }, @@ -55899,23 +60153,28 @@ "values": [ { "name": "TEXTURE_REPEAT_PARENT_NODE", - "value": 0 + "value": 0, + "documentation": "The [CanvasItem] will inherit the filter from its parent." }, { "name": "TEXTURE_REPEAT_DISABLED", - "value": 1 + "value": 1, + "documentation": "Texture will not repeat." }, { "name": "TEXTURE_REPEAT_ENABLED", - "value": 2 + "value": 2, + "documentation": "Texture will repeat normally." }, { "name": "TEXTURE_REPEAT_MIRROR", - "value": 3 + "value": 3, + "documentation": "Texture will repeat in a 2x2 tiled mode, where elements at even positions are mirrored." }, { "name": "TEXTURE_REPEAT_MAX", - "value": 4 + "value": 4, + "documentation": "Represents the size of the [enum TextureRepeat] enum." } ] }, @@ -55925,19 +60184,23 @@ "values": [ { "name": "CLIP_CHILDREN_DISABLED", - "value": 0 + "value": 0, + "documentation": "Child draws over parent and is not clipped." }, { "name": "CLIP_CHILDREN_ONLY", - "value": 1 + "value": 1, + "documentation": "Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn." }, { "name": "CLIP_CHILDREN_AND_DRAW", - "value": 2 + "value": 2, + "documentation": "Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area." }, { "name": "CLIP_CHILDREN_MAX", - "value": 3 + "value": 3, + "documentation": "Represents the size of the [enum ClipChildrenMode] enum." } ] } @@ -55948,7 +60211,8 @@ "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "Called when [CanvasItem] has been requested to redraw (after [method queue_redraw] is called, either manually or by the engine).\nCorresponds to the [constant NOTIFICATION_DRAW] notification in [method Object._notification]." }, { "name": "get_canvas_item", @@ -55959,7 +60223,8 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the canvas item RID used by [RenderingServer] for this item." }, { "name": "set_visible", @@ -55995,7 +60260,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw])." }, { "name": "show", @@ -56003,7 +60269,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Show the [CanvasItem] if it's currently hidden. This is equivalent to setting [member visible] to [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead." }, { "name": "hide", @@ -56011,7 +60278,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Hide the [CanvasItem] if it's currently visible. This is equivalent to setting [member visible] to [code]false[/code]." }, { "name": "queue_redraw", @@ -56019,7 +60287,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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 [b]once[/b] per frame, even if this method has been called multiple times." }, { "name": "move_to_front", @@ -56027,7 +60296,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Moves this node to display on top of its siblings.\nInternally, the node is moved to the bottom of parent's children list. The method has no effect on nodes without a parent." }, { "name": "set_as_top_level", @@ -56267,7 +60537,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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].\nIf [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 [code]1.0[/code]." }, { "name": "draw_dashed_line", @@ -56309,7 +60580,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "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].\nIf [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 [code]1.0[/code]." }, { "name": "draw_polyline", @@ -56341,7 +60613,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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].\nIf [param width] is negative, the polyline is 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 [code]1.0[/code]." }, { "name": "draw_polyline_colors", @@ -56373,7 +60646,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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].\nIf [param width] is negative, then the polyline is 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 [code]1.0[/code]." }, { "name": "draw_arc", @@ -56425,7 +60699,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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].\nIf [param width] is negative, then the arc is 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 [code]1.0[/code].\nThe arc is drawn from [param start_angle] towards the value of [param end_angle] so in clockwise direction if [code]start_angle < end_angle[/code] 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)." }, { "name": "draw_multiline", @@ -56452,7 +60727,8 @@ "meta": "float", "default_value": "-1.0" } - ] + ], + "documentation": "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 [code]points[2 * i][/code], [code]points[2 * i + 1][/code] 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.\nIf [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 [code]1.0[/code]." }, { "name": "draw_multiline_colors", @@ -56479,7 +60755,8 @@ "meta": "float", "default_value": "-1.0" } - ] + ], + "documentation": "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 [code]points[2 * i][/code], [code]points[2 * i + 1][/code] endpoints and has [code]colors[i][/code] 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.\nIf [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 [code]1.0[/code]." }, { "name": "draw_rect", @@ -56511,7 +60788,8 @@ "meta": "float", "default_value": "-1.0" } - ] + ], + "documentation": "Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect].\nIf [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 [code]1.0[/code].\n[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].\n[b]Note:[/b] 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])." }, { "name": "draw_circle", @@ -56534,7 +60812,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon]." }, { "name": "draw_texture", @@ -56560,7 +60839,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Draws a texture at a given position." }, { "name": "draw_texture_rect", @@ -56595,7 +60875,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_rect] and [method draw_texture_rect_region]." }, { "name": "draw_texture_rect_region", @@ -56635,7 +60916,8 @@ "type": "bool", "default_value": "true" } - ] + ], + "documentation": "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 [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_texture_rect]." }, { "name": "draw_msdf_texture_rect_region", @@ -56683,7 +60965,8 @@ "meta": "double", "default_value": "1.0" } - ] + ], + "documentation": "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.\nIf [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.\nValue of the [param pixel_range] should the same that was used during distance field texture generation." }, { "name": "draw_lcd_texture_rect_region", @@ -56713,7 +60996,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color.\nTexture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored:\n[codeblock]\ndst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a);\ndst.g = texture.g * modulate.g * modulate.a + dst.g * (1.0 - texture.g * modulate.a);\ndst.b = texture.b * modulate.b * modulate.a + dst.b * (1.0 - texture.b * modulate.a);\ndst.a = modulate.a + dst.a * (1.0 - modulate.a);\n[/codeblock]" }, { "name": "draw_style_box", @@ -56731,7 +61015,8 @@ "name": "rect", "type": "Rect2" } - ] + ], + "documentation": "Draws a styled rectangle." }, { "name": "draw_primitive", @@ -56761,7 +61046,8 @@ "type": "Texture2D", "default_value": "null" } - ] + ], + "documentation": "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]." }, { "name": "draw_polygon", @@ -56792,7 +61078,8 @@ "type": "Texture2D", "default_value": "null" } - ] + ], + "documentation": "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." }, { "name": "draw_colored_polygon", @@ -56823,7 +61110,8 @@ "type": "Texture2D", "default_value": "null" } - ] + ], + "documentation": "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." }, { "name": "draw_string", @@ -56885,7 +61173,8 @@ "type": "enum::TextServer.Orientation", "default_value": "0" } - ] + ], + "documentation": "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.\n[b]Example using the default project font:[/b]\n[codeblocks]\n[gdscript]\n# If using this method in a script that redraws constantly, move the\n# `default_font` declaration to a member variable assigned in `_ready()`\n# so the Control is only created once.\nvar default_font = ThemeDB.fallback_font\nvar default_font_size = ThemeDB.fallback_font_size\ndraw_string(default_font, Vector2(64, 64), \"Hello world\", HORIZONTAL_ALIGNMENT_LEFT, -1, default_font_size)\n[/gdscript]\n[csharp]\n// If using this method in a script that redraws constantly, move the\n// `default_font` declaration to a member variable assigned in `_Ready()`\n// so the Control is only created once.\nFont defaultFont = ThemeDB.FallbackFont;\nint defaultFontSize = ThemeDB.FallbackFontSize;\nDrawString(defaultFont, new Vector2(64, 64), \"Hello world\", HORIZONTAL_ALIGNMENT_LEFT, -1, defaultFontSize);\n[/csharp]\n[/codeblocks]\nSee also [method Font.draw_string]." }, { "name": "draw_multiline_string", @@ -56958,7 +61247,8 @@ "type": "enum::TextServer.Orientation", "default_value": "0" } - ] + ], + "documentation": "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." }, { "name": "draw_string_outline", @@ -57026,7 +61316,8 @@ "type": "enum::TextServer.Orientation", "default_value": "0" } - ] + ], + "documentation": "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." }, { "name": "draw_multiline_string_outline", @@ -57105,7 +61396,8 @@ "type": "enum::TextServer.Orientation", "default_value": "0" } - ] + ], + "documentation": "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." }, { "name": "draw_char", @@ -57141,7 +61433,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Draws a string first character using a custom font." }, { "name": "draw_char_outline", @@ -57183,7 +61476,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Draws a string first character outline using a custom font." }, { "name": "draw_mesh", @@ -57214,7 +61508,8 @@ "type": "Color", "default_value": "Color(1, 1, 1, 1)" } - ] + ], + "documentation": "Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation." }, { "name": "draw_multimesh", @@ -57232,7 +61527,8 @@ "name": "texture", "type": "Texture2D" } - ] + ], + "documentation": "Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation." }, { "name": "draw_set_transform", @@ -57260,7 +61556,8 @@ "type": "Vector2", "default_value": "Vector2(1, 1)" } - ] + ], + "documentation": "Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this.\n[b]Note:[/b] [member FontFile.oversampling] does [i]not[/i] 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 [b]Multichannel Signed Distance Field[/b] 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." }, { "name": "draw_set_transform_matrix", @@ -57274,7 +61571,8 @@ "name": "xform", "type": "Transform2D" } - ] + ], + "documentation": "Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this." }, { "name": "draw_animation_slice", @@ -57308,7 +61606,8 @@ "meta": "double", "default_value": "0.0" } - ] + ], + "documentation": "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." }, { "name": "draw_end_animation", @@ -57316,7 +61615,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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." }, { "name": "get_transform", @@ -57327,7 +61627,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform matrix of this item." }, { "name": "get_global_transform", @@ -57338,7 +61639,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "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." }, { "name": "get_global_transform_with_canvas", @@ -57349,7 +61651,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform from the local coordinate system of this [CanvasItem] to the [Viewport]s coordinate system." }, { "name": "get_viewport_transform", @@ -57360,7 +61663,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s embedders coordinate system." }, { "name": "get_viewport_rect", @@ -57371,7 +61675,8 @@ "hash": 1639390495, "return_value": { "type": "Rect2" - } + }, + "documentation": "Returns the viewport's boundaries as a [Rect2]." }, { "name": "get_canvas_transform", @@ -57382,7 +61687,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform from the coordinate system of the canvas, this item is in, to the [Viewport]s coordinate system." }, { "name": "get_screen_transform", @@ -57393,7 +61699,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform of this [CanvasItem] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins.\nEquals to [method get_global_transform] if the window is embedded (see [member Viewport.gui_embed_subwindows])." }, { "name": "get_local_mouse_position", @@ -57404,7 +61711,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the mouse's position in this [CanvasItem] using the local coordinate system of this [CanvasItem]." }, { "name": "get_global_mouse_position", @@ -57415,7 +61723,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].\n[b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position]." }, { "name": "get_canvas", @@ -57426,7 +61735,8 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the [RID] of the [World2D] canvas where this item is in." }, { "name": "get_world_2d", @@ -57437,7 +61747,8 @@ "hash": 2339128592, "return_value": { "type": "World2D" - } + }, + "documentation": "Returns the [World2D] where this item is in." }, { "name": "set_material", @@ -57501,7 +61812,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_LOCAL_TRANSFORM_CHANGED] when its local transform changes." }, { "name": "is_local_transform_notification_enabled", @@ -57512,7 +61824,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if local transform notifications are communicated to children." }, { "name": "set_notify_transform", @@ -57526,7 +61839,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes." }, { "name": "is_transform_notification_enabled", @@ -57537,7 +61851,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if global transform notifications are communicated to children." }, { "name": "force_update_transform", @@ -57545,7 +61860,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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." }, { "name": "make_canvas_position_local", @@ -57562,7 +61878,8 @@ "name": "screen_point", "type": "Vector2" } - ] + ], + "documentation": "Assigns [param screen_point] as this node's new local transform." }, { "name": "make_input_local", @@ -57579,7 +61896,8 @@ "name": "event", "type": "InputEvent" } - ] + ], + "documentation": "Transformations issued by [param event]'s inputs are applied in local space instead of global space." }, { "name": "set_visibility_layer", @@ -57625,7 +61943,8 @@ "name": "enabled", "type": "bool" } - ] + ], + "documentation": "Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer." }, { "name": "get_visibility_layer_bit", @@ -57643,7 +61962,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns an individual bit on the rendering visibility layer." }, { "name": "set_texture_filter", @@ -57723,16 +62043,20 @@ ], "signals": [ { - "name": "draw" + "name": "draw", + "documentation": "Emitted when the [CanvasItem] must redraw, [i]after[/i] the related [constant NOTIFICATION_DRAW] notification, and [i]before[/i] [method _draw] is called.\n[b]Note:[/b] Deferred connections do not allow drawing through the [code]draw_*[/code] methods." }, { - "name": "visibility_changed" + "name": "visibility_changed", + "documentation": "Emitted when the visibility (hidden/visible) changes." }, { - "name": "hidden" + "name": "hidden", + "documentation": "Emitted when becoming hidden." }, { - "name": "item_rect_changed" + "name": "item_rect_changed", + "documentation": "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])." } ], "properties": [ @@ -57740,93 +62064,109 @@ "type": "bool", "name": "visible", "setter": "set_visible", - "getter": "is_visible" + "getter": "is_visible", + "documentation": "If [code]true[/code], 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 [code]true[/code]).\n[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead." }, { "type": "Color", "name": "modulate", "setter": "set_modulate", - "getter": "get_modulate" + "getter": "get_modulate", + "documentation": "The color applied to this [CanvasItem]. This property does affect child [CanvasItem]s, unlike [member self_modulate] which only affects the node itself." }, { "type": "Color", "name": "self_modulate", "setter": "set_self_modulate", - "getter": "get_self_modulate" + "getter": "get_self_modulate", + "documentation": "The color applied to this [CanvasItem]. This property does [b]not[/b] affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children.\n[b]Note:[/b] Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see [code]include_internal[/code] parameter of [method Node.get_child] and other similar methods)." }, { "type": "bool", "name": "show_behind_parent", "setter": "set_draw_behind_parent", - "getter": "is_draw_behind_parent_enabled" + "getter": "is_draw_behind_parent_enabled", + "documentation": "If [code]true[/code], the object draws behind its parent." }, { "type": "bool", "name": "top_level", "setter": "set_as_top_level", - "getter": "is_set_as_top_level" + "getter": "is_set_as_top_level", + "documentation": "If [code]true[/code], this [CanvasItem] will [i]not[/i] 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 [code]true[/code]. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node]." }, { "type": "int", "name": "clip_children", "setter": "set_clip_children_mode", - "getter": "get_clip_children_mode" + "getter": "get_clip_children_mode", + "documentation": "Allows the current node to clip children nodes, essentially acting as a mask." }, { "type": "int", "name": "light_mask", "setter": "set_light_mask", - "getter": "get_light_mask" + "getter": "get_light_mask", + "documentation": "The rendering layers in which this [CanvasItem] responds to [Light2D] nodes." }, { "type": "int", "name": "visibility_layer", "setter": "set_visibility_layer", - "getter": "get_visibility_layer" + "getter": "get_visibility_layer", + "documentation": "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." }, { "type": "int", "name": "z_index", "setter": "set_z_index", - "getter": "get_z_index" + "getter": "get_z_index", + "documentation": "Z index. 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).\n[b]Note:[/b] 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." }, { "type": "bool", "name": "z_as_relative", "setter": "set_z_as_relative", - "getter": "is_z_relative" + "getter": "is_z_relative", + "documentation": "If [code]true[/code], 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." }, { "type": "bool", "name": "y_sort_enabled", "setter": "set_y_sort_enabled", - "getter": "is_y_sort_enabled" + "getter": "is_y_sort_enabled", + "documentation": "If [code]true[/code], child nodes with the lowest Y position are drawn before those with a higher Y position. If [code]false[/code], Y-sorting is disabled. Y-sorting only affects children that inherit from [CanvasItem].\nYou can nest nodes with Y-sorting. Child Y-sorted nodes are sorted in the same space as the parent Y-sort. This feature allows you to organize a scene better or divide it into multiple ones without changing your scene tree." }, { "type": "int", "name": "texture_filter", "setter": "set_texture_filter", - "getter": "get_texture_filter" + "getter": "get_texture_filter", + "documentation": "The texture filtering mode to use on this [CanvasItem]." }, { "type": "int", "name": "texture_repeat", "setter": "set_texture_repeat", - "getter": "get_texture_repeat" + "getter": "get_texture_repeat", + "documentation": "The texture repeating mode to use on this [CanvasItem]." }, { "type": "CanvasItemMaterial,ShaderMaterial", "name": "material", "setter": "set_material", - "getter": "get_material" + "getter": "get_material", + "documentation": "The material applied to this [CanvasItem]." }, { "type": "bool", "name": "use_parent_material", "setter": "set_use_parent_material", - "getter": "get_use_parent_material" + "getter": "get_use_parent_material", + "documentation": "If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material." } - ] + ], + "documentation": "Abstract base class for everything in 2D space. Canvas items are laid out in a tree; children inherit and extend their parent's transform. [CanvasItem] is extended by [Control] for GUI-related nodes, and by [Node2D] for 2D game objects.\nAny [CanvasItem] can draw. For this, [method queue_redraw] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal.\nCanvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis.\nA [CanvasItem] can be hidden, which will also hide its children. By adjusting various other properties of a [CanvasItem], you can also modulate its color (via [member modulate] or [member self_modulate]), change its Z-index, blend mode, and more." }, { "name": "CanvasItemMaterial", @@ -57841,23 +62181,28 @@ "values": [ { "name": "BLEND_MODE_MIX", - "value": 0 + "value": 0, + "documentation": "Mix blending mode. Colors are assumed to be independent of the alpha (opacity) value." }, { "name": "BLEND_MODE_ADD", - "value": 1 + "value": 1, + "documentation": "Additive blending mode." }, { "name": "BLEND_MODE_SUB", - "value": 2 + "value": 2, + "documentation": "Subtractive blending mode." }, { "name": "BLEND_MODE_MUL", - "value": 3 + "value": 3, + "documentation": "Multiplicative blending mode." }, { "name": "BLEND_MODE_PREMULT_ALPHA", - "value": 4 + "value": 4, + "documentation": "Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value." } ] }, @@ -57867,15 +62212,18 @@ "values": [ { "name": "LIGHT_MODE_NORMAL", - "value": 0 + "value": 0, + "documentation": "Render the material using both light and non-light sensitive material properties." }, { "name": "LIGHT_MODE_UNSHADED", - "value": 1 + "value": 1, + "documentation": "Render the material as if there were no light." }, { "name": "LIGHT_MODE_LIGHT_ONLY", - "value": 2 + "value": 2, + "documentation": "Render the material as if there were only light." } ] } @@ -58041,39 +62389,46 @@ "type": "int", "name": "blend_mode", "setter": "set_blend_mode", - "getter": "get_blend_mode" + "getter": "get_blend_mode", + "documentation": "The manner in which a material's rendering is applied to underlying textures." }, { "type": "int", "name": "light_mode", "setter": "set_light_mode", - "getter": "get_light_mode" + "getter": "get_light_mode", + "documentation": "The manner in which material reacts to lighting." }, { "type": "bool", "name": "particles_animation", "setter": "set_particles_animation", - "getter": "get_particles_animation" + "getter": "get_particles_animation", + "documentation": "If [code]true[/code], 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.\nThis property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes." }, { "type": "int", "name": "particles_anim_h_frames", "setter": "set_particles_anim_h_frames", - "getter": "get_particles_anim_h_frames" + "getter": "get_particles_anim_h_frames", + "documentation": "The number of columns in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D].\n[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]." }, { "type": "int", "name": "particles_anim_v_frames", "setter": "set_particles_anim_v_frames", - "getter": "get_particles_anim_v_frames" + "getter": "get_particles_anim_v_frames", + "documentation": "The number of rows in the spritesheet assigned as [Texture2D] for a [GPUParticles2D] or [CPUParticles2D].\n[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]." }, { "type": "bool", "name": "particles_anim_loop", "setter": "set_particles_anim_loop", - "getter": "get_particles_anim_loop" + "getter": "get_particles_anim_loop", + "documentation": "If [code]true[/code], the particles animation will loop.\n[b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]." } - ] + ], + "documentation": "[CanvasItemMaterial]s provide a means of modifying the textures associated with a CanvasItem. They specialize in describing blend and lighting behaviors for textures. Use a [ShaderMaterial] to more fully customize a material's interactions with a [CanvasItem]." }, { "name": "CanvasLayer", @@ -58140,7 +62495,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Shows any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to [code]true[/code]." }, { "name": "hide", @@ -58148,7 +62504,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Hides any [CanvasItem] under this [CanvasLayer]. This is equivalent to setting [member visible] to [code]false[/code]." }, { "name": "set_transform", @@ -58184,7 +62541,8 @@ "hash": 3814499831, "return_value": { "type": "Transform2D" - } + }, + "documentation": "Returns the transform from the [CanvasLayer]s coordinate system to the [Viewport]s coordinate system." }, { "name": "set_offset", @@ -58349,12 +62707,14 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the RID of the canvas used by this layer." } ], "signals": [ { - "name": "visibility_changed" + "name": "visibility_changed", + "documentation": "Emitted when visibility of the layer is changed. See [member visible]." } ], "properties": [ @@ -58362,57 +62722,67 @@ "type": "int", "name": "layer", "setter": "set_layer", - "getter": "get_layer" + "getter": "get_layer", + "documentation": "Layer index for draw order. Lower values are drawn behind higher values.\n[b]Note:[/b] 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." }, { "type": "bool", "name": "visible", "setter": "set_visible", - "getter": "is_visible" + "getter": "is_visible", + "documentation": "If [code]false[/code], any [CanvasItem] under this [CanvasLayer] will be hidden.\nUnlike [member CanvasItem.visible], visibility of a [CanvasLayer] isn't propagated to underlying layers." }, { "type": "Vector2", "name": "offset", "setter": "set_offset", - "getter": "get_offset" + "getter": "get_offset", + "documentation": "The layer's base offset." }, { "type": "float", "name": "rotation", "setter": "set_rotation", - "getter": "get_rotation" + "getter": "get_rotation", + "documentation": "The layer's rotation in radians." }, { "type": "Vector2", "name": "scale", "setter": "set_scale", - "getter": "get_scale" + "getter": "get_scale", + "documentation": "The layer's scale." }, { "type": "Transform2D", "name": "transform", "setter": "set_transform", - "getter": "get_transform" + "getter": "get_transform", + "documentation": "The layer's transform." }, { "type": "Viewport", "name": "custom_viewport", "setter": "set_custom_viewport", - "getter": "get_custom_viewport" + "getter": "get_custom_viewport", + "documentation": "The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead." }, { "type": "bool", "name": "follow_viewport_enabled", "setter": "set_follow_viewport", - "getter": "is_following_viewport" + "getter": "is_following_viewport", + "documentation": "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.\nTogether with [member follow_viewport_scale] it can be used for a pseudo 3D effect." }, { "type": "float", "name": "follow_viewport_scale", "setter": "set_follow_viewport_scale", - "getter": "get_follow_viewport_scale" + "getter": "get_follow_viewport_scale", + "documentation": "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." } - ] + ], + "documentation": "[CanvasItem]-derived nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index [code]0[/code], so a [CanvasLayer] with index [code]-1[/code] will be drawn below, and a [CanvasLayer] with index [code]1[/code] will be drawn above. This order will hold regardless of the [member CanvasItem.z_index] of the nodes within each layer.\n[CanvasLayer]s can be hidden and they can also optionally follow the viewport. This makes them useful for HUDs like health bar overlays (on layers [code]1[/code] and higher) or backgrounds (on layers [code]-1[/code] and lower).\n[b]Note:[/b] Embedded [Window]s are placed on layer [code]1024[/code]. [CanvasItem]s on layers [code]1025[/code] and higher appear in front of embedded windows.\n[b]Note:[/b] Each [CanvasLayer] is drawn on one specific [Viewport] and cannot be shared between multiple [Viewport]s, see [member custom_viewport]. When using multiple [Viewport]s, for example in a split-screen game, you need create an individual [CanvasLayer] for each [Viewport] you want it to be drawn on." }, { "name": "CanvasModulate", @@ -58452,9 +62822,11 @@ "type": "Color", "name": "color", "setter": "set_color", - "getter": "get_color" + "getter": "get_color", + "documentation": "The tint color to apply." } - ] + ], + "documentation": "[CanvasModulate] applies a color tint to all nodes on a canvas. Only one can be used to tint a canvas, but [CanvasLayer]s can be used to render things independently." }, { "name": "CanvasTexture", @@ -58646,45 +63018,53 @@ "type": "Texture2D", "name": "diffuse_texture", "setter": "set_diffuse_texture", - "getter": "get_diffuse_texture" + "getter": "get_diffuse_texture", + "documentation": "The diffuse (color) texture to use. This is the main texture you want to set in most cases." }, { "type": "Texture2D", "name": "normal_texture", "setter": "set_normal_texture", - "getter": "get_normal_texture" + "getter": "get_normal_texture", + "documentation": "The normal map texture to use. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture].\n[b]Note:[/b] 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." }, { "type": "Texture2D", "name": "specular_texture", "setter": "set_specular_texture", - "getter": "get_specular_texture" + "getter": "get_specular_texture", + "documentation": "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]." }, { "type": "Color", "name": "specular_color", "setter": "set_specular_color", - "getter": "get_specular_color" + "getter": "get_specular_color", + "documentation": "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]." }, { "type": "float", "name": "specular_shininess", "setter": "set_specular_shininess", - "getter": "get_specular_shininess" + "getter": "get_specular_shininess", + "documentation": "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 [code]1.0[/code] disables specular reflections entirely. Only has a visible effect if [Light2D]s are affecting this [CanvasTexture]." }, { "type": "int", "name": "texture_filter", "setter": "set_texture_filter", - "getter": "get_texture_filter" + "getter": "get_texture_filter", + "documentation": "The texture filtering mode to use when drawing this [CanvasTexture]." }, { "type": "int", "name": "texture_repeat", "setter": "set_texture_repeat", - "getter": "get_texture_repeat" + "getter": "get_texture_repeat", + "documentation": "The texture repeat mode to use when drawing this [CanvasTexture]." } - ] + ], + "documentation": "[CanvasTexture] is an alternative to [ImageTexture] for 2D rendering. It allows using normal maps and specular maps in any node that inherits from [CanvasItem]. [CanvasTexture] also allows overriding the texture's filter and repeat mode independently of the node's properties (or the project settings).\n[b]Note:[/b] [CanvasTexture] cannot be used in 3D rendering. For physically-based materials in 3D, use [BaseMaterial3D] instead." }, { "name": "CapsuleMesh", @@ -58807,27 +63187,32 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "Radius of the capsule mesh." }, { "type": "float", "name": "height", "setter": "set_height", - "getter": "get_height" + "getter": "get_height", + "documentation": "Total height of the capsule mesh (including the hemispherical ends)." }, { "type": "int", "name": "radial_segments", "setter": "set_radial_segments", - "getter": "get_radial_segments" + "getter": "get_radial_segments", + "documentation": "Number of radial segments on the capsule mesh." }, { "type": "int", "name": "rings", "setter": "set_rings", - "getter": "get_rings" + "getter": "get_rings", + "documentation": "Number of rings along the height of the capsule." } - ] + ], + "documentation": "Class representing a capsule-shaped [PrimitiveMesh]." }, { "name": "CapsuleShape2D", @@ -58896,15 +63281,18 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "The capsule's radius." }, { "type": "float", "name": "height", "setter": "set_height", - "getter": "get_height" + "getter": "get_height", + "documentation": "The capsule's height." } - ] + ], + "documentation": "A 2D capsule shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape2D].\n[b]Performance:[/b] [CapsuleShape2D] is fast to check collisions against, but it is slower than [RectangleShape2D] and [CircleShape2D]." }, { "name": "CapsuleShape3D", @@ -58973,15 +63361,18 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "The capsule's radius." }, { "type": "float", "name": "height", "setter": "set_height", - "getter": "get_height" + "getter": "get_height", + "documentation": "The capsule's height." } - ] + ], + "documentation": "A 3D capsule shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape3D].\n[b]Performance:[/b] [CapsuleShape3D] is fast to check collisions against. It is faster than [CylinderShape3D], but slower than [SphereShape3D] and [BoxShape3D]." }, { "name": "CenterContainer", @@ -59021,9 +63412,11 @@ "type": "bool", "name": "use_top_left", "setter": "set_use_top_left", - "getter": "is_using_top_left" + "getter": "is_using_top_left", + "documentation": "If [code]true[/code], centers children relative to the [CenterContainer]'s top left corner." } - ] + ], + "documentation": "[CenterContainer] is a container that keeps all of its child controls in its center at their minimum size." }, { "name": "CharFXTransform", @@ -59373,81 +63766,95 @@ "type": "Transform2D", "name": "transform", "setter": "set_transform", - "getter": "get_transform" + "getter": "get_transform", + "documentation": "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." }, { "type": "Vector2i", "name": "range", "setter": "set_range", - "getter": "get_range" + "getter": "get_range", + "documentation": "Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing." }, { "type": "float", "name": "elapsed_time", "setter": "set_elapsed_time", - "getter": "get_elapsed_time" + "getter": "get_elapsed_time", + "documentation": "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.\n[b]Note:[/b] Time still passes while the [RichTextLabel] is hidden." }, { "type": "bool", "name": "visible", "setter": "set_visibility", - "getter": "is_visible" + "getter": "is_visible", + "documentation": "If [code]true[/code], the character will be drawn. If [code]false[/code], 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 [code]Color(1, 1, 1, 0)[/code] instead." }, { "type": "bool", "name": "outline", "setter": "set_outline", - "getter": "is_outline" + "getter": "is_outline", + "documentation": "If [code]true[/code], FX transform is called for outline drawing. Setting this property won't affect drawing." }, { "type": "Vector2", "name": "offset", "setter": "set_offset", - "getter": "get_offset" + "getter": "get_offset", + "documentation": "The position offset the character will be drawn with (in pixels)." }, { "type": "Color", "name": "color", "setter": "set_color", - "getter": "get_color" + "getter": "get_color", + "documentation": "The color the character will be drawn with." }, { "type": "Dictionary", "name": "env", "setter": "set_environment", - "getter": "get_environment" + "getter": "get_environment", + "documentation": "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 [code]#rrggbb[/code] or [code]#rgb[/code] 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.\nFor example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]:\n[codeblock]\n{\"foo\": \"hello\", \"bar\": true, \"baz\": 42, \"color\": Color(1, 1, 1, 1)}\n[/codeblock]" }, { "type": "int", "name": "glyph_index", "setter": "set_glyph_index", - "getter": "get_glyph_index" + "getter": "get_glyph_index", + "documentation": "Font specific glyph index." }, { "type": "int", "name": "glyph_count", "setter": "set_glyph_count", - "getter": "get_glyph_count" + "getter": "get_glyph_count", + "documentation": "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." }, { "type": "int", "name": "glyph_flags", "setter": "set_glyph_flags", - "getter": "get_glyph_flags" + "getter": "get_glyph_flags", + "documentation": "Glyph flags. See [enum TextServer.GraphemeFlag] for more info. Setting this property won't affect drawing." }, { "type": "int", "name": "relative_index", "setter": "set_relative_index", - "getter": "get_relative_index" + "getter": "get_relative_index", + "documentation": "The character offset of the glyph, relative to the current [RichTextEffect] custom block. Setting this property won't affect drawing." }, { "type": "RID", "name": "font", "setter": "set_font", - "getter": "get_font" + "getter": "get_font", + "documentation": "Font resource used to render glyph." } - ] + ], + "documentation": "By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]." }, { "name": "CharacterBody2D", @@ -59462,11 +63869,13 @@ "values": [ { "name": "MOTION_MODE_GROUNDED", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "MOTION_MODE_FLOATING", - "value": 1 + "value": 1, + "documentation": "Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for top-down games." } ] }, @@ -59476,15 +63885,18 @@ "values": [ { "name": "PLATFORM_ON_LEAVE_ADD_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Add the last platform velocity to the [member velocity] when you leave a moving platform." }, { "name": "PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "PLATFORM_ON_LEAVE_DO_NOTHING", - "value": 2 + "value": 2, + "documentation": "Do nothing when leaving a platform." } ] } @@ -59499,7 +63911,8 @@ "hash": 2240911060, "return_value": { "type": "bool" - } + }, + "documentation": "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.\nModifies [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].\nWhen 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.\nThe general behavior and available properties change according to the [member motion_mode].\nReturns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]." }, { "name": "apply_floor_snap", @@ -59507,7 +63920,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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 [code]true[/code]." }, { "name": "set_velocity", @@ -59907,7 +64321,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"floor\" or not." }, { "name": "is_on_floor_only", @@ -59918,7 +64333,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"floor\" or not." }, { "name": "is_on_ceiling", @@ -59929,7 +64345,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"ceiling\" or not." }, { "name": "is_on_ceiling_only", @@ -59940,7 +64357,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"ceiling\" or not." }, { "name": "is_on_wall", @@ -59951,7 +64369,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"wall\" or not." }, { "name": "is_on_wall_only", @@ -59962,7 +64381,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"wall\" or not." }, { "name": "get_floor_normal", @@ -59973,7 +64393,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]." }, { "name": "get_wall_normal", @@ -59984,7 +64405,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code]." }, { "name": "get_last_motion", @@ -59995,7 +64417,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "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." }, { "name": "get_position_delta", @@ -60006,7 +64429,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the travel (position delta) that occurred during the last call to [method move_and_slide]." }, { "name": "get_real_velocity", @@ -60017,7 +64441,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "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." }, { "name": "get_floor_angle", @@ -60036,7 +64461,8 @@ "type": "Vector2", "default_value": "Vector2(0, -1)" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "get_platform_velocity", @@ -60047,7 +64473,8 @@ "hash": 3341600327, "return_value": { "type": "Vector2" - } + }, + "documentation": "Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]." }, { "name": "get_slide_collision_count", @@ -60059,7 +64486,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]." }, { "name": "get_slide_collision", @@ -60077,7 +64505,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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).\n[b]Example usage:[/b]\n[codeblocks]\n[gdscript]\nfor i in get_slide_collision_count():\n var collision = get_slide_collision(i)\n print(\"Collided with: \", collision.get_collider().name)\n[/gdscript]\n[csharp]\nfor (int i = 0; i < GetSlideCollisionCount(); i++)\n{\n KinematicCollision2D collision = GetSlideCollision(i);\n GD.Print(\"Collided with: \", (collision.GetCollider() as Node).Name);\n}\n[/csharp]\n[/codeblocks]" }, { "name": "get_last_slide_collision", @@ -60088,7 +64517,8 @@ "hash": 2161834755, "return_value": { "type": "KinematicCollision2D" - } + }, + "documentation": "Returns a [KinematicCollision2D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]." } ], "properties": [ @@ -60096,93 +64526,109 @@ "type": "int", "name": "motion_mode", "setter": "set_motion_mode", - "getter": "get_motion_mode" + "getter": "get_motion_mode", + "documentation": "Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes." }, { "type": "Vector2", "name": "up_direction", "setter": "set_up_direction", - "getter": "get_up_direction" + "getter": "get_up_direction", + "documentation": "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]." }, { "type": "Vector2", "name": "velocity", "setter": "set_velocity", - "getter": "get_velocity" + "getter": "get_velocity", + "documentation": "Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]." }, { "type": "bool", "name": "slide_on_ceiling", "setter": "set_slide_on_ceiling_enabled", - "getter": "is_slide_on_ceiling_enabled" + "getter": "is_slide_on_ceiling_enabled", + "documentation": "If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically." }, { "type": "int", "name": "max_slides", "setter": "set_max_slides", - "getter": "get_max_slides" + "getter": "get_max_slides", + "documentation": "Maximum number of times the body can change direction before it stops when calling [method move_and_slide]." }, { "type": "float", "name": "wall_min_slide_angle", "setter": "set_wall_min_slide_angle", - "getter": "get_wall_min_slide_angle" + "getter": "get_wall_min_slide_angle", + "documentation": "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]." }, { "type": "bool", "name": "floor_stop_on_slope", "setter": "set_floor_stop_on_slope_enabled", - "getter": "is_floor_stop_on_slope_enabled" + "getter": "is_floor_stop_on_slope_enabled", + "documentation": "If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.\nIf [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force." }, { "type": "bool", "name": "floor_constant_speed", "setter": "set_floor_constant_speed_enabled", - "getter": "is_floor_constant_speed_enabled" + "getter": "is_floor_constant_speed_enabled", + "documentation": "If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes.\nIf [code]true[/code], 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." }, { "type": "bool", "name": "floor_block_on_wall", "setter": "set_floor_block_on_wall_enabled", - "getter": "is_floor_block_on_wall_enabled" + "getter": "is_floor_block_on_wall_enabled", + "documentation": "If [code]true[/code], 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." }, { "type": "float", "name": "floor_max_angle", "setter": "set_floor_max_angle", - "getter": "get_floor_max_angle" + "getter": "get_floor_max_angle", + "documentation": "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." }, { "type": "float", "name": "floor_snap_length", "setter": "set_floor_snap_length", - "getter": "get_floor_snap_length" + "getter": "get_floor_snap_length", + "documentation": "Sets a snapping distance. When set to a value different from [code]0.0[/code], 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].\nAs 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]." }, { "type": "int", "name": "platform_on_leave", "setter": "set_platform_on_leave", - "getter": "get_platform_on_leave" + "getter": "get_platform_on_leave", + "documentation": "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." }, { "type": "int", "name": "platform_floor_layers", "setter": "set_platform_floor_layers", - "getter": "get_platform_floor_layers" + "getter": "get_platform_floor_layers", + "documentation": "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." }, { "type": "int", "name": "platform_wall_layers", "setter": "set_platform_wall_layers", - "getter": "get_platform_wall_layers" + "getter": "get_platform_wall_layers", + "documentation": "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." }, { "type": "float", "name": "safe_margin", "setter": "set_safe_margin", - "getter": "get_safe_margin" + "getter": "get_safe_margin", + "documentation": "Extra margin used for collision recovery when calling [method move_and_slide].\nIf 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.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA 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." } - ] + ], + "documentation": "[CharacterBody2D] is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection ([method move_and_slide] method) in addition to the general collision detection provided by [method PhysicsBody2D.move_and_collide]. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters.\nFor game objects that don't require complex movement or collision detection, such as moving platforms, [AnimatableBody2D] is simpler to configure." }, { "name": "CharacterBody3D", @@ -60197,11 +64643,13 @@ "values": [ { "name": "MOTION_MODE_GROUNDED", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "MOTION_MODE_FLOATING", - "value": 1 + "value": 1, + "documentation": "Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will always be constant. This mode is suitable for games without ground like space games." } ] }, @@ -60211,15 +64659,18 @@ "values": [ { "name": "PLATFORM_ON_LEAVE_ADD_VELOCITY", - "value": 0 + "value": 0, + "documentation": "Add the last platform velocity to the [member velocity] when you leave a moving platform." }, { "name": "PLATFORM_ON_LEAVE_ADD_UPWARD_VELOCITY", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "PLATFORM_ON_LEAVE_DO_NOTHING", - "value": 2 + "value": 2, + "documentation": "Do nothing when leaving a platform." } ] } @@ -60234,7 +64685,8 @@ "hash": 2240911060, "return_value": { "type": "bool" - } + }, + "documentation": "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.\nModifies [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].\nWhen 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.\nReturns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]." }, { "name": "apply_floor_snap", @@ -60242,7 +64694,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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 [code]true[/code]." }, { "name": "set_velocity", @@ -60642,7 +65095,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"floor\" or not." }, { "name": "is_on_floor_only", @@ -60653,7 +65107,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"floor\" or not." }, { "name": "is_on_ceiling", @@ -60664,7 +65119,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"ceiling\" or not." }, { "name": "is_on_ceiling_only", @@ -60675,7 +65131,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"ceiling\" or not." }, { "name": "is_on_wall", @@ -60686,7 +65143,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"wall\" or not." }, { "name": "is_on_wall_only", @@ -60697,7 +65155,8 @@ "hash": 36873697, "return_value": { "type": "bool" - } + }, + "documentation": "Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. The [member up_direction] and [member floor_max_angle] are used to determine whether a surface is \"wall\" or not." }, { "name": "get_floor_normal", @@ -60708,7 +65167,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]." }, { "name": "get_wall_normal", @@ -60719,7 +65179,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Returns the surface normal of the wall at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_wall] returns [code]true[/code]." }, { "name": "get_last_motion", @@ -60730,7 +65191,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "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." }, { "name": "get_position_delta", @@ -60741,7 +65203,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Returns the travel (position delta) that occurred during the last call to [method move_and_slide]." }, { "name": "get_real_velocity", @@ -60752,7 +65215,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "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." }, { "name": "get_floor_angle", @@ -60771,7 +65235,8 @@ "type": "Vector3", "default_value": "Vector3(0, 1, 0)" } - ] + ], + "documentation": "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 [code]true[/code]." }, { "name": "get_platform_velocity", @@ -60782,7 +65247,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]." }, { "name": "get_platform_angular_velocity", @@ -60793,7 +65259,8 @@ "hash": 3360562783, "return_value": { "type": "Vector3" - } + }, + "documentation": "Returns the angular velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]." }, { "name": "get_slide_collision_count", @@ -60805,7 +65272,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]." }, { "name": "get_slide_collision", @@ -60823,7 +65291,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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)." }, { "name": "get_last_slide_collision", @@ -60834,7 +65303,8 @@ "hash": 186875014, "return_value": { "type": "KinematicCollision3D" - } + }, + "documentation": "Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]." } ], "properties": [ @@ -60842,107 +65312,125 @@ "type": "int", "name": "motion_mode", "setter": "set_motion_mode", - "getter": "get_motion_mode" + "getter": "get_motion_mode", + "documentation": "Sets the motion mode which defines the behavior of [method move_and_slide]. See [enum MotionMode] constants for available modes." }, { "type": "Vector3", "name": "up_direction", "setter": "set_up_direction", - "getter": "get_up_direction" + "getter": "get_up_direction", + "documentation": "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]." }, { "type": "bool", "name": "slide_on_ceiling", "setter": "set_slide_on_ceiling_enabled", - "getter": "is_slide_on_ceiling_enabled" + "getter": "is_slide_on_ceiling_enabled", + "documentation": "If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically." }, { "type": "Vector3", "name": "velocity", "setter": "set_velocity", - "getter": "get_velocity" + "getter": "get_velocity", + "documentation": "Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]." }, { "type": "int", "name": "max_slides", "setter": "set_max_slides", - "getter": "get_max_slides" + "getter": "get_max_slides", + "documentation": "Maximum number of times the body can change direction before it stops when calling [method move_and_slide]." }, { "type": "float", "name": "wall_min_slide_angle", "setter": "set_wall_min_slide_angle", - "getter": "get_wall_min_slide_angle" + "getter": "get_wall_min_slide_angle", + "documentation": "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 [code]true[/code]." }, { "type": "bool", "name": "floor_stop_on_slope", "setter": "set_floor_stop_on_slope_enabled", - "getter": "is_floor_stop_on_slope_enabled" + "getter": "is_floor_stop_on_slope_enabled", + "documentation": "If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.\nIf [code]false[/code], the body will slide on floor's slopes when [member velocity] applies a downward force." }, { "type": "bool", "name": "floor_constant_speed", "setter": "set_floor_constant_speed_enabled", - "getter": "is_floor_constant_speed_enabled" + "getter": "is_floor_constant_speed_enabled", + "documentation": "If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes.\nIf [code]true[/code], 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." }, { "type": "bool", "name": "floor_block_on_wall", "setter": "set_floor_block_on_wall_enabled", - "getter": "is_floor_block_on_wall_enabled" + "getter": "is_floor_block_on_wall_enabled", + "documentation": "If [code]true[/code], 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." }, { "type": "float", "name": "floor_max_angle", "setter": "set_floor_max_angle", - "getter": "get_floor_max_angle" + "getter": "get_floor_max_angle", + "documentation": "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." }, { "type": "float", "name": "floor_snap_length", "setter": "set_floor_snap_length", - "getter": "get_floor_snap_length" + "getter": "get_floor_snap_length", + "documentation": "Sets a snapping distance. When set to a value different from [code]0.0[/code], 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].\nAs 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]." }, { "type": "int", "name": "platform_on_leave", "setter": "set_platform_on_leave", - "getter": "get_platform_on_leave" + "getter": "get_platform_on_leave", + "documentation": "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." }, { "type": "int", "name": "platform_floor_layers", "setter": "set_platform_floor_layers", - "getter": "get_platform_floor_layers" + "getter": "get_platform_floor_layers", + "documentation": "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." }, { "type": "int", "name": "platform_wall_layers", "setter": "set_platform_wall_layers", - "getter": "get_platform_wall_layers" + "getter": "get_platform_wall_layers", + "documentation": "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." }, { "type": "float", "name": "safe_margin", "setter": "set_safe_margin", - "getter": "get_safe_margin" + "getter": "get_safe_margin", + "documentation": "Extra margin used for collision recovery when calling [method move_and_slide].\nIf 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.\nA higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors.\nA 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." } - ] + ], + "documentation": "[CharacterBody3D] is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection ([method move_and_slide] method) in addition to the general collision detection provided by [method PhysicsBody3D.move_and_collide]. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters.\nFor game objects that don't require complex movement or collision detection, such as moving platforms, [AnimatableBody3D] is simpler to configure." }, { "name": "CheckBox", "is_refcounted": false, "is_instantiable": true, "inherits": "Button", - "api_type": "core" + "api_type": "core", + "documentation": "[CheckBox] allows the user to choose one of only two possible options. It's similar to [CheckButton] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use [CheckBox] when toggling it has [b]no[/b] immediate effect on something. For example, it could be used when toggling it will only do something once a confirmation button is pressed.\nSee also [BaseButton] which contains common properties and methods associated with this node.\nWhen [member BaseButton.button_group] specifies a [ButtonGroup], [CheckBox] changes its appearance to that of a radio button and uses the various [code]radio_*[/code] theme properties." }, { "name": "CheckButton", "is_refcounted": false, "is_instantiable": true, "inherits": "Button", - "api_type": "core" + "api_type": "core", + "documentation": "[CheckButton] is a toggle button displayed as a check field. It's similar to [CheckBox] in functionality, but it has a different appearance. To follow established UX patterns, it's recommended to use [CheckButton] when toggling it has an [b]immediate[/b] effect on something. For example, it can be used when pressing it shows or hides advanced settings, without asking the user to confirm this action.\nSee also [BaseButton] which contains common properties and methods associated with this node." }, { "name": "CircleShape2D", @@ -60984,9 +65472,11 @@ "type": "float", "name": "radius", "setter": "set_radius", - "getter": "get_radius" + "getter": "get_radius", + "documentation": "The circle's radius." } - ] + ], + "documentation": "A 2D circle shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape2D].\n[b]Performance:[/b] [CircleShape2D] is fast to check collisions against. It is faster than [RectangleShape2D] and [CapsuleShape2D]." }, { "name": "ClassDB", @@ -61004,7 +65494,8 @@ "hash": 1139954409, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns the names of all the classes available." }, { "name": "get_inheriters_from_class", @@ -61021,7 +65512,8 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Returns the names of all the classes that directly or indirectly inherit from [param class]." }, { "name": "get_parent_class", @@ -61038,7 +65530,8 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Returns the parent class of [param class]." }, { "name": "class_exists", @@ -61055,7 +65548,8 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Returns whether the specified [param class] is available or not." }, { "name": "is_parent_class", @@ -61076,7 +65570,8 @@ "name": "inherits", "type": "StringName" } - ] + ], + "documentation": "Returns whether [param inherits] is an ancestor of [param class] or not." }, { "name": "can_instantiate", @@ -61093,7 +65588,8 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Returns [code]true[/code] if objects can be instantiated from the specified [param class], otherwise returns [code]false[/code]." }, { "name": "instantiate", @@ -61110,7 +65606,8 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Creates an instance of [param class]." }, { "name": "class_has_signal", @@ -61131,7 +65628,8 @@ "name": "signal", "type": "StringName" } - ] + ], + "documentation": "Returns whether [param class] or its ancestry has a signal called [param signal] or not." }, { "name": "class_get_signal", @@ -61152,7 +65650,8 @@ "name": "signal", "type": "StringName" } - ] + ], + "documentation": "Returns the [param signal] data of [param class] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]." }, { "name": "class_get_signal_list", @@ -61174,7 +65673,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with all the signals of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]." }, { "name": "class_get_property_list", @@ -61196,7 +65696,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with all the properties of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]." }, { "name": "class_get_property", @@ -61217,7 +65718,8 @@ "name": "property", "type": "StringName" } - ] + ], + "documentation": "Returns the value of [param property] of [param object] or its ancestry." }, { "name": "class_set_property", @@ -61242,7 +65744,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "Sets [param property] value of [param object] to [param value]." }, { "name": "class_has_method", @@ -61268,7 +65771,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns whether [param class] (or its ancestry if [param no_inheritance] is [code]false[/code]) has a method called [param method] or not." }, { "name": "class_get_method_list", @@ -61290,7 +65794,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with all the methods of [param class] or its ancestry if [param no_inheritance] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code].\n[b]Note:[/b] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names." }, { "name": "class_get_integer_constant_list", @@ -61312,7 +65817,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with the names all the integer constants of [param class] or its ancestry." }, { "name": "class_has_integer_constant", @@ -61333,7 +65839,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "Returns whether [param class] or its ancestry has an integer constant called [param name] or not." }, { "name": "class_get_integer_constant", @@ -61355,7 +65862,8 @@ "name": "name", "type": "StringName" } - ] + ], + "documentation": "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." }, { "name": "class_has_enum", @@ -61381,7 +65889,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns whether [param class] or its ancestry has an enum called [param name] or not." }, { "name": "class_get_enum_list", @@ -61403,7 +65912,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with all the enums of [param class] or its ancestry." }, { "name": "class_get_enum_constants", @@ -61429,7 +65939,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns an array with all the keys in [param enum] of [param class] or its ancestry." }, { "name": "class_get_integer_constant_enum", @@ -61455,7 +65966,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Returns which enum the integer constant [param name] of [param class] or its ancestry belongs to." }, { "name": "is_class_enabled", @@ -61472,9 +65984,11 @@ "name": "class", "type": "StringName" } - ] + ], + "documentation": "Returns whether this [param class] is enabled or not." } - ] + ], + "documentation": "Provides access to metadata stored for every available class." }, { "name": "CodeEdit", @@ -61489,43 +66003,53 @@ "values": [ { "name": "KIND_CLASS", - "value": 0 + "value": 0, + "documentation": "Marks the option as a class." }, { "name": "KIND_FUNCTION", - "value": 1 + "value": 1, + "documentation": "Marks the option as a function." }, { "name": "KIND_SIGNAL", - "value": 2 + "value": 2, + "documentation": "Marks the option as a Godot signal." }, { "name": "KIND_VARIABLE", - "value": 3 + "value": 3, + "documentation": "Marks the option as a variable." }, { "name": "KIND_MEMBER", - "value": 4 + "value": 4, + "documentation": "Marks the option as a member." }, { "name": "KIND_ENUM", - "value": 5 + "value": 5, + "documentation": "Marks the option as an enum entry." }, { "name": "KIND_CONSTANT", - "value": 6 + "value": 6, + "documentation": "Marks the option as a constant." }, { "name": "KIND_NODE_PATH", - "value": 7 + "value": 7, + "documentation": "Marks the option as a Godot node path." }, { "name": "KIND_FILE_PATH", - "value": 8 + "value": 8, + "documentation": "Marks the option as a file path." }, { "name": "KIND_PLAIN_TEXT", - "value": 9 + "value": 9, + "documentation": "Marks the option as unclassified or plain text." } ] }, @@ -61535,19 +66059,23 @@ "values": [ { "name": "LOCATION_LOCAL", - "value": 0 + "value": 0, + "documentation": "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)." }, { "name": "LOCATION_PARENT_MASK", - "value": 256 + "value": 256, + "documentation": "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." }, { "name": "LOCATION_OTHER_USER_CODE", - "value": 512 + "value": 512, + "documentation": "The option is from user code which is not local and not in a derived class (e.g. Autoload Singletons)." }, { "name": "LOCATION_OTHER", - "value": 1024 + "value": 1024, + "documentation": "The option is from other engine code, not covered by the other enum constants - e.g. built-in classes." } ] } @@ -61564,7 +66092,8 @@ "name": "replace", "type": "bool" } - ] + ], + "documentation": "Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced." }, { "name": "_request_code_completion", @@ -61577,7 +66106,8 @@ "name": "force", "type": "bool" } - ] + ], + "documentation": "Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed." }, { "name": "_filter_code_completion_candidates", @@ -61593,7 +66123,8 @@ "name": "candidates", "type": "typedarray::Dictionary" } - ] + ], + "documentation": "Override this method to define what items in [param candidates] should be displayed.\nBoth [param candidates] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content." }, { "name": "set_indent_size", @@ -61703,7 +66234,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Perform an indent as if the user activated the \"ui_text_indent\" action." }, { "name": "indent_lines", @@ -61711,7 +66243,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Indents selected lines, or in the case of no selection the caret line by one." }, { "name": "unindent_lines", @@ -61719,7 +66252,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Unindents selected lines, or in the case of no selection the caret line by one. Same as performing \"ui_text_unindent\" action." }, { "name": "convert_indent", @@ -61741,7 +66275,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "Converts the indents of lines between [param from_line] and [param to_line] to tabs or spaces as set by [member indent_use_spaces].\nValues of [code]-1[/code] convert the entire text." }, { "name": "set_auto_brace_completion_enabled", @@ -61809,7 +66344,8 @@ "name": "end_key", "type": "String" } - ] + ], + "documentation": "Adds a brace pair.\nBoth the start and end keys must be symbols. Only the start key has to be unique." }, { "name": "set_auto_brace_completion_pairs", @@ -61851,7 +66387,8 @@ "name": "open_key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if open key [param open_key] exists." }, { "name": "has_auto_brace_completion_close_key", @@ -61868,7 +66405,8 @@ "name": "close_key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if close key [param close_key] exists." }, { "name": "get_auto_brace_completion_close_key", @@ -61885,7 +66423,8 @@ "name": "open_key", "type": "String" } - ] + ], + "documentation": "Gets the matching auto brace close key for [param open_key]." }, { "name": "set_draw_breakpoints_gutter", @@ -61979,7 +66518,8 @@ "name": "breakpointed", "type": "bool" } - ] + ], + "documentation": "Sets the line as breakpointed." }, { "name": "is_line_breakpointed", @@ -61997,7 +66537,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is breakpointed or not." }, { "name": "clear_breakpointed_lines", @@ -62005,7 +66546,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all breakpointed lines." }, { "name": "get_breakpointed_lines", @@ -62016,7 +66558,8 @@ "hash": 1930428628, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "Gets all breakpointed lines." }, { "name": "set_line_as_bookmarked", @@ -62035,7 +66578,8 @@ "name": "bookmarked", "type": "bool" } - ] + ], + "documentation": "Sets the line as bookmarked." }, { "name": "is_line_bookmarked", @@ -62053,7 +66597,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is bookmarked or not." }, { "name": "clear_bookmarked_lines", @@ -62061,7 +66606,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all bookmarked lines." }, { "name": "get_bookmarked_lines", @@ -62072,7 +66618,8 @@ "hash": 1930428628, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "Gets all bookmarked lines." }, { "name": "set_line_as_executing", @@ -62091,7 +66638,8 @@ "name": "executing", "type": "bool" } - ] + ], + "documentation": "Sets the line as executing." }, { "name": "is_line_executing", @@ -62109,7 +66657,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is marked as executing or not." }, { "name": "clear_executing_lines", @@ -62117,7 +66666,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Clears all executed lines." }, { "name": "get_executing_lines", @@ -62128,7 +66678,8 @@ "hash": 1930428628, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "Gets all executing lines." }, { "name": "set_draw_line_numbers", @@ -62246,7 +66797,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block." }, { "name": "fold_line", @@ -62261,7 +66813,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Folds the given line, if possible (see [method can_fold_line])." }, { "name": "unfold_line", @@ -62276,7 +66829,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Unfolds all lines that were previously folded." }, { "name": "fold_all_lines", @@ -62284,7 +66838,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Folds all lines that are possible to be folded (see [method can_fold_line])." }, { "name": "unfold_all_lines", @@ -62292,7 +66847,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Unfolds all lines, folded or not." }, { "name": "toggle_foldable_line", @@ -62307,7 +66863,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Toggle the folding of the code block at the given line." }, { "name": "is_line_folded", @@ -62325,7 +66882,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is folded or not." }, { "name": "get_folded_lines", @@ -62336,7 +66894,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::int" - } + }, + "documentation": "Returns all lines that are current folded." }, { "name": "create_code_region", @@ -62344,7 +66903,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see [method add_comment_delimiter]).\nA code region is a part of code that is highlighted when folded and can help organize your script.\nCode region start and end tags can be customized (see [method set_code_region_tags]).\nCode regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code])" }, { "name": "get_code_region_start_tag", @@ -62355,7 +66915,8 @@ "hash": 201670096, "return_value": { "type": "String" - } + }, + "documentation": "Returns the code region start tag (without comment delimiter)." }, { "name": "get_code_region_end_tag", @@ -62366,7 +66927,8 @@ "hash": 201670096, "return_value": { "type": "String" - } + }, + "documentation": "Returns the code region end tag (without comment delimiter)." }, { "name": "set_code_region_tags", @@ -62386,7 +66948,8 @@ "type": "String", "default_value": "\"endregion\"" } - ] + ], + "documentation": "Sets the code region start and end tags (without comment delimiter)." }, { "name": "is_line_code_region_start", @@ -62404,7 +66967,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is a code region start." }, { "name": "is_line_code_region_end", @@ -62422,7 +66986,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether the line at the specified index is a code region end." }, { "name": "add_string_delimiter", @@ -62445,7 +67010,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Adds a string delimiter.\nBoth the start and end keys must be symbols. Only the start key has to be unique.\n[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]." }, { "name": "remove_string_delimiter", @@ -62459,7 +67025,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Removes the string delimiter with [param start_key]." }, { "name": "has_string_delimiter", @@ -62476,7 +67043,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if string [param start_key] exists." }, { "name": "set_string_delimiters", @@ -62498,7 +67066,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all string delimiters." }, { "name": "get_string_delimiters", @@ -62537,7 +67106,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "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 [code]-1[/code]." }, { "name": "add_comment_delimiter", @@ -62560,7 +67130,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Adds a comment delimiter.\nBoth the start and end keys must be symbols. Only the start key has to be unique.\n[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]." }, { "name": "remove_comment_delimiter", @@ -62574,7 +67145,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Removes the comment delimiter with [param start_key]." }, { "name": "has_comment_delimiter", @@ -62591,7 +67163,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if comment [param start_key] exists." }, { "name": "set_comment_delimiters", @@ -62613,7 +67186,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all comment delimiters." }, { "name": "get_comment_delimiters", @@ -62652,7 +67226,8 @@ "meta": "int32", "default_value": "-1" } - ] + ], + "documentation": "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 [code]-1[/code]." }, { "name": "get_delimiter_start_key", @@ -62670,7 +67245,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the start key for a string or comment region index." }, { "name": "get_delimiter_end_key", @@ -62688,7 +67264,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the end key for a string or comment region index." }, { "name": "get_delimiter_start_position", @@ -62711,7 +67288,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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 [code]-1[/code]." }, { "name": "get_delimiter_end_position", @@ -62734,7 +67312,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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 [code]-1[/code]." }, { "name": "set_code_hint", @@ -62748,7 +67327,8 @@ "name": "code_hint", "type": "String" } - ] + ], + "documentation": "Sets the code hint text. Pass an empty string to clear." }, { "name": "set_code_hint_draw_below", @@ -62762,7 +67342,8 @@ "name": "draw_below", "type": "bool" } - ] + ], + "documentation": "Sets if the code hint should draw below the text." }, { "name": "get_text_for_code_completion", @@ -62773,7 +67354,8 @@ "hash": 201670096, "return_value": { "type": "String" - } + }, + "documentation": "Returns the full text with char [code]0xFFFF[/code] at the caret location." }, { "name": "request_code_completion", @@ -62788,7 +67370,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "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." }, { "name": "add_code_completion_option", @@ -62834,7 +67417,8 @@ "meta": "int32", "default_value": "1024" } - ] + ], + "documentation": "Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list.\n[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.\n[b]Note:[/b] This list will replace all current candidates." }, { "name": "update_code_completion_options", @@ -62848,7 +67432,8 @@ "name": "force", "type": "bool" } - ] + ], + "documentation": "Submits all completion options added with [method add_code_completion_option]. Will try to force the autocomplete menu to popup, if [param force] is [code]true[/code].\n[b]Note:[/b] This will replace all current candidates." }, { "name": "get_code_completion_options", @@ -62859,7 +67444,8 @@ "hash": 3995934104, "return_value": { "type": "typedarray::Dictionary" - } + }, + "documentation": "Gets all completion options, see [method get_code_completion_option] for return content." }, { "name": "get_code_completion_option", @@ -62877,7 +67463,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Gets the completion option at [param index]. The return [Dictionary] has the following key-values:\n[code]kind[/code]: [enum CodeCompletionKind]\n[code]display_text[/code]: Text that is shown on the autocomplete menu.\n[code]insert_text[/code]: Text that is to be inserted when this item is selected.\n[code]font_color[/code]: Color of the text on the autocomplete menu.\n[code]icon[/code]: Icon to draw on the autocomplete menu.\n[code]default_value[/code]: Value of the symbol." }, { "name": "get_code_completion_selected_index", @@ -62889,7 +67476,8 @@ "return_value": { "type": "int", "meta": "int32" - } + }, + "documentation": "Gets the index of the current selected completion option." }, { "name": "set_code_completion_selected_index", @@ -62904,7 +67492,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Sets the current selected completion option." }, { "name": "confirm_code_completion", @@ -62919,7 +67508,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather than merged." }, { "name": "cancel_code_completion", @@ -62927,7 +67517,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Cancels the autocomplete menu." }, { "name": "set_code_completion_enabled", @@ -63041,7 +67632,8 @@ ], "return_value": { "type": "String" - } + }, + "documentation": "Returns the full text with char [code]0xFFFF[/code] at the cursor location." }, { "name": "get_text_with_cursor_char", @@ -63064,7 +67656,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the full text with char [code]0xFFFF[/code] at the specified location." }, { "name": "set_symbol_lookup_word_as_valid", @@ -63078,7 +67671,8 @@ "name": "valid", "type": "bool" } - ] + ], + "documentation": "Sets the symbol emitted by [signal symbol_validate] as a valid lookup." }, { "name": "duplicate_lines", @@ -63086,7 +67680,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "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." } ], "signals": [ @@ -63097,10 +67692,12 @@ "name": "line", "type": "int" } - ] + ], + "documentation": "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." }, { - "name": "code_completion_requested" + "name": "code_completion_requested", + "documentation": "Emitted when the user requests code completion." }, { "name": "symbol_lookup", @@ -63117,7 +67714,8 @@ "name": "column", "type": "int" } - ] + ], + "documentation": "Emitted when the user has clicked on a valid symbol." }, { "name": "symbol_validate", @@ -63126,7 +67724,8 @@ "name": "symbol", "type": "String" } - ] + ], + "documentation": "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]." } ], "properties": [ @@ -63134,123 +67733,144 @@ "type": "bool", "name": "symbol_lookup_on_click", "setter": "set_symbol_lookup_on_click_enabled", - "getter": "is_symbol_lookup_on_click_enabled" + "getter": "is_symbol_lookup_on_click_enabled", + "documentation": "Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted." }, { "type": "bool", "name": "line_folding", "setter": "set_line_folding_enabled", - "getter": "is_line_folding_enabled" + "getter": "is_line_folding_enabled", + "documentation": "Sets whether line folding is allowed." }, { "type": "PackedInt32Array", "name": "line_length_guidelines", "setter": "set_line_length_guidelines", - "getter": "get_line_length_guidelines" + "getter": "get_line_length_guidelines", + "documentation": "Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently." }, { "type": "bool", "name": "gutters_draw_breakpoints_gutter", "setter": "set_draw_breakpoints_gutter", - "getter": "is_drawing_breakpoints_gutter" + "getter": "is_drawing_breakpoints_gutter", + "documentation": "Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines." }, { "type": "bool", "name": "gutters_draw_bookmarks", "setter": "set_draw_bookmarks_gutter", - "getter": "is_drawing_bookmarks_gutter" + "getter": "is_drawing_bookmarks_gutter", + "documentation": "Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines." }, { "type": "bool", "name": "gutters_draw_executing_lines", "setter": "set_draw_executing_lines_gutter", - "getter": "is_drawing_executing_lines_gutter" + "getter": "is_drawing_executing_lines_gutter", + "documentation": "Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines." }, { "type": "bool", "name": "gutters_draw_line_numbers", "setter": "set_draw_line_numbers", - "getter": "is_draw_line_numbers_enabled" + "getter": "is_draw_line_numbers_enabled", + "documentation": "Sets if line numbers should be drawn in the gutter." }, { "type": "bool", "name": "gutters_zero_pad_line_numbers", "setter": "set_line_numbers_zero_padded", - "getter": "is_line_numbers_zero_padded" + "getter": "is_line_numbers_zero_padded", + "documentation": "Sets if line numbers drawn in the gutter are zero padded." }, { "type": "bool", "name": "gutters_draw_fold_gutter", "setter": "set_draw_fold_gutter", - "getter": "is_drawing_fold_gutter" + "getter": "is_drawing_fold_gutter", + "documentation": "Sets if foldable lines icons should be drawn in the gutter." }, { "type": "PackedStringArray", "name": "delimiter_strings", "setter": "set_string_delimiters", - "getter": "get_string_delimiters" + "getter": "get_string_delimiters", + "documentation": "Sets the string delimiters. All existing string delimiters will be removed." }, { "type": "PackedStringArray", "name": "delimiter_comments", "setter": "set_comment_delimiters", - "getter": "get_comment_delimiters" + "getter": "get_comment_delimiters", + "documentation": "Sets the comment delimiters. All existing comment delimiters will be removed." }, { "type": "bool", "name": "code_completion_enabled", "setter": "set_code_completion_enabled", - "getter": "is_code_completion_enabled" + "getter": "is_code_completion_enabled", + "documentation": "Sets whether code completion is allowed." }, { "type": "PackedStringArray", "name": "code_completion_prefixes", "setter": "set_code_completion_prefixes", - "getter": "get_code_completion_prefixes" + "getter": "get_code_completion_prefixes", + "documentation": "Sets prefixes that will trigger code completion." }, { "type": "int", "name": "indent_size", "setter": "set_indent_size", - "getter": "get_indent_size" + "getter": "get_indent_size", + "documentation": "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." }, { "type": "bool", "name": "indent_use_spaces", "setter": "set_indent_using_spaces", - "getter": "is_indent_using_spaces" + "getter": "is_indent_using_spaces", + "documentation": "Use spaces instead of tabs for indentation." }, { "type": "bool", "name": "indent_automatic", "setter": "set_auto_indent_enabled", - "getter": "is_auto_indent_enabled" + "getter": "is_auto_indent_enabled", + "documentation": "Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found." }, { "type": "PackedStringArray", "name": "indent_automatic_prefixes", "setter": "set_auto_indent_prefixes", - "getter": "get_auto_indent_prefixes" + "getter": "get_auto_indent_prefixes", + "documentation": "Prefixes to trigger an automatic indent." }, { "type": "bool", "name": "auto_brace_completion_enabled", "setter": "set_auto_brace_completion_enabled", - "getter": "is_auto_brace_completion_enabled" + "getter": "is_auto_brace_completion_enabled", + "documentation": "Sets whether brace pairs should be autocompleted." }, { "type": "bool", "name": "auto_brace_completion_highlight_matching", "setter": "set_highlight_matching_braces_enabled", - "getter": "is_highlight_matching_braces_enabled" + "getter": "is_highlight_matching_braces_enabled", + "documentation": "Highlight mismatching brace pairs." }, { "type": "Dictionary", "name": "auto_brace_completion_pairs", "setter": "set_auto_brace_completion_pairs", - "getter": "get_auto_brace_completion_pairs" + "getter": "get_auto_brace_completion_pairs", + "documentation": "Sets the brace pairs to be autocompleted." } - ] + ], + "documentation": "CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It has many features commonly found in code editors such as line numbers, line folding, code completion, indent management, and string/comment management.\n[b]Note:[/b] Regardless of locale, [CodeEdit] will by default always use left-to-right text direction to correctly display source code." }, { "name": "CodeHighlighter", @@ -63275,7 +67895,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Sets the color for a keyword.\nThe keyword cannot contain any symbols except '_'." }, { "name": "remove_keyword_color", @@ -63289,7 +67910,8 @@ "name": "keyword", "type": "String" } - ] + ], + "documentation": "Removes the keyword." }, { "name": "has_keyword_color", @@ -63306,7 +67928,8 @@ "name": "keyword", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the keyword exists, else [code]false[/code]." }, { "name": "get_keyword_color", @@ -63323,7 +67946,8 @@ "name": "keyword", "type": "String" } - ] + ], + "documentation": "Returns the color for a keyword." }, { "name": "set_keyword_colors", @@ -63345,7 +67969,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all keywords." }, { "name": "get_keyword_colors", @@ -63374,7 +67999,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Sets the color for a member keyword.\nThe member keyword cannot contain any symbols except '_'.\nIt will not be highlighted if preceded by a '.'." }, { "name": "remove_member_keyword_color", @@ -63388,7 +68014,8 @@ "name": "member_keyword", "type": "String" } - ] + ], + "documentation": "Removes the member keyword." }, { "name": "has_member_keyword_color", @@ -63405,7 +68032,8 @@ "name": "member_keyword", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the member keyword exists, else [code]false[/code]." }, { "name": "get_member_keyword_color", @@ -63422,7 +68050,8 @@ "name": "member_keyword", "type": "String" } - ] + ], + "documentation": "Returns the color for a member keyword." }, { "name": "set_member_keyword_colors", @@ -63444,7 +68073,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all member keywords." }, { "name": "get_member_keyword_colors", @@ -63482,7 +68112,8 @@ "type": "bool", "default_value": "false" } - ] + ], + "documentation": "Adds a color region such as comments or strings.\nBoth the start and end keys must be symbols. Only the start key has to be unique.\n[param line_only] denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]." }, { "name": "remove_color_region", @@ -63496,7 +68127,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Removes the color region that uses that start key." }, { "name": "has_color_region", @@ -63513,7 +68145,8 @@ "name": "start_key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the start key exists, else [code]false[/code]." }, { "name": "set_color_regions", @@ -63535,7 +68168,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes all color regions." }, { "name": "get_color_regions", @@ -63654,45 +68288,53 @@ "type": "Color", "name": "number_color", "setter": "set_number_color", - "getter": "get_number_color" + "getter": "get_number_color", + "documentation": "Sets the color for numbers." }, { "type": "Color", "name": "symbol_color", "setter": "set_symbol_color", - "getter": "get_symbol_color" + "getter": "get_symbol_color", + "documentation": "Sets the color for symbols." }, { "type": "Color", "name": "function_color", "setter": "set_function_color", - "getter": "get_function_color" + "getter": "get_function_color", + "documentation": "Sets color for functions. A function is a non-keyword string followed by a '('." }, { "type": "Color", "name": "member_variable_color", "setter": "set_member_variable_color", - "getter": "get_member_variable_color" + "getter": "get_member_variable_color", + "documentation": "Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'." }, { "type": "Dictionary", "name": "keyword_colors", "setter": "set_keyword_colors", - "getter": "get_keyword_colors" + "getter": "get_keyword_colors", + "documentation": "Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color." }, { "type": "Dictionary", "name": "member_keyword_colors", "setter": "set_member_keyword_colors", - "getter": "get_member_keyword_colors" + "getter": "get_member_keyword_colors", + "documentation": "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." }, { "type": "Dictionary", "name": "color_regions", "setter": "set_color_regions", - "getter": "get_color_regions" + "getter": "get_color_regions", + "documentation": "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." } - ] + ], + "documentation": "By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a [TextEdit] control." }, { "name": "CollisionObject2D", @@ -63707,15 +68349,18 @@ "values": [ { "name": "DISABLE_MODE_REMOVE", - "value": 0 + "value": 0, + "documentation": "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].\nAutomatically re-added to the physics simulation when the [Node] is processed again." }, { "name": "DISABLE_MODE_MAKE_STATIC", - "value": 1 + "value": 1, + "documentation": "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.\nAutomatically set [PhysicsBody2D] back to its original mode when the [Node] is processed again." }, { "name": "DISABLE_MODE_KEEP_ACTIVE", - "value": 2 + "value": 2, + "documentation": "When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation." } ] } @@ -63741,21 +68386,24 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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.\n[b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set." }, { "name": "_mouse_enter", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "Called when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] 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." }, { "name": "_mouse_exit", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "Called when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] 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." }, { "name": "_mouse_shape_enter", @@ -63769,7 +68417,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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 [code]true[/code] and at least one [member collision_layer] bit to be called." }, { "name": "_mouse_shape_exit", @@ -63783,7 +68432,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "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 [code]true[/code] and at least one [member collision_layer] bit to be called." }, { "name": "get_rid", @@ -63794,7 +68444,8 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the object's [RID]." }, { "name": "set_collision_layer", @@ -63867,7 +68518,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_layer_value", @@ -63885,7 +68537,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_mask_value", @@ -63904,7 +68557,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_mask_value", @@ -63922,7 +68576,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_priority", @@ -64017,7 +68672,8 @@ "name": "owner", "type": "Object" } - ] + ], + "documentation": "Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference." }, { "name": "remove_shape_owner", @@ -64032,7 +68688,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Removes the given shape owner." }, { "name": "get_shape_owners", @@ -64043,7 +68700,8 @@ "hash": 969006518, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument." }, { "name": "shape_owner_set_transform", @@ -64062,7 +68720,8 @@ "name": "transform", "type": "Transform2D" } - ] + ], + "documentation": "Sets the [Transform2D] of the given shape owner." }, { "name": "shape_owner_get_transform", @@ -64080,7 +68739,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the shape owner's [Transform2D]." }, { "name": "shape_owner_get_owner", @@ -64098,7 +68758,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the parent object of the given shape owner." }, { "name": "shape_owner_set_disabled", @@ -64117,7 +68778,8 @@ "name": "disabled", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], disables the given shape owner." }, { "name": "is_shape_owner_disabled", @@ -64135,7 +68797,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "If [code]true[/code], the shape owner and its shapes are disabled." }, { "name": "shape_owner_set_one_way_collision", @@ -64154,7 +68817,8 @@ "name": "enable", "type": "bool" } - ] + ], + "documentation": "If [param enable] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s." }, { "name": "is_shape_owner_one_way_collision_enabled", @@ -64172,7 +68836,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns [code]true[/code] if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s." }, { "name": "shape_owner_set_one_way_collision_margin", @@ -64192,7 +68857,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id] to [param margin] pixels." }, { "name": "get_shape_owner_one_way_collision_margin", @@ -64211,7 +68877,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [param owner_id]." }, { "name": "shape_owner_add_shape", @@ -64230,7 +68897,8 @@ "name": "shape", "type": "Shape2D" } - ] + ], + "documentation": "Adds a [Shape2D] to the shape owner." }, { "name": "shape_owner_get_shape_count", @@ -64249,7 +68917,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the number of shapes the given shape owner contains." }, { "name": "shape_owner_get_shape", @@ -64272,7 +68941,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [Shape2D] with the given ID from the given shape owner." }, { "name": "shape_owner_get_shape_index", @@ -64296,7 +68966,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the child index of the [Shape2D] with the given ID from the given shape owner." }, { "name": "shape_owner_remove_shape", @@ -64316,7 +68987,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes a shape from the given shape owner." }, { "name": "shape_owner_clear_shapes", @@ -64331,7 +69003,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Removes all shapes from the shape owner." }, { "name": "shape_find_owner", @@ -64350,7 +69023,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [code]owner_id[/code] of the given shape." } ], "signals": [ @@ -64369,13 +69043,16 @@ "name": "shape_idx", "type": "int" } - ] + ], + "documentation": "Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. See [method _input_event] for details." }, { - "name": "mouse_entered" + "name": "mouse_entered", + "documentation": "Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] 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.\n[b]Note:[/b] 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." }, { - "name": "mouse_exited" + "name": "mouse_exited", + "documentation": "Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] 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.\n[b]Note:[/b] 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." }, { "name": "mouse_shape_entered", @@ -64384,7 +69061,8 @@ "name": "shape_idx", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code] and at least one [member collision_layer] bit to be set." }, { "name": "mouse_shape_exited", @@ -64393,7 +69071,8 @@ "name": "shape_idx", "type": "int" } - ] + ], + "documentation": "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 [code]true[/code] and at least one [member collision_layer] bit to be set." } ], "properties": [ @@ -64401,33 +69080,39 @@ "type": "int", "name": "disable_mode", "setter": "set_disable_mode", - "getter": "get_disable_mode" + "getter": "get_disable_mode", + "documentation": "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." }, { "type": "int", "name": "collision_layer", "setter": "set_collision_layer", - "getter": "get_collision_layer" + "getter": "get_collision_layer", + "documentation": "The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].\n[b]Note:[/b] 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=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "int", "name": "collision_mask", "setter": "set_collision_mask", - "getter": "get_collision_mask" + "getter": "get_collision_mask", + "documentation": "The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].\n[b]Note:[/b] 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=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "float", "name": "collision_priority", "setter": "set_collision_priority", - "getter": "get_collision_priority" + "getter": "get_collision_priority", + "documentation": "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." }, { "type": "bool", "name": "input_pickable", "setter": "set_pickable", - "getter": "is_pickable" + "getter": "is_pickable", + "documentation": "If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set." } - ] + ], + "documentation": "Abstract base class for 2D physics objects. [CollisionObject2D] can hold any number of [Shape2D]s for collision. Each shape must be assigned to a [i]shape owner[/i]. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.\n[b]Note:[/b] Only collisions between objects within the same canvas ([Viewport] canvas or [CanvasLayer]) are supported. The behavior of collisions between objects in different canvases is undefined." }, { "name": "CollisionObject3D", @@ -64442,15 +69127,18 @@ "values": [ { "name": "DISABLE_MODE_REMOVE", - "value": 0 + "value": 0, + "documentation": "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].\nAutomatically re-added to the physics simulation when the [Node] is processed again." }, { "name": "DISABLE_MODE_MAKE_STATIC", - "value": 1 + "value": 1, + "documentation": "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.\nAutomatically set [PhysicsBody3D] back to its original mode when the [Node] is processed again." }, { "name": "DISABLE_MODE_KEEP_ACTIVE", - "value": 2 + "value": 2, + "documentation": "When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation." } ] } @@ -64484,21 +69172,24 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Receives unhandled [InputEvent]s. [param 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.\n[b]Note:[/b] [method _input_event] requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set." }, { "name": "_mouse_enter", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "Called when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] 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." }, { "name": "_mouse_exit", "is_const": false, "is_static": false, "is_vararg": false, - "is_virtual": true + "is_virtual": true, + "documentation": "Called when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] 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." }, { "name": "set_collision_layer", @@ -64571,7 +69262,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_layer], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_layer_value", @@ -64589,7 +69281,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_mask_value", @@ -64608,7 +69301,8 @@ "name": "value", "type": "bool" } - ] + ], + "documentation": "Based on [param value], enables or disables the specified layer in the [member collision_mask], given a [param layer_number] between 1 and 32." }, { "name": "get_collision_mask_value", @@ -64626,7 +69320,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [param layer_number] between 1 and 32." }, { "name": "set_collision_priority", @@ -64739,7 +69434,8 @@ "hash": 2944877500, "return_value": { "type": "RID" - } + }, + "documentation": "Returns the object's [RID]." }, { "name": "create_shape_owner", @@ -64757,7 +69453,8 @@ "name": "owner", "type": "Object" } - ] + ], + "documentation": "Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference." }, { "name": "remove_shape_owner", @@ -64772,7 +69469,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Removes the given shape owner." }, { "name": "get_shape_owners", @@ -64783,7 +69481,8 @@ "hash": 969006518, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument." }, { "name": "shape_owner_set_transform", @@ -64802,7 +69501,8 @@ "name": "transform", "type": "Transform3D" } - ] + ], + "documentation": "Sets the [Transform3D] of the given shape owner." }, { "name": "shape_owner_get_transform", @@ -64820,7 +69520,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the shape owner's [Transform3D]." }, { "name": "shape_owner_get_owner", @@ -64838,7 +69539,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the parent object of the given shape owner." }, { "name": "shape_owner_set_disabled", @@ -64857,7 +69559,8 @@ "name": "disabled", "type": "bool" } - ] + ], + "documentation": "If [code]true[/code], disables the given shape owner." }, { "name": "is_shape_owner_disabled", @@ -64875,7 +69578,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "If [code]true[/code], the shape owner and its shapes are disabled." }, { "name": "shape_owner_add_shape", @@ -64894,7 +69598,8 @@ "name": "shape", "type": "Shape3D" } - ] + ], + "documentation": "Adds a [Shape3D] to the shape owner." }, { "name": "shape_owner_get_shape_count", @@ -64913,7 +69618,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Returns the number of shapes the given shape owner contains." }, { "name": "shape_owner_get_shape", @@ -64936,7 +69642,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [Shape3D] with the given ID from the given shape owner." }, { "name": "shape_owner_get_shape_index", @@ -64960,7 +69667,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the child index of the [Shape3D] with the given ID from the given shape owner." }, { "name": "shape_owner_remove_shape", @@ -64980,7 +69688,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Removes a shape from the given shape owner." }, { "name": "shape_owner_clear_shapes", @@ -64995,7 +69704,8 @@ "type": "int", "meta": "uint32" } - ] + ], + "documentation": "Removes all shapes from the shape owner." }, { "name": "shape_find_owner", @@ -65014,7 +69724,8 @@ "type": "int", "meta": "int32" } - ] + ], + "documentation": "Returns the [code]owner_id[/code] of the given shape." } ], "signals": [ @@ -65041,13 +69752,16 @@ "name": "shape_idx", "type": "int" } - ] + ], + "documentation": "Emitted when the object receives an unhandled [InputEvent]. [param 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." }, { - "name": "mouse_entered" + "name": "mouse_entered", + "documentation": "Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.\n[b]Note:[/b] 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." }, { - "name": "mouse_exited" + "name": "mouse_exited", + "documentation": "Emitted when the mouse pointer exits all this object's shapes. Requires [member input_ray_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.\n[b]Note:[/b] 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." } ], "properties": [ @@ -65055,39 +69769,46 @@ "type": "int", "name": "disable_mode", "setter": "set_disable_mode", - "getter": "get_disable_mode" + "getter": "get_disable_mode", + "documentation": "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." }, { "type": "int", "name": "collision_layer", "setter": "set_collision_layer", - "getter": "get_collision_layer" + "getter": "get_collision_layer", + "documentation": "The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask].\n[b]Note:[/b] 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=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "int", "name": "collision_mask", "setter": "set_collision_mask", - "getter": "get_collision_mask" + "getter": "get_collision_mask", + "documentation": "The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer].\n[b]Note:[/b] 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=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information." }, { "type": "float", "name": "collision_priority", "setter": "set_collision_priority", - "getter": "get_collision_priority" + "getter": "get_collision_priority", + "documentation": "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." }, { "type": "bool", "name": "input_ray_pickable", "setter": "set_ray_pickable", - "getter": "is_ray_pickable" + "getter": "is_ray_pickable", + "documentation": "If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [member collision_layer] bit to be set." }, { "type": "bool", "name": "input_capture_on_drag", "setter": "set_capture_input_on_drag", - "getter": "get_capture_input_on_drag" + "getter": "get_capture_input_on_drag", + "documentation": "If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes." } - ] + ], + "documentation": "Abstract base class for 3D physics objects. [CollisionObject3D] can hold any number of [Shape3D]s for collision. Each shape must be assigned to a [i]shape owner[/i]. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.\n[b]Warning:[/b] With a non-uniform scale, this node will likely not behave as expected. It is advised to keep its scale the same on all axes and adjust its collision shape(s) instead." }, { "name": "CollisionPolygon2D", @@ -65102,11 +69823,13 @@ "values": [ { "name": "BUILD_SOLIDS", - "value": 0 + "value": 0, + "documentation": "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)." }, { "name": "BUILD_SEGMENTS", - "value": 1 + "value": 1, + "documentation": "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)." } ] } @@ -65245,33 +69968,39 @@ "type": "int", "name": "build_mode", "setter": "set_build_mode", - "getter": "get_build_mode" + "getter": "get_build_mode", + "documentation": "Collision build mode. Use one of the [enum BuildMode] constants." }, { "type": "PackedVector2Array", "name": "polygon", "setter": "set_polygon", - "getter": "get_polygon" + "getter": "get_polygon", + "documentation": "The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first.\n[b]Warning:[/b] The returned value is a clone of the [PackedVector2Array], not a reference." }, { "type": "bool", "name": "disabled", "setter": "set_disabled", - "getter": "is_disabled" + "getter": "is_disabled", + "documentation": "If [code]true[/code], no collisions will be detected." }, { "type": "bool", "name": "one_way_collision", "setter": "set_one_way_collision", - "getter": "is_one_way_collision_enabled" + "getter": "is_one_way_collision_enabled", + "documentation": "If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects.\n[b]Note:[/b] This property has no effect if this [CollisionPolygon2D] is a child of an [Area2D] node." }, { "type": "float", "name": "one_way_collision_margin", "setter": "set_one_way_collision_margin", - "getter": "get_one_way_collision_margin" + "getter": "get_one_way_collision_margin", + "documentation": "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." } - ] + ], + "documentation": "A node that provides a thickened polygon shape (a prism) to a [CollisionObject2D] parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an [Area2D] or turn [PhysicsBody2D] into a solid object.\n[b]Warning:[/b] A non-uniformly scaled [CollisionShape2D] will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead." }, { "name": "CollisionPolygon3D", @@ -65390,27 +70119,32 @@ "type": "float", "name": "depth", "setter": "set_depth", - "getter": "get_depth" + "getter": "get_depth", + "documentation": "Length that the resulting collision extends in either direction perpendicular to its 2D polygon." }, { "type": "bool", "name": "disabled", "setter": "set_disabled", - "getter": "is_disabled" + "getter": "is_disabled", + "documentation": "If [code]true[/code], no collision will be produced." }, { "type": "PackedVector2Array", "name": "polygon", "setter": "set_polygon", - "getter": "get_polygon" + "getter": "get_polygon", + "documentation": "Array of vertices which define the 2D polygon in the local XY plane.\n[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the class property." }, { "type": "float", "name": "margin", "setter": "set_margin", - "getter": "get_margin" + "getter": "get_margin", + "documentation": "The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details." } - ] + ], + "documentation": "A node that provides a thickened polygon shape (a prism) to a [CollisionObject3D] parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an [Area3D] or turn [PhysicsBody3D] into a solid object.\n[b]Warning:[/b] A non-uniformly scaled [CollisionShape3D] will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead." }, { "name": "CollisionShape2D", @@ -65552,33 +70286,39 @@ "type": "Shape2D", "name": "shape", "setter": "set_shape", - "getter": "get_shape" + "getter": "get_shape", + "documentation": "The actual shape owned by this collision shape." }, { "type": "bool", "name": "disabled", "setter": "set_disabled", - "getter": "is_disabled" + "getter": "is_disabled", + "documentation": "A disabled collision shape has no effect in the world. This property should be changed with [method Object.set_deferred]." }, { "type": "bool", "name": "one_way_collision", "setter": "set_one_way_collision", - "getter": "is_one_way_collision_enabled" + "getter": "is_one_way_collision_enabled", + "documentation": "Sets whether this collision shape should only detect collision on one side (top or bottom).\n[b]Note:[/b] This property has no effect if this [CollisionShape2D] is a child of an [Area2D] node." }, { "type": "float", "name": "one_way_collision_margin", "setter": "set_one_way_collision_margin", - "getter": "get_one_way_collision_margin" + "getter": "get_one_way_collision_margin", + "documentation": "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." }, { "type": "Color", "name": "debug_color", "setter": "set_debug_color", - "getter": "get_debug_color" + "getter": "get_debug_color", + "documentation": "The collision shape debug color.\n[b]Note:[/b] The default value is [member ProjectSettings.debug/shapes/collision/shape_color]. The [code]Color(0, 0, 0, 1)[/code] value documented here is a placeholder, and not the actual default debug color." } - ] + ], + "documentation": "A node that provides a [Shape2D] to a [CollisionObject2D] parent and allows to edit it. This can give a detection shape to an [Area2D] or turn a [PhysicsBody2D] into a solid object." }, { "name": "CollisionShape3D", @@ -65599,7 +70339,8 @@ "name": "resource", "type": "Resource" } - ] + ], + "documentation": "[i]Obsoleted.[/i] Use [signal Resource.changed] instead." }, { "name": "set_shape", @@ -65657,7 +70398,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry." } ], "properties": [ @@ -65665,15 +70407,18 @@ "type": "Shape3D", "name": "shape", "setter": "set_shape", - "getter": "get_shape" + "getter": "get_shape", + "documentation": "The actual shape owned by this collision shape." }, { "type": "bool", "name": "disabled", "setter": "set_disabled", - "getter": "is_disabled" + "getter": "is_disabled", + "documentation": "A disabled collision shape has no effect in the world." } - ] + ], + "documentation": "A node that provides a [Shape3D] to a [CollisionObject3D] parent and allows to edit it. This can give a detection shape to an [Area3D] or turn a [PhysicsBody3D] into a solid object.\n[b]Warning:[/b] A non-uniformly scaled [CollisionShape3D] will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its [member shape] resource instead." }, { "name": "ColorPicker", @@ -65688,19 +70433,23 @@ "values": [ { "name": "MODE_RGB", - "value": 0 + "value": 0, + "documentation": "Allows editing the color with Red/Green/Blue sliders." }, { "name": "MODE_HSV", - "value": 1 + "value": 1, + "documentation": "Allows editing the color with Hue/Saturation/Value sliders." }, { "name": "MODE_RAW", - "value": 2 + "value": 2, + "documentation": "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)." }, { "name": "MODE_OKHSL", - "value": 3 + "value": 3, + "documentation": "Allows editing the color with Hue/Saturation/Lightness sliders.\nOKHSL 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.\n[url=https://bottosson.github.io/posts/colorpicker/]Okhsv and Okhsl color spaces[/url]" } ] }, @@ -65710,23 +70459,28 @@ "values": [ { "name": "SHAPE_HSV_RECTANGLE", - "value": 0 + "value": 0, + "documentation": "HSV Color Model rectangle color space." }, { "name": "SHAPE_HSV_WHEEL", - "value": 1 + "value": 1, + "documentation": "HSV Color Model rectangle color space with a wheel." }, { "name": "SHAPE_VHS_CIRCLE", - "value": 2 + "value": 2, + "documentation": "HSV Color Model circle color space. Use Saturation as a radius." }, { "name": "SHAPE_OKHSL_CIRCLE", - "value": 3 + "value": 3, + "documentation": "HSL OK Color Model circle color space." }, { "name": "SHAPE_NONE", - "value": 4 + "value": 4, + "documentation": "The color space shape and the shape select button are hidden. Can't be selected from the shapes popup." } ] } @@ -65994,7 +70748,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "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.\n[b]Note:[/b] The presets list is only for [i]this[/i] color picker." }, { "name": "erase_preset", @@ -66008,7 +70763,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Removes the given color from the list of color presets of this color picker." }, { "name": "get_presets", @@ -66019,7 +70775,8 @@ "hash": 1392750486, "return_value": { "type": "PackedColorArray" - } + }, + "documentation": "Returns the list of colors in the presets of the color picker." }, { "name": "add_recent_preset", @@ -66033,7 +70790,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "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.\n[b]Note:[/b] The recent presets list is only for [i]this[/i] color picker." }, { "name": "erase_recent_preset", @@ -66047,7 +70805,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Removes the given color from the list of color recent presets of this color picker." }, { "name": "get_recent_presets", @@ -66058,7 +70817,8 @@ "hash": 1392750486, "return_value": { "type": "PackedColorArray" - } + }, + "documentation": "Returns the list of colors in the recent presets of the color picker." }, { "name": "set_picker_shape", @@ -66094,7 +70854,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Emitted when the color is changed." }, { "name": "preset_added", @@ -66103,7 +70864,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Emitted when a preset is added." }, { "name": "preset_removed", @@ -66112,7 +70874,8 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Emitted when a preset is removed." } ], "properties": [ @@ -66120,69 +70883,81 @@ "type": "Color", "name": "color", "setter": "set_pick_color", - "getter": "get_pick_color" + "getter": "get_pick_color", + "documentation": "The currently selected color." }, { "type": "bool", "name": "edit_alpha", "setter": "set_edit_alpha", - "getter": "is_editing_alpha" + "getter": "is_editing_alpha", + "documentation": "If [code]true[/code], shows an alpha channel slider (opacity)." }, { "type": "int", "name": "color_mode", "setter": "set_color_mode", - "getter": "get_color_mode" + "getter": "get_color_mode", + "documentation": "The currently selected color mode. See [enum ColorModeType]." }, { "type": "bool", "name": "deferred_mode", "setter": "set_deferred_mode", - "getter": "is_deferred_mode" + "getter": "is_deferred_mode", + "documentation": "If [code]true[/code], 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)." }, { "type": "int", "name": "picker_shape", "setter": "set_picker_shape", - "getter": "get_picker_shape" + "getter": "get_picker_shape", + "documentation": "The shape of the color space view. See [enum PickerShapeType]." }, { "type": "bool", "name": "can_add_swatches", "setter": "set_can_add_swatches", - "getter": "are_swatches_enabled" + "getter": "are_swatches_enabled", + "documentation": "If [code]true[/code], it's possible to add presets under Swatches. If [code]false[/code], the button to add presets is disabled." }, { "type": "bool", "name": "sampler_visible", "setter": "set_sampler_visible", - "getter": "is_sampler_visible" + "getter": "is_sampler_visible", + "documentation": "If [code]true[/code], the color sampler and color preview are visible." }, { "type": "bool", "name": "color_modes_visible", "setter": "set_modes_visible", - "getter": "are_modes_visible" + "getter": "are_modes_visible", + "documentation": "If [code]true[/code], the color mode buttons are visible." }, { "type": "bool", "name": "sliders_visible", "setter": "set_sliders_visible", - "getter": "are_sliders_visible" + "getter": "are_sliders_visible", + "documentation": "If [code]true[/code], the color sliders are visible." }, { "type": "bool", "name": "hex_visible", "setter": "set_hex_visible", - "getter": "is_hex_visible" + "getter": "is_hex_visible", + "documentation": "If [code]true[/code], the hex color code input field is visible." }, { "type": "bool", "name": "presets_visible", "setter": "set_presets_visible", - "getter": "are_presets_visible" + "getter": "are_presets_visible", + "documentation": "If [code]true[/code], the Swatches and Recent Colors presets are visible." } - ] + ], + "documentation": "A widget that provides an interface for selecting or modifying a color. It can optionally provide functionalities like a color sampler (eyedropper), color modes, and presets.\n[b]Note:[/b] This control is the color picker widget itself. You can use a [ColorPickerButton] instead if you need a button that brings up a [ColorPicker] in a popup." }, { "name": "ColorPickerButton", @@ -66225,7 +71000,8 @@ "hash": 331835996, "return_value": { "type": "ColorPicker" - } + }, + "documentation": "Returns the [ColorPicker] that this node toggles.\n[b]Warning:[/b] 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." }, { "name": "get_popup", @@ -66236,7 +71012,8 @@ "hash": 1322440207, "return_value": { "type": "PopupPanel" - } + }, + "documentation": "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.\n[b]Warning:[/b] 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." }, { "name": "set_edit_alpha", @@ -66272,13 +71049,16 @@ "name": "color", "type": "Color" } - ] + ], + "documentation": "Emitted when the color changes." }, { - "name": "popup_closed" + "name": "popup_closed", + "documentation": "Emitted when the [ColorPicker] is closed." }, { - "name": "picker_created" + "name": "picker_created", + "documentation": "Emitted when the [ColorPicker] is created (the button is pressed for the first time)." } ], "properties": [ @@ -66286,15 +71066,18 @@ "type": "Color", "name": "color", "setter": "set_pick_color", - "getter": "get_pick_color" + "getter": "get_pick_color", + "documentation": "The currently selected color." }, { "type": "bool", "name": "edit_alpha", "setter": "set_edit_alpha", - "getter": "is_editing_alpha" + "getter": "is_editing_alpha", + "documentation": "If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible." } - ] + ], + "documentation": "Encapsulates a [ColorPicker], making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker]'s visibility.\nSee also [BaseButton] which contains common properties and methods associated with this node.\n[b]Note:[/b] By default, the button may not be wide enough for the color preview swatch to be visible. Make sure to set [member Control.custom_minimum_size] to a big enough value to give the button enough space." }, { "name": "ColorRect", @@ -66334,23 +71117,27 @@ "type": "Color", "name": "color", "setter": "set_color", - "getter": "get_color" + "getter": "get_color", + "documentation": "The fill color of the rectangle." } - ] + ], + "documentation": "Displays a rectangle filled with a solid [member color]. If you need to display the border alone, consider using a [Panel] instead." }, { "name": "CompressedCubemap", "is_refcounted": true, "is_instantiable": true, "inherits": "CompressedTextureLayered", - "api_type": "core" + "api_type": "core", + "documentation": "A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods:\n- Lossless (WebP or PNG, uncompressed on the GPU)\n- Lossy (WebP, uncompressed on the GPU)\n- VRAM Compressed (compressed on the GPU)\n- VRAM Uncompressed (uncompressed on the GPU)\n- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)\nOnly [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.\nUsing [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.\nSee [Cubemap] for a general description of cubemaps." }, { "name": "CompressedCubemapArray", "is_refcounted": true, "is_instantiable": true, "inherits": "CompressedTextureLayered", - "api_type": "core" + "api_type": "core", + "documentation": "A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods:\n- Lossless (WebP or PNG, uncompressed on the GPU)\n- Lossy (WebP, uncompressed on the GPU)\n- VRAM Compressed (compressed on the GPU)\n- VRAM Uncompressed (uncompressed on the GPU)\n- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)\nOnly [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.\nUsing [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.\nSee [CubemapArray] for a general description of cubemap arrays." }, { "name": "CompressedTexture2D", @@ -66374,7 +71161,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Loads the texture from the specified [param path]." }, { "name": "get_load_path", @@ -66393,16 +71181,19 @@ "type": "String", "name": "load_path", "setter": "load", - "getter": "get_load_path" + "getter": "get_load_path", + "documentation": "The [CompressedTexture2D]'s file path to a [code].ctex[/code] file." } - ] + ], + "documentation": "A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression):\n- Lossless (WebP or PNG, uncompressed on the GPU)\n- Lossy (WebP, uncompressed on the GPU)\n- VRAM Compressed (compressed on the GPU)\n- VRAM Uncompressed (uncompressed on the GPU)\n- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)\nOnly [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.\nUsing [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D." }, { "name": "CompressedTexture2DArray", "is_refcounted": true, "is_instantiable": true, "inherits": "CompressedTextureLayered", - "api_type": "core" + "api_type": "core", + "documentation": "A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods:\n- Lossless (WebP or PNG, uncompressed on the GPU)\n- Lossy (WebP, uncompressed on the GPU)\n- VRAM Compressed (compressed on the GPU)\n- VRAM Uncompressed (uncompressed on the GPU)\n- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)\nOnly [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.\nUsing [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.\nSee [Texture2DArray] for a general description of texture arrays." }, { "name": "CompressedTexture3D", @@ -66426,7 +71217,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Loads the texture from the specified [param path]." }, { "name": "get_load_path", @@ -66445,9 +71237,11 @@ "type": "String", "name": "load_path", "setter": "load", - "getter": "get_load_path" + "getter": "get_load_path", + "documentation": "The [CompressedTexture3D]'s file path to a [code].ctex3d[/code] file." } - ] + ], + "documentation": "[CompressedTexture3D] is the VRAM-compressed counterpart of [ImageTexture3D]. The file extension for [CompressedTexture3D] files is [code].ctex3d[/code]. This file format is internal to Godot; it is created by importing other image formats with the import system.\n[CompressedTexture3D] uses VRAM compression, which allows to reduce memory usage on the GPU when rendering the texture. This also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.\nSee [Texture3D] for a general description of 3D textures." }, { "name": "CompressedTextureLayered", @@ -66471,7 +71265,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Loads the texture at [param path]." }, { "name": "get_load_path", @@ -66490,9 +71285,11 @@ "type": "String", "name": "load_path", "setter": "load", - "getter": "get_load_path" + "getter": "get_load_path", + "documentation": "The path the texture should be loaded from." } - ] + ], + "documentation": "Base class for [CompressedTexture2DArray] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [TextureLayered]." }, { "name": "ConcavePolygonShape2D", @@ -66532,9 +71329,11 @@ "type": "PackedVector2Array", "name": "segments", "setter": "set_segments", - "getter": "get_segments" + "getter": "get_segments", + "documentation": "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." } - ] + ], + "documentation": "A 2D polyline shape, intended for use in physics. Used internally in [CollisionPolygon2D] when it's in [constant CollisionPolygon2D.BUILD_SEGMENTS] mode.\nBeing just a collection of interconnected line segments, [ConcavePolygonShape2D] is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, [ConvexPolygonShape2D] is [i]hollow[/i] even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection.\n[b]Note:[/b] When used for collision, [ConcavePolygonShape2D] is intended to work with static [CollisionShape2D] nodes like [StaticBody2D] and will likely not behave well for [CharacterBody2D]s or [RigidBody2D]s in a mode other than Static.\n[b]Warning:[/b] Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the \"outside\" of the shape, and on the next frame it may be \"inside\" it. [ConcavePolygonShape2D] is hollow, so it won't detect a collision.\n[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, [CollisionPolygon2D]'s [constant CollisionPolygon2D.BUILD_SOLIDS] mode can be used, which decomposes the polygon into convex ones; see [ConvexPolygonShape2D]'s documentation for instructions." }, { "name": "ConcavePolygonShape3D", @@ -66555,7 +71354,8 @@ "name": "faces", "type": "PackedVector3Array" } - ] + ], + "documentation": "Sets the faces of the trimesh shape from an array of vertices. The [param faces] array should be composed of triples such that each triple of vertices defines a triangle." }, { "name": "get_faces", @@ -66566,7 +71366,8 @@ "hash": 497664490, "return_value": { "type": "PackedVector3Array" - } + }, + "documentation": "Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle." }, { "name": "set_backface_collision_enabled", @@ -66605,9 +71406,11 @@ "type": "bool", "name": "backface_collision", "setter": "set_backface_collision_enabled", - "getter": "is_backface_collision_enabled" + "getter": "is_backface_collision_enabled", + "documentation": "If set to [code]true[/code], collisions occur on both sides of the concave shape faces. Otherwise they occur only along the face normals." } - ] + ], + "documentation": "A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape3D].\nBeing just a collection of interconnected triangles, [ConcavePolygonShape3D] is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, [ConvexPolygonShape3D] is [i]hollow[/i] even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.\n[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [CollisionShape3D] nodes like [StaticBody3D] and will likely not behave well for [CharacterBody3D]s or [RigidBody3D]s in a mode other than Static.\n[b]Warning:[/b] Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the \"outside\" of the shape, and on the next frame it may be \"inside\" it. [ConcavePolygonShape3D] is hollow, so it won't detect a collision.\n[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, [ConvexPolygonShape3D] should be used. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions." }, { "name": "ConeTwistJoint3D", @@ -66622,27 +71425,33 @@ "values": [ { "name": "PARAM_SWING_SPAN", - "value": 0 + "value": 0, + "documentation": "Swing is rotation from side to side, around the axis perpendicular to the twist axis.\nThe swing span defines, how much rotation will not get corrected along the swing axis.\nCould be defined as looseness in the [ConeTwistJoint3D].\nIf below 0.05, this behavior is locked." }, { "name": "PARAM_TWIST_SPAN", - "value": 1 + "value": 1, + "documentation": "Twist is the rotation around the twist axis, this value defined how far the joint can twist.\nTwist is locked if below 0.05." }, { "name": "PARAM_BIAS", - "value": 2 + "value": 2, + "documentation": "The speed with which the swing or twist will take place.\nThe higher, the faster." }, { "name": "PARAM_SOFTNESS", - "value": 3 + "value": 3, + "documentation": "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint." }, { "name": "PARAM_RELAXATION", - "value": 4 + "value": 4, + "documentation": "Defines, how fast the swing- and twist-speed-difference on both sides gets synced." }, { "name": "PARAM_MAX", - "value": 5 + "value": 5, + "documentation": "Represents the size of the [enum Param] enum." } ] } @@ -66665,7 +71474,8 @@ "type": "float", "meta": "float" } - ] + ], + "documentation": "Sets the value of the specified parameter." }, { "name": "get_param", @@ -66683,7 +71493,8 @@ "name": "param", "type": "enum::ConeTwistJoint3D.Param" } - ] + ], + "documentation": "Returns the value of the specified parameter." } ], "properties": [ @@ -66692,37 +71503,43 @@ "name": "swing_span", "setter": "set_param", "getter": "get_param", - "index": 0 + "index": 0, + "documentation": "Swing is rotation from side to side, around the axis perpendicular to the twist axis.\nThe swing span defines, how much rotation will not get corrected along the swing axis.\nCould be defined as looseness in the [ConeTwistJoint3D].\nIf below 0.05, this behavior is locked." }, { "type": "float", "name": "twist_span", "setter": "set_param", "getter": "get_param", - "index": 1 + "index": 1, + "documentation": "Twist is the rotation around the twist axis, this value defined how far the joint can twist.\nTwist is locked if below 0.05." }, { "type": "float", "name": "bias", "setter": "set_param", "getter": "get_param", - "index": 2 + "index": 2, + "documentation": "The speed with which the swing or twist will take place.\nThe higher, the faster." }, { "type": "float", "name": "softness", "setter": "set_param", "getter": "get_param", - "index": 3 + "index": 3, + "documentation": "The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint." }, { "type": "float", "name": "relaxation", "setter": "set_param", "getter": "get_param", - "index": 4 + "index": 4, + "documentation": "Defines, how fast the swing- and twist-speed-difference on both sides gets synced." } - ] + ], + "documentation": "A physics joint that connects two 3D physics bodies in a way that simulates a ball-and-socket joint. The twist axis is initiated as the X axis of the [ConeTwistJoint3D]. Once the physics bodies swing, the twist axis is calculated as the middle of the X axes of the joint in the local space of the two physics bodies. Useful for limbs like shoulders and hips, lamps hanging off a ceiling, etc." }, { "name": "ConfigFile", @@ -66751,7 +71568,8 @@ "name": "value", "type": "Variant" } - ] + ], + "documentation": "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 [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed." }, { "name": "get_value", @@ -66777,7 +71595,8 @@ "type": "Variant", "default_value": "null" } - ] + ], + "documentation": "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 [code]null[/code], an error is also raised." }, { "name": "has_section", @@ -66794,7 +71613,8 @@ "name": "section", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the specified section exists." }, { "name": "has_section_key", @@ -66815,7 +71635,8 @@ "name": "key", "type": "String" } - ] + ], + "documentation": "Returns [code]true[/code] if the specified section-key pair exists." }, { "name": "get_sections", @@ -66826,7 +71647,8 @@ "hash": 1139954409, "return_value": { "type": "PackedStringArray" - } + }, + "documentation": "Returns an array of all defined section identifiers." }, { "name": "get_section_keys", @@ -66843,7 +71665,8 @@ "name": "section", "type": "String" } - ] + ], + "documentation": "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." }, { "name": "erase_section", @@ -66857,7 +71680,8 @@ "name": "section", "type": "String" } - ] + ], + "documentation": "Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist." }, { "name": "erase_section_key", @@ -66875,7 +71699,8 @@ "name": "key", "type": "String" } - ] + ], + "documentation": "Deletes the specified key in a section. Raises an error if either the section or the key do not exist." }, { "name": "load", @@ -66892,7 +71717,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "parse", @@ -66909,7 +71735,8 @@ "name": "data", "type": "String" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "save", @@ -66926,7 +71753,8 @@ "name": "path", "type": "String" } - ] + ], + "documentation": "Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "encode_to_text", @@ -66937,7 +71765,8 @@ "hash": 201670096, "return_value": { "type": "String" - } + }, + "documentation": "Obtain the text version of this config file (the same text that would be written to a file)." }, { "name": "load_encrypted", @@ -66958,7 +71787,8 @@ "name": "key", "type": "PackedByteArray" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "load_encrypted_pass", @@ -66979,7 +71809,8 @@ "name": "password", "type": "String" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "save_encrypted", @@ -67000,7 +71831,8 @@ "name": "key", "type": "PackedByteArray" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "save_encrypted_pass", @@ -67021,7 +71853,8 @@ "name": "password", "type": "String" } - ] + ], + "documentation": "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.\nReturns [constant OK] on success, or one of the other [enum Error] values if the operation failed." }, { "name": "clear", @@ -67029,9 +71862,11 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Removes the entire contents of the config." } - ] + ], + "documentation": "This helper class can be used to store [Variant] values on the filesystem using INI-style formatting. The stored values are identified by a section and a key:\n[codeblock]\n[section]\nsome_key=42\nstring_example=\"Hello World3D!\"\na_vector=Vector3(1, 0, 2)\n[/codeblock]\nThe stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem.\nThe following example shows how to create a simple [ConfigFile] and save it on disc:\n[codeblocks]\n[gdscript]\n# Create new ConfigFile object.\nvar config = ConfigFile.new()\n\n# Store some values.\nconfig.set_value(\"Player1\", \"player_name\", \"Steve\")\nconfig.set_value(\"Player1\", \"best_score\", 10)\nconfig.set_value(\"Player2\", \"player_name\", \"V3geta\")\nconfig.set_value(\"Player2\", \"best_score\", 9001)\n\n# Save it to a file (overwrite if already exists).\nconfig.save(\"user://scores.cfg\")\n[/gdscript]\n[csharp]\n// Create new ConfigFile object.\nvar config = new ConfigFile();\n\n// Store some values.\nconfig.SetValue(\"Player1\", \"player_name\", \"Steve\");\nconfig.SetValue(\"Player1\", \"best_score\", 10);\nconfig.SetValue(\"Player2\", \"player_name\", \"V3geta\");\nconfig.SetValue(\"Player2\", \"best_score\", 9001);\n\n// Save it to a file (overwrite if already exists).\nconfig.Save(\"user://scores.cfg\");\n[/csharp]\n[/codeblocks]\nThis example shows how the above file could be loaded:\n[codeblocks]\n[gdscript]\nvar score_data = {}\nvar config = ConfigFile.new()\n\n# Load data from a file.\nvar err = config.load(\"user://scores.cfg\")\n\n# If the file didn't load, ignore it.\nif err != OK:\n return\n\n# Iterate over all sections.\nfor player in config.get_sections():\n # Fetch the data for each section.\n var player_name = config.get_value(player, \"player_name\")\n var player_score = config.get_value(player, \"best_score\")\n score_data[player_name] = player_score\n[/gdscript]\n[csharp]\nvar score_data = new Godot.Collections.Dictionary();\nvar config = new ConfigFile();\n\n// Load data from a file.\nError err = config.Load(\"user://scores.cfg\");\n\n// If the file didn't load, ignore it.\nif (err != Error.Ok)\n{\n return;\n}\n\n// Iterate over all sections.\nforeach (String player in config.GetSections())\n{\n // Fetch the data for each section.\n var player_name = (String)config.GetValue(player, \"player_name\");\n var player_score = (int)config.GetValue(player, \"best_score\");\n score_data[player_name] = player_score;\n}\n[/csharp]\n[/codeblocks]\nAny operation that mutates the ConfigFile such as [method set_value], [method clear], or [method erase_section], only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with [method save], [method save_encrypted], or [method save_encrypted_pass].\nKeep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load.\nConfigFiles can also contain manually written comment lines starting with a semicolon ([code];[/code]). Those lines will be ignored when parsing the file. Note that comments will be lost when saving the ConfigFile. This can still be useful for dedicated server configuration files, which are typically never overwritten without explicit user action.\n[b]Note:[/b] The file extension given to a ConfigFile does not have any impact on its formatting or behavior. By convention, the [code].cfg[/code] extension is used here, but any other extension such as [code].ini[/code] is also valid. Since neither [code].cfg[/code] nor [code].ini[/code] are standardized, Godot's ConfigFile formatting may differ from files written by other programs." }, { "name": "ConfirmationDialog", @@ -67049,7 +71884,8 @@ "hash": 1856205918, "return_value": { "type": "Button" - } + }, + "documentation": "Returns the cancel button.\n[b]Warning:[/b] 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." }, { "name": "set_cancel_button_text", @@ -67082,9 +71918,11 @@ "type": "String", "name": "cancel_button_text", "setter": "set_cancel_button_text", - "getter": "get_cancel_button_text" + "getter": "get_cancel_button_text", + "documentation": "The text displayed by the cancel button (see [method get_cancel_button])." } - ] + ], + "documentation": "A dialog used for confirmation of actions. This window is similar to [AcceptDialog], but pressing its Cancel button can have a different outcome from pressing the OK button. The order of the two buttons varies depending on the host OS.\nTo get cancel action, you can use:\n[codeblocks]\n[gdscript]\nget_cancel_button().pressed.connect(self.canceled)\n[/gdscript]\n[csharp]\nGetCancelButton().Pressed += Canceled;\n[/csharp]\n[/codeblocks]" }, { "name": "Container", @@ -67095,11 +71933,13 @@ "constants": [ { "name": "NOTIFICATION_PRE_SORT_CHILDREN", - "value": 50 + "value": 50, + "documentation": "Notification just before children are going to be sorted, in case there's something to process beforehand." }, { "name": "NOTIFICATION_SORT_CHILDREN", - "value": 51 + "value": 51, + "documentation": "Notification for when sorting the children, it must be obeyed immediately." } ], "methods": [ @@ -67111,7 +71951,8 @@ "is_virtual": true, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "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.\n[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed." }, { "name": "_get_allowed_size_flags_vertical", @@ -67121,7 +71962,8 @@ "is_virtual": true, "return_value": { "type": "PackedInt32Array" - } + }, + "documentation": "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.\n[b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed." }, { "name": "queue_sort", @@ -67129,7 +71971,8 @@ "is_vararg": false, "is_static": false, "is_virtual": false, - "hash": 3218959716 + "hash": 3218959716, + "documentation": "Queue resort of the contained children. This is called automatically anyway, but can be called upon request." }, { "name": "fit_child_in_rect", @@ -67147,17 +71990,21 @@ "name": "rect", "type": "Rect2" } - ] + ], + "documentation": "Fit a child control in a given rect. This is mainly a helper for creating custom container classes." } ], "signals": [ { - "name": "pre_sort_children" + "name": "pre_sort_children", + "documentation": "Emitted when children are going to be sorted." }, { - "name": "sort_children" + "name": "sort_children", + "documentation": "Emitted when sorting the children is needed." } - ] + ], + "documentation": "Base class for all GUI containers. A [Container] automatically arranges its child controls in a certain way. This class can be inherited to make custom container types." }, { "name": "Control", @@ -67168,39 +72015,48 @@ "constants": [ { "name": "NOTIFICATION_RESIZED", - "value": 40 + "value": 40, + "documentation": "Sent when the node changes size. Use [member size] to get the new size." }, { "name": "NOTIFICATION_MOUSE_ENTER", - "value": 41 + "value": 41, + "documentation": "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.\n[b]Note:[/b] [member CanvasItem.z_index] doesn't affect, which Control receives the notification." }, { "name": "NOTIFICATION_MOUSE_EXIT", - "value": 42 + "value": 42, + "documentation": "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.\n[b]Note:[/b] [member CanvasItem.z_index] doesn't affect, which Control receives the notification." }, { "name": "NOTIFICATION_FOCUS_ENTER", - "value": 43 + "value": 43, + "documentation": "Sent when the node grabs focus." }, { "name": "NOTIFICATION_FOCUS_EXIT", - "value": 44 + "value": 44, + "documentation": "Sent when the node loses focus." }, { "name": "NOTIFICATION_THEME_CHANGED", - "value": 45 + "value": 45, + "documentation": "Sent when the node needs to refresh its theme items. This happens in one of the following cases:\n- The [member theme] property is changed on this node or any of its ancestors.\n- The [member theme_type_variation] property is changed on this node.\n- One of the node's theme property overrides is changed.\n- The node enters the scene tree.\n[b]Note:[/b] 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." }, { "name": "NOTIFICATION_SCROLL_BEGIN", - "value": 47 + "value": 47, + "documentation": "Sent when this node is inside a [ScrollContainer] which has begun being scrolled." }, { "name": "NOTIFICATION_SCROLL_END", - "value": 48 + "value": 48, + "documentation": "Sent when this node is inside a [ScrollContainer] which has stopped being scrolled." }, { "name": "NOTIFICATION_LAYOUT_DIRECTION_CHANGED", - "value": 49 + "value": 49, + "documentation": "Sent when control layout direction is changed." } ], "enums": [ @@ -67210,15 +72066,18 @@ "values": [ { "name": "FOCUS_NONE", - "value": 0 + "value": 0, + "documentation": "The node cannot grab focus. Use with [member focus_mode]." }, { "name": "FOCUS_CLICK", - "value": 1 + "value": 1, + "documentation": "The node can only grab focus on mouse clicks. Use with [member focus_mode]." }, { "name": "FOCUS_ALL", - "value": 2 + "value": 2, + "documentation": "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]." } ] }, @@ -67228,71 +72087,88 @@ "values": [ { "name": "CURSOR_ARROW", - "value": 0 + "value": 0, + "documentation": "Show the system's arrow mouse cursor when the user hovers the node. Use with [member mouse_default_cursor_shape]." }, { "name": "CURSOR_IBEAM", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "CURSOR_POINTING_HAND", - "value": 2 + "value": 2, + "documentation": "Show the system's pointing hand mouse cursor when the user hovers the node." }, { "name": "CURSOR_CROSS", - "value": 3 + "value": 3, + "documentation": "Show the system's cross mouse cursor when the user hovers the node." }, { "name": "CURSOR_WAIT", - "value": 4 + "value": 4, + "documentation": "Show the system's wait mouse cursor when the user hovers the node. Often an hourglass." }, { "name": "CURSOR_BUSY", - "value": 5 + "value": 5, + "documentation": "Show the system's busy mouse cursor when the user hovers the node. Often an arrow with a small hourglass." }, { "name": "CURSOR_DRAG", - "value": 6 + "value": 6, + "documentation": "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." }, { "name": "CURSOR_CAN_DROP", - "value": 7 + "value": 7, + "documentation": "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." }, { "name": "CURSOR_FORBIDDEN", - "value": 8 + "value": 8, + "documentation": "Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle." }, { "name": "CURSOR_VSIZE", - "value": 9 + "value": 9, + "documentation": "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." }, { "name": "CURSOR_HSIZE", - "value": 10 + "value": 10, + "documentation": "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." }, { "name": "CURSOR_BDIAGSIZE", - "value": 11 + "value": 11, + "documentation": "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." }, { "name": "CURSOR_FDIAGSIZE", - "value": 12 + "value": 12, + "documentation": "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." }, { "name": "CURSOR_MOVE", - "value": 13 + "value": 13, + "documentation": "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." }, { "name": "CURSOR_VSPLIT", - "value": 14 + "value": 14, + "documentation": "Show the system's vertical split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_VSIZE]." }, { "name": "CURSOR_HSPLIT", - "value": 15 + "value": 15, + "documentation": "Show the system's horizontal split mouse cursor when the user hovers the node. On Windows, it's the same as [constant CURSOR_HSIZE]." }, { "name": "CURSOR_HELP", - "value": 16 + "value": 16, + "documentation": "Show the system's help mouse cursor when the user hovers the node, a question mark." } ] }, @@ -67302,67 +72178,83 @@ "values": [ { "name": "PRESET_TOP_LEFT", - "value": 0 + "value": 0, + "documentation": "Snap all 4 anchors to the top-left of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_TOP_RIGHT", - "value": 1 + "value": 1, + "documentation": "Snap all 4 anchors to the top-right of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_BOTTOM_LEFT", - "value": 2 + "value": 2, + "documentation": "Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_BOTTOM_RIGHT", - "value": 3 + "value": 3, + "documentation": "Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_CENTER_LEFT", - "value": 4 + "value": 4, + "documentation": "Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_CENTER_TOP", - "value": 5 + "value": 5, + "documentation": "Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_CENTER_RIGHT", - "value": 6 + "value": 6, + "documentation": "Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_CENTER_BOTTOM", - "value": 7 + "value": 7, + "documentation": "Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_CENTER", - "value": 8 + "value": 8, + "documentation": "Snap all 4 anchors to the center of the parent control's bounds. Use with [method set_anchors_preset]." }, { "name": "PRESET_LEFT_WIDE", - "value": 9 + "value": 9, + "documentation": "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]." }, { "name": "PRESET_TOP_WIDE", - "value": 10 + "value": 10, + "documentation": "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]." }, { "name": "PRESET_RIGHT_WIDE", - "value": 11 + "value": 11, + "documentation": "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]." }, { "name": "PRESET_BOTTOM_WIDE", - "value": 12 + "value": 12, + "documentation": "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]." }, { "name": "PRESET_VCENTER_WIDE", - "value": 13 + "value": 13, + "documentation": "Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with [method set_anchors_preset]." }, { "name": "PRESET_HCENTER_WIDE", - "value": 14 + "value": 14, + "documentation": "Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset]." }, { "name": "PRESET_FULL_RECT", - "value": 15 + "value": 15, + "documentation": "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]." } ] }, @@ -67372,19 +72264,23 @@ "values": [ { "name": "PRESET_MODE_MINSIZE", - "value": 0 + "value": 0, + "documentation": "The control will be resized to its minimum size." }, { "name": "PRESET_MODE_KEEP_WIDTH", - "value": 1 + "value": 1, + "documentation": "The control's width will not change." }, { "name": "PRESET_MODE_KEEP_HEIGHT", - "value": 2 + "value": 2, + "documentation": "The control's height will not change." }, { "name": "PRESET_MODE_KEEP_SIZE", - "value": 3 + "value": 3, + "documentation": "The control's size will not change." } ] }, @@ -67394,27 +72290,33 @@ "values": [ { "name": "SIZE_SHRINK_BEGIN", - "value": 0 + "value": 0, + "documentation": "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].\n[b]Note:[/b] Setting this flag is equal to not having any size flags." }, { "name": "SIZE_FILL", - "value": 1 + "value": 1, + "documentation": "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]." }, { "name": "SIZE_EXPAND", - "value": 2 + "value": 2, + "documentation": "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]." }, { "name": "SIZE_EXPAND_FILL", - "value": 3 + "value": 3, + "documentation": "Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information." }, { "name": "SIZE_SHRINK_CENTER", - "value": 4 + "value": 4, + "documentation": "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]." }, { "name": "SIZE_SHRINK_END", - "value": 8 + "value": 8, + "documentation": "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]." } ] }, @@ -67424,15 +72326,18 @@ "values": [ { "name": "MOUSE_FILTER_STOP", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "MOUSE_FILTER_PASS", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "MOUSE_FILTER_IGNORE", - "value": 2 + "value": 2, + "documentation": "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." } ] }, @@ -67442,15 +72347,18 @@ "values": [ { "name": "GROW_DIRECTION_BEGIN", - "value": 0 + "value": 0, + "documentation": "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." }, { "name": "GROW_DIRECTION_END", - "value": 1 + "value": 1, + "documentation": "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." }, { "name": "GROW_DIRECTION_BOTH", - "value": 2 + "value": 2, + "documentation": "The control will grow in both directions equally to make up if its minimum size is changed to be greater than its current size." } ] }, @@ -67460,11 +72368,13 @@ "values": [ { "name": "ANCHOR_BEGIN", - "value": 0 + "value": 0, + "documentation": "Snaps one of the 4 anchor's sides to the origin of the node's [code]Rect[/code], in the top left. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]." }, { "name": "ANCHOR_END", - "value": 1 + "value": 1, + "documentation": "Snaps one of the 4 anchor's sides to the end of the node's [code]Rect[/code], in the bottom right. Use it with one of the [code]anchor_*[/code] member variables, like [member anchor_left]. To change all 4 anchors at once, use [method set_anchors_preset]." } ] }, @@ -67474,19 +72384,23 @@ "values": [ { "name": "LAYOUT_DIRECTION_INHERITED", - "value": 0 + "value": 0, + "documentation": "Automatic layout direction, determined from the parent control layout direction." }, { "name": "LAYOUT_DIRECTION_LOCALE", - "value": 1 + "value": 1, + "documentation": "Automatic layout direction, determined from the current locale." }, { "name": "LAYOUT_DIRECTION_LTR", - "value": 2 + "value": 2, + "documentation": "Left-to-right layout direction." }, { "name": "LAYOUT_DIRECTION_RTL", - "value": 3 + "value": 3, + "documentation": "Right-to-left layout direction." } ] }, @@ -67496,19 +72410,23 @@ "values": [ { "name": "TEXT_DIRECTION_INHERITED", - "value": 3 + "value": 3, + "documentation": "Text writing direction is the same as layout direction." }, { "name": "TEXT_DIRECTION_AUTO", - "value": 0 + "value": 0, + "documentation": "Automatic text writing direction, determined from the current locale and text content." }, { "name": "TEXT_DIRECTION_LTR", - "value": 1 + "value": 1, + "documentation": "Left-to-right text writing direction." }, { "name": "TEXT_DIRECTION_RTL", - "value": 2 + "value": 2, + "documentation": "Right-to-left text writing direction." } ] } @@ -67528,7 +72446,8 @@ "name": "point", "type": "Vector2" } - ] + ], + "documentation": "Virtual method to be implemented by the user. Returns whether the given [param point] is inside this control.\nIf not overridden, default behavior is checking if the point is within control's Rect.\n[b]Note:[/b] If you want to check if a point is inside the control, you can use [code]Rect2(Vector2.ZERO, size).has_point(point)[/code]." }, { "name": "_structured_text_parser", @@ -67548,7 +72467,8 @@ "name": "text", "type": "String" } - ] + ], + "documentation": "User defined BiDi algorithm override function.\nReturns 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." }, { "name": "_get_minimum_size", @@ -67558,7 +72478,8 @@ "is_virtual": true, "return_value": { "type": "Vector2" - } + }, + "documentation": "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).\nIf not overridden, defaults to [constant Vector2.ZERO].\n[b]Note:[/b] 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." }, { "name": "_get_tooltip", @@ -67574,7 +72495,8 @@ "name": "at_position", "type": "Vector2" } - ] + ], + "documentation": "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].\n[b]Note:[/b] If this method returns an empty [String], no tooltip is displayed." }, { "name": "_get_drag_data", @@ -67590,7 +72512,8 @@ "name": "at_position", "type": "Vector2" } - ] + ], + "documentation": "Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] 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].\nA 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.\n[codeblocks]\n[gdscript]\nfunc _get_drag_data(position):\n var mydata = make_data() # This is your custom method generating the drag data.\n set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.\n return mydata\n[/gdscript]\n[csharp]\npublic override Variant _GetDragData(Vector2 atPosition)\n{\n var myData = MakeData(); // This is your custom method generating the drag data.\n SetDragPreview(MakePreview(myData)); // This is your custom method generating the preview of the drag data.\n return myData;\n}\n[/csharp]\n[/codeblocks]" }, { "name": "_can_drop_data", @@ -67610,7 +72533,8 @@ "name": "data", "type": "Variant" } - ] + ], + "documentation": "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.\nThis method should only be used to test the data. Process the data in [method _drop_data].\n[codeblocks]\n[gdscript]\nfunc _can_drop_data(position, data):\n # Check position if it is relevant to you\n # Otherwise, just check data\n return typeof(data) == TYPE_DICTIONARY and data.has(\"expected\")\n[/gdscript]\n[csharp]\npublic override bool _CanDropData(Vector2 atPosition, Variant data)\n{\n // Check position if it is relevant to you\n // Otherwise, just check data\n return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey(\"expected\");\n}\n[/csharp]\n[/codeblocks]" }, { "name": "_drop_data", @@ -67627,7 +72551,8 @@ "name": "data", "type": "Variant" } - ] + ], + "documentation": "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.\n[codeblocks]\n[gdscript]\nfunc _can_drop_data(position, data):\n return typeof(data) == TYPE_DICTIONARY and data.has(\"color\")\n\nfunc _drop_data(position, data):\n var color = data[\"color\"]\n[/gdscript]\n[csharp]\npublic override bool _CanDropData(Vector2 atPosition, Variant data)\n{\n return data.VariantType == Variant.Type.Dictionary && dict.AsGodotDictionary().ContainsKey(\"color\");\n}\n\npublic override void _DropData(Vector2 atPosition, Variant data)\n{\n Color color = data.AsGodotDictionary()[\"color\"].AsColor();\n}\n[/csharp]\n[/codeblocks]" }, { "name": "_make_custom_tooltip", @@ -67643,7 +72568,8 @@ "name": "for_text", "type": "String" } - ] + ], + "documentation": "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.\nThe 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 [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead.\nThe 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 [code]\"TooltipPanel\"[/code] (see [member tooltip_text] for an example).\n[b]Note:[/b] 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.\n[b]Note:[/b] 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.\n[b]Example of usage with a custom-constructed node:[/b]\n[codeblocks]\n[gdscript]\nfunc _make_custom_tooltip(for_text):\n var label = Label.new()\n label.text = for_text\n return label\n[/gdscript]\n[csharp]\npublic override Control _MakeCustomTooltip(string forText)\n{\n var label = new Label();\n label.Text = forText;\n return label;\n}\n[/csharp]\n[/codeblocks]\n[b]Example of usage with a custom scene instance:[/b]\n[codeblocks]\n[gdscript]\nfunc _make_custom_tooltip(for_text):\n var tooltip = preload(\"res://some_tooltip_scene.tscn\").instantiate()\n tooltip.get_node(\"Label\").text = for_text\n return tooltip\n[/gdscript]\n[csharp]\npublic override Control _MakeCustomTooltip(string forText)\n{\n Node tooltip = ResourceLoader.Load(\"res://some_tooltip_scene.tscn\").Instantiate();\n tooltip.GetNode