@ringozz/godot 4.7.2-570 → 4.7.2-583

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.
Files changed (98) hide show
  1. package/gen/classes/AnimationNode.ts +1 -1
  2. package/gen/classes/AnimationNodeBlendSpace2D.ts +1 -1
  3. package/gen/classes/ArrayOccluder3D.ts +3 -2
  4. package/gen/classes/AudioStreamMP3.ts +1 -1
  5. package/gen/classes/AudioStreamOggVorbis.ts +1 -1
  6. package/gen/classes/AudioStreamWAV.ts +2 -2
  7. package/gen/classes/BitMap.ts +1 -1
  8. package/gen/classes/CPUParticles2D.ts +3 -3
  9. package/gen/classes/CPUParticles3D.ts +3 -3
  10. package/gen/classes/CSGPolygon3D.ts +2 -1
  11. package/gen/classes/CharFXTransform.ts +1 -1
  12. package/gen/classes/CodeEdit.ts +6 -6
  13. package/gen/classes/CodeHighlighter.ts +3 -3
  14. package/gen/classes/CollisionPolygon2D.ts +1 -1
  15. package/gen/classes/CollisionPolygon3D.ts +2 -2
  16. package/gen/classes/ColorPalette.ts +2 -1
  17. package/gen/classes/Compositor.ts +1 -1
  18. package/gen/classes/ConcavePolygonShape2D.ts +2 -1
  19. package/gen/classes/ConcavePolygonShape3D.ts +2 -1
  20. package/gen/classes/Control.ts +4 -4
  21. package/gen/classes/ConvexPolygonShape2D.ts +2 -1
  22. package/gen/classes/ConvexPolygonShape3D.ts +2 -1
  23. package/gen/classes/DPITexture.ts +1 -1
  24. package/gen/classes/FileDialog.ts +1 -1
  25. package/gen/classes/Font.ts +1 -1
  26. package/gen/classes/FontFile.ts +2 -2
  27. package/gen/classes/FontVariation.ts +4 -4
  28. package/gen/classes/GLTFAccessor.ts +2 -2
  29. package/gen/classes/GLTFMesh.ts +2 -2
  30. package/gen/classes/GLTFNode.ts +1 -1
  31. package/gen/classes/GLTFObjectModelProperty.ts +2 -2
  32. package/gen/classes/GLTFSkeleton.ts +4 -4
  33. package/gen/classes/GLTFSkin.ts +7 -7
  34. package/gen/classes/GLTFState.ts +19 -19
  35. package/gen/classes/Gradient.ts +2 -2
  36. package/gen/classes/GraphEdit.ts +2 -2
  37. package/gen/classes/HeightMapShape3D.ts +1 -1
  38. package/gen/classes/Image.ts +1 -1
  39. package/gen/classes/Label.ts +2 -2
  40. package/gen/classes/Label3D.ts +1 -1
  41. package/gen/classes/LightmapGIData.ts +5 -5
  42. package/gen/classes/Line2D.ts +1 -1
  43. package/gen/classes/LineEdit.ts +1 -1
  44. package/gen/classes/LinkButton.ts +1 -1
  45. package/gen/classes/MultiMesh.ts +6 -6
  46. package/gen/classes/NavigationMesh.ts +2 -2
  47. package/gen/classes/NavigationMeshSourceGeometryData2D.ts +3 -3
  48. package/gen/classes/NavigationMeshSourceGeometryData3D.ts +3 -3
  49. package/gen/classes/NavigationObstacle2D.ts +1 -1
  50. package/gen/classes/NavigationObstacle3D.ts +1 -1
  51. package/gen/classes/NavigationPathQueryParameters2D.ts +2 -2
  52. package/gen/classes/NavigationPathQueryParameters3D.ts +2 -2
  53. package/gen/classes/NavigationPathQueryResult2D.ts +5 -4
  54. package/gen/classes/NavigationPathQueryResult3D.ts +5 -4
  55. package/gen/classes/NavigationPolygon.ts +3 -3
  56. package/gen/classes/OccluderPolygon2D.ts +2 -1
  57. package/gen/classes/OggPacketSequence.ts +2 -2
  58. package/gen/classes/OpenXRAction.ts +1 -1
  59. package/gen/classes/OpenXRActionMap.ts +2 -2
  60. package/gen/classes/OpenXRActionSet.ts +1 -1
  61. package/gen/classes/OpenXRIPBinding.ts +2 -2
  62. package/gen/classes/OpenXRInteractionProfile.ts +2 -2
  63. package/gen/classes/PhysicsPointQueryParameters2D.ts +1 -1
  64. package/gen/classes/PhysicsPointQueryParameters3D.ts +1 -1
  65. package/gen/classes/PhysicsRayQueryParameters2D.ts +1 -1
  66. package/gen/classes/PhysicsRayQueryParameters3D.ts +1 -1
  67. package/gen/classes/PhysicsShapeQueryParameters2D.ts +1 -1
  68. package/gen/classes/PhysicsShapeQueryParameters3D.ts +1 -1
  69. package/gen/classes/PhysicsTestMotionParameters2D.ts +2 -2
  70. package/gen/classes/PhysicsTestMotionParameters3D.ts +2 -2
  71. package/gen/classes/Polygon2D.ts +5 -5
  72. package/gen/classes/PolygonOccluder3D.ts +2 -1
  73. package/gen/classes/PolygonPathFinder.ts +1 -1
  74. package/gen/classes/RDFramebufferPass.ts +4 -4
  75. package/gen/classes/RDPipelineColorBlendState.ts +1 -1
  76. package/gen/classes/RDPipelineMultisampleState.ts +1 -1
  77. package/gen/classes/RDPipelineShader.ts +1 -1
  78. package/gen/classes/RDShaderSPIRV.ts +10 -10
  79. package/gen/classes/ResourcePreloader.ts +1 -1
  80. package/gen/classes/RichTextLabel.ts +3 -3
  81. package/gen/classes/Shortcut.ts +1 -1
  82. package/gen/classes/SplitContainer.ts +1 -1
  83. package/gen/classes/SpriteFrames.ts +1 -1
  84. package/gen/classes/StreamPeerBuffer.ts +1 -1
  85. package/gen/classes/SystemFont.ts +1 -1
  86. package/gen/classes/TextEdit.ts +1 -1
  87. package/gen/classes/TextMesh.ts +1 -1
  88. package/gen/classes/TileMapLayer.ts +1 -1
  89. package/gen/classes/Translation.ts +1 -1
  90. package/gen/classes/VisualShaderNode.ts +2 -2
  91. package/gen/classes/VisualShaderNodeFrame.ts +1 -1
  92. package/gen/classes/VisualShaderNodeIntParameter.ts +1 -1
  93. package/gen/classes/WebSocketMultiplayerPeer.ts +2 -2
  94. package/gen/classes/WebSocketPeer.ts +2 -2
  95. package/gen/classes/Window.ts +1 -1
  96. package/gen/classes/XRFaceTracker.ts +1 -1
  97. package/package.json +4 -4
  98. package/src/runtime.ts +15 -1
@@ -29,7 +29,7 @@ export class PhysicsPointQueryParameters3D extends RefCounted {
29
29
  * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
30
30
  */
31
31
  get exclude(): GodotArray<RID> { return _C(this, 4693) as GodotArray<RID>; }
32
- set exclude(v: GodotArray<RID>) { _C(this, 11309, v); }
32
+ set exclude(v: GodotArray<RID> | RID[]) { _C(this, 11309, v); }
33
33
 
34
34
  /**
35
35
  * If `true`, the query will take {@link PhysicsBody3D}s into account.
@@ -47,7 +47,7 @@ export class PhysicsRayQueryParameters2D extends RefCounted {
47
47
  * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
48
48
  */
49
49
  get exclude(): GodotArray<RID> { return _C(this, 4693) as GodotArray<RID>; }
50
- set exclude(v: GodotArray<RID>) { _C(this, 11309, v); }
50
+ set exclude(v: GodotArray<RID> | RID[]) { _C(this, 11309, v); }
51
51
 
52
52
  /**
53
53
  * If `true`, the query will take {@link PhysicsBody2D}s into account.
@@ -47,7 +47,7 @@ export class PhysicsRayQueryParameters3D extends RefCounted {
47
47
  * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
48
48
  */
49
49
  get exclude(): GodotArray<RID> { return _C(this, 4693) as GodotArray<RID>; }
50
- set exclude(v: GodotArray<RID>) { _C(this, 11309, v); }
50
+ set exclude(v: GodotArray<RID> | RID[]) { _C(this, 11309, v); }
51
51
 
52
52
  /**
53
53
  * If `true`, the query will take {@link PhysicsBody3D}s into account.
@@ -24,7 +24,7 @@ export class PhysicsShapeQueryParameters2D extends RefCounted {
24
24
  * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
25
25
  */
26
26
  get exclude(): GodotArray<RID> { return _C(this, 4693) as GodotArray<RID>; }
27
- set exclude(v: GodotArray<RID>) { _C(this, 11309, v); }
27
+ set exclude(v: GodotArray<RID> | RID[]) { _C(this, 11309, v); }
28
28
 
29
29
  /**
30
30
  * The collision margin for the shape.
@@ -24,7 +24,7 @@ export class PhysicsShapeQueryParameters3D extends RefCounted {
24
24
  * **Note:** The returned array is copied and any changes to it will not update the original property value. To update the value you need to modify the returned array, and then assign it to the property again.
25
25
  */
26
26
  get exclude(): GodotArray<RID> { return _C(this, 4693) as GodotArray<RID>; }
27
- set exclude(v: GodotArray<RID>) { _C(this, 11309, v); }
27
+ set exclude(v: GodotArray<RID> | RID[]) { _C(this, 11309, v); }
28
28
 
29
29
  /**
30
30
  * The collision margin for the shape.
@@ -41,13 +41,13 @@ export class PhysicsTestMotionParameters2D extends RefCounted {
41
41
  * Optional array of body {@link RID} to exclude from collision. Use {@link CollisionObject2D.getRid} to get the {@link RID} associated with a {@link CollisionObject2D}-derived node.
42
42
  */
43
43
  get excludeBodies(): GodotArray<RID> { return _C(this, 4694) as GodotArray<RID>; }
44
- set excludeBodies(v: GodotArray<RID>) { _C(this, 11310, v); }
44
+ set excludeBodies(v: GodotArray<RID> | RID[]) { _C(this, 11310, v); }
45
45
 
46
46
  /**
47
47
  * Optional array of object unique instance ID to exclude from collision. See {@link Object.getInstanceId}.
48
48
  */
49
49
  get excludeObjects(): GodotArray<number> { return _C(this, 4698) as GodotArray<number>; }
50
- set excludeObjects(v: GodotArray<number>) { _C(this, 11314, v); }
50
+ set excludeObjects(v: GodotArray<number> | number[]) { _C(this, 11314, v); }
51
51
 
52
52
  /**
53
53
  * If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by {@link CharacterBody2D} for improving floor detection during floor snapping.
@@ -47,13 +47,13 @@ export class PhysicsTestMotionParameters3D extends RefCounted {
47
47
  * Optional array of body {@link RID} to exclude from collision. Use {@link CollisionObject3D.getRid} to get the {@link RID} associated with a {@link CollisionObject3D}-derived node.
48
48
  */
49
49
  get excludeBodies(): GodotArray<RID> { return _C(this, 4694) as GodotArray<RID>; }
50
- set excludeBodies(v: GodotArray<RID>) { _C(this, 11310, v); }
50
+ set excludeBodies(v: GodotArray<RID> | RID[]) { _C(this, 11310, v); }
51
51
 
52
52
  /**
53
53
  * Optional array of object unique instance ID to exclude from collision. See {@link Object.getInstanceId}.
54
54
  */
55
55
  get excludeObjects(): GodotArray<number> { return _C(this, 4698) as GodotArray<number>; }
56
- set excludeObjects(v: GodotArray<number>) { _C(this, 11314, v); }
56
+ set excludeObjects(v: GodotArray<number> | number[]) { _C(this, 11314, v); }
57
57
 
58
58
  /**
59
59
  * If set to `true`, any depenetration from the recovery phase is reported as a collision; this is used e.g. by {@link CharacterBody3D} for improving floor detection during floor snapping.
@@ -117,28 +117,28 @@ export class Polygon2D extends Node2D {
117
117
  * The polygon's list of vertices. The final point will be connected to the first.
118
118
  */
119
119
  get polygon(): PackedVector2Array { return _C(this, 5962) as PackedVector2Array; }
120
- set polygon(v: PackedVector2Array) { _C(this, 12373, v); }
120
+ set polygon(v: PackedVector2Array | Vector2[]) { _C(this, 12373, v); }
121
121
 
122
122
  /**
123
123
  * Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use `Vector2(0, 0)`.
124
124
  */
125
125
  get uv(): PackedVector2Array { return _C(this, 7002) as PackedVector2Array; }
126
- set uv(v: PackedVector2Array) { _C(this, 13251, v); }
126
+ set uv(v: PackedVector2Array | Vector2[]) { _C(this, 13251, v); }
127
127
 
128
128
  /**
129
129
  * Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use {@link color}.
130
130
  */
131
131
  get vertexColors(): PackedColorArray { return _C(this, 7050) as PackedColorArray; }
132
- set vertexColors(v: PackedColorArray) { _C(this, 13291, v); }
132
+ set vertexColors(v: PackedColorArray | Color[]) { _C(this, 13291, v); }
133
133
 
134
134
  /**
135
135
  * The list of polygons, in case more than one is being represented. Every individual polygon is stored as a {@link PackedInt32Array} where each {@link int} is an index to a point in {@link polygon}. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in {@link polygon}, using the order they are stored in.
136
136
  */
137
137
  get polygons(): GodotArray { return _C(this, 5964) as GodotArray; }
138
- set polygons(v: GodotArray) { _C(this, 12374, v); }
138
+ set polygons(v: GodotArray | unknown[]) { _C(this, 12374, v); }
139
139
 
140
140
  get bones(): GodotArray { return _C(this, 996) as GodotArray; }
141
- set bones(v: GodotArray) { _C(this, 1022, v); }
141
+ set bones(v: GodotArray | unknown[]) { _C(this, 1022, v); }
142
142
 
143
143
  /**
144
144
  * Number of internal vertices, used for UV mapping.
@@ -4,6 +4,7 @@
4
4
  import { _C, _R } from '../../src/runtime.ts';
5
5
  import { Occluder3D } from './Occluder3D.ts';
6
6
  import type { PackedVector2Array } from '../heap-types/index.ts';
7
+ import type { Vector2 } from '../value-types/index.ts';
7
8
 
8
9
  /**
9
10
  * {@link PolygonOccluder3D} stores a polygon shape that can be used by the engine's occlusion culling system. When an {@link OccluderInstance3D} with a {@link PolygonOccluder3D} is selected in the editor, an editor will appear at the top of the 3D viewport so you can add/remove points. All points must be placed on the same 2D plane, which means it is not possible to create arbitrary 3D shapes with a single {@link PolygonOccluder3D}. To use arbitrary 3D shapes as occluders, use {@link ArrayOccluder3D} or {@link OccluderInstance3D}'s baking feature instead.
@@ -17,7 +18,7 @@ export class PolygonOccluder3D extends Occluder3D {
17
18
  * The polygon must *not* have intersecting lines. Otherwise, triangulation will fail (with an error message printed).
18
19
  */
19
20
  get polygon(): PackedVector2Array { return _C(this, 5962) as PackedVector2Array; }
20
- set polygon(v: PackedVector2Array) { _C(this, 12373, v); }
21
+ set polygon(v: PackedVector2Array | Vector2[]) { _C(this, 12373, v); }
21
22
 
22
23
  static readonly name = _R(601, PolygonOccluder3D);
23
24
  }
@@ -55,7 +55,7 @@ export class PolygonPathFinder extends Resource {
55
55
  getBounds(): Rect2 { return _C(this, 3997) as Rect2; }
56
56
 
57
57
  get data(): GodotDictionary { return _C(this, 1000) as GodotDictionary; }
58
- set data(v: GodotDictionary) { _C(this, 1026, v); }
58
+ set data(v: GodotDictionary | Record<string, any>) { _C(this, 1026, v); }
59
59
 
60
60
  static readonly name = _R(602, PolygonPathFinder);
61
61
  }
@@ -17,25 +17,25 @@ export class RDFramebufferPass extends RefCounted {
17
17
  * Color attachments in order starting from 0. If this attachment is not used by the shader, pass ATTACHMENT_UNUSED to skip.
18
18
  */
19
19
  get colorAttachments(): PackedInt32Array { return _C(this, 4220) as PackedInt32Array; }
20
- set colorAttachments(v: PackedInt32Array) { _C(this, 10906, v); }
20
+ set colorAttachments(v: PackedInt32Array | number[]) { _C(this, 10906, v); }
21
21
 
22
22
  /**
23
23
  * Used for multipass framebuffers (more than one render pass). Converts an attachment to an input. Make sure to also supply it properly in the {@link RDUniform} for the uniform set.
24
24
  */
25
25
  get inputAttachments(): PackedInt32Array { return _C(this, 5107) as PackedInt32Array; }
26
- set inputAttachments(v: PackedInt32Array) { _C(this, 11710, v); }
26
+ set inputAttachments(v: PackedInt32Array | number[]) { _C(this, 11710, v); }
27
27
 
28
28
  /**
29
29
  * If the color attachments are multisampled, non-multisampled resolve attachments can be provided.
30
30
  */
31
31
  get resolveAttachments(): PackedInt32Array { return _C(this, 6155) as PackedInt32Array; }
32
- set resolveAttachments(v: PackedInt32Array) { _C(this, 12541, v); }
32
+ set resolveAttachments(v: PackedInt32Array | number[]) { _C(this, 12541, v); }
33
33
 
34
34
  /**
35
35
  * Attachments to preserve in this pass (otherwise they are erased).
36
36
  */
37
37
  get preserveAttachments(): PackedInt32Array { return _C(this, 5991) as PackedInt32Array; }
38
- set preserveAttachments(v: PackedInt32Array) { _C(this, 12400, v); }
38
+ set preserveAttachments(v: PackedInt32Array | number[]) { _C(this, 12400, v); }
39
39
 
40
40
  /**
41
41
  * Depth attachment. ATTACHMENT_UNUSED should be used if no depth buffer is required for this pass.
@@ -36,7 +36,7 @@ export class RDPipelineColorBlendState extends RefCounted {
36
36
  * The attachments that are blended together.
37
37
  */
38
38
  get attachments(): GodotArray<RDPipelineColorBlendStateAttachment> { return _C(this, 3807) as GodotArray<RDPipelineColorBlendStateAttachment>; }
39
- set attachments(v: GodotArray<RDPipelineColorBlendStateAttachment>) { _C(this, 10548, v); }
39
+ set attachments(v: GodotArray<RDPipelineColorBlendStateAttachment> | RDPipelineColorBlendStateAttachment[]) { _C(this, 10548, v); }
40
40
 
41
41
  static readonly name = _R(620, RDPipelineColorBlendState);
42
42
  }
@@ -46,7 +46,7 @@ export class RDPipelineMultisampleState extends RefCounted {
46
46
  * The sample mask array. See the [sample mask Vulkan documentation](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#fragops-samplemask) for more details.
47
47
  */
48
48
  get sampleMasks(): GodotArray<number> { return _C(this, 6228) as GodotArray<number>; }
49
- set sampleMasks(v: GodotArray<number>) { _C(this, 12600, v); }
49
+ set sampleMasks(v: GodotArray<number> | number[]) { _C(this, 12600, v); }
50
50
 
51
51
  static readonly name = _R(623, RDPipelineMultisampleState);
52
52
  }
@@ -23,7 +23,7 @@ export class RDPipelineShader extends RefCounted {
23
23
  * Specialization constants applied to the selected shader stage at pipeline creation time.
24
24
  */
25
25
  get specializationConstants(): GodotArray<RDPipelineSpecializationConstant> { return _C(this, 6488) as GodotArray<RDPipelineSpecializationConstant>; }
26
- set specializationConstants(v: GodotArray<RDPipelineSpecializationConstant>) { _C(this, 12832, v); }
26
+ set specializationConstants(v: GodotArray<RDPipelineSpecializationConstant> | RDPipelineSpecializationConstant[]) { _C(this, 12832, v); }
27
27
 
28
28
  static readonly name = _R(625, RDPipelineShader);
29
29
  }
@@ -16,61 +16,61 @@ export class RDShaderSPIRV extends Resource {
16
16
  * The SPIR-V bytecode for the vertex shader stage.
17
17
  */
18
18
  get bytecodeVertex(): PackedByteArray { return _C(this, 6530, 0) as PackedByteArray; }
19
- set bytecodeVertex(v: PackedByteArray) { _C(this, 12876, 0, v); }
19
+ set bytecodeVertex(v: PackedByteArray | number[]) { _C(this, 12876, 0, v); }
20
20
 
21
21
  /**
22
22
  * The SPIR-V bytecode for the fragment shader stage.
23
23
  */
24
24
  get bytecodeFragment(): PackedByteArray { return _C(this, 6530, 1) as PackedByteArray; }
25
- set bytecodeFragment(v: PackedByteArray) { _C(this, 12876, 1, v); }
25
+ set bytecodeFragment(v: PackedByteArray | number[]) { _C(this, 12876, 1, v); }
26
26
 
27
27
  /**
28
28
  * The SPIR-V bytecode for the tessellation control shader stage.
29
29
  */
30
30
  get bytecodeTesselationControl(): PackedByteArray { return _C(this, 6530, 2) as PackedByteArray; }
31
- set bytecodeTesselationControl(v: PackedByteArray) { _C(this, 12876, 2, v); }
31
+ set bytecodeTesselationControl(v: PackedByteArray | number[]) { _C(this, 12876, 2, v); }
32
32
 
33
33
  /**
34
34
  * The SPIR-V bytecode for the tessellation evaluation shader stage.
35
35
  */
36
36
  get bytecodeTesselationEvaluation(): PackedByteArray { return _C(this, 6530, 3) as PackedByteArray; }
37
- set bytecodeTesselationEvaluation(v: PackedByteArray) { _C(this, 12876, 3, v); }
37
+ set bytecodeTesselationEvaluation(v: PackedByteArray | number[]) { _C(this, 12876, 3, v); }
38
38
 
39
39
  /**
40
40
  * The SPIR-V bytecode for the compute shader stage.
41
41
  */
42
42
  get bytecodeCompute(): PackedByteArray { return _C(this, 6530, 4) as PackedByteArray; }
43
- set bytecodeCompute(v: PackedByteArray) { _C(this, 12876, 4, v); }
43
+ set bytecodeCompute(v: PackedByteArray | number[]) { _C(this, 12876, 4, v); }
44
44
 
45
45
  /**
46
46
  * The SPIR-V bytecode for the ray generation shader stage.
47
47
  */
48
48
  get bytecodeRaygen(): PackedByteArray { return _C(this, 6530, 5) as PackedByteArray; }
49
- set bytecodeRaygen(v: PackedByteArray) { _C(this, 12876, 5, v); }
49
+ set bytecodeRaygen(v: PackedByteArray | number[]) { _C(this, 12876, 5, v); }
50
50
 
51
51
  /**
52
52
  * The SPIR-V bytecode for the any hit shader stage.
53
53
  */
54
54
  get bytecodeAnyHit(): PackedByteArray { return _C(this, 6530, 6) as PackedByteArray; }
55
- set bytecodeAnyHit(v: PackedByteArray) { _C(this, 12876, 6, v); }
55
+ set bytecodeAnyHit(v: PackedByteArray | number[]) { _C(this, 12876, 6, v); }
56
56
 
57
57
  /**
58
58
  * The SPIR-V bytecode for the closest hit shader stage.
59
59
  */
60
60
  get bytecodeClosestHit(): PackedByteArray { return _C(this, 6530, 7) as PackedByteArray; }
61
- set bytecodeClosestHit(v: PackedByteArray) { _C(this, 12876, 7, v); }
61
+ set bytecodeClosestHit(v: PackedByteArray | number[]) { _C(this, 12876, 7, v); }
62
62
 
63
63
  /**
64
64
  * The SPIR-V bytecode for the miss shader stage.
65
65
  */
66
66
  get bytecodeMiss(): PackedByteArray { return _C(this, 6530, 8) as PackedByteArray; }
67
- set bytecodeMiss(v: PackedByteArray) { _C(this, 12876, 8, v); }
67
+ set bytecodeMiss(v: PackedByteArray | number[]) { _C(this, 12876, 8, v); }
68
68
 
69
69
  /**
70
70
  * The SPIR-V bytecode for the intersection shader stage.
71
71
  */
72
72
  get bytecodeIntersection(): PackedByteArray { return _C(this, 6530, 9) as PackedByteArray; }
73
- set bytecodeIntersection(v: PackedByteArray) { _C(this, 12876, 9, v); }
73
+ set bytecodeIntersection(v: PackedByteArray | number[]) { _C(this, 12876, 9, v); }
74
74
 
75
75
  /**
76
76
  * The compilation error message for the vertex shader stage (set by the SPIR-V compiler and Godot). If empty, shader compilation was successful.
@@ -44,7 +44,7 @@ export class ResourcePreloader extends Node {
44
44
  getResourceList(): PackedStringArray { return _C(this, 6162) as PackedStringArray; }
45
45
 
46
46
  get resources(): GodotArray { return _C(this, 1012) as GodotArray; }
47
- set resources(v: GodotArray) { _C(this, 1042, v); }
47
+ set resources(v: GodotArray | unknown[]) { _C(this, 1042, v); }
48
48
 
49
49
  static readonly name = _R(664, ResourcePreloader);
50
50
  }
@@ -612,14 +612,14 @@ export class RichTextLabel extends Control {
612
612
  * Aligns text to the given tab-stops.
613
613
  */
614
614
  get tabStops(): PackedFloat32Array { return _C(this, 6683) as PackedFloat32Array; }
615
- set tabStops(v: PackedFloat32Array) { _C(this, 12981, v); }
615
+ set tabStops(v: PackedFloat32Array | number[]) { _C(this, 12981, v); }
616
616
 
617
617
  /**
618
618
  * The currently installed custom effects. This is an array of {@link RichTextEffect}s.
619
619
  * To add a custom effect, it's more convenient to use {@link installEffect}.
620
620
  */
621
621
  get customEffects(): GodotArray { return _C(this, 4607) as GodotArray; }
622
- set customEffects(v: GodotArray) { _C(this, 11224, v); }
622
+ set customEffects(v: GodotArray | unknown[]) { _C(this, 11224, v); }
623
623
 
624
624
  /**
625
625
  * If `true`, the label underlines meta tags such as {@link code skip-lint}[{text}]({text}). These tags can call a function when clicked if {@link meta_clicked} is connected to a function.
@@ -707,7 +707,7 @@ export class RichTextLabel extends Control {
707
707
  * Set additional options for BiDi override.
708
708
  */
709
709
  get structuredTextBidiOverrideOptions(): GodotArray { return _C(this, 6586) as GodotArray; }
710
- set structuredTextBidiOverrideOptions(v: GodotArray) { _C(this, 12914, v); }
710
+ set structuredTextBidiOverrideOptions(v: GodotArray | unknown[]) { _C(this, 12914, v); }
711
711
 
712
712
  /**
713
713
  * Triggered when the user clicks on content between meta (URL) tags. If the meta is defined in BBCode, e.g. {@link code skip-lint}[Text](value"})[/code], then the parameter for this signal will always be a {@link String} type. If a particular type or an object is desired, the {@link pushMeta} method must be used to manually insert the data into the tag stack. Alternatively, you can convert the {@link String} input to the desired type based on its contents (such as calling {@link JSON.parse} on it).
@@ -54,7 +54,7 @@ export class Shortcut extends Resource {
54
54
  * Generally the {@link InputEvent} used is an {@link InputEventKey}, though it can be any {@link InputEvent}, including an {@link InputEventAction}.
55
55
  */
56
56
  get events(): GodotArray { return _C(this, 4691) as GodotArray; }
57
- set events(v: GodotArray) { _C(this, 11308, v); }
57
+ set events(v: GodotArray | unknown[]) { _C(this, 11308, v); }
58
58
 
59
59
  static readonly name = _R(700, Shortcut);
60
60
  }
@@ -51,7 +51,7 @@ export class SplitContainer extends Container {
51
51
  * **Note:** If the split offsets cause {@link Control} nodes to overlap, the first split will take priority when resolving the positions.
52
52
  */
53
53
  get splitOffsets(): PackedInt32Array { return _C(this, 6500) as PackedInt32Array; }
54
- set splitOffsets(v: PackedInt32Array) { _C(this, 12843, v); }
54
+ set splitOffsets(v: PackedInt32Array | number[]) { _C(this, 12843, v); }
55
55
 
56
56
  /**
57
57
  * If `true`, the draggers will be disabled and the children will be sized as if all {@link splitOffsets} were `0`.
@@ -122,7 +122,7 @@ export class SpriteFrames extends Resource {
122
122
  clearAll(): void { _C(this, 2233); }
123
123
 
124
124
  get animations(): GodotArray { return _C(this, 995) as GodotArray; }
125
- set animations(v: GodotArray) { _C(this, 1021, v); }
125
+ set animations(v: GodotArray | unknown[]) { _C(this, 1021, v); }
126
126
 
127
127
  static readonly name = _R(739, SpriteFrames);
128
128
  }
@@ -46,7 +46,7 @@ export class StreamPeerBuffer extends StreamPeer {
46
46
  * The underlying data buffer. Setting this value resets the cursor.
47
47
  */
48
48
  get dataArray(): PackedByteArray { return _C(this, 4411) as PackedByteArray; }
49
- set dataArray(v: PackedByteArray) { _C(this, 11035, v); }
49
+ set dataArray(v: PackedByteArray | number[]) { _C(this, 11035, v); }
50
50
 
51
51
  static readonly name = _R(745, StreamPeerBuffer);
52
52
  }
@@ -20,7 +20,7 @@ export class SystemFont extends Font {
20
20
  * Array of font family names to search, first matching font found is used.
21
21
  */
22
22
  get fontNames(): PackedStringArray { return _C(this, 4851) as PackedStringArray; }
23
- set fontNames(v: PackedStringArray) { _C(this, 11456, v); }
23
+ set fontNames(v: PackedStringArray | string[]) { _C(this, 11456, v); }
24
24
 
25
25
  /**
26
26
  * If set to `true`, italic or oblique font is preferred.
@@ -1169,7 +1169,7 @@ export class TextEdit extends Control {
1169
1169
  * Set additional options for BiDi override.
1170
1170
  */
1171
1171
  get structuredTextBidiOverrideOptions(): GodotArray { return _C(this, 6586) as GodotArray; }
1172
- set structuredTextBidiOverrideOptions(v: GodotArray) { _C(this, 12914, v); }
1172
+ set structuredTextBidiOverrideOptions(v: GodotArray | unknown[]) { _C(this, 12914, v); }
1173
1173
 
1174
1174
  /**
1175
1175
  * Emitted when {@link clear} is called or {@link text} is set.
@@ -128,7 +128,7 @@ export class TextMesh extends PrimitiveMesh {
128
128
  * Set additional options for BiDi override.
129
129
  */
130
130
  get structuredTextBidiOverrideOptions(): GodotArray { return _C(this, 6586) as GodotArray; }
131
- set structuredTextBidiOverrideOptions(v: GodotArray) { _C(this, 12914, v); }
131
+ set structuredTextBidiOverrideOptions(v: GodotArray | unknown[]) { _C(this, 12914, v); }
132
132
 
133
133
  static readonly name = _R(769, TextMesh);
134
134
  }
@@ -196,7 +196,7 @@ export class TileMapLayer extends Node2D {
196
196
  * The raw tile map data as a byte array.
197
197
  */
198
198
  get tileMapData(): PackedByteArray { return _C(this, 6794) as PackedByteArray; }
199
- set tileMapData(v: PackedByteArray) { _C(this, 13072, v); }
199
+ set tileMapData(v: PackedByteArray | number[]) { _C(this, 13072, v); }
200
200
 
201
201
  /**
202
202
  * If `false`, disables this {@link TileMapLayer} completely (rendering, collision, navigation, scene tiles, etc.)
@@ -72,7 +72,7 @@ export class Translation extends Resource {
72
72
  getMessageCount(): number { return _C(this, 5519) as number; }
73
73
 
74
74
  get messages(): GodotDictionary { return _C(this, 1005) as GodotDictionary; }
75
- set messages(v: GodotDictionary) { _C(this, 1033, v); }
75
+ set messages(v: GodotDictionary | Record<string, any>) { _C(this, 1033, v); }
76
76
 
77
77
  /**
78
78
  * The locale of the translation.
@@ -42,10 +42,10 @@ export class VisualShaderNode extends Resource {
42
42
  set outputPortForPreview(v: number) { _C(this, 12221, v); }
43
43
 
44
44
  get defaultInputValues(): GodotArray { return _C(this, 4452) as GodotArray; }
45
- set defaultInputValues(v: GodotArray) { _C(this, 11065, v); }
45
+ set defaultInputValues(v: GodotArray | unknown[]) { _C(this, 11065, v); }
46
46
 
47
47
  get expandedOutputPorts(): GodotArray { return _C(this, 1007) as GodotArray; }
48
- set expandedOutputPorts(v: GodotArray) { _C(this, 1035, v); }
48
+ set expandedOutputPorts(v: GodotArray | unknown[]) { _C(this, 1035, v); }
49
49
 
50
50
  /**
51
51
  * Represents the index of the frame this node is linked to. If set to `-1` the node is not linked to any frame.
@@ -52,7 +52,7 @@ export class VisualShaderNodeFrame extends VisualShaderNodeResizableBase {
52
52
  * The list of nodes attached to the frame.
53
53
  */
54
54
  get attachedNodes(): PackedInt32Array { return _C(this, 3805) as PackedInt32Array; }
55
- set attachedNodes(v: PackedInt32Array) { _C(this, 10547, v); }
55
+ set attachedNodes(v: PackedInt32Array | number[]) { _C(this, 10547, v); }
56
56
 
57
57
  static readonly name = _R(869, VisualShaderNodeFrame);
58
58
  }
@@ -39,7 +39,7 @@ export class VisualShaderNodeIntParameter extends VisualShaderNodeParameter {
39
39
  * The names used for the enum select in the editor. {@link hint} must be {@link HINT_ENUM} for this to take effect.
40
40
  */
41
41
  get enumNames(): PackedStringArray { return _C(this, 4677) as PackedStringArray; }
42
- set enumNames(v: PackedStringArray) { _C(this, 11300, v); }
42
+ set enumNames(v: PackedStringArray | string[]) { _C(this, 11300, v); }
43
43
 
44
44
  /**
45
45
  * If `true`, the node will have a custom default value.
@@ -45,13 +45,13 @@ export class WebSocketMultiplayerPeer extends MultiplayerPeer {
45
45
  * The supported WebSocket sub-protocols. See {@link WebSocketPeer.supportedProtocols} for more details.
46
46
  */
47
47
  get supportedProtocols(): PackedStringArray { return _C(this, 6620) as PackedStringArray; }
48
- set supportedProtocols(v: PackedStringArray) { _C(this, 12937, v); }
48
+ set supportedProtocols(v: PackedStringArray | string[]) { _C(this, 12937, v); }
49
49
 
50
50
  /**
51
51
  * The extra headers to use during handshake. See {@link WebSocketPeer.handshakeHeaders} for more details.
52
52
  */
53
53
  get handshakeHeaders(): PackedStringArray { return _C(this, 5020) as PackedStringArray; }
54
- set handshakeHeaders(v: PackedStringArray) { _C(this, 11603, v); }
54
+ set handshakeHeaders(v: PackedStringArray | string[]) { _C(this, 11603, v); }
55
55
 
56
56
  /**
57
57
  * The inbound buffer size for connected peers. See {@link WebSocketPeer.inboundBufferSize} for more details.
@@ -140,14 +140,14 @@ export class WebSocketPeer extends PacketPeer {
140
140
  * The WebSocket sub-protocols allowed during the WebSocket handshake.
141
141
  */
142
142
  get supportedProtocols(): PackedStringArray { return _C(this, 6620) as PackedStringArray; }
143
- set supportedProtocols(v: PackedStringArray) { _C(this, 12937, v); }
143
+ set supportedProtocols(v: PackedStringArray | string[]) { _C(this, 12937, v); }
144
144
 
145
145
  /**
146
146
  * The extra HTTP headers to be sent during the WebSocket handshake.
147
147
  * **Note:** Not supported in Web exports due to browsers' restrictions.
148
148
  */
149
149
  get handshakeHeaders(): PackedStringArray { return _C(this, 5020) as PackedStringArray; }
150
- set handshakeHeaders(v: PackedStringArray) { _C(this, 11603, v); }
150
+ set handshakeHeaders(v: PackedStringArray | string[]) { _C(this, 11603, v); }
151
151
 
152
152
  /**
153
153
  * The size of the input buffer in bytes (roughly the maximum amount of memory that will be allocated for the inbound packets).
@@ -542,7 +542,7 @@ export class Window extends Viewport {
542
542
  * **Note:** This property is implemented on Linux (X11), macOS and Windows.
543
543
  */
544
544
  get mousePassthroughPolygon(): PackedVector2Array { return _C(this, 5590) as PackedVector2Array; }
545
- set mousePassthroughPolygon(v: PackedVector2Array) { _C(this, 12096, v); }
545
+ set mousePassthroughPolygon(v: PackedVector2Array | Vector2[]) { _C(this, 12096, v); }
546
546
 
547
547
  /**
548
548
  * If `true`, the window is visible.
@@ -26,7 +26,7 @@ export class XRFaceTracker extends XRTracker {
26
26
  * The array of face blend shape weights with indices corresponding to the {@link BlendShapeEntry} enum.
27
27
  */
28
28
  get blendShapes(): PackedFloat32Array { return _C(this, 3942) as PackedFloat32Array; }
29
- set blendShapes(v: PackedFloat32Array) { _C(this, 10685, v); }
29
+ set blendShapes(v: PackedFloat32Array | number[]) { _C(this, 10685, v); }
30
30
 
31
31
  static readonly name = _R(980, XRFaceTracker);
32
32
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ringozz/godot",
3
3
  "author": "Vladimir Davidovich",
4
- "version": "4.7.2-570",
4
+ "version": "4.7.2-583",
5
5
  "description": "Node-API bindings for Godot Engine — call Godot classes from JavaScript",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -42,9 +42,9 @@
42
42
  "precision": "single"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@ringozz/godot-macos-arm64": "^4.7.2-570",
46
- "@ringozz/godot-windows-x86_64": "^4.7.2-570",
47
- "@ringozz/godot-web-wasm32": "^4.7.2-570"
45
+ "@ringozz/godot-macos-arm64": "^4.7.2-583",
46
+ "@ringozz/godot-windows-x86_64": "^4.7.2-583",
47
+ "@ringozz/godot-web-wasm32": "^4.7.2-583"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@types/bun": "*"
package/src/runtime.ts CHANGED
@@ -64,6 +64,15 @@ export const requestAnimationFrame = _mod.requestAnimationFrame as typeof global
64
64
  /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/DedicatedWorkerGlobalScope/cancelAnimationFrame) */
65
65
  export const cancelAnimationFrame = _mod.cancelAnimationFrame as typeof globalThis.cancelAnimationFrame ?? globalThis.cancelAnimationFrame;
66
66
 
67
+ // One-shot callbacks of in-flight `_P` awaits. The connection's JSCallable holds
68
+ // only a weak reference to the callback, so without this the function could be
69
+ // GC'd before the signal fires. A module root is the only retention Bun reliably
70
+ // traces: neither `_P`'s closure cells nor a Set attached to the signal's object
71
+ // wrapper survive a full GC while the await is pending (the await machinery
72
+ // discards the promise `_P` returns, and Bun may collect the emitter's wrapper).
73
+ // Removed as soon as the signal fires or the connect fails.
74
+ const pendingCallbacks = new Set<(...args: any[]) => void>();
75
+
67
76
  /** Make a Signal PromiseLike: connects a one-shot callback that resolves with the args tuple. */
68
77
  export function _P(signal: any, onfulfilled?: any, onrejected?: any) {
69
78
  return new Promise<any>((resolve, reject) => {
@@ -72,11 +81,16 @@ export function _P(signal: any, onfulfilled?: any, onrejected?: any) {
72
81
  return;
73
82
  }
74
83
  const cb = (...args: any[]) => {
84
+ pendingCallbacks.delete(cb);
75
85
  signal.disconnect(cb);
76
86
  resolve(args);
77
87
  };
88
+ pendingCallbacks.add(cb);
78
89
  const res = signal.connect(cb);
79
- if (res !== 0) reject(new Error('Failed to connect signal: error code ' + res));
90
+ if (res !== 0) {
91
+ pendingCallbacks.delete(cb);
92
+ reject(new Error('Failed to connect signal: error code ' + res));
93
+ }
80
94
  }).then(onfulfilled, onrejected);
81
95
  }
82
96