typescript-to-gdscript 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +232 -104
- package/dist/cli/convert.d.ts.map +1 -1
- package/dist/cli/convert.js +15 -5
- package/dist/cli/convert.js.map +1 -1
- package/dist/converter/common/index.d.ts +17 -1
- package/dist/converter/common/index.d.ts.map +1 -1
- package/dist/converter/common/index.js +69 -19
- package/dist/converter/common/index.js.map +1 -1
- package/dist/converter/ts-to-gd/access-rewrite.d.ts +40 -0
- package/dist/converter/ts-to-gd/access-rewrite.d.ts.map +1 -0
- package/dist/converter/ts-to-gd/access-rewrite.js +124 -0
- package/dist/converter/ts-to-gd/access-rewrite.js.map +1 -0
- package/dist/converter/ts-to-gd/class-members.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/class-members.js +5 -5
- package/dist/converter/ts-to-gd/class-members.js.map +1 -1
- package/dist/converter/ts-to-gd/expressions.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/expressions.js +32 -8
- package/dist/converter/ts-to-gd/expressions.js.map +1 -1
- package/dist/converter/ts-to-gd/file-scope.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/file-scope.js +1 -1
- package/dist/converter/ts-to-gd/file-scope.js.map +1 -1
- package/dist/converter/ts-to-gd/gd-getset.js +2 -2
- package/dist/converter/ts-to-gd/gd-getset.js.map +1 -1
- package/dist/converter/ts-to-gd/index.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/index.js +1 -0
- package/dist/converter/ts-to-gd/index.js.map +1 -1
- package/dist/converter/ts-to-gd/parameters.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/parameters.js +2 -2
- package/dist/converter/ts-to-gd/parameters.js.map +1 -1
- package/dist/converter/ts-to-gd/statements.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/statements.js +1 -1
- package/dist/converter/ts-to-gd/statements.js.map +1 -1
- package/dist/typings/override-system.d.ts.map +1 -1
- package/dist/typings/override-system.js +6 -0
- package/dist/typings/override-system.js.map +1 -1
- package/dist/watcher/check.d.ts +87 -0
- package/dist/watcher/check.d.ts.map +1 -0
- package/dist/watcher/check.js +209 -0
- package/dist/watcher/check.js.map +1 -0
- package/dist/watcher/heal.d.ts +66 -0
- package/dist/watcher/heal.d.ts.map +1 -0
- package/dist/watcher/heal.js +132 -0
- package/dist/watcher/heal.js.map +1 -0
- package/dist/watcher/index.d.ts +1 -0
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js +48 -52
- package/dist/watcher/index.js.map +1 -1
- package/package.json +6 -1
- package/typings/classes/AccessibilityServer.d.ts +1 -1
- package/typings/classes/AnimationLibrary.d.ts +4 -4
- package/typings/classes/AnimationNodeBlendSpace1D.d.ts +28 -2
- package/typings/classes/AnimationNodeBlendSpace2D.d.ts +28 -2
- package/typings/classes/AreaLight3D.d.ts +37 -0
- package/typings/classes/AudioEffectInstance.d.ts +1 -1
- package/typings/classes/AudioStreamRandomizer.d.ts +10 -0
- package/typings/classes/Basis.d.ts +2 -2
- package/typings/classes/CPUParticles2D.d.ts +2 -2
- package/typings/classes/CPUParticles3D.d.ts +2 -2
- package/typings/classes/CanvasItem.d.ts +15 -0
- package/typings/classes/CodeEdit.d.ts +2 -0
- package/typings/classes/CollisionObject2D.d.ts +2 -2
- package/typings/classes/Container.d.ts +1 -0
- package/typings/classes/Control.d.ts +68 -9
- package/typings/classes/Curve.d.ts +26 -1
- package/typings/classes/Curve2D.d.ts +15 -0
- package/typings/classes/Curve3D.d.ts +20 -0
- package/typings/classes/DirAccess.d.ts +6 -1
- package/typings/classes/DisplayServer.d.ts +35 -10
- package/typings/classes/DrawableTexture2D.d.ts +0 -4
- package/typings/classes/EditorCommandPalette.d.ts +0 -2
- package/typings/classes/EditorContextMenuPlugin.d.ts +4 -0
- package/typings/classes/EditorDock.d.ts +2 -3
- package/typings/classes/EditorExportPlatform.d.ts +4 -2
- package/typings/classes/EditorExportPlugin.d.ts +2 -0
- package/typings/classes/EditorFeatureProfile.d.ts +1 -1
- package/typings/classes/EditorInspector.d.ts +10 -0
- package/typings/classes/EditorInterface.d.ts +2 -2
- package/typings/classes/EditorNode3DGizmoPlugin.d.ts +4 -0
- package/typings/classes/EditorPlugin.d.ts +4 -4
- package/typings/classes/EditorResourcePicker.d.ts +2 -1
- package/typings/classes/EditorSceneFormatImporter.d.ts +23 -0
- package/typings/classes/EditorSettings.d.ts +44 -7
- package/typings/classes/EditorTranslationParserPlugin.d.ts +4 -0
- package/typings/classes/EditorVCSInterface.d.ts +6 -2
- package/typings/classes/FileDialog.d.ts +15 -0
- package/typings/classes/Font.d.ts +13 -1
- package/typings/classes/FontVariation.d.ts +10 -0
- package/typings/classes/GDScript.d.ts +8 -0
- package/typings/classes/GDScriptLanguageProtocol.d.ts +25 -0
- package/typings/classes/GDScriptSyntaxHighlighter.d.ts +6 -0
- package/typings/classes/GDScriptTextDocument.d.ts +27 -0
- package/typings/classes/GDScriptWorkspace.d.ts +17 -0
- package/typings/classes/GPUParticles2D.d.ts +2 -2
- package/typings/classes/GPUParticles3D.d.ts +15 -2
- package/typings/classes/Geometry2D.d.ts +2 -2
- package/typings/classes/Image.d.ts +6 -4
- package/typings/classes/ImageFormatLoader.d.ts +5 -0
- package/typings/classes/Input.d.ts +11 -2
- package/typings/classes/InputEventMouseMotion.d.ts +2 -2
- package/typings/classes/ItemList.d.ts +20 -0
- package/typings/classes/IterateIK3D.d.ts +6 -3
- package/typings/classes/JavaClassWrapper.d.ts +13 -0
- package/typings/classes/JavaScriptBridge.d.ts +1 -1
- package/typings/classes/Label.d.ts +1 -0
- package/typings/classes/LabelSettings.d.ts +25 -0
- package/typings/classes/Light3D.d.ts +1 -1
- package/typings/classes/Logger.d.ts +1 -1
- package/typings/classes/LookAtModifier3D.d.ts +1 -1
- package/typings/classes/MenuButton.d.ts +35 -0
- package/typings/classes/MeshLibrary.d.ts +2 -0
- package/typings/classes/MovieWriter.d.ts +2 -0
- package/typings/classes/MultiplayerPeerExtension.d.ts +9 -9
- package/typings/classes/Node.d.ts +6 -0
- package/typings/classes/Node3D.d.ts +6 -4
- package/typings/classes/OS.d.ts +1 -1
- package/typings/classes/Object.d.ts +11 -8
- package/typings/classes/OptimizedTranslation.d.ts +2 -2
- package/typings/classes/OptionButton.d.ts +51 -7
- package/typings/classes/PacketPeerExtension.d.ts +1 -1
- package/typings/classes/ParticleProcessMaterial.d.ts +58 -0
- package/typings/classes/PhysicsDirectSpaceState2DExtension.d.ts +6 -6
- package/typings/classes/PhysicsDirectSpaceState3DExtension.d.ts +6 -6
- package/typings/classes/PhysicsServer2DExtension.d.ts +5 -5
- package/typings/classes/PhysicsServer3DExtension.d.ts +1 -1
- package/typings/classes/PopupMenu.d.ts +58 -6
- package/typings/classes/ProjectSettings.d.ts +89 -21
- package/typings/classes/Quaternion.d.ts +2 -2
- package/typings/classes/RDAccelerationStructureGeometry.d.ts +42 -0
- package/typings/classes/RDAccelerationStructureInstance.d.ts +34 -0
- package/typings/classes/RDHitGroup.d.ts +20 -0
- package/typings/classes/RDPipelineShader.d.ts +14 -0
- package/typings/classes/RandomNumberGenerator.d.ts +4 -2
- package/typings/classes/RenderSceneBuffersConfiguration.d.ts +4 -1
- package/typings/classes/RenderingDevice.d.ts +93 -23
- package/typings/classes/RenderingServer.d.ts +51 -3
- package/typings/classes/Resource.d.ts +2 -0
- package/typings/classes/ResourceImporterOBJ.d.ts +1 -1
- package/typings/classes/ResourceImporterScene.d.ts +11 -3
- package/typings/classes/RichTextLabel.d.ts +14 -6
- package/typings/classes/SceneTree.d.ts +29 -5
- package/typings/classes/Script.d.ts +2 -0
- package/typings/classes/ScriptEditor.d.ts +7 -0
- package/typings/classes/ScriptLanguageExtension.d.ts +7 -0
- package/typings/classes/ScrollContainer.d.ts +17 -5
- package/typings/classes/SkeletonModification2DJiggle.d.ts +4 -0
- package/typings/classes/SpringBoneSimulator3D.d.ts +4 -2
- package/typings/classes/SpriteFrames.d.ts +20 -4
- package/typings/classes/StreamPeerExtension.d.ts +2 -2
- package/typings/classes/TabBar.d.ts +20 -0
- package/typings/classes/TabContainer.d.ts +21 -3
- package/typings/classes/TextEdit.d.ts +2 -2
- package/typings/classes/TextServer.d.ts +23 -1
- package/typings/classes/TextServerExtension.d.ts +23 -1
- package/typings/classes/TileSet.d.ts +3 -1
- package/typings/classes/Tree.d.ts +16 -7
- package/typings/classes/TreeItem.d.ts +9 -2
- package/typings/classes/UndoRedo.d.ts +2 -2
- package/typings/classes/Vector2.d.ts +4 -2
- package/typings/classes/Vector2i.d.ts +4 -2
- package/typings/classes/Vector3.d.ts +4 -2
- package/typings/classes/Vector3i.d.ts +4 -2
- package/typings/classes/Vector4.d.ts +4 -2
- package/typings/classes/Vector4i.d.ts +4 -2
- package/typings/classes/Viewport.d.ts +17 -1
- package/typings/classes/Window.d.ts +20 -6
- package/typings/classes/_globals.d.ts +104 -26
- package/typings/classes/index.d.ts +10 -112
- package/typings/godot-class-registry.json +885 -3604
- package/typings/classes/VisualShader.d.ts +0 -112
- package/typings/classes/VisualShaderNode.d.ts +0 -63
- package/typings/classes/VisualShaderNodeBillboard.d.ts +0 -28
- package/typings/classes/VisualShaderNodeBooleanConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeBooleanParameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeClamp.d.ts +0 -26
- package/typings/classes/VisualShaderNodeColorConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeColorFunc.d.ts +0 -32
- package/typings/classes/VisualShaderNodeColorOp.d.ts +0 -32
- package/typings/classes/VisualShaderNodeColorParameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeComment.d.ts +0 -12
- package/typings/classes/VisualShaderNodeCompare.d.ts +0 -68
- package/typings/classes/VisualShaderNodeConstant.d.ts +0 -6
- package/typings/classes/VisualShaderNodeCubemap.d.ts +0 -43
- package/typings/classes/VisualShaderNodeCubemapParameter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeCurveTexture.d.ts +0 -10
- package/typings/classes/VisualShaderNodeCurveXYZTexture.d.ts +0 -10
- package/typings/classes/VisualShaderNodeCustom.d.ts +0 -122
- package/typings/classes/VisualShaderNodeDerivativeFunc.d.ts +0 -56
- package/typings/classes/VisualShaderNodeDeterminant.d.ts +0 -6
- package/typings/classes/VisualShaderNodeDistanceFade.d.ts +0 -6
- package/typings/classes/VisualShaderNodeDotProduct.d.ts +0 -6
- package/typings/classes/VisualShaderNodeExpression.d.ts +0 -12
- package/typings/classes/VisualShaderNodeFaceForward.d.ts +0 -8
- package/typings/classes/VisualShaderNodeFloatConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeFloatFunc.d.ts +0 -108
- package/typings/classes/VisualShaderNodeFloatOp.d.ts +0 -36
- package/typings/classes/VisualShaderNodeFloatParameter.d.ts +0 -52
- package/typings/classes/VisualShaderNodeFrame.d.ts +0 -35
- package/typings/classes/VisualShaderNodeFresnel.d.ts +0 -6
- package/typings/classes/VisualShaderNodeGlobalExpression.d.ts +0 -6
- package/typings/classes/VisualShaderNodeGroupBase.d.ts +0 -60
- package/typings/classes/VisualShaderNodeIf.d.ts +0 -8
- package/typings/classes/VisualShaderNodeInput.d.ts +0 -20
- package/typings/classes/VisualShaderNodeIntConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeIntFunc.d.ts +0 -24
- package/typings/classes/VisualShaderNodeIntOp.d.ts +0 -48
- package/typings/classes/VisualShaderNodeIntParameter.d.ts +0 -58
- package/typings/classes/VisualShaderNodeIs.d.ts +0 -18
- package/typings/classes/VisualShaderNodeLinearSceneDepth.d.ts +0 -6
- package/typings/classes/VisualShaderNodeMix.d.ts +0 -28
- package/typings/classes/VisualShaderNodeMultiplyAdd.d.ts +0 -22
- package/typings/classes/VisualShaderNodeOuterProduct.d.ts +0 -6
- package/typings/classes/VisualShaderNodeOutput.d.ts +0 -6
- package/typings/classes/VisualShaderNodeParameter.d.ts +0 -32
- package/typings/classes/VisualShaderNodeParameterRef.d.ts +0 -10
- package/typings/classes/VisualShaderNodeParticleAccelerator.d.ts +0 -20
- package/typings/classes/VisualShaderNodeParticleBoxEmitter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeParticleConeVelocity.d.ts +0 -6
- package/typings/classes/VisualShaderNodeParticleEmit.d.ts +0 -22
- package/typings/classes/VisualShaderNodeParticleEmitter.d.ts +0 -12
- package/typings/classes/VisualShaderNodeParticleMeshEmitter.d.ts +0 -20
- package/typings/classes/VisualShaderNodeParticleMultiplyByAxisAngle.d.ts +0 -10
- package/typings/classes/VisualShaderNodeParticleOutput.d.ts +0 -6
- package/typings/classes/VisualShaderNodeParticleRandomness.d.ts +0 -22
- package/typings/classes/VisualShaderNodeParticleRingEmitter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeParticleSphereEmitter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeProximityFade.d.ts +0 -6
- package/typings/classes/VisualShaderNodeRandomRange.d.ts +0 -6
- package/typings/classes/VisualShaderNodeRemap.d.ts +0 -33
- package/typings/classes/VisualShaderNodeReroute.d.ts +0 -8
- package/typings/classes/VisualShaderNodeResizableBase.d.ts +0 -10
- package/typings/classes/VisualShaderNodeRotationByAxis.d.ts +0 -6
- package/typings/classes/VisualShaderNodeSDFRaymarch.d.ts +0 -6
- package/typings/classes/VisualShaderNodeSDFToScreenUV.d.ts +0 -8
- package/typings/classes/VisualShaderNodeSample3D.d.ts +0 -18
- package/typings/classes/VisualShaderNodeScreenNormalWorldSpace.d.ts +0 -6
- package/typings/classes/VisualShaderNodeScreenUVToSDF.d.ts +0 -8
- package/typings/classes/VisualShaderNodeSmoothStep.d.ts +0 -28
- package/typings/classes/VisualShaderNodeStep.d.ts +0 -28
- package/typings/classes/VisualShaderNodeSwitch.d.ts +0 -30
- package/typings/classes/VisualShaderNodeTexture.d.ts +0 -57
- package/typings/classes/VisualShaderNodeTexture2DArray.d.ts +0 -12
- package/typings/classes/VisualShaderNodeTexture2DArrayParameter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTexture2DParameter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTexture3D.d.ts +0 -12
- package/typings/classes/VisualShaderNodeTexture3DParameter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTextureParameter.d.ts +0 -104
- package/typings/classes/VisualShaderNodeTextureParameterTriplanar.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTextureSDF.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTextureSDFNormal.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTransformCompose.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTransformConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeTransformDecompose.d.ts +0 -6
- package/typings/classes/VisualShaderNodeTransformFunc.d.ts +0 -18
- package/typings/classes/VisualShaderNodeTransformOp.d.ts +0 -32
- package/typings/classes/VisualShaderNodeTransformParameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeTransformVecMult.d.ts +0 -22
- package/typings/classes/VisualShaderNodeUIntConstant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeUIntFunc.d.ts +0 -20
- package/typings/classes/VisualShaderNodeUIntOp.d.ts +0 -48
- package/typings/classes/VisualShaderNodeUIntParameter.d.ts +0 -16
- package/typings/classes/VisualShaderNodeUVFunc.d.ts +0 -22
- package/typings/classes/VisualShaderNodeUVPolarCoord.d.ts +0 -6
- package/typings/classes/VisualShaderNodeVarying.d.ts +0 -14
- package/typings/classes/VisualShaderNodeVaryingGetter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeVaryingSetter.d.ts +0 -6
- package/typings/classes/VisualShaderNodeVec2Constant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeVec2Parameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeVec3Constant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeVec3Parameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeVec4Constant.d.ts +0 -10
- package/typings/classes/VisualShaderNodeVec4Parameter.d.ts +0 -14
- package/typings/classes/VisualShaderNodeVectorBase.d.ts +0 -20
- package/typings/classes/VisualShaderNodeVectorCompose.d.ts +0 -8
- package/typings/classes/VisualShaderNodeVectorDecompose.d.ts +0 -8
- package/typings/classes/VisualShaderNodeVectorDistance.d.ts +0 -6
- package/typings/classes/VisualShaderNodeVectorFunc.d.ts +0 -84
- package/typings/classes/VisualShaderNodeVectorLen.d.ts +0 -6
- package/typings/classes/VisualShaderNodeVectorOp.d.ts +0 -42
- package/typings/classes/VisualShaderNodeVectorRefract.d.ts +0 -8
- package/typings/classes/VisualShaderNodeWorldPositionFromDepth.d.ts +0 -8
|
@@ -17,10 +17,10 @@ declare class SpriteFrames extends Resource {
|
|
|
17
17
|
* Duplicates the animation `anim_from` to a new animation named `anim_to`. Fails if `anim_to` already exists, or if `anim_from` does not exist.
|
|
18
18
|
*/
|
|
19
19
|
duplicate_animation(anim_from: string, anim_to: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Returns `true` if the given animation is configured to loop when it finishes playing. Otherwise, returns `false`.
|
|
22
|
-
*/
|
|
20
|
+
/** Returns `true` if `get_animation_loop_mode(anim) == LOOP_LINEAR`. Otherwise, returns `false`. */
|
|
23
21
|
get_animation_loop(anim: string): boolean;
|
|
22
|
+
/** Returns the loop mode for the `anim` animation. */
|
|
23
|
+
get_animation_loop_mode(anim: string): int;
|
|
24
24
|
/**
|
|
25
25
|
* Returns an array containing the names associated to each animation. Values are placed in alphabetical order.
|
|
26
26
|
*/
|
|
@@ -45,13 +45,29 @@ declare class SpriteFrames extends Resource {
|
|
|
45
45
|
/** Changes the `anim` animation's name to `newname`. */
|
|
46
46
|
rename_animation(anim: string, newname: string): void;
|
|
47
47
|
/**
|
|
48
|
-
* If `loop` is `
|
|
48
|
+
* If `loop` is `false` equivalent to `set_animation_loop_mode(LOOP_NONE)`.
|
|
49
|
+
* If `loop` is `true` equivalent to `set_animation_loop_mode(LOOP_LINEAR)`.
|
|
49
50
|
*/
|
|
50
51
|
set_animation_loop(anim: string, loop: boolean): void;
|
|
52
|
+
/** Sets the `loop_mode` for the `anim` animation. */
|
|
53
|
+
set_animation_loop_mode(anim: string, loop_mode: int): void;
|
|
51
54
|
/** Sets the speed for the `anim` animation in frames per second. */
|
|
52
55
|
set_animation_speed(anim: string, fps: float): void;
|
|
53
56
|
/**
|
|
54
57
|
* Sets the `texture` and the `duration` of the frame `idx` in the `anim` animation. `duration` specifies the relative duration, see {@link get_frame_duration} for details.
|
|
55
58
|
*/
|
|
56
59
|
set_frame(anim: string, idx: int, texture: Texture2D, duration?: float): void;
|
|
60
|
+
|
|
61
|
+
// enum LoopMode
|
|
62
|
+
/** The animation plays once and stops when it reaches the end, or the start if played in reverse. */
|
|
63
|
+
static readonly LOOP_NONE: int;
|
|
64
|
+
/**
|
|
65
|
+
* The animation restarts from the beginning when it reaches the end, or from the end if played in reverse, repeating continuously.
|
|
66
|
+
*/
|
|
67
|
+
static readonly LOOP_LINEAR: int;
|
|
68
|
+
/**
|
|
69
|
+
* The animation alternates direction each time it reaches the end or start, playing forward and then in reverse repeatedly.
|
|
70
|
+
* **Note:** Both {@link AnimatedSprite2D} and {@link AnimatedSprite3D} play the first/last frame for its duration only once at each end of the animation loop (instead of twice, once per forward/backward animation direction).
|
|
71
|
+
*/
|
|
72
|
+
static readonly LOOP_PINGPONG: int;
|
|
57
73
|
}
|
|
@@ -5,6 +5,6 @@ declare class StreamPeerExtension extends StreamPeer {
|
|
|
5
5
|
_get_available_bytes(): int;
|
|
6
6
|
_get_data(r_buffer: int, r_bytes: int, r_received: int): int;
|
|
7
7
|
_get_partial_data(r_buffer: int, r_bytes: int, r_received: int): int;
|
|
8
|
-
_put_data(
|
|
9
|
-
_put_partial_data(
|
|
8
|
+
_put_data(data: int, bytes: int, r_sent: int): int;
|
|
9
|
+
_put_partial_data(data: int, bytes: int, r_sent: int): int;
|
|
10
10
|
}
|
|
@@ -40,6 +40,26 @@ declare class TabBar extends Control {
|
|
|
40
40
|
tab_close_display_policy: int;
|
|
41
41
|
/** The number of tabs currently in the bar. */
|
|
42
42
|
tab_count: int;
|
|
43
|
+
/**
|
|
44
|
+
* If `true`, the tab at `index` is disabled.
|
|
45
|
+
* **Note:** `index` is a value in the `0 .. tab_count - 1` range.
|
|
46
|
+
*/
|
|
47
|
+
'tab_{index}/disabled': boolean;
|
|
48
|
+
/**
|
|
49
|
+
* If `true`, the tab at `index` is hidden.
|
|
50
|
+
* **Note:** `index` is a value in the `0 .. tab_count - 1` range.
|
|
51
|
+
*/
|
|
52
|
+
'tab_{index}/icon': Texture2D | null;
|
|
53
|
+
/**
|
|
54
|
+
* The title text of the tab at `index`.
|
|
55
|
+
* **Note:** `index` is a value in the `0 .. tab_count - 1` range.
|
|
56
|
+
*/
|
|
57
|
+
'tab_{index}/title': string;
|
|
58
|
+
/**
|
|
59
|
+
* The tooltip text of the tab at `index`.
|
|
60
|
+
* **Note:** `index` is a value in the `0 .. tab_count - 1` range.
|
|
61
|
+
*/
|
|
62
|
+
'tab_{index}/tooltip': string;
|
|
43
63
|
/**
|
|
44
64
|
* {@link TabBar}s with the same rearrange group ID will allow dragging the tabs between them. Enable drag with {@link drag_to_rearrange_enabled}.
|
|
45
65
|
* Setting this to `-1` will disable rearranging between {@link TabBar}s.
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/** A container that creates a tab for each child control, displaying only the active tab's control. */
|
|
5
5
|
declare class TabContainer extends Container {
|
|
6
|
-
/**
|
|
7
|
-
* If `true`, all tabs are drawn in front of the panel. If `false`, inactive tabs are drawn behind the panel.
|
|
8
|
-
*/
|
|
6
|
+
/** This doesn't do anything. */
|
|
9
7
|
all_tabs_in_front: boolean;
|
|
10
8
|
/**
|
|
11
9
|
* If `true`, tabs overflowing this node's width will be hidden, displaying two navigation buttons instead. Otherwise, this node's minimum size is updated so that all tabs are visible.
|
|
@@ -31,6 +29,26 @@ declare class TabContainer extends Container {
|
|
|
31
29
|
tab_alignment: int;
|
|
32
30
|
/** The focus access mode for the internal {@link TabBar} node. */
|
|
33
31
|
tab_focus_mode: int;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the tab at `index` is disabled.
|
|
34
|
+
* **Note:** `index` is a value in the `0 .. get_tab_count() - 1` range.
|
|
35
|
+
*/
|
|
36
|
+
'tab_{index}/disabled': boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If `true`, the tab at `index` is hidden.
|
|
39
|
+
* **Note:** `index` is a value in the `0 .. get_tab_count() - 1` range.
|
|
40
|
+
*/
|
|
41
|
+
'tab_{index}/hidden': boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The title text of the tab at `index`.
|
|
44
|
+
* **Note:** `index` is a value in the `0 .. get_tab_count() - 1` range.
|
|
45
|
+
*/
|
|
46
|
+
'tab_{index}/icon': Texture2D | null;
|
|
47
|
+
/**
|
|
48
|
+
* The tooltip text of the tab at `index`.
|
|
49
|
+
* **Note:** `index` is a value in the `0 .. get_tab_count() - 1` range.
|
|
50
|
+
*/
|
|
51
|
+
'tab_{index}/title': string;
|
|
34
52
|
/** The horizontal alignment of the tabs. */
|
|
35
53
|
tabs_position: int;
|
|
36
54
|
/**
|
|
@@ -85,11 +85,11 @@ declare class TextEdit extends Control {
|
|
|
85
85
|
*/
|
|
86
86
|
mouse_default_cursor_shape: int;
|
|
87
87
|
/**
|
|
88
|
-
* If `true`, {@link TextEdit}
|
|
88
|
+
* If `true`, {@link TextEdit} fits its minimum height to the number of visible lines instead of scrolling vertically. If a maximum height is set (for example via {@link Control.custom_maximum_size}) and content exceeds it, a vertical scrollbar is shown.
|
|
89
89
|
*/
|
|
90
90
|
scroll_fit_content_height: boolean;
|
|
91
91
|
/**
|
|
92
|
-
* If `true`, {@link TextEdit}
|
|
92
|
+
* If `true`, {@link TextEdit} fits its minimum width to the widest line instead of scrolling horizontally. If a maximum width is set (for example via {@link Control.custom_maximum_size}) and content exceeds it, a horizontal scrollbar is shown.
|
|
93
93
|
*/
|
|
94
94
|
scroll_fit_content_width: boolean;
|
|
95
95
|
/** If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. */
|
|
@@ -148,6 +148,20 @@ declare class TextServer extends RefCounted {
|
|
|
148
148
|
* Returns oversampling factor override. If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See {@link Viewport.oversampling}. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
|
|
149
149
|
*/
|
|
150
150
|
font_get_oversampling(font_rid: RID): float;
|
|
151
|
+
/**
|
|
152
|
+
* Returns the array in the predefined color palette at `index`. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using {@link font_set_palette_custom_colors}.
|
|
153
|
+
*/
|
|
154
|
+
font_get_palette_colors(font_rid: RID, index: int): PackedColorArray;
|
|
155
|
+
/**
|
|
156
|
+
* Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
|
|
157
|
+
*/
|
|
158
|
+
font_get_palette_count(font_rid: RID): int;
|
|
159
|
+
/** Returns array of custom colors to override predefined palette. */
|
|
160
|
+
font_get_palette_custom_colors(font_rid: RID): PackedColorArray;
|
|
161
|
+
/**
|
|
162
|
+
* Returns the name of the predefined color palette at `index`. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
|
|
163
|
+
*/
|
|
164
|
+
font_get_palette_name(font_rid: RID, index: int): string;
|
|
151
165
|
/** Returns scaling factor of the color bitmap font. */
|
|
152
166
|
font_get_scale(font_rid: RID, size: int): float;
|
|
153
167
|
/** Returns `true` if support override is enabled for the `script`. */
|
|
@@ -190,6 +204,8 @@ declare class TextServer extends RefCounted {
|
|
|
190
204
|
font_get_underline_position(font_rid: RID, size: int): float;
|
|
191
205
|
/** Returns thickness of the underline in pixels. */
|
|
192
206
|
font_get_underline_thickness(font_rid: RID, size: int): float;
|
|
207
|
+
/** Returns used palette index. */
|
|
208
|
+
font_get_used_palette(font_rid: RID): int;
|
|
193
209
|
/**
|
|
194
210
|
* Returns variation coordinates for the specified font cache entry. See {@link font_supported_variation_list} for more info.
|
|
195
211
|
*/
|
|
@@ -302,7 +318,7 @@ declare class TextServer extends RefCounted {
|
|
|
302
318
|
/**
|
|
303
319
|
* If set to `true`, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only.
|
|
304
320
|
*/
|
|
305
|
-
font_set_modulate_color_glyphs(font_rid: RID,
|
|
321
|
+
font_set_modulate_color_glyphs(font_rid: RID, modulate: boolean): void;
|
|
306
322
|
/**
|
|
307
323
|
* Sets the width of the range around the shape between the minimum and maximum representable signed distance.
|
|
308
324
|
*/
|
|
@@ -322,6 +338,10 @@ declare class TextServer extends RefCounted {
|
|
|
322
338
|
* If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See {@link Viewport.oversampling}. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
|
|
323
339
|
*/
|
|
324
340
|
font_set_oversampling(font_rid: RID, oversampling: float): void;
|
|
341
|
+
/**
|
|
342
|
+
* Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use `Color(0, 0, 0, 0)`, to keep predefined palette color at specific position.
|
|
343
|
+
*/
|
|
344
|
+
font_set_palette_custom_colors(font_rid: RID, colors: PackedColorArray | Array<unknown>): void;
|
|
325
345
|
/** Sets scaling factor of the color bitmap font. */
|
|
326
346
|
font_set_scale(font_rid: RID, size: int, scale: float): void;
|
|
327
347
|
/** Adds override for {@link font_is_script_supported}. */
|
|
@@ -355,6 +375,8 @@ declare class TextServer extends RefCounted {
|
|
|
355
375
|
font_set_underline_position(font_rid: RID, size: int, underline_position: float): void;
|
|
356
376
|
/** Sets thickness of the underline in pixels. */
|
|
357
377
|
font_set_underline_thickness(font_rid: RID, size: int, underline_thickness: float): void;
|
|
378
|
+
/** Sets used palette index. */
|
|
379
|
+
font_set_used_palette(font_rid: RID, index: int): void;
|
|
358
380
|
/**
|
|
359
381
|
* Sets variation coordinates for the specified font cache entry. See {@link font_supported_variation_list} for more info.
|
|
360
382
|
*/
|
|
@@ -112,6 +112,20 @@ declare class TextServerExtension extends TextServer {
|
|
|
112
112
|
* Returns oversampling factor override. If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See {@link Viewport.oversampling}. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
|
|
113
113
|
*/
|
|
114
114
|
_font_get_oversampling(font_rid: RID): float;
|
|
115
|
+
/**
|
|
116
|
+
* Returns the array in the predefined color palette at `index`. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using {@link _font_set_palette_custom_colors}.
|
|
117
|
+
*/
|
|
118
|
+
_font_get_palette_colors(font_rid: RID, index: int): PackedColorArray;
|
|
119
|
+
/**
|
|
120
|
+
* Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
|
|
121
|
+
*/
|
|
122
|
+
_font_get_palette_count(font_rid: RID): int;
|
|
123
|
+
/** Returns array of custom colors to override predefined palette. */
|
|
124
|
+
_font_get_palette_custom_colors(font_rid: RID): PackedColorArray;
|
|
125
|
+
/**
|
|
126
|
+
* Returns the name of the predefined color palette at `index`. Palette contains all colors used to render font glyphs. Each palette has the same number of colors.
|
|
127
|
+
*/
|
|
128
|
+
_font_get_palette_name(font_rid: RID, index: int): string;
|
|
115
129
|
/** Returns scaling factor of the color bitmap font. */
|
|
116
130
|
_font_get_scale(font_rid: RID, size: int): float;
|
|
117
131
|
/** Returns `true` if support override is enabled for the `script`. */
|
|
@@ -154,6 +168,8 @@ declare class TextServerExtension extends TextServer {
|
|
|
154
168
|
_font_get_underline_position(font_rid: RID, size: int): float;
|
|
155
169
|
/** Returns thickness of the underline in pixels. */
|
|
156
170
|
_font_get_underline_thickness(font_rid: RID, size: int): float;
|
|
171
|
+
/** Returns used palette index. */
|
|
172
|
+
_font_get_used_palette(font_rid: RID): int;
|
|
157
173
|
/** Returns variation coordinates for the specified font cache entry. */
|
|
158
174
|
_font_get_variation_coordinates(font_rid: RID): Dictionary;
|
|
159
175
|
/**
|
|
@@ -272,6 +288,10 @@ declare class TextServerExtension extends TextServer {
|
|
|
272
288
|
* If set to a positive value, overrides the oversampling factor of the viewport this font is used in. See {@link Viewport.oversampling}. This value doesn't override the [code skip-lint]oversampling[/code] parameter of [code skip-lint]draw_*[/code] methods. Used by dynamic fonts only.
|
|
273
289
|
*/
|
|
274
290
|
_font_set_oversampling(font_rid: RID, oversampling: float): void;
|
|
291
|
+
/**
|
|
292
|
+
* Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use `Color(0, 0, 0, 0)`, to keep predefined palette color at specific position.
|
|
293
|
+
*/
|
|
294
|
+
_font_set_palette_custom_colors(font_rid: RID, colors: PackedColorArray | Array<unknown>): void;
|
|
275
295
|
/** Sets scaling factor of the color bitmap font. */
|
|
276
296
|
_font_set_scale(font_rid: RID, size: int, scale: float): void;
|
|
277
297
|
/** Adds override for {@link _font_is_script_supported}. */
|
|
@@ -298,6 +318,8 @@ declare class TextServerExtension extends TextServer {
|
|
|
298
318
|
_font_set_underline_position(font_rid: RID, size: int, underline_position: float): void;
|
|
299
319
|
/** Sets thickness of the underline in pixels. */
|
|
300
320
|
_font_set_underline_thickness(font_rid: RID, size: int, underline_thickness: float): void;
|
|
321
|
+
/** Sets used palette index. */
|
|
322
|
+
_font_set_used_palette(font_rid: RID, index: int): void;
|
|
301
323
|
/** Sets variation coordinates for the specified font cache entry. */
|
|
302
324
|
_font_set_variation_coordinates(font_rid: RID, variation_coordinates: Dictionary): void;
|
|
303
325
|
/**
|
|
@@ -426,7 +448,7 @@ declare class TextServerExtension extends TextServer {
|
|
|
426
448
|
/**
|
|
427
449
|
* Returns shapes of the carets corresponding to the character offset `position` in the text. Returned caret shape is 1 pixel wide rectangle.
|
|
428
450
|
*/
|
|
429
|
-
_shaped_text_get_carets(shaped: RID, position: int,
|
|
451
|
+
_shaped_text_get_carets(shaped: RID, position: int, r_caret: unknown): void;
|
|
430
452
|
/** Returns array of the composite character boundaries. */
|
|
431
453
|
_shaped_text_get_character_breaks(shaped: RID): PackedInt32Array;
|
|
432
454
|
/** Returns ellipsis character used for text clipping. */
|
|
@@ -70,6 +70,8 @@ declare class TileSet extends Resource {
|
|
|
70
70
|
add_terrain_set(to_position?: int): void;
|
|
71
71
|
/** Clears tile proxies pointing to invalid tiles. */
|
|
72
72
|
cleanup_invalid_tile_proxies(): void;
|
|
73
|
+
/** Clears all terrain properties for the given terrain set. */
|
|
74
|
+
clear_terrains(terrain_set: int): void;
|
|
73
75
|
/** Clears all tile proxies. */
|
|
74
76
|
clear_tile_proxies(): void;
|
|
75
77
|
/**
|
|
@@ -218,7 +220,7 @@ declare class TileSet extends Resource {
|
|
|
218
220
|
* Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
|
|
219
221
|
* Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
|
|
220
222
|
*/
|
|
221
|
-
set_coords_level_tile_proxy(
|
|
223
|
+
set_coords_level_tile_proxy(source_from: int, coords_from: Vector2i | Vector2, source_to: int, coords_to: Vector2i | Vector2): void;
|
|
222
224
|
/**
|
|
223
225
|
* Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
|
|
224
226
|
*/
|
|
@@ -132,14 +132,23 @@ declare class Tree extends Control {
|
|
|
132
132
|
get_column_title_tooltip_text(column: int): string;
|
|
133
133
|
/** Returns the column's width in pixels. */
|
|
134
134
|
get_column_width(column: int): int;
|
|
135
|
+
/**
|
|
136
|
+
* Returns the internal canvas item designated for custom drawing. See {@link TreeItem.set_custom_draw_callback}.
|
|
137
|
+
* **Note:** This canvas item clears automatically on each Tree draw call.
|
|
138
|
+
*/
|
|
139
|
+
get_custom_drawing_canvas_item(): RID;
|
|
135
140
|
/**
|
|
136
141
|
* Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See {@link TreeItem.set_cell_mode}.
|
|
137
142
|
*/
|
|
138
143
|
get_custom_popup_rect(): Rect2;
|
|
139
144
|
/**
|
|
140
|
-
* Returns the drop section at `position`,
|
|
141
|
-
*
|
|
142
|
-
*
|
|
145
|
+
* Returns the drop section at `position`, as permitted by enabled {@link DropModeFlags}.
|
|
146
|
+
* - `-1` if the position is **above** the item. Typically used to insert as the item's previous sibling.
|
|
147
|
+
* - `0` if the position is **on** the item. Typically used to insert as the item's last child.
|
|
148
|
+
* - `1` if the position is **below** the item, when the item has no children. Typically used to insert as the item's next sibling. If the item *does* have children, this section is still reachable by hovering to the left of the item's collapse arrow, and below.
|
|
149
|
+
* - `2` if the position is **below** the item, when the item has children. Typically used to insert as the item's first child.
|
|
150
|
+
* - `-100` if the position is not over any item, or no {@link DropModeFlags} are set.
|
|
151
|
+
* See {@link DropModeFlags} for a description of each drop region. To get the item which the returned drop section refers to, use {@link get_item_at_position}.
|
|
143
152
|
*/
|
|
144
153
|
get_drop_section_at_position(position: Vector2 | Vector2i): int;
|
|
145
154
|
/**
|
|
@@ -272,18 +281,18 @@ declare class Tree extends Control {
|
|
|
272
281
|
static readonly SELECT_MULTI: int;
|
|
273
282
|
// enum DropModeFlags
|
|
274
283
|
/**
|
|
275
|
-
* Disables all drop sections
|
|
284
|
+
* Disables all drop sections.
|
|
276
285
|
* **Note:** This is the default flag, it has no effect when combined with other flags.
|
|
277
286
|
*/
|
|
278
287
|
static readonly DROP_MODE_DISABLED: int;
|
|
279
288
|
/**
|
|
280
289
|
* Enables the "on item" drop section. This drop section covers the entire item.
|
|
281
|
-
* When combined with {@link DROP_MODE_INBETWEEN}, this drop section halves
|
|
290
|
+
* When combined with {@link DROP_MODE_INBETWEEN}, this drop section halves in height and stays centered vertically.
|
|
282
291
|
*/
|
|
283
292
|
static readonly DROP_MODE_ON_ITEM: int;
|
|
284
293
|
/**
|
|
285
|
-
* Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item,
|
|
286
|
-
* When combined with {@link DROP_MODE_ON_ITEM}, these drop sections
|
|
294
|
+
* Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, while the "below item" drop section covers the bottom half, and extends downward to the left of any children.
|
|
295
|
+
* When combined with {@link DROP_MODE_ON_ITEM}, these drop sections halve in height and stay at the top and bottom respectively.
|
|
287
296
|
*/
|
|
288
297
|
static readonly DROP_MODE_INBETWEEN: int;
|
|
289
298
|
// enum ScrollHintMode
|
|
@@ -175,6 +175,8 @@ declare class TreeItem extends GodotObject {
|
|
|
175
175
|
get_tooltip_text(column: int): string;
|
|
176
176
|
/** Returns the {@link Tree} that owns this TreeItem. */
|
|
177
177
|
get_tree(): Tree | null;
|
|
178
|
+
/** Returns `true` if this {@link TreeItem} is allowed to accept children. */
|
|
179
|
+
is_accepting_children(): boolean;
|
|
178
180
|
/**
|
|
179
181
|
* Returns `true` if this {@link TreeItem}, or any of its descendants, is collapsed.
|
|
180
182
|
* If `only_visible` is `true` it ignores non-visible {@link TreeItem}s.
|
|
@@ -217,8 +219,12 @@ declare class TreeItem extends GodotObject {
|
|
|
217
219
|
* **Note:** If you want to move a child from one {@link Tree} to another, then instead of removing and adding it manually you can use {@link move_before} or {@link move_after}.
|
|
218
220
|
*/
|
|
219
221
|
remove_child(child: TreeItem): void;
|
|
220
|
-
/**
|
|
221
|
-
|
|
222
|
+
/**
|
|
223
|
+
* Selects the given `column`. If `set_as_cursor` is `true`, the {@link Tree}'s cursor will be moved to this item (only matters if {@link Tree.select_mode} is set to {@link Tree.SELECT_MULTI}).
|
|
224
|
+
*/
|
|
225
|
+
select(column: int, set_as_cursor?: boolean): void;
|
|
226
|
+
/** Sets {@link TreeItem}'s ability to accept children. */
|
|
227
|
+
set_accept_children(allowed: boolean): void;
|
|
222
228
|
/**
|
|
223
229
|
* Sets the given column's auto translate mode to `mode`.
|
|
224
230
|
* All columns use {@link Node.AUTO_TRANSLATE_MODE_INHERIT} by default, which uses the same auto translate mode as the {@link Tree} itself.
|
|
@@ -265,6 +271,7 @@ declare class TreeItem extends GodotObject {
|
|
|
265
271
|
/**
|
|
266
272
|
* Sets the given column's custom draw callback. Use an empty {@link Callable} ([code skip-lint]Callable()[/code]) to clear the custom callback. The cell has to be in {@link CELL_MODE_CUSTOM} to use this feature.
|
|
267
273
|
* The `callback` should accept two arguments: the {@link TreeItem} that is drawn and its position and size as a {@link Rect2}.
|
|
274
|
+
* To draw custom content over the native style, please use {@link Tree.get_custom_drawing_canvas_item}.
|
|
268
275
|
*/
|
|
269
276
|
set_custom_draw_callback(column: int, callback: Callable): void;
|
|
270
277
|
/** Sets custom font used to draw text in the given `column`. */
|
|
@@ -68,13 +68,13 @@ declare class UndoRedo extends GodotObject {
|
|
|
68
68
|
* Returns `true` if the {@link UndoRedo} is currently committing the action, i.e. running its "do" method or property change (see {@link commit_action}).
|
|
69
69
|
*/
|
|
70
70
|
is_committing_action(): boolean;
|
|
71
|
-
/** Redo the last action. */
|
|
71
|
+
/** Redo the last action. Returns `false` if there was no action to redo. */
|
|
72
72
|
redo(): boolean;
|
|
73
73
|
/**
|
|
74
74
|
* Marks the next "do" and "undo" operations to be processed even if the action gets merged with another in the {@link MERGE_ENDS} mode. Return to normal operation using {@link end_force_keep_in_merge_ends}.
|
|
75
75
|
*/
|
|
76
76
|
start_force_keep_in_merge_ends(): void;
|
|
77
|
-
/** Undo the last action. */
|
|
77
|
+
/** Undo the last action. Returns `false` if there was no action to undo. */
|
|
78
78
|
undo(): boolean;
|
|
79
79
|
|
|
80
80
|
/** Called when {@link undo} or {@link redo} was called. */
|
|
@@ -74,11 +74,13 @@ declare interface Vector2 {
|
|
|
74
74
|
*/
|
|
75
75
|
direction_to(to: Vector2 | Vector2i): Vector2;
|
|
76
76
|
/**
|
|
77
|
-
* Returns the squared distance between this vector and `to`.
|
|
77
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
78
78
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
79
79
|
*/
|
|
80
80
|
distance_squared_to(to: Vector2 | Vector2i): float;
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
83
|
+
*/
|
|
82
84
|
distance_to(to: Vector2 | Vector2i): float;
|
|
83
85
|
/**
|
|
84
86
|
* Returns the dot product of this vector and `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.
|
|
@@ -21,11 +21,13 @@ declare interface Vector2i {
|
|
|
21
21
|
*/
|
|
22
22
|
clampi(min: int, max: int): Vector2i;
|
|
23
23
|
/**
|
|
24
|
-
* Returns the squared distance between this vector and `to`.
|
|
24
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
25
25
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
26
26
|
*/
|
|
27
27
|
distance_squared_to(to: Vector2i | Vector2): int;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
30
|
+
*/
|
|
29
31
|
distance_to(to: Vector2i | Vector2): float;
|
|
30
32
|
/** Returns the length (magnitude) of this vector. */
|
|
31
33
|
length(): float;
|
|
@@ -56,11 +56,13 @@ declare interface Vector3 {
|
|
|
56
56
|
*/
|
|
57
57
|
direction_to(to: Vector3 | Vector3i): Vector3;
|
|
58
58
|
/**
|
|
59
|
-
* Returns the squared distance between this vector and `to`.
|
|
59
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
60
60
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
61
61
|
*/
|
|
62
62
|
distance_squared_to(to: Vector3 | Vector3i): float;
|
|
63
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
65
|
+
*/
|
|
64
66
|
distance_to(to: Vector3 | Vector3i): float;
|
|
65
67
|
/**
|
|
66
68
|
* Returns the dot product of this vector and `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.
|
|
@@ -21,11 +21,13 @@ declare interface Vector3i {
|
|
|
21
21
|
*/
|
|
22
22
|
clampi(min: int, max: int): Vector3i;
|
|
23
23
|
/**
|
|
24
|
-
* Returns the squared distance between this vector and `to`.
|
|
24
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
25
25
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
26
26
|
*/
|
|
27
27
|
distance_squared_to(to: Vector3i | Vector3): int;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
30
|
+
*/
|
|
29
31
|
distance_to(to: Vector3i | Vector3): float;
|
|
30
32
|
/** Returns the length (magnitude) of this vector. */
|
|
31
33
|
length(): float;
|
|
@@ -38,11 +38,13 @@ declare interface Vector4 {
|
|
|
38
38
|
*/
|
|
39
39
|
direction_to(to: Vector4 | Vector4i): Vector4;
|
|
40
40
|
/**
|
|
41
|
-
* Returns the squared distance between this vector and `to`.
|
|
41
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
42
42
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
43
43
|
*/
|
|
44
44
|
distance_squared_to(to: Vector4 | Vector4i): float;
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
47
|
+
*/
|
|
46
48
|
distance_to(to: Vector4 | Vector4i): float;
|
|
47
49
|
/** Returns the dot product of this vector and `with`. */
|
|
48
50
|
dot(with_: Vector4 | Vector4i): float;
|
|
@@ -23,11 +23,13 @@ declare interface Vector4i {
|
|
|
23
23
|
*/
|
|
24
24
|
clampi(min: int, max: int): Vector4i;
|
|
25
25
|
/**
|
|
26
|
-
* Returns the squared distance between this vector and `to`.
|
|
26
|
+
* Returns the squared Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
27
27
|
* This method runs faster than {@link distance_to}, so prefer it if you need to compare vectors or need the squared distance for some formula.
|
|
28
28
|
*/
|
|
29
29
|
distance_squared_to(to: Vector4i | Vector4): int;
|
|
30
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Returns the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between this vector and `to`.
|
|
32
|
+
*/
|
|
31
33
|
distance_to(to: Vector4i | Vector4): float;
|
|
32
34
|
/** Returns the length (magnitude) of this vector. */
|
|
33
35
|
length(): float;
|
|
@@ -152,8 +152,9 @@ declare class Viewport extends Node {
|
|
|
152
152
|
/**
|
|
153
153
|
* Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close).
|
|
154
154
|
* Enabling temporal antialiasing ({@link use_taa}) will automatically apply a `-0.5` offset to this value, while enabling FXAA ({@link screen_space_aa}) will automatically apply a `-0.25` offset to this value. If both TAA and FXAA are enabled at the same time, an offset of `-0.75` is applied to this value.
|
|
155
|
-
* **Note:** If {@link scaling_3d_scale} is lower than `1.0` (exclusive), {@link texture_mipmap_bias} is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is `log2(scaling_3d_scale) + mipmap_bias`.
|
|
156
155
|
* To control this property on the root viewport, set the {@link ProjectSettings.rendering/textures/default_filters/texture_mipmap_bias} project setting.
|
|
156
|
+
* **Note:** If {@link scaling_3d_scale} is lower than `1.0` (exclusive), {@link texture_mipmap_bias} is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is `log2(scaling_3d_scale) + mipmap_bias`.
|
|
157
|
+
* **Note:** This property is only supported in the Forward+ and Mobile renderers, not Compatibility. In Compatibility, this property is always treated as if it was set to `0.0`.
|
|
157
158
|
*/
|
|
158
159
|
texture_mipmap_bias: float;
|
|
159
160
|
/**
|
|
@@ -531,6 +532,11 @@ declare class Viewport extends Node {
|
|
|
531
532
|
* **Note:** Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
|
|
532
533
|
*/
|
|
533
534
|
static readonly SCALING_3D_MODE_METALFX_TEMPORAL: int;
|
|
535
|
+
/**
|
|
536
|
+
* Use nearest-neighbor filtering for the viewport's 3D buffer. This looks crisper than {@link SCALING_3D_MODE_BILINEAR} and has no additional rendering cost. The amount of scaling can be set using {@link scaling_3d_scale}. Values greater than `1.0` are not supported and bilinear downsampling will be used instead. A value of `1.0` disables scaling.
|
|
537
|
+
* **Note:** When using the **Nearest** scaling mode, to avoid uneven pixel scaling, it's highly recommended to use a value equal to an integer divisor with a dividend of `1`. For example, it's best to use a scale of `0.5` (1/2), `0.3333` (1/3), `0.25` (1/4), `0.2` (1/5), and so on.
|
|
538
|
+
*/
|
|
539
|
+
static readonly SCALING_3D_MODE_NEAREST: int;
|
|
534
540
|
/** Represents the size of the {@link Scaling3DMode} enum. */
|
|
535
541
|
static readonly SCALING_3D_MODE_MAX: int;
|
|
536
542
|
// enum MSAA
|
|
@@ -728,6 +734,16 @@ declare class Viewport extends Node {
|
|
|
728
734
|
* **Note:** Only supported when using the Forward+ or Mobile rendering methods.
|
|
729
735
|
*/
|
|
730
736
|
static readonly DEBUG_DRAW_INTERNAL_BUFFER: int;
|
|
737
|
+
/**
|
|
738
|
+
* Draws the cluster used by {@link AreaLight3D} nodes to optimize light rendering.
|
|
739
|
+
* **Note:** Only supported when using the Forward+ rendering method.
|
|
740
|
+
*/
|
|
741
|
+
static readonly DEBUG_DRAW_CLUSTER_AREA_LIGHTS: int;
|
|
742
|
+
/**
|
|
743
|
+
* Draws the atlas used by {@link AreaLight3D} nodes in the upper left quadrant of the {@link Viewport}.
|
|
744
|
+
* **Note:** Only supported when using the Forward+ or Mobile rendering method.
|
|
745
|
+
*/
|
|
746
|
+
static readonly DEBUG_DRAW_AREA_LIGHT_ATLAS: int;
|
|
731
747
|
// enum DefaultCanvasItemTextureFilter
|
|
732
748
|
/**
|
|
733
749
|
* The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
|
|
@@ -288,8 +288,8 @@ declare class Window extends Viewport {
|
|
|
288
288
|
/** Returns layout direction and text writing direction. */
|
|
289
289
|
get_layout_direction(): int;
|
|
290
290
|
/**
|
|
291
|
-
* Returns the maximum value for linear color components that can be displayed in this window, regardless of SDR or HDR output. Returns `1.0` if HDR is not enabled or not supported.
|
|
292
|
-
*
|
|
291
|
+
* Returns the maximum value for linear color components that can be displayed in this window, regardless of SDR or HDR output. Returns `1.0` if HDR is not enabled or not supported. The {@link output_max_linear_value_changed} signal will be emitted whenever this value changes.
|
|
292
|
+
* This value is used by tonemapping and other {@link Environment} effects to ensure that bright colors are presented in the range that can be displayed by this window. When using this maximum linear value in your project, it should only be used to present colors directly to the screen without tonemapping and without influencing lighting, post-processing effects, or surrounding color. The following is an example that produces the brightest purple color that the screen can produce:
|
|
293
293
|
* **Note:** You will need to convert sRGB colors to linear before multiplying by this value to get correct results.
|
|
294
294
|
*/
|
|
295
295
|
get_output_max_linear_value(): float;
|
|
@@ -593,6 +593,10 @@ declare class Window extends Viewport {
|
|
|
593
593
|
* Emitted when the mouse event is received by the custom decoration area defined by {@link nonclient_area}, and normal input to the window is blocked (such as when it has an exclusive child opened). `event`'s position is in the embedder's coordinate system.
|
|
594
594
|
*/
|
|
595
595
|
nonclient_window_input: Signal<[InputEvent]>;
|
|
596
|
+
/**
|
|
597
|
+
* Emitted when the output max linear value returned by {@link Window.get_output_max_linear_value} has changed. This occurs when HDR output is enabled or disabled and when any HDR output luminance values of the window have changed, such as when the player adjusts their screen brightness setting or moves the window to a different screen. `output_max_linear_value` is the new value.
|
|
598
|
+
*/
|
|
599
|
+
output_max_linear_value_changed: Signal<[float]>;
|
|
596
600
|
/** Emitted when the {@link NOTIFICATION_THEME_CHANGED} notification is sent. */
|
|
597
601
|
theme_changed: Signal<[]>;
|
|
598
602
|
/** Emitted when window title bar text is changed. */
|
|
@@ -644,39 +648,45 @@ declare class Window extends Viewport {
|
|
|
644
648
|
// enum Flags
|
|
645
649
|
/**
|
|
646
650
|
* The window can't be resized by dragging its resize grip. It's still possible to resize the window using {@link size}. This flag is ignored for full screen windows. Set with {@link unresizable}.
|
|
651
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, Windows, and embedded windows.
|
|
647
652
|
*/
|
|
648
653
|
static readonly FLAG_RESIZE_DISABLED: int;
|
|
649
654
|
/**
|
|
650
655
|
* The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. Set with {@link borderless}.
|
|
656
|
+
* **Note:** This flag is implemented on Linux (X11/Wayland), macOS, Windows, and embedded windows.
|
|
651
657
|
*/
|
|
652
658
|
static readonly FLAG_BORDERLESS: int;
|
|
653
659
|
/**
|
|
654
660
|
* The window is floating on top of all other windows. This flag is ignored for full-screen windows. Set with {@link always_on_top}.
|
|
661
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, Windows, and embedded windows.
|
|
655
662
|
*/
|
|
656
663
|
static readonly FLAG_ALWAYS_ON_TOP: int;
|
|
657
664
|
/**
|
|
658
665
|
* The window background can be transparent. Set with {@link transparent}.
|
|
659
666
|
* **Note:** This flag has no effect if either {@link ProjectSettings.display/window/per_pixel_transparency/allowed}, or the window's {@link Viewport.transparent_bg} is set to `false`.
|
|
667
|
+
* **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, Windows, and embedded windows.
|
|
660
668
|
*/
|
|
661
669
|
static readonly FLAG_TRANSPARENT: int;
|
|
662
670
|
/**
|
|
663
671
|
* The window can't be focused. No-focus window will ignore all input, except mouse clicks. Set with {@link unfocusable}.
|
|
672
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, Windows, and embedded windows.
|
|
664
673
|
*/
|
|
665
674
|
static readonly FLAG_NO_FOCUS: int;
|
|
666
675
|
/**
|
|
667
676
|
* Window is part of menu or {@link OptionButton} dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see {@link transient}).
|
|
668
|
-
* **Note:** This flag
|
|
677
|
+
* **Note:** This flag is implemented on Linux (X11/Wayland), macOS, Windows, and embedded {@link Popup} windows.
|
|
669
678
|
*/
|
|
670
679
|
static readonly FLAG_POPUP: int;
|
|
671
680
|
/**
|
|
672
681
|
* Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. Set with {@link extend_to_title}.
|
|
673
|
-
* **Note:** This flag is implemented only on macOS.
|
|
674
682
|
* **Note:** This flag has no effect in embedded windows.
|
|
683
|
+
* **Note:** This flag is implemented only on macOS.
|
|
675
684
|
*/
|
|
676
685
|
static readonly FLAG_EXTEND_TO_TITLE: int;
|
|
677
686
|
/**
|
|
678
687
|
* All mouse events are passed to the underlying window of the same application.
|
|
679
688
|
* **Note:** This flag has no effect in embedded windows.
|
|
689
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, Windows.
|
|
680
690
|
*/
|
|
681
691
|
static readonly FLAG_MOUSE_PASSTHROUGH: int;
|
|
682
692
|
/**
|
|
@@ -694,16 +704,20 @@ declare class Window extends Viewport {
|
|
|
694
704
|
static readonly FLAG_EXCLUDE_FROM_CAPTURE: int;
|
|
695
705
|
/**
|
|
696
706
|
* Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window).
|
|
707
|
+
* **Note:** This flag has no effect in embedded windows.
|
|
708
|
+
* **Note:** This flag is implemented on Linux (Wayland).
|
|
697
709
|
*/
|
|
698
710
|
static readonly FLAG_POPUP_WM_HINT: int;
|
|
699
711
|
/**
|
|
700
712
|
* Window minimize button is disabled.
|
|
701
|
-
* **Note:** This flag
|
|
713
|
+
* **Note:** This flag has no effect in embedded windows.
|
|
714
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, and Windows.
|
|
702
715
|
*/
|
|
703
716
|
static readonly FLAG_MINIMIZE_DISABLED: int;
|
|
704
717
|
/**
|
|
705
718
|
* Window maximize button is disabled.
|
|
706
|
-
* **Note:** This flag
|
|
719
|
+
* **Note:** This flag has no effect in embedded windows.
|
|
720
|
+
* **Note:** This flag is implemented on Linux (X11), macOS, and Windows.
|
|
707
721
|
*/
|
|
708
722
|
static readonly FLAG_MAXIMIZE_DISABLED: int;
|
|
709
723
|
/** Max value of the {@link Flags}. */
|