typescript-to-gdscript 0.1.0 → 0.1.1
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 +229 -103
- 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/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 +1 -1
- 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/package.json +6 -1
- package/typings/classes/AnimationNodeBlendSpace1D.d.ts +2 -17
- package/typings/classes/AnimationNodeBlendSpace2D.d.ts +2 -17
- package/typings/classes/Area3D.d.ts +7 -14
- package/typings/classes/ArrayMesh.d.ts +0 -15
- package/typings/classes/AudioEffectAmplify.d.ts +2 -2
- package/typings/classes/AudioEffectBandLimitFilter.d.ts +1 -1
- package/typings/classes/AudioEffectBandPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectCapture.d.ts +9 -10
- package/typings/classes/AudioEffectChorus.d.ts +28 -57
- package/typings/classes/AudioEffectCompressor.d.ts +9 -11
- package/typings/classes/AudioEffectDelay.d.ts +15 -21
- package/typings/classes/AudioEffectDistortion.d.ts +10 -19
- package/typings/classes/AudioEffectEQ.d.ts +2 -2
- package/typings/classes/AudioEffectEQ10.d.ts +2 -2
- package/typings/classes/AudioEffectEQ21.d.ts +2 -2
- package/typings/classes/AudioEffectEQ6.d.ts +2 -2
- package/typings/classes/AudioEffectFilter.d.ts +9 -25
- package/typings/classes/AudioEffectHardLimiter.d.ts +5 -8
- package/typings/classes/AudioEffectHighPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectHighShelfFilter.d.ts +1 -1
- package/typings/classes/AudioEffectLimiter.d.ts +4 -9
- package/typings/classes/AudioEffectLowPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectLowShelfFilter.d.ts +1 -1
- package/typings/classes/AudioEffectNotchFilter.d.ts +1 -1
- package/typings/classes/AudioEffectPanner.d.ts +2 -7
- package/typings/classes/AudioEffectPhaser.d.ts +7 -9
- package/typings/classes/AudioEffectPitchShift.d.ts +3 -3
- package/typings/classes/AudioEffectReverb.d.ts +8 -17
- package/typings/classes/AudioEffectSpectrumAnalyzer.d.ts +5 -4
- package/typings/classes/AudioEffectStereoEnhance.d.ts +4 -7
- package/typings/classes/AudioServer.d.ts +2 -2
- package/typings/classes/AudioStreamPlaybackResampled.d.ts +0 -8
- package/typings/classes/BaseButton.d.ts +1 -1
- package/typings/classes/Basis.d.ts +0 -4
- package/typings/classes/Camera3D.d.ts +1 -1
- package/typings/classes/CameraAttributes.d.ts +0 -1
- package/typings/classes/CameraFeed.d.ts +0 -4
- package/typings/classes/CanvasItem.d.ts +1 -1
- package/typings/classes/CodeEdit.d.ts +0 -4
- package/typings/classes/CollisionObject2D.d.ts +0 -6
- package/typings/classes/CollisionPolygon2D.d.ts +0 -5
- package/typings/classes/CollisionShape2D.d.ts +0 -5
- package/typings/classes/Container.d.ts +0 -6
- package/typings/classes/Control.d.ts +0 -59
- package/typings/classes/DPITexture.d.ts +0 -14
- package/typings/classes/Decal.d.ts +0 -1
- package/typings/classes/Dictionary.d.ts +0 -1
- package/typings/classes/DisplayServer.d.ts +1 -128
- package/typings/classes/EditorDock.d.ts +2 -8
- package/typings/classes/EditorExportPlugin.d.ts +0 -5
- package/typings/classes/EditorFileSystem.d.ts +0 -2
- package/typings/classes/EditorInterface.d.ts +2 -4
- package/typings/classes/EditorSettings.d.ts +133 -197
- package/typings/classes/EditorSpinSlider.d.ts +0 -6
- package/typings/classes/Environment.d.ts +2 -7
- package/typings/classes/FileAccess.d.ts +1 -1
- package/typings/classes/FileDialog.d.ts +1 -1
- package/typings/classes/FoldableContainer.d.ts +1 -1
- package/typings/classes/Font.d.ts +2 -2
- package/typings/classes/GPUParticles3D.d.ts +0 -4
- package/typings/classes/GeometryInstance3D.d.ts +1 -1
- package/typings/classes/GradientTexture2D.d.ts +0 -2
- package/typings/classes/Image.d.ts +0 -1
- package/typings/classes/ImageTexture.d.ts +2 -0
- package/typings/classes/ImporterMesh.d.ts +0 -6
- package/typings/classes/Input.d.ts +13 -148
- package/typings/classes/InputEvent.d.ts +0 -8
- package/typings/classes/InputEventGesture.d.ts +3 -2
- package/typings/classes/InputEventMouse.d.ts +3 -2
- package/typings/classes/InputEventWithModifiers.d.ts +3 -2
- package/typings/classes/InputMap.d.ts +0 -3
- package/typings/classes/ItemList.d.ts +2 -9
- package/typings/classes/Joint3D.d.ts +0 -1
- package/typings/classes/LookAtModifier3D.d.ts +1 -2
- package/typings/classes/MainLoop.d.ts +0 -4
- package/typings/classes/NativeMenu.d.ts +3 -10
- package/typings/classes/Node.d.ts +5 -9
- package/typings/classes/OS.d.ts +2 -2
- package/typings/classes/Object.d.ts +2 -5
- package/typings/classes/OptionButton.d.ts +0 -6
- package/typings/classes/PCKPacker.d.ts +0 -4
- package/typings/classes/ParticleProcessMaterial.d.ts +0 -5
- package/typings/classes/PhysicsDirectBodyState2D.d.ts +1 -2
- package/typings/classes/PhysicsDirectBodyState3D.d.ts +1 -2
- package/typings/classes/PhysicsServer2D.d.ts +2 -2
- package/typings/classes/PhysicsServer2DExtension.d.ts +1 -1
- package/typings/classes/PhysicsServer3D.d.ts +42 -145
- package/typings/classes/PopupMenu.d.ts +8 -22
- package/typings/classes/PopupPanel.d.ts +0 -2
- package/typings/classes/PortableCompressedTexture2D.d.ts +2 -0
- package/typings/classes/ProjectSettings.d.ts +60 -44
- package/typings/classes/RDShaderSPIRV.d.ts +0 -30
- package/typings/classes/RDShaderSource.d.ts +0 -10
- package/typings/classes/RenderingDevice.d.ts +0 -104
- package/typings/classes/RenderingServer.d.ts +11 -213
- package/typings/classes/Resource.d.ts +2 -2
- package/typings/classes/ResourceImporterDynamicFont.d.ts +1 -3
- package/typings/classes/ResourceImporterSVG.d.ts +0 -10
- package/typings/classes/ResourceImporterTexture.d.ts +2 -2
- package/typings/classes/SceneTree.d.ts +29 -5
- package/typings/classes/ScriptEditor.d.ts +0 -6
- package/typings/classes/Shader.d.ts +0 -2
- package/typings/classes/Shape3D.d.ts +0 -1
- package/typings/classes/SplitContainer.d.ts +0 -6
- package/typings/classes/String.d.ts +1 -1
- package/typings/classes/SubViewport.d.ts +0 -4
- package/typings/classes/TextEdit.d.ts +0 -3
- package/typings/classes/TextServer.d.ts +0 -2
- package/typings/classes/TextServerExtension.d.ts +0 -2
- package/typings/classes/Texture2D.d.ts +0 -14
- package/typings/classes/TextureRect.d.ts +1 -4
- package/typings/classes/Tree.d.ts +2 -9
- package/typings/classes/TreeItem.d.ts +0 -8
- package/typings/classes/Tween.d.ts +0 -13
- package/typings/classes/Viewport.d.ts +0 -10
- package/typings/classes/VisualShader.d.ts +0 -2
- package/typings/classes/VisualShaderNodeColorFunc.d.ts +2 -2
- package/typings/classes/VoxelGIData.d.ts +0 -10
- package/typings/classes/Window.d.ts +0 -23
- package/typings/classes/XRCamera3D.d.ts +1 -1
- package/typings/classes/XRServer.d.ts +0 -2
- package/typings/classes/_globals.d.ts +86 -45
- package/typings/classes/index.d.ts +0 -5
- package/typings/godot-class-registry.json +108 -1254
- package/typings/classes/AccessibilityServer.d.ts +0 -405
- package/typings/classes/AwaitTweener.d.ts +0 -10
- package/typings/classes/BlitMaterial.d.ts +0 -22
- package/typings/classes/DrawableTexture2D.d.ts +0 -47
- package/typings/classes/VirtualJoystick.d.ts +0 -94
|
@@ -11,7 +11,6 @@ declare class Environment extends Resource {
|
|
|
11
11
|
adjustment_brightness: float;
|
|
12
12
|
/**
|
|
13
13
|
* The {@link Texture2D} or {@link Texture3D} lookup table (LUT) to use for the built-in post-process color grading. Can use a {@link GradientTexture1D} for a 1-dimensional LUT, or a {@link Texture3D} for a more complex LUT. Effective only if {@link adjustment_enabled} is `true`.
|
|
14
|
-
* **Note:** Color correction does not currently support HDR output due to only supporting values in the SDR (0.0 to 1.0) range.
|
|
15
14
|
*/
|
|
16
15
|
adjustment_color_correction: Texture | null;
|
|
17
16
|
/**
|
|
@@ -346,7 +345,7 @@ declare class Environment extends Resource {
|
|
|
346
345
|
tonemap_agx_contrast: float;
|
|
347
346
|
/**
|
|
348
347
|
* The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set {@link tonemap_agx_white} to at least `6.0`. Higher values result in less blown out highlights, but may make the scene appear lower contrast. {@link tonemap_agx_white} is the same as {@link tonemap_white}, but is only effective with the {@link TONE_MAPPER_AGX} tonemapper. See also {@link tonemap_exposure}.
|
|
349
|
-
* **Note:** When using the Mobile renderer with {@link Viewport.use_hdr_2d} disabled, {@link tonemap_agx_white} is ignored and a white value of `2.0` will always be used instead.
|
|
348
|
+
* **Note:** When using the Mobile renderer with {@link Viewport.use_hdr_2d} disabled, {@link tonemap_agx_white} is ignored and a white value of `2.0` will always be used instead.
|
|
350
349
|
*/
|
|
351
350
|
tonemap_agx_white: float;
|
|
352
351
|
/**
|
|
@@ -361,7 +360,6 @@ declare class Environment extends Resource {
|
|
|
361
360
|
/**
|
|
362
361
|
* The white reference value for tonemapping, which indicates where bright white is located in the scale of values provided to the tonemapper. For photorealistic lighting, it is recommended to set {@link tonemap_white} to at least `6.0`. Higher values result in less blown out highlights, but may make the scene appear lower contrast. {@link tonemap_agx_white} will be used instead when using the {@link TONE_MAPPER_AGX} tonemapper. See also {@link tonemap_exposure}.
|
|
363
362
|
* **Note:** {@link tonemap_white} must be set to `2.0` or lower on the Mobile renderer to produce bright images.
|
|
364
|
-
* **Note:** {@link tonemap_white} is ignored when using {@link TONE_MAPPER_LINEAR} and will be dynamically adjusted at runtime to never be less than the parent window's {@link Window.get_output_max_linear_value} when using {@link TONE_MAPPER_REINHARDT} with {@link Viewport.use_hdr_2d}.
|
|
365
363
|
*/
|
|
366
364
|
tonemap_white: float;
|
|
367
365
|
/**
|
|
@@ -664,13 +662,11 @@ declare class Environment extends Resource {
|
|
|
664
662
|
static readonly TONE_MAPPER_REINHARDT: int;
|
|
665
663
|
/**
|
|
666
664
|
* Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than {@link TONE_MAPPER_REINHARDT}. Slightly slower than {@link TONE_MAPPER_REINHARDT}.
|
|
667
|
-
* **Note:** This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.
|
|
668
665
|
*/
|
|
669
666
|
static readonly TONE_MAPPER_FILMIC: int;
|
|
670
667
|
/**
|
|
671
668
|
* Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than {@link TONE_MAPPER_FILMIC}.
|
|
672
669
|
* **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
|
|
673
|
-
* **Note:** This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.
|
|
674
670
|
*/
|
|
675
671
|
static readonly TONE_MAPPER_ACES: int;
|
|
676
672
|
/**
|
|
@@ -681,12 +677,11 @@ declare class Environment extends Resource {
|
|
|
681
677
|
/** Adds the glow effect to the scene. */
|
|
682
678
|
static readonly GLOW_BLEND_MODE_ADDITIVE: int;
|
|
683
679
|
/**
|
|
684
|
-
* Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. {@link tonemap_white} is used to determine the maximum scene value where the glow should have no influence. When {@link tonemap_mode} is set to {@link TONE_MAPPER_LINEAR}
|
|
680
|
+
* Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. {@link tonemap_white} is used to determine the maximum scene value where the glow should have no influence. When {@link tonemap_mode} is set to {@link TONE_MAPPER_LINEAR}, a value of `1.0` will be used as the maximum scene value.
|
|
685
681
|
*/
|
|
686
682
|
static readonly GLOW_BLEND_MODE_SCREEN: int;
|
|
687
683
|
/**
|
|
688
684
|
* Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of `0.25` and will have no influence when applied to image values greater than `1.0`.
|
|
689
|
-
* **Note:** This blend mode does not support HDR output because expects a maximum output value of `1.0`. It is recommended to use a different blend mode when rendering to an HDR screen.
|
|
690
685
|
*/
|
|
691
686
|
static readonly GLOW_BLEND_MODE_SOFTLIGHT: int;
|
|
692
687
|
/**
|
|
@@ -236,7 +236,7 @@ declare class FileAccess extends RefCounted {
|
|
|
236
236
|
seek(position: int): void;
|
|
237
237
|
/**
|
|
238
238
|
* Sets the file cursor to the specified position in bytes, from the end of the file. This changes the value returned by {@link get_position}.
|
|
239
|
-
* **Note:** This is an offset, so you should use negative numbers otherwise the file cursor will
|
|
239
|
+
* **Note:** This is an offset, so you should use negative numbers otherwise the file cursor will be at the end of the file.
|
|
240
240
|
*/
|
|
241
241
|
seek_end(position?: int): void;
|
|
242
242
|
/**
|
|
@@ -76,7 +76,7 @@ declare class FileDialog extends ConfirmationDialog {
|
|
|
76
76
|
* <member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default=""Save a File"" />
|
|
77
77
|
* <member name="use_native_dialog" type="bool" setter="set_use_native_dialog" getter="get_use_native_dialog" default="false">
|
|
78
78
|
* If `true`, and if supported by the current {@link DisplayServer}, OS native dialog will be used instead of custom one.
|
|
79
|
-
* **Note:** On Android, it is only supported when using {@link ACCESS_FILESYSTEM}. For access mode {@link ACCESS_RESOURCES} and {@link ACCESS_USERDATA}, the system will fall back to custom FileDialog.
|
|
79
|
+
* **Note:** On Android, it is only supported for Android 10+ devices and when using {@link ACCESS_FILESYSTEM}. For access mode {@link ACCESS_RESOURCES} and {@link ACCESS_USERDATA}, the system will fall back to custom FileDialog.
|
|
80
80
|
* **Note:** On Linux and macOS, sandboxed apps always use native dialogs to access the host file system.
|
|
81
81
|
* **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use {@link OS.get_granted_permissions} to get a list of saved bookmarks.
|
|
82
82
|
* **Note:** Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown.
|
|
@@ -8,7 +8,7 @@ declare class FoldableContainer extends Container {
|
|
|
8
8
|
* The {@link FoldableGroup} associated with the container. When multiple {@link FoldableContainer} nodes share the same group, only one of them is allowed to be unfolded.
|
|
9
9
|
*/
|
|
10
10
|
focus_mode: int;
|
|
11
|
-
/** If `true`, the container will
|
|
11
|
+
/** If `true`, the container will becomes folded and will hide all its children. */
|
|
12
12
|
folded: boolean;
|
|
13
13
|
/** Language code used for text shaping algorithms. If left empty, the current locale is used instead. */
|
|
14
14
|
language: string;
|
|
@@ -44,7 +44,7 @@ declare class Font extends Resource {
|
|
|
44
44
|
/** Returns {@link TextServer} RID of the font cache for specific variation. */
|
|
45
45
|
find_variation(variation_coordinates: Dictionary, face_index?: int, strength?: float, transform?: Transform2D, spacing_top?: int, spacing_bottom?: int, spacing_space?: int, spacing_glyph?: int, baseline_offset?: float): RID;
|
|
46
46
|
/**
|
|
47
|
-
* Returns the
|
|
47
|
+
* Returns the average font ascent (number of pixels above the baseline).
|
|
48
48
|
* **Note:** Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line).
|
|
49
49
|
*/
|
|
50
50
|
get_ascent(font_size?: int): float;
|
|
@@ -54,7 +54,7 @@ declare class Font extends Resource {
|
|
|
54
54
|
*/
|
|
55
55
|
get_char_size(char: int, font_size: int): Vector2;
|
|
56
56
|
/**
|
|
57
|
-
* Returns the
|
|
57
|
+
* Returns the average font descent (number of pixels below the baseline).
|
|
58
58
|
* **Note:** Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line).
|
|
59
59
|
*/
|
|
60
60
|
get_descent(font_size?: int): float;
|
|
@@ -225,13 +225,9 @@ declare class GPUParticles3D extends GeometryInstance3D {
|
|
|
225
225
|
/** Particle starts with specified `CUSTOM` data. */
|
|
226
226
|
static readonly EMIT_FLAG_CUSTOM: int;
|
|
227
227
|
// enum TransformAlign
|
|
228
|
-
/** Do not align particle transforms relative to the camera or velocity. */
|
|
229
228
|
static readonly TRANSFORM_ALIGN_DISABLED: int;
|
|
230
|
-
/** Align each particle's Z axis to face the camera. */
|
|
231
229
|
static readonly TRANSFORM_ALIGN_Z_BILLBOARD: int;
|
|
232
|
-
/** Align each particle's Y axis to the velocity vector. */
|
|
233
230
|
static readonly TRANSFORM_ALIGN_Y_TO_VELOCITY: int;
|
|
234
|
-
/** Align each particle's Z axis to face the camera and Y axis to the velocity vector. */
|
|
235
231
|
static readonly TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: int;
|
|
236
232
|
|
|
237
233
|
/** Maximum number of draw passes supported. */
|
|
@@ -6,7 +6,7 @@ declare class GeometryInstance3D extends VisualInstance3D {
|
|
|
6
6
|
/** The mode used to cast shadows from this instance. */
|
|
7
7
|
cast_shadow: int;
|
|
8
8
|
/**
|
|
9
|
-
* Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive {@link AABB} recalculation that happens when a skeleton is used with a {@link MeshInstance3D} or to have precise control over the {@link MeshInstance3D}'s bounding box. To use the default AABB, set value to an {@link AABB} with all fields set to `0.0`. To avoid frustum culling, set {@link custom_aabb} to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. To disable all forms of culling (including occlusion
|
|
9
|
+
* Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive {@link AABB} recalculation that happens when a skeleton is used with a {@link MeshInstance3D} or to have precise control over the {@link MeshInstance3D}'s bounding box. To use the default AABB, set value to an {@link AABB} with all fields set to `0.0`. To avoid frustum culling, set {@link custom_aabb} to a very large AABB that covers your entire game world such as `AABB(-10000, -10000, -10000, 20000, 20000, 20000)`. To disable all forms of culling (including occlusion culling), call {@link RenderingServer.instance_set_ignore_culling} on the {@link GeometryInstance3D}'s {@link RID}.
|
|
10
10
|
*/
|
|
11
11
|
custom_aabb: AABB;
|
|
12
12
|
/**
|
|
@@ -46,8 +46,6 @@ declare class GradientTexture2D extends Texture2D {
|
|
|
46
46
|
static readonly FILL_RADIAL: int;
|
|
47
47
|
/** The colors are linearly interpolated in a square pattern. */
|
|
48
48
|
static readonly FILL_SQUARE: int;
|
|
49
|
-
/** The colors are linearly interpolated in a cone pattern. */
|
|
50
|
-
static readonly FILL_CONIC: int;
|
|
51
49
|
// enum Repeat
|
|
52
50
|
/**
|
|
53
51
|
* The gradient fill is restricted to the range defined by {@link fill_from} to {@link fill_to} offsets.
|
|
@@ -210,7 +210,6 @@ declare class Image extends Resource {
|
|
|
210
210
|
premultiply_alpha(): void;
|
|
211
211
|
/**
|
|
212
212
|
* Resizes the image to the given `width` and `height`. New pixels are calculated using the `interpolation` mode defined via {@link Interpolation} constants.
|
|
213
|
-
* **Note:** If the image's format is {@link FORMAT_RGBA4444}, {@link FORMAT_RGB565}, or {@link FORMAT_RGBE9995}, it will be temporarily converted to either {@link FORMAT_RGBA8} or {@link FORMAT_RGBAH}. This can affect the quality of the resized image.
|
|
214
213
|
*/
|
|
215
214
|
resize(width: int, height: int, interpolation: int): void;
|
|
216
215
|
/**
|
|
@@ -9,6 +9,8 @@ declare class ImageTexture extends Texture2D {
|
|
|
9
9
|
* Creates a new {@link ImageTexture} and initializes it by allocating and setting the data from an {@link Image}.
|
|
10
10
|
*/
|
|
11
11
|
static create_from_image(image: Image): ImageTexture;
|
|
12
|
+
/** Returns the format of the texture. */
|
|
13
|
+
get_format(): int;
|
|
12
14
|
/**
|
|
13
15
|
* Replaces the texture's data with a new {@link Image}. This will re-allocate new memory for the texture.
|
|
14
16
|
* If you want to update the image, but don't need to change its parameters (format, size), use {@link update} instead for better performance.
|
|
@@ -67,12 +67,6 @@ declare class ImporterMesh extends Resource {
|
|
|
67
67
|
get_surface_name(surface_idx: int): string;
|
|
68
68
|
/** Returns the primitive type of the requested surface (see {@link add_surface}). */
|
|
69
69
|
get_surface_primitive_type(surface_idx: int): int;
|
|
70
|
-
/**
|
|
71
|
-
* Merges multiple {@link ImporterMesh}es into a single {@link ImporterMesh}. Each input mesh is transformed by the corresponding {@link Transform3D} in the `relative_transforms` array, which must be the same size as `importer_meshes`. Negative scales are supported, and the winding order in the mesh data will be corrected to account for this.
|
|
72
|
-
* If `deduplicate_surfaces` is `true` and multiple meshes have surfaces with the same names and formats, the surfaces will be merged together when the meshes are merged, and will use the material from the first matching surface. This is useful for reducing the number of surfaces in the resulting mesh, and avoids duplicating materials. Surfaces with bone weights will never be deduplicated. If `deduplicate_surfaces` is `false`, the surfaces will always be kept separate, and will be given unique names.
|
|
73
|
-
* **Warning:** Blend shapes and LODs are not supported and will be discarded. Do not use this function to discard blend shapes and LODs, as support for these may be added in the future.
|
|
74
|
-
*/
|
|
75
|
-
static merge_importer_meshes(importer_meshes: Array<ImporterMesh>, relative_transforms: Array<Transform3D>, deduplicate_surfaces?: boolean): ImporterMesh | null;
|
|
76
70
|
/** Sets the blend shape mode. */
|
|
77
71
|
set_blend_shape_mode(mode: int): void;
|
|
78
72
|
/** Sets the size hint of this mesh for lightmap-unwrapping in UV-space. */
|
|
@@ -11,10 +11,6 @@ declare interface Input extends GodotObject {
|
|
|
11
11
|
* If `true`, sends touch input events when clicking or dragging the mouse. See also {@link ProjectSettings.input_devices/pointing/emulate_touch_from_mouse}.
|
|
12
12
|
*/
|
|
13
13
|
emulate_touch_from_mouse: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* If `true`, joypad input (including motion sensors) and LED light changes will be ignored and joypad vibration will be stopped when the application is not focused.
|
|
16
|
-
*/
|
|
17
|
-
ignore_joypad_on_unfocused_application: boolean;
|
|
18
14
|
/** Controls the mouse mode. */
|
|
19
15
|
mouse_mode: int;
|
|
20
16
|
/**
|
|
@@ -27,8 +23,6 @@ declare interface Input extends GodotObject {
|
|
|
27
23
|
is_emulating_mouse_from_touch(): boolean;
|
|
28
24
|
set_emulate_touch_from_mouse(value: boolean): void;
|
|
29
25
|
is_emulating_touch_from_mouse(): boolean;
|
|
30
|
-
set_ignore_joypad_on_unfocused_application(value: boolean): void;
|
|
31
|
-
is_ignoring_joypad_on_unfocused_application(): boolean;
|
|
32
26
|
set_mouse_mode(value: int): void;
|
|
33
27
|
get_mouse_mode(): int;
|
|
34
28
|
set_use_accumulated_input(value: boolean): void;
|
|
@@ -46,12 +40,6 @@ declare interface Input extends GodotObject {
|
|
|
46
40
|
* Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices.
|
|
47
41
|
*/
|
|
48
42
|
add_joy_mapping(mapping: string | NodePath, update_existing?: boolean): void;
|
|
49
|
-
/**
|
|
50
|
-
* Clears the calibration information for the specified joypad's motion sensors, if it has any and if they were calibrated.
|
|
51
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
52
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
53
|
-
*/
|
|
54
|
-
clear_joy_motion_sensors_calibration(device: int): void;
|
|
55
43
|
/**
|
|
56
44
|
* Sends all input events which are in the current buffer to the game loop. These events may have been buffered as a result of accumulated input ({@link use_accumulated_input}) or agile input flushing ({@link ProjectSettings.input_devices/buffering/agile_event_flushing}).
|
|
57
45
|
* The engine will already do this itself at key execution points (at least once per frame). However, this can be useful in advanced cases where you want precise control over the timing of event handling.
|
|
@@ -79,10 +67,7 @@ declare interface Input extends GodotObject {
|
|
|
79
67
|
* This is a shorthand for writing `Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")`.
|
|
80
68
|
*/
|
|
81
69
|
get_axis(negative_action: string, positive_action: string): float;
|
|
82
|
-
/**
|
|
83
|
-
* Returns an {@link Array} containing the device IDs of all currently connected joypads.
|
|
84
|
-
* **Note:** The order of connected joypads can not be guaranteed to be the same after a project and/or the editor is restarted, because Godot doesn't save the order of joypad connections. Joypads are registered in the order they are discovered by Godot.
|
|
85
|
-
*/
|
|
70
|
+
/** Returns an {@link Array} containing the device IDs of all currently connected joypads. */
|
|
86
71
|
get_connected_joypads(): Array<int>;
|
|
87
72
|
/** Returns the currently assigned cursor shape. */
|
|
88
73
|
get_current_cursor_shape(): int;
|
|
@@ -98,86 +83,33 @@ declare interface Input extends GodotObject {
|
|
|
98
83
|
* **Note:** For Android, {@link ProjectSettings.input_devices/sensors/enable_gyroscope} must be enabled.
|
|
99
84
|
*/
|
|
100
85
|
get_gyroscope(): Vector3;
|
|
101
|
-
/**
|
|
102
|
-
* Returns the acceleration, including the force of gravity, in m/s² of the joypad's accelerometer sensor, if the joypad has one and it's currently enabled. Otherwise, the method returns {@link Vector3.ZERO}. See also {@link get_joy_gravity} and {@link set_joy_motion_sensors_enabled}.
|
|
103
|
-
* For a joypad held in front of you, the returned axes are defined as follows:
|
|
104
|
-
* +X ... -X: left ... right;
|
|
105
|
-
* +Y ... -Y: bottom ... top;
|
|
106
|
-
* +Z ... -Z: farther ... closer.
|
|
107
|
-
* The gravity part value is measured as a vector with length of `9.8` away from the center of the Earth, which is a negative Y value.
|
|
108
|
-
* **Note:** This feature is only supported on Windows, Linux, and macOS. On iOS, joypad accelerometer sensor reading is not supported due to OS limitations.
|
|
109
|
-
*/
|
|
110
|
-
get_joy_accelerometer(device: int): Vector3;
|
|
111
86
|
/** Returns the current value of the joypad axis at index `axis`. */
|
|
112
87
|
get_joy_axis(device: int, axis: int): float;
|
|
113
88
|
/**
|
|
114
|
-
* Returns
|
|
115
|
-
* For a joypad held in front of you, the returned axes are defined as follows:
|
|
116
|
-
* +X ... -X: left ... right;
|
|
117
|
-
* +Y ... -Y: bottom ... top;
|
|
118
|
-
* +Z ... -Z: farther ... closer.
|
|
119
|
-
* The gravity part value is measured as a vector with length of `9.8` away from the center of the Earth, which is a negative Y value.
|
|
120
|
-
* **Note:** This feature is only supported on Windows, Linux, and macOS. On iOS, joypad accelerometer sensor reading is not supported due to OS limitations.
|
|
121
|
-
*/
|
|
122
|
-
get_joy_gravity(device: int): Vector3;
|
|
123
|
-
/**
|
|
124
|
-
* Returns an SDL-compatible device GUID on platforms that use gamepad remapping, e.g. `030000004c050000c405000000010000`. Returns an empty string if it cannot be found. Godot uses SDL's internal mappings, supplemented by community-contributed mappings, to determine gamepad names and mappings based on this GUID.
|
|
89
|
+
* Returns an SDL2-compatible device GUID on platforms that use gamepad remapping, e.g. `030000004c050000c405000000010000`. Returns an empty string if it cannot be found. Godot uses the SDL2 game controller database (https://github.com/gabomdq/SDL_GameControllerDB) to determine gamepad names and mappings based on this GUID.
|
|
125
90
|
* On Windows, all XInput joypad GUIDs will be overridden by Godot to `__XINPUT_DEVICE__`, because their mappings are the same.
|
|
126
91
|
*/
|
|
127
92
|
get_joy_guid(device: int): string;
|
|
128
|
-
/**
|
|
129
|
-
* Returns the rotation rate in rad/s around a joypad's X, Y, and Z axes of the gyroscope sensor, if the joypad has one and it's currently enabled. Otherwise, the method returns {@link Vector3.ZERO}. See also {@link set_joy_motion_sensors_enabled}.
|
|
130
|
-
* The rotation is positive in the counter-clockwise direction.
|
|
131
|
-
* For a joypad held in front of you, the returned axes are defined as follows:
|
|
132
|
-
* X: Angular speed around the X axis (pitch);
|
|
133
|
-
* Y: Angular speed around the Y axis (yaw);
|
|
134
|
-
* Z: Angular speed around the Z axis (roll).
|
|
135
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad gyroscope and gyroscope calibration in your games.
|
|
136
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
137
|
-
*/
|
|
138
|
-
get_joy_gyroscope(device: int): Vector3;
|
|
139
93
|
/**
|
|
140
94
|
* Returns a dictionary with extra platform-specific information about the device, e.g. the raw gamepad name from the OS or the Steam Input index.
|
|
141
|
-
* On Windows, Linux,
|
|
95
|
+
* On Windows, Linux, and macOS, the dictionary contains the following fields:
|
|
142
96
|
* `raw_name`: The name of the controller as it came from the OS, before getting renamed by the controller database.
|
|
143
97
|
* `vendor_id`: The USB vendor ID of the device.
|
|
144
98
|
* `product_id`: The USB product ID of the device.
|
|
145
|
-
* `
|
|
146
|
-
*
|
|
147
|
-
* `
|
|
148
|
-
*
|
|
149
|
-
* **Note:** The returned dictionary is always empty on Android and Web.
|
|
99
|
+
* `steam_input_index`: The Steam Input gamepad index, if the device is not a Steam Input device this key won't be present.
|
|
100
|
+
* On Windows, the dictionary can have an additional field:
|
|
101
|
+
* `xinput_index`: The index of the controller in the XInput system. This key won't be present for devices not handled by XInput.
|
|
102
|
+
* **Note:** The returned dictionary is always empty on Android, iOS, visionOS, and Web.
|
|
150
103
|
*/
|
|
151
104
|
get_joy_info(device: int): Dictionary;
|
|
152
|
-
/**
|
|
153
|
-
* Returns the calibration information about the specified joypad's motion sensors in the form of a {@link Dictionary}, if it has any and if they have been calibrated, otherwise returns an empty {@link Dictionary}.
|
|
154
|
-
* The dictionary contains the following fields:
|
|
155
|
-
* `gyroscope_offset`: average offset in gyroscope values from {@link Vector2.ZERO} in rad/s.
|
|
156
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
157
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
158
|
-
*/
|
|
159
|
-
get_joy_motion_sensors_calibration(device: int): Dictionary;
|
|
160
|
-
/**
|
|
161
|
-
* Returns the joypad's motion sensor rate in Hz, if the joypad has motion sensors and they're currently enabled. See also {@link set_joy_motion_sensors_enabled}.
|
|
162
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
163
|
-
*/
|
|
164
|
-
get_joy_motion_sensors_rate(device: int): float;
|
|
165
105
|
/**
|
|
166
106
|
* Returns the name of the joypad at the specified device index, e.g. `PS4 Controller`. Godot uses the SDL2 game controller database (https://github.com/gabomdq/SDL_GameControllerDB) to determine gamepad names.
|
|
167
107
|
*/
|
|
168
108
|
get_joy_name(device: int): string;
|
|
169
|
-
/**
|
|
170
|
-
* Returns the duration of the current vibration effect in seconds.
|
|
171
|
-
* **Note:** This method returns the same value that was passed to {@link start_joy_vibration}, and this value does **not** change when the joypad's vibration runs out, it only gets reset after a call to {@link stop_joy_vibration}.
|
|
172
|
-
* If you want to check if a joypad is still vibrating, use {@link is_joy_vibrating} instead.
|
|
173
|
-
*/
|
|
109
|
+
/** Returns the duration of the current vibration effect in seconds. */
|
|
174
110
|
get_joy_vibration_duration(device: int): float;
|
|
175
|
-
/** Returns the remaining duration of the current vibration effect in seconds. */
|
|
176
|
-
get_joy_vibration_remaining_duration(device: int): float;
|
|
177
111
|
/**
|
|
178
112
|
* Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor.
|
|
179
|
-
* **Note:** This method returns the same values that were passed to {@link start_joy_vibration}, and these values do **not** change when the joypad's vibration runs out, they only get reset after a call to {@link stop_joy_vibration}.
|
|
180
|
-
* If you want to check if a joypad is still vibrating, use {@link is_joy_vibrating} instead.
|
|
181
113
|
*/
|
|
182
114
|
get_joy_vibration_strength(device: int): Vector2;
|
|
183
115
|
/**
|
|
@@ -206,20 +138,9 @@ declare interface Input extends GodotObject {
|
|
|
206
138
|
get_vector(negative_x: string, positive_x: string, negative_y: string, positive_y: string, deadzone?: float): Vector2;
|
|
207
139
|
/**
|
|
208
140
|
* Returns `true` if the joypad has an LED light that can change colors and/or brightness. See also {@link set_joy_light}.
|
|
209
|
-
* **Note:** This feature is only supported on Windows, Linux,
|
|
141
|
+
* **Note:** This feature is only supported on Windows, Linux, and macOS.
|
|
210
142
|
*/
|
|
211
143
|
has_joy_light(device: int): boolean;
|
|
212
|
-
/**
|
|
213
|
-
* Returns `true` if the joypad has motion sensors (accelerometer and gyroscope).
|
|
214
|
-
* **Note:** On iOS, joypad accelerometer sensor reading is not supported due to OS limitations.
|
|
215
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
216
|
-
*/
|
|
217
|
-
has_joy_motion_sensors(device: int): boolean;
|
|
218
|
-
/**
|
|
219
|
-
* Returns `true` if the joypad supports vibration. See also {@link start_joy_vibration}.
|
|
220
|
-
* **Note:** For macOS, vibration is only supported in macOS 11 and later. When connected via USB, vibration is only supported for major brand controllers (except Xbox One and Xbox Series X/S controllers) due to macOS limitations.
|
|
221
|
-
*/
|
|
222
|
-
has_joy_vibration(device: int): boolean;
|
|
223
144
|
/**
|
|
224
145
|
* Returns `true` when the user has *started* pressing the action event in the current frame or physics tick. It will only return `true` on the frame or tick that the user pressed down the button.
|
|
225
146
|
* This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed.
|
|
@@ -267,29 +188,6 @@ declare interface Input extends GodotObject {
|
|
|
267
188
|
* Returns `true` if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them.
|
|
268
189
|
*/
|
|
269
190
|
is_joy_known(device: int): boolean;
|
|
270
|
-
/**
|
|
271
|
-
* Returns `true` if the joypad's motion sensors have been calibrated.
|
|
272
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
273
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
274
|
-
*/
|
|
275
|
-
is_joy_motion_sensors_calibrated(device: int): boolean;
|
|
276
|
-
/**
|
|
277
|
-
* Returns `true` if the joypad's motion sensors are currently being calibrated.
|
|
278
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
279
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
280
|
-
*/
|
|
281
|
-
is_joy_motion_sensors_calibrating(device: int): boolean;
|
|
282
|
-
/**
|
|
283
|
-
* Returns `true` if the requested joypad has motion sensors (accelerometer and gyroscope) and they are currently enabled. See also {@link set_joy_motion_sensors_enabled} and {@link has_joy_motion_sensors}.
|
|
284
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
285
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
286
|
-
*/
|
|
287
|
-
is_joy_motion_sensors_enabled(device: int): boolean;
|
|
288
|
-
/**
|
|
289
|
-
* Returns `true` if the joypad is still vibrating after a call to {@link start_joy_vibration}.
|
|
290
|
-
* Unlike {@link get_joy_vibration_strength} and {@link get_joy_vibration_duration}, this method returns `false` after the joypad's vibration runs out.
|
|
291
|
-
*/
|
|
292
|
-
is_joy_vibrating(device: int): boolean;
|
|
293
191
|
/**
|
|
294
192
|
* Returns `true` if you are pressing the key with the `keycode` printed on it. You can pass a {@link Key} constant or any Unicode character code.
|
|
295
193
|
*/
|
|
@@ -351,22 +249,9 @@ declare interface Input extends GodotObject {
|
|
|
351
249
|
/**
|
|
352
250
|
* Sets the joypad's LED light, if available, to the specified color. See also {@link has_joy_light}.
|
|
353
251
|
* **Note:** There is no way to get the color of the light from a joypad. If you need to know the assigned color, store it separately.
|
|
354
|
-
* **Note:** This feature is only supported on Windows, Linux,
|
|
252
|
+
* **Note:** This feature is only supported on Windows, Linux, and macOS.
|
|
355
253
|
*/
|
|
356
254
|
set_joy_light(device: int, color: Color): void;
|
|
357
|
-
/**
|
|
358
|
-
* Sets the specified joypad's calibration information. See also {@link get_joy_motion_sensors_calibration}.
|
|
359
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
360
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
361
|
-
*/
|
|
362
|
-
set_joy_motion_sensors_calibration(device: int, calibration_info: Dictionary): void;
|
|
363
|
-
/**
|
|
364
|
-
* Enables or disables the motion sensors (accelerometer and gyroscope), if available, on the specified joypad.
|
|
365
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
366
|
-
* It's recommended to disable the motion sensors when they're no longer being used, because otherwise it might drain the controller battery faster.
|
|
367
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
368
|
-
*/
|
|
369
|
-
set_joy_motion_sensors_enabled(device: int, enable: boolean): void;
|
|
370
255
|
/**
|
|
371
256
|
* Sets the value of the magnetic field of the magnetometer sensor. Can be used for debugging on devices without a hardware sensor, for example in an editor on a PC.
|
|
372
257
|
* **Note:** This value can be immediately overwritten by the hardware sensor value on Android and iOS.
|
|
@@ -378,30 +263,11 @@ declare interface Input extends GodotObject {
|
|
|
378
263
|
*/
|
|
379
264
|
should_ignore_device(vendor_id: int, product_id: int): boolean;
|
|
380
265
|
/**
|
|
381
|
-
* Starts the
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* **Note:** Accelerometer sensor doesn't usually require calibration.
|
|
385
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
386
|
-
*/
|
|
387
|
-
start_joy_motion_sensors_calibration(device: int): void;
|
|
388
|
-
/**
|
|
389
|
-
* Starts to vibrate the joypad. See also {@link has_joy_vibration} and {@link is_joy_vibrating}.
|
|
390
|
-
* Joypads usually come with two rumble motors, a strong and a weak one.
|
|
391
|
-
* `weak_magnitude` is the strength of the weak motor (between `0.0` and `1.0`).
|
|
392
|
-
* `strong_magnitude` is the strength of the strong motor (between `0.0` and `1.0`).
|
|
393
|
-
* `duration` is the duration of the effect in seconds (a duration of `0.0` will try to play the vibration as long as possible, which is about 65 seconds).
|
|
394
|
-
* The vibration can be stopped early by calling {@link stop_joy_vibration}.
|
|
395
|
-
* See also {@link get_joy_vibration_strength} and {@link get_joy_vibration_duration}.
|
|
396
|
-
* **Note:** For macOS, vibration is only supported in macOS 11 and later. When connected via USB, vibration is only supported for major brand controllers (except Xbox One and Xbox Series X/S controllers) due to macOS limitations.
|
|
266
|
+
* Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. `weak_magnitude` is the strength of the weak motor (between 0 and 1) and `strong_magnitude` is the strength of the strong motor (between 0 and 1). `duration` is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). The vibration can be stopped early by calling {@link stop_joy_vibration}.
|
|
267
|
+
* **Note:** Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds.
|
|
268
|
+
* **Note:** For macOS, vibration is only supported in macOS 11 and later.
|
|
397
269
|
*/
|
|
398
270
|
start_joy_vibration(device: int, weak_magnitude: float, strong_magnitude: float, duration?: float): void;
|
|
399
|
-
/**
|
|
400
|
-
* Stops the calibration process of the specified joypad's motion sensors.
|
|
401
|
-
* See {@link start_joy_motion_sensors_calibration} for an example on how to use joypad motion sensors and calibration in your games.
|
|
402
|
-
* **Note:** This feature is only supported on Windows, Linux, macOS, and iOS.
|
|
403
|
-
*/
|
|
404
|
-
stop_joy_motion_sensors_calibration(device: int): void;
|
|
405
271
|
/** Stops the vibration of the joypad started with {@link start_joy_vibration}. */
|
|
406
272
|
stop_joy_vibration(device: int): void;
|
|
407
273
|
/**
|
|
@@ -412,7 +278,6 @@ declare interface Input extends GodotObject {
|
|
|
412
278
|
* **Note:** For iOS, specifying the duration is only supported in iOS 13 and later.
|
|
413
279
|
* **Note:** For Web, the amplitude cannot be changed.
|
|
414
280
|
* **Note:** Some web browsers such as Safari and Firefox for Android do not support {@link vibrate_handheld}.
|
|
415
|
-
* **Note:** Device settings such as vibration on/off, "do not disturb" mode or specific haptic feedback on/off may prevent {@link vibrate_handheld} effects.
|
|
416
281
|
*/
|
|
417
282
|
vibrate_handheld(duration_ms?: int, amplitude?: float): void;
|
|
418
283
|
/**
|
|
@@ -74,12 +74,4 @@ declare class InputEvent extends Resource {
|
|
|
74
74
|
* Device ID used for emulated mouse input from a touchscreen, or for emulated touch input from a mouse. This can be used to distinguish emulated mouse input from physical mouse input, or emulated touch input from physical touch input.
|
|
75
75
|
*/
|
|
76
76
|
static readonly DEVICE_ID_EMULATION: int;
|
|
77
|
-
/**
|
|
78
|
-
* Device ID used for input from a keyboard. This can be used to distinguish keyboard input events from joypad input events.
|
|
79
|
-
*/
|
|
80
|
-
static readonly DEVICE_ID_KEYBOARD: int;
|
|
81
|
-
/**
|
|
82
|
-
* Device ID used for input from a mouse. This can be used to distinguish mouse input events from joypad input events.
|
|
83
|
-
*/
|
|
84
|
-
static readonly DEVICE_ID_MOUSE: int;
|
|
85
77
|
}
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
/** Abstract base class for touch gestures. */
|
|
5
5
|
declare class InputEventGesture extends InputEventWithModifiers {
|
|
6
6
|
/**
|
|
7
|
-
* <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)">
|
|
8
7
|
* The local gesture position relative to the {@link Viewport}. If used in {@link Control._gui_input}, the position is relative to the current {@link Control} that received this gesture.
|
|
9
8
|
*/
|
|
10
|
-
|
|
9
|
+
position: Vector2;
|
|
10
|
+
set_position(value: Vector2 | Vector2i): void;
|
|
11
|
+
get_position(): Vector2;
|
|
11
12
|
}
|
|
@@ -8,11 +8,10 @@ declare class InputEventMouse extends InputEventWithModifiers {
|
|
|
8
8
|
*/
|
|
9
9
|
button_mask: int;
|
|
10
10
|
/**
|
|
11
|
-
* <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)">
|
|
12
11
|
* When received in {@link Node._input} or {@link Node._unhandled_input}, returns the mouse's position in the root {@link Viewport} using the coordinate system of the root {@link Viewport}.
|
|
13
12
|
* When received in {@link Control._gui_input}, returns the mouse's position in the {@link CanvasLayer} that the {@link Control} is in using the coordinate system of the {@link CanvasLayer}.
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
global_position: Vector2;
|
|
16
15
|
/**
|
|
17
16
|
* When received in {@link Node._input} or {@link Node._unhandled_input}, returns the mouse's position in the {@link Viewport} this {@link Node} is in using the coordinate system of this {@link Viewport}.
|
|
18
17
|
* When received in {@link Control._gui_input}, returns the mouse's position in the {@link Control} using the local coordinate system of the {@link Control}.
|
|
@@ -20,6 +19,8 @@ declare class InputEventMouse extends InputEventWithModifiers {
|
|
|
20
19
|
position: Vector2;
|
|
21
20
|
set_button_mask(value: int): void;
|
|
22
21
|
get_button_mask(): int;
|
|
22
|
+
set_global_position(value: Vector2 | Vector2i): void;
|
|
23
|
+
get_global_position(): Vector2;
|
|
23
24
|
set_position(value: Vector2 | Vector2i): void;
|
|
24
25
|
get_position(): Vector2;
|
|
25
26
|
}
|
|
@@ -12,10 +12,9 @@ declare class InputEventWithModifiers extends InputEventFromWindow {
|
|
|
12
12
|
/** State of the `Ctrl` modifier. */
|
|
13
13
|
ctrl_pressed: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* <member name="meta_pressed" type="bool" setter="set_meta_pressed" getter="is_meta_pressed" default="false">
|
|
16
15
|
* State of the `Meta` modifier. On Windows and Linux, this represents the Windows key (sometimes called "meta" or "super" on Linux). On macOS, this represents the Command key.
|
|
17
16
|
*/
|
|
18
|
-
|
|
17
|
+
meta_pressed: boolean;
|
|
19
18
|
/** State of the `Shift` modifier. */
|
|
20
19
|
shift_pressed: boolean;
|
|
21
20
|
set_alt_pressed(value: boolean): void;
|
|
@@ -24,6 +23,8 @@ declare class InputEventWithModifiers extends InputEventFromWindow {
|
|
|
24
23
|
is_command_or_control_autoremap(): boolean;
|
|
25
24
|
set_ctrl_pressed(value: boolean): void;
|
|
26
25
|
is_ctrl_pressed(): boolean;
|
|
26
|
+
set_meta_pressed(value: boolean): void;
|
|
27
|
+
is_meta_pressed(): boolean;
|
|
27
28
|
set_shift_pressed(value: boolean): void;
|
|
28
29
|
is_shift_pressed(): boolean;
|
|
29
30
|
|
|
@@ -42,9 +42,6 @@ declare interface InputMap extends GodotObject {
|
|
|
42
42
|
* Clears all {@link InputEventAction} in the {@link InputMap} and load it anew from {@link ProjectSettings}.
|
|
43
43
|
*/
|
|
44
44
|
load_from_project_settings(): void;
|
|
45
|
-
|
|
46
|
-
/** Emitted when the {@link ProjectSettings} {@link InputMap} has been loaded. */
|
|
47
|
-
project_settings_loaded: Signal<[]>;
|
|
48
45
|
}
|
|
49
46
|
declare const InputMap: InputMap;
|
|
50
47
|
|
|
@@ -107,20 +107,13 @@ declare class ItemList extends Control {
|
|
|
107
107
|
* If `selectable` is `true`, the list item will be selectable.
|
|
108
108
|
*/
|
|
109
109
|
add_item(text: string | NodePath, icon?: Texture2D, selectable?: boolean): int;
|
|
110
|
-
/**
|
|
111
|
-
* Ensures the currently selected item (the first selected item if multiple selection is enabled) is visible, adjusting the scroll position as necessary to place the item at the center of the list if possible. See also {@link ensure_current_is_visible}.
|
|
112
|
-
* Fails and prints an error if both arguments are `false`.
|
|
113
|
-
*/
|
|
114
|
-
center_on_current(center_verically?: boolean, center_horizontally?: boolean): void;
|
|
115
110
|
/** Removes all items from the list. */
|
|
116
111
|
clear(): void;
|
|
117
112
|
/** Ensures the item associated with the specified index is not selected. */
|
|
118
113
|
deselect(idx: int): void;
|
|
119
114
|
/** Ensures there are no items selected. */
|
|
120
115
|
deselect_all(): void;
|
|
121
|
-
/**
|
|
122
|
-
* Ensures the currently selected item (the first selected item if multiple selection is enabled) is visible, adjusting the scroll position as necessary. See also {@link center_on_current}.
|
|
123
|
-
*/
|
|
116
|
+
/** Ensure current selection is visible, adjusting the scroll position as necessary. */
|
|
124
117
|
ensure_current_is_visible(): void;
|
|
125
118
|
/**
|
|
126
119
|
* Forces an update to the list size based on its items. This happens automatically whenever size of the items, or other relevant settings like {@link auto_height}, change. The method can be used to trigger the update ahead of next drawing pass.
|
|
@@ -188,7 +181,7 @@ declare class ItemList extends Control {
|
|
|
188
181
|
/** Removes the item specified by `idx` index from the list. */
|
|
189
182
|
remove_item(idx: int): void;
|
|
190
183
|
/**
|
|
191
|
-
*
|
|
184
|
+
* Select the item at the specified index.
|
|
192
185
|
* **Note:** This method does not trigger the item selection signal.
|
|
193
186
|
*/
|
|
194
187
|
select(idx: int, single?: boolean): void;
|
|
@@ -17,7 +17,6 @@ declare class Joint3D extends Node3D {
|
|
|
17
17
|
node_b: NodePath;
|
|
18
18
|
/**
|
|
19
19
|
* The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority.
|
|
20
|
-
* **Note:** Only supported when using GodotPhysics3D. This property is ignored when using Jolt Physics.
|
|
21
20
|
*/
|
|
22
21
|
solver_priority: int;
|
|
23
22
|
set_exclude_nodes_from_collision(value: boolean): void;
|
|
@@ -68,7 +68,6 @@ declare class LookAtModifier3D extends SkeletonModifier3D {
|
|
|
68
68
|
primary_rotation_axis: int;
|
|
69
69
|
/**
|
|
70
70
|
* The relative option. If `true`, the rotation is applied relative to the pose. If `false`, the rotation is applied relative to the rest. It means to replace the current pose with the {@link LookAtModifier3D}'s result.
|
|
71
|
-
* **Note:** This option affects the base angle for {@link use_angle_limitation} unlike {@link IterateIK3D}'s {@link JointLimitation3D}. Since the {@link LookAtModifier3D} relies strongly on Euler rotation, the axis that determines the limitation and the actual rotation are strongly tied together.
|
|
72
71
|
*/
|
|
73
72
|
relative: boolean;
|
|
74
73
|
/** The threshold to start damping for {@link secondary_limit_angle}. */
|
|
@@ -100,7 +99,7 @@ declare class LookAtModifier3D extends SkeletonModifier3D {
|
|
|
100
99
|
transition_type: int;
|
|
101
100
|
/**
|
|
102
101
|
* If `true`, limits the amount of rotation. For example, this helps to prevent a character's neck from rotating 360 degrees.
|
|
103
|
-
* **Note:** As with {@link AnimationTree} blending, interpolation is provided that favors {@link Skeleton3D.get_bone_rest}
|
|
102
|
+
* **Note:** As with {@link AnimationTree} blending, interpolation is provided that favors {@link Skeleton3D.get_bone_rest}. This means that interpolation does not select the shortest path in some cases.
|
|
104
103
|
* **Note:** Some values for {@link transition_type} (such as {@link Tween.TRANS_BACK}, {@link Tween.TRANS_ELASTIC}, and {@link Tween.TRANS_SPRING}) may exceed the limitations. If interpolation occurs while overshooting the limitations, the result might not respect the bone rest.
|
|
105
104
|
*/
|
|
106
105
|
use_angle_limitation: boolean;
|
|
@@ -73,8 +73,4 @@ declare class MainLoop extends GodotObject {
|
|
|
73
73
|
static readonly NOTIFICATION_APPLICATION_FOCUS_OUT: int;
|
|
74
74
|
/** Notification received when text server is changed. */
|
|
75
75
|
static readonly NOTIFICATION_TEXT_SERVER_CHANGED: int;
|
|
76
|
-
/** Notification received when the application enters picture-in-picture mode. */
|
|
77
|
-
static readonly NOTIFICATION_APPLICATION_PIP_MODE_ENTERED: int;
|
|
78
|
-
/** Notification received when the application exits picture-in-picture mode. */
|
|
79
|
-
static readonly NOTIFICATION_APPLICATION_PIP_MODE_EXITED: int;
|
|
80
76
|
}
|