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
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
/** Abstraction for working with modern low-level graphics APIs. */
|
|
5
5
|
declare class RenderingDevice extends GodotObject {
|
|
6
|
-
/** Builds the `acceleration_structure`. */
|
|
7
|
-
acceleration_structure_build(acceleration_structure: RID): int;
|
|
8
6
|
/** This method does nothing. */
|
|
9
7
|
barrier(from_: int, to: int): void;
|
|
8
|
+
/** Builds the `blas`. */
|
|
9
|
+
blas_build(blas: RID): int;
|
|
10
10
|
/**
|
|
11
|
-
* Creates a new Bottom
|
|
11
|
+
* Creates a new Bottom-Level Acceleration Structure (BLAS). It can be accessed with the RID that is returned.
|
|
12
12
|
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
13
|
-
* `position_attribute_location` selects which vertex attribute location supplies the position data (default is 0).
|
|
14
13
|
*/
|
|
15
|
-
blas_create(
|
|
14
|
+
blas_create(geometries: Array<RDAccelerationStructureGeometry>, flags: int): RID;
|
|
16
15
|
/**
|
|
17
16
|
* Clears the contents of the `buffer`, clearing `size_bytes` bytes, starting at `offset`.
|
|
18
17
|
* Prints an error if:
|
|
@@ -335,6 +334,44 @@ declare class RenderingDevice extends GodotObject {
|
|
|
335
334
|
get_tracked_object_type_count(): int;
|
|
336
335
|
/** Returns `true` if the `feature` is supported by the GPU. */
|
|
337
336
|
has_feature(feature: int): boolean;
|
|
337
|
+
/**
|
|
338
|
+
* Creates a new hit shader binding table (SBT). It can be accessed with the RID that is returned.
|
|
339
|
+
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
340
|
+
* This will be freed automatically when the `raytracing_pipeline` is freed.
|
|
341
|
+
* The hit SBT resizes itself as needed. `initial_hit_group_capacity` is used to allocate the initial backing memory.
|
|
342
|
+
*/
|
|
343
|
+
hit_sbt_create(raytracing_pipeline: RID, initial_hit_group_capacity: int): RID;
|
|
344
|
+
/**
|
|
345
|
+
* Allocates a contiguous range of SBT entries from `hit_sbt`.
|
|
346
|
+
* The returned value should be assigned to {@link RDAccelerationStructureInstance.hit_sbt_range}.
|
|
347
|
+
* During ray traversal, hit group index is computed as:
|
|
348
|
+
* (geometry index in {@link RDAccelerationStructureInstance.blas})
|
|
349
|
+
* × (SBT stride used in `traceRayEXT`)
|
|
350
|
+
* + (SBT offset used in `traceRayEXT`)
|
|
351
|
+
* + (range offset)
|
|
352
|
+
* `hit_group_count` must be large enough to cover all SBT entries that may be indexed by this equation. This typically corresponds to:
|
|
353
|
+
* (geometry count in {@link RDAccelerationStructureInstance.blas})
|
|
354
|
+
* × (SBT stride used in `traceRayEXT`)
|
|
355
|
+
* The allocated range is uninitialized and must be filled using {@link hit_sbt_range_update}.
|
|
356
|
+
*/
|
|
357
|
+
hit_sbt_range_alloc(hit_sbt: RID, hit_group_count: int): int;
|
|
358
|
+
/**
|
|
359
|
+
* Frees a hit SBT range previously allocated with {@link hit_sbt_range_alloc}.
|
|
360
|
+
* The range must not be in use by any acceleration structure after being freed.
|
|
361
|
+
*/
|
|
362
|
+
hit_sbt_range_free(hit_sbt: RID, range: int): int;
|
|
363
|
+
/**
|
|
364
|
+
* Updates the contents of a hit SBT range.
|
|
365
|
+
* `hit_group_indices` specifies indices into the hit group array provided in {@link raytracing_pipeline_create}.
|
|
366
|
+
* The `offset` parameter specifies where within the allocated range the writing begins. This allows partial updates of a range. However, the complete range must be fully initialized before it is used in a raytracing dispatch.
|
|
367
|
+
*/
|
|
368
|
+
hit_sbt_range_update(hit_sbt: RID, range: int, offset: int, hit_group_indices: PackedInt32Array | Array<unknown>): int;
|
|
369
|
+
/**
|
|
370
|
+
* Sets a new `raytracing_pipeline` for `hit_sbt`.
|
|
371
|
+
* The new pipeline must be a superset of the previous one. Existing hit groups must keep the same order and new hit groups should be appended to the end. This preserves existing SBT entries.
|
|
372
|
+
* The previous pipeline must remain valid during the call.
|
|
373
|
+
*/
|
|
374
|
+
hit_sbt_set_pipeline(hit_sbt: RID, raytracing_pipeline: RID): int;
|
|
338
375
|
/**
|
|
339
376
|
* Creates a new index array. It can be accessed with the RID that is returned.
|
|
340
377
|
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
@@ -368,15 +405,21 @@ declare class RenderingDevice extends GodotObject {
|
|
|
368
405
|
*/
|
|
369
406
|
raytracing_list_set_push_constant(raytracing_list: int, buffer: PackedByteArray | Array<unknown>, size_bytes: int): void;
|
|
370
407
|
/**
|
|
371
|
-
* Initializes a
|
|
408
|
+
* Initializes a raytracing dispatch for `raytracing_list`, launching `width` × `height` × `depth` rays.
|
|
409
|
+
* `raygen_shader_index` selects the ray generation shader from the pipeline bound with {@link raytracing_list_bind_raytracing_pipeline}.
|
|
410
|
+
* `hit_sbt` must use the same pipeline bound to `raytracing_list`.
|
|
372
411
|
*/
|
|
373
|
-
raytracing_list_trace_rays(raytracing_list: int, width: int, height: int): void;
|
|
412
|
+
raytracing_list_trace_rays(raytracing_list: int, raygen_shader_index: int, hit_sbt: RID, width: int, height: int, depth: int): void;
|
|
374
413
|
/**
|
|
375
414
|
* Creates a new raytracing pipeline. It can be accessed with the RID that is returned.
|
|
376
415
|
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
377
|
-
*
|
|
416
|
+
* Each shader must provide the required stage. All stages must use compatible pipeline layouts. The pipeline selects the required stage from each shader.
|
|
417
|
+
* Input order defines stable indices used by the API:
|
|
418
|
+
* - `raygen_shaders` is indexed in {@link raytracing_list_trace_rays}.
|
|
419
|
+
* - `miss_shaders` is indexed in `traceRayEXT`.
|
|
420
|
+
* - `hit_groups` is indexed in {@link hit_sbt_range_update}.
|
|
378
421
|
*/
|
|
379
|
-
raytracing_pipeline_create(
|
|
422
|
+
raytracing_pipeline_create(raygen_shaders: Array<RDPipelineShader>, miss_shaders: Array<RDPipelineShader>, hit_groups: Array<RDHitGroup>, max_trace_recursion_depth: int): RID;
|
|
380
423
|
/**
|
|
381
424
|
* Returns `true` if the raytracing pipeline specified by the `raytracing_pipeline` RID is valid, `false` otherwise.
|
|
382
425
|
*/
|
|
@@ -476,7 +519,7 @@ declare class RenderingDevice extends GodotObject {
|
|
|
476
519
|
*/
|
|
477
520
|
texture_clear(texture: RID, color: Color, base_mipmap: int, mipmap_count: int, base_layer: int, layer_count: int): int;
|
|
478
521
|
/**
|
|
479
|
-
* Copies the `from_texture` to `to_texture` with the specified `from_pos`, `to_pos` and `size` coordinates.
|
|
522
|
+
* Copies the `from_texture` to `to_texture` with the specified `from_pos`, `to_pos` and `size` coordinates. For 2-dimensional textures, `from_pos` and `to_pos` must have a Z axis of `0`, and `size` must have a Z axis of `1`. Source and destination mipmaps/layers must also be specified, with these parameters being `0` for textures without mipmaps or single-layer textures. Returns {@link @GlobalScope.OK} if the texture copy was successful or {@link @GlobalScope.ERR_INVALID_PARAMETER} otherwise.
|
|
480
523
|
* **Note:** `from_texture` texture can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to {@link FINAL_ACTION_CONTINUE}) to copy this texture.
|
|
481
524
|
* **Note:** `from_texture` texture requires the {@link TEXTURE_USAGE_CAN_COPY_FROM_BIT} to be retrieved.
|
|
482
525
|
* **Note:** `to_texture` can't be copied while a draw list that uses it as part of a framebuffer is being created. Ensure the draw list is finalized (and that the color/depth texture using it is not set to {@link FINAL_ACTION_CONTINUE}) to copy this texture.
|
|
@@ -564,20 +607,17 @@ declare class RenderingDevice extends GodotObject {
|
|
|
564
607
|
*/
|
|
565
608
|
texture_update(texture: RID, layer: int, data: PackedByteArray | Array<unknown>): int;
|
|
566
609
|
/**
|
|
567
|
-
*
|
|
568
|
-
*
|
|
569
|
-
*
|
|
610
|
+
* Builds the `tlas`. The contents of previous builds are discarded.
|
|
611
|
+
* Any BLAS provided through the {@link RDAccelerationStructureInstance.blas} member must already have been built using the {@link blas_build} method.
|
|
612
|
+
* The number of instances can be equal to or smaller than the maximum instance count provided in the {@link tlas_create} method.
|
|
613
|
+
* **Note:** Freeing or rebuilding any of the provided BLASes after this method invalidates the TLAS and requires it to be rebuilt.
|
|
570
614
|
*/
|
|
571
|
-
|
|
615
|
+
tlas_build(tlas: RID, instances: Array<RDAccelerationStructureInstance>): int;
|
|
572
616
|
/**
|
|
573
|
-
* Creates a new
|
|
617
|
+
* Creates a new Top-Level Acceleration Structure (TLAS). It can be accessed with the RID that is returned.
|
|
574
618
|
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
575
619
|
*/
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Fills the content of an instances buffer. The number of BLASes and transforms passed as input should be the same and should equal the instance count used at instance buffer creation time.
|
|
579
|
-
*/
|
|
580
|
-
tlas_instances_buffer_fill(instances_buffer: RID, blases: Array<RID>, transforms: Array<Transform3D>): void;
|
|
620
|
+
tlas_create(max_instance_count: int, flags: int): RID;
|
|
581
621
|
/**
|
|
582
622
|
* Creates a new uniform buffer. It can be accessed with the RID that is returned.
|
|
583
623
|
* Once finished with your RID, you will want to free the RID using the RenderingDevice's {@link free_rid} method.
|
|
@@ -1777,11 +1817,41 @@ declare class RenderingDevice extends GodotObject {
|
|
|
1777
1817
|
* Allows usage of this buffer as input data for an acceleration structure build operation. You must first check that the GPU supports it:
|
|
1778
1818
|
*/
|
|
1779
1819
|
static readonly BUFFER_CREATION_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT: int;
|
|
1780
|
-
// enum
|
|
1820
|
+
// enum AccelerationStructureFlagBits
|
|
1821
|
+
/** Allows the acceleration structure to be updated after it has been built. */
|
|
1822
|
+
static readonly ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT: int;
|
|
1823
|
+
/** Allows the acceleration structure to be compacted to reduce memory usage after it has been built. */
|
|
1824
|
+
static readonly ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT: int;
|
|
1825
|
+
/**
|
|
1826
|
+
* Prioritizes ray traversal performance over build performance when building the acceleration structure.
|
|
1827
|
+
*/
|
|
1828
|
+
static readonly ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT: int;
|
|
1829
|
+
/**
|
|
1830
|
+
* Prioritizes build performance over ray traversal performance when building the acceleration structure.
|
|
1831
|
+
*/
|
|
1832
|
+
static readonly ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT: int;
|
|
1833
|
+
/**
|
|
1834
|
+
* Reduces the memory usage of the acceleration structure, potentially at the cost of reduced ray traversal performance.
|
|
1835
|
+
*/
|
|
1836
|
+
static readonly ACCELERATION_STRUCTURE_LOW_MEMORY_BIT: int;
|
|
1837
|
+
// enum AccelerationStructureGeometryFlagBits
|
|
1781
1838
|
/** An opaque geometry does not invoke the any hit shaders. */
|
|
1782
|
-
static readonly
|
|
1839
|
+
static readonly ACCELERATION_STRUCTURE_GEOMETRY_OPAQUE_BIT: int;
|
|
1783
1840
|
/** This geometry only calls the any hit shader a single time for each primitive. */
|
|
1784
|
-
static readonly
|
|
1841
|
+
static readonly ACCELERATION_STRUCTURE_GEOMETRY_NO_DUPLICATE_ANY_HIT_INVOCATION_BIT: int;
|
|
1842
|
+
// enum AccelerationStructureInstanceFlagBits
|
|
1843
|
+
/** Disables triangle face culling for this instance during ray traversal. */
|
|
1844
|
+
static readonly ACCELERATION_STRUCTURE_INSTANCE_TRIANGLE_FACING_CULL_DISABLE_BIT: int;
|
|
1845
|
+
/** Flips the triangle facing direction for this instance during ray traversal. */
|
|
1846
|
+
static readonly ACCELERATION_STRUCTURE_INSTANCE_TRIANGLE_FLIP_FACING_BIT: int;
|
|
1847
|
+
/**
|
|
1848
|
+
* Forces all geometries in this instance to be treated as opaque, preventing any hit shaders from being invoked.
|
|
1849
|
+
*/
|
|
1850
|
+
static readonly ACCELERATION_STRUCTURE_INSTANCE_FORCE_OPAQUE_BIT: int;
|
|
1851
|
+
/**
|
|
1852
|
+
* Forces all geometries in this instance to be treated as non-opaque, allowing any hit shaders to be invoked.
|
|
1853
|
+
*/
|
|
1854
|
+
static readonly ACCELERATION_STRUCTURE_INSTANCE_FORCE_NO_OPAQUE_BIT: int;
|
|
1785
1855
|
// enum UniformType
|
|
1786
1856
|
/** Sampler uniform. */
|
|
1787
1857
|
static readonly UNIFORM_TYPE_SAMPLER: int;
|
|
@@ -10,6 +10,13 @@ declare interface RenderingServer extends GodotObject {
|
|
|
10
10
|
set_render_loop_enabled(value: boolean): void;
|
|
11
11
|
is_render_loop_enabled(): boolean;
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Creates a new area light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most `light_*` RenderingServer functions.
|
|
15
|
+
* Once finished with your RID, you will want to free the RID using the RenderingServer's {@link free_rid} method.
|
|
16
|
+
* To place in a scene, attach this area light to an instance using {@link instance_set_base} using the returned RID.
|
|
17
|
+
* **Note:** The equivalent node is {@link AreaLight3D}.
|
|
18
|
+
*/
|
|
19
|
+
area_light_create(): RID;
|
|
13
20
|
/**
|
|
14
21
|
* Bakes the material data of the Mesh passed in the `base` parameter with optional `material_overrides` to a set of {@link Image}s of size `image_size`. Returns an array of {@link Image}s containing material properties as specified in {@link BakeChannels}.
|
|
15
22
|
*/
|
|
@@ -612,7 +619,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
612
619
|
/**
|
|
613
620
|
* Sets the variables to be used with the volumetric fog post-process effect. See {@link Environment} for more details.
|
|
614
621
|
*/
|
|
615
|
-
environment_set_volumetric_fog(env: RID, enable: boolean, density: float, albedo: Color, emission: Color, emission_energy: float, anisotropy: float, length: float,
|
|
622
|
+
environment_set_volumetric_fog(env: RID, enable: boolean, density: float, albedo: Color, emission: Color, emission_energy: float, anisotropy: float, length: float, detail_spread: float, gi_inject: float, temporal_reprojection: boolean, temporal_reprojection_amount: float, ambient_inject: float, sky_affect: float): void;
|
|
616
623
|
/**
|
|
617
624
|
* Enables filtering of the volumetric fog scattering buffer. This results in much smoother volumes with very few under-sampling artifacts.
|
|
618
625
|
*/
|
|
@@ -884,6 +891,14 @@ declare interface RenderingServer extends GodotObject {
|
|
|
884
891
|
instances_cull_ray(from_: Vector3 | Vector3i, to: Vector3 | Vector3i, scenario?: RID): PackedInt64Array;
|
|
885
892
|
/** Returns `true` if our code is currently executing on the rendering thread. */
|
|
886
893
|
is_on_render_thread(): boolean;
|
|
894
|
+
/**
|
|
895
|
+
* Defines whether the energy of an {@link AreaLight3D} is normalized (divided) by its area. If set to `true`, changing the size does not affect the total energy output. Equivalent to {@link AreaLight3D.area_normalize_energy}.
|
|
896
|
+
*/
|
|
897
|
+
light_area_set_normalize_energy(light: RID, enable: boolean): void;
|
|
898
|
+
/**
|
|
899
|
+
* Sets the extents (width and height) in meters for this area light. Equivalent to {@link AreaLight3D.area_size}.
|
|
900
|
+
*/
|
|
901
|
+
light_area_set_size(light: RID, size: Vector2 | Vector2i): void;
|
|
887
902
|
/**
|
|
888
903
|
* If `true`, this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to {@link DirectionalLight3D.directional_shadow_blend_splits}.
|
|
889
904
|
*/
|
|
@@ -1338,8 +1353,11 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1338
1353
|
* Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to {@link instances_cull_aabb}, {@link instances_cull_convex}, or {@link instances_cull_ray}.
|
|
1339
1354
|
*/
|
|
1340
1355
|
particles_request_process(particles: RID): void;
|
|
1341
|
-
/**
|
|
1342
|
-
|
|
1356
|
+
/**
|
|
1357
|
+
* Requests the particles to process for extra process time during a single frame.
|
|
1358
|
+
* `process_time` defines the time that the particles will process while emitting is on. `process_time_residual` defines the time that particles will process with emitting turned off for the simulation. When combined with the particles' speed scale set to `0.0`, this is useful to be able to seek a particle system timeline.
|
|
1359
|
+
*/
|
|
1360
|
+
particles_request_process_time(particles: RID, process_time: float, process_time_residual?: float): void;
|
|
1343
1361
|
/** Reset the particles on the next update. Equivalent to {@link GPUParticles3D.restart}. */
|
|
1344
1362
|
particles_restart(particles: RID): void;
|
|
1345
1363
|
/**
|
|
@@ -1433,6 +1451,10 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1433
1451
|
* Sets the transform alignment for the particle system. Equivalent to {@link GPUParticles3D.transform_align}.
|
|
1434
1452
|
*/
|
|
1435
1453
|
particles_set_transform_align(particles: RID, align: int): void;
|
|
1454
|
+
/** Sets which axis to use for transform alignment. */
|
|
1455
|
+
particles_set_transform_align_axis(particles: RID, rotation_axis: int): void;
|
|
1456
|
+
/** When using Z-Billboarding, which CUSTOM channel to read from. */
|
|
1457
|
+
particles_set_transform_align_channel_filter(particles: RID, channel_filter: int): void;
|
|
1436
1458
|
/**
|
|
1437
1459
|
* If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to {@link GPUParticles3D.local_coords}.
|
|
1438
1460
|
*/
|
|
@@ -1904,6 +1926,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1904
1926
|
/**
|
|
1905
1927
|
* Affects the final texture sharpness by reading from a lower or higher mipmap (also called "texture LOD bias"). Negative values make mipmapped textures sharper but grainier when viewed at a distance, while positive values make mipmapped textures blurrier (even when up close). To get sharper textures at a distance without introducing too much graininess, set this between `-0.75` and `0.0`. Enabling temporal antialiasing ({@link ProjectSettings.rendering/anti_aliasing/quality/use_taa}) can help reduce the graininess visible when using negative mipmap bias.
|
|
1906
1928
|
* **Note:** When the 3D scaling mode is set to FSR 1.0, this value is used to adjust the automatic mipmap bias which is calculated internally based on the scale factor. The formula for this is `-log2(1.0 / scale) + mipmap_bias`.
|
|
1929
|
+
* **Note:** This method is only supported in the Forward+ and Mobile renderers, not Compatibility. In Compatibility, this method is always treated as if `mipmap_bias` was set to `0.0`.
|
|
1907
1930
|
*/
|
|
1908
1931
|
viewport_set_texture_mipmap_bias(viewport: RID, mipmap_bias: float): void;
|
|
1909
1932
|
/** If `true`, the viewport renders its background as transparent. */
|
|
@@ -2282,6 +2305,8 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2282
2305
|
readonly LIGHT_OMNI: int;
|
|
2283
2306
|
/** Spot light (see {@link SpotLight3D}). */
|
|
2284
2307
|
readonly LIGHT_SPOT: int;
|
|
2308
|
+
/** Area light (see {@link AreaLight3D}). */
|
|
2309
|
+
readonly LIGHT_AREA: int;
|
|
2285
2310
|
// enum LightParam
|
|
2286
2311
|
/** The light's energy multiplier. */
|
|
2287
2312
|
readonly LIGHT_PARAM_ENERGY: int;
|
|
@@ -2471,6 +2496,24 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2471
2496
|
readonly PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY: int;
|
|
2472
2497
|
/** Align each particle's Z axis to face the camera and Y axis to the velocity vector. */
|
|
2473
2498
|
readonly PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: int;
|
|
2499
|
+
/** Billboard each particles around a local axis. */
|
|
2500
|
+
readonly PARTICLES_TRANSFORM_ALIGN_LOCAL_BILLBOARD: int;
|
|
2501
|
+
// enum ParticlesTransformAlignCustomSrc
|
|
2502
|
+
/** Do not read from CUSTOM when performing billboarding. */
|
|
2503
|
+
readonly PARTICLES_ALIGN_CHANNEL_FILTER_DISABLED: int;
|
|
2504
|
+
/** Read from `CUSTOM.x` when performing billboarding and use it as an angle, in radians. */
|
|
2505
|
+
readonly PARTICLES_ALIGN_CHANNEL_FILTER_X: int;
|
|
2506
|
+
/** Read from `CUSTOM.y` when performing billboarding and use it as an angle, in radians. */
|
|
2507
|
+
readonly PARTICLES_ALIGN_CHANNEL_FILTER_Y: int;
|
|
2508
|
+
/** Read from `CUSTOM.z` when performing billboarding and use it as an angle, in radians. */
|
|
2509
|
+
readonly PARTICLES_ALIGN_CHANNEL_FILTER_Z: int;
|
|
2510
|
+
/** Read from `CUSTOM.w` when performing billboarding and use it as an angle, in radians. */
|
|
2511
|
+
readonly PARTICLES_ALIGN_CHANNEL_FILTER_W: int;
|
|
2512
|
+
// enum ParticlesTransformAlignAxis
|
|
2513
|
+
/** Use the X axis for local billboarding. */
|
|
2514
|
+
readonly PARTICLES_ALIGN_AXIS_X: int;
|
|
2515
|
+
/** Use the Y axis for local billboarding. */
|
|
2516
|
+
readonly PARTICLES_ALIGN_AXIS_Y: int;
|
|
2474
2517
|
// enum ParticlesDrawOrder
|
|
2475
2518
|
/** Draw particles in the order that they appear in the particles array. */
|
|
2476
2519
|
readonly PARTICLES_DRAW_ORDER_INDEX: int;
|
|
@@ -2560,6 +2603,11 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2560
2603
|
* **Note:** Only supported when the Metal rendering driver is in use, which limits this scaling mode to macOS and iOS.
|
|
2561
2604
|
*/
|
|
2562
2605
|
readonly VIEWPORT_SCALING_3D_MODE_METALFX_TEMPORAL: int;
|
|
2606
|
+
/**
|
|
2607
|
+
* Use nearest-neighbor filtering for the viewport's 3D buffer. This looks crisper than {@link VIEWPORT_SCALING_3D_MODE_BILINEAR} and has no additional rendering cost. The amount of scaling can be set using {@link Viewport.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.
|
|
2608
|
+
* **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.
|
|
2609
|
+
*/
|
|
2610
|
+
readonly VIEWPORT_SCALING_3D_MODE_NEAREST: int;
|
|
2563
2611
|
/** Represents the size of the {@link ViewportScaling3DMode} enum. */
|
|
2564
2612
|
readonly VIEWPORT_SCALING_3D_MODE_MAX: int;
|
|
2565
2613
|
// enum ViewportUpdateMode
|
|
@@ -49,6 +49,8 @@ declare class Resource extends RefCounted {
|
|
|
49
49
|
* **Example:** Set a random `damage` value to every local resource from an instantiated scene:
|
|
50
50
|
*/
|
|
51
51
|
_setup_local_to_scene(): void;
|
|
52
|
+
/** Copies the data from `resource` into this resource. Both resources must share the same class. */
|
|
53
|
+
copy_from_resource(resource: Resource): int;
|
|
52
54
|
/**
|
|
53
55
|
* Duplicates this resource, returning a new resource with its `export`ed or {@link PROPERTY_USAGE_STORAGE} properties copied from the original.
|
|
54
56
|
* If `deep` is `false`, a **shallow** copy is returned: nested {@link Array}, {@link Dictionary}, and {@link Resource} properties are not duplicated and are shared with the original resource.
|
|
@@ -23,7 +23,7 @@ declare class ResourceImporterOBJ extends ResourceImporter {
|
|
|
23
23
|
*/
|
|
24
24
|
generate_shadow_mesh: boolean;
|
|
25
25
|
/**
|
|
26
|
-
* If `true`, generate vertex tangents using Mikktspace (http://www.mikktspace.com/) if the source mesh doesn't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead
|
|
26
|
+
* If `true`, generate vertex tangents using Mikktspace (http://www.mikktspace.com/) if the source mesh doesn't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead of relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents.
|
|
27
27
|
* If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents.
|
|
28
28
|
*/
|
|
29
29
|
generate_tangents: boolean;
|
|
@@ -25,6 +25,10 @@ declare class ResourceImporterScene extends ResourceImporter {
|
|
|
25
25
|
* If `true`, trim the beginning and end of animations if there are no keyframe changes. This can reduce output file size and memory usage with certain 3D scenes, depending on the contents of their animation tracks.
|
|
26
26
|
*/
|
|
27
27
|
'animation/trimming': boolean;
|
|
28
|
+
/**
|
|
29
|
+
* If the 3D model file contains only one mesh, this option has no effect. If `true` and the 3D model file contains multiple meshes with the same surface names and formats, the surfaces will be merged together when the meshes are merged. This is useful for reducing the number of surfaces in the resulting mesh, and avoids duplicating materials. If `false` and the 3D model file contains multiple meshes, the surfaces will always be kept separate.
|
|
30
|
+
*/
|
|
31
|
+
'array_mesh/deduplicate_surfaces': boolean;
|
|
28
32
|
/**
|
|
29
33
|
* Path to an import script, which can run code after the import process has completed for custom processing. See Using import scripts for automation ($DOCS_URL/tutorials/assets_pipeline/importing_3d_scenes/import_configuration.html#using-import-scripts-for-automation) for more information.
|
|
30
34
|
*/
|
|
@@ -45,12 +49,16 @@ declare class ResourceImporterScene extends ResourceImporter {
|
|
|
45
49
|
'materials/extract_format': int;
|
|
46
50
|
/** Path extracted materials are saved to. If empty, source scene path is used. */
|
|
47
51
|
'materials/extract_path': string;
|
|
52
|
+
/**
|
|
53
|
+
* If `true`, the mesh names will be set to the names of the nodes in the 3D model file. If `false`, the mesh names will be set to the names of the meshes in the 3D model file. Enabling this is a common work-around when the author of the 3D model file did not properly set the mesh names in Blender or other 3D modeling apps. For example, a file may have a node named "Turret" with a mesh named "Cube.002", so enabling this option will set the mesh name to "Turret" instead of "Cube_002".
|
|
54
|
+
*/
|
|
55
|
+
'mesh_library/use_node_names_as_mesh_names': boolean;
|
|
48
56
|
/**
|
|
49
57
|
* If `true`, enables the generation of shadow meshes on import. This optimizes shadow rendering without reducing quality by welding vertices together when possible. This in turn reduces the memory bandwidth required to render shadows. Shadow mesh generation currently doesn't support using a lower detail level than the source mesh (but shadow rendering will make use of LODs when relevant).
|
|
50
58
|
*/
|
|
51
59
|
'meshes/create_shadow_meshes': boolean;
|
|
52
60
|
/**
|
|
53
|
-
* If `true`, generate vertex tangents using Mikktspace (http://www.mikktspace.com/) if the input meshes don't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead
|
|
61
|
+
* If `true`, generate vertex tangents using Mikktspace (http://www.mikktspace.com/) if the input meshes don't have tangent data. When possible, it's recommended to let the 3D modeling software generate tangents on export instead of relying on this option. Tangents are required for correct display of normal and height maps, along with any material/shader features that require tangents.
|
|
54
62
|
* If you don't need material features that require tangents, disabling this can reduce output file size and speed up importing if the source 3D file doesn't contain tangents.
|
|
55
63
|
*/
|
|
56
64
|
'meshes/ensure_tangents': boolean;
|
|
@@ -105,9 +113,9 @@ declare class ResourceImporterScene extends ResourceImporter {
|
|
|
105
113
|
'nodes/use_node_type_suffixes': boolean;
|
|
106
114
|
/**
|
|
107
115
|
* If checked, use named {@link Skin}s for animation. The {@link MeshInstance3D} node contains 3 properties of relevance here: a skeleton {@link NodePath} pointing to the {@link Skeleton3D} node (usually `..`), a mesh, and a skin:
|
|
108
|
-
* - The {@link Skeleton3D} node contains a list of bones with names, their pose and rest, a name and a parent bone.
|
|
116
|
+
* - The {@link Skeleton3D} node contains a list of bones with names, their pose and rest, a name, and a parent bone.
|
|
109
117
|
* - The mesh is all of the raw vertex data needed to display a mesh. In terms of the mesh, it knows how vertices are weight-painted and uses some internal numbering often imported from 3D modeling software.
|
|
110
|
-
* - The skin contains the information necessary to bind this mesh onto this Skeleton3D. For
|
|
118
|
+
* - The skin contains the information necessary to bind this mesh onto this Skeleton3D. For each of the internal bone IDs chosen by the 3D modeling software, it contains two things. Firstly, a matrix known as the Bind Pose Matrix, Inverse Bind Matrix, or IBM for short. Secondly, the {@link Skin} contains each bone's name (if {@link skins/use_named_skins} is `true`), or the bone's index within the {@link Skeleton3D} list (if {@link skins/use_named_skins} is `false`).
|
|
111
119
|
* Together, this information is enough to tell Godot how to use the bone poses in the {@link Skeleton3D} node to render the mesh from each {@link MeshInstance3D}. Note that each {@link MeshInstance3D} may share binds, as is common in models exported from Blender, or each {@link MeshInstance3D} may use a separate {@link Skin} object, as is common in models exported from other tools such as Maya.
|
|
112
120
|
*/
|
|
113
121
|
'skins/use_named_skins': boolean;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
declare class RichTextLabel extends Control {
|
|
6
6
|
/**
|
|
7
7
|
* If set to something other than {@link TextServer.AUTOWRAP_OFF}, the text gets wrapped inside the node's bounding rectangle.
|
|
8
|
+
* **Note:** RichTextLabels with autowrapping and {@link fit_content} enabled must have a custom maximum width configured to work correctly, either through the RichTextLabel's own {@link Control.custom_maximum_size} or as a result of a propagated maximum size from a parent Control with {@link Control.propagate_maximum_size} enabled.
|
|
8
9
|
*/
|
|
9
10
|
autowrap_mode: int;
|
|
10
11
|
/**
|
|
@@ -32,6 +33,7 @@ declare class RichTextLabel extends Control {
|
|
|
32
33
|
drag_and_drop_selection_enabled: boolean;
|
|
33
34
|
/**
|
|
34
35
|
* If `true`, the label's minimum size will be automatically updated to fit its content, matching the behavior of {@link Label}.
|
|
36
|
+
* **Note:** RichTextLabels with autowrapping and {@link fit_content} enabled must have a custom maximum width configured to work correctly, either through the RichTextLabel's own {@link Control.custom_maximum_size} or as a result of a propagated maximum size from a parent Control with {@link Control.propagate_maximum_size} enabled.
|
|
35
37
|
*/
|
|
36
38
|
fit_content: boolean;
|
|
37
39
|
/**
|
|
@@ -175,11 +177,10 @@ declare class RichTextLabel extends Control {
|
|
|
175
177
|
* If `width` and `height` are not set, but `region` is, the region's rect will be used.
|
|
176
178
|
* `key` is an optional identifier, that can be used to modify the image via {@link update_image}.
|
|
177
179
|
* If `pad` is set, and the image is smaller than the size specified by `width` and `height`, the image padding is added to match the size instead of upscaling.
|
|
178
|
-
*
|
|
179
|
-
* If `height_in_percent` is set, `height` values are percentages of the control width instead of pixels.
|
|
180
|
+
* Parameters `width_unit` and `height_unit` determine the units used to calculate the image width and height, respectively.
|
|
180
181
|
* `alt_text` is used as the image description for assistive apps.
|
|
181
182
|
*/
|
|
182
|
-
add_image(image: Texture2D, width?:
|
|
183
|
+
add_image(image: Texture2D, width?: float, height?: float, color?: Color, inline_align?: int, region?: Rect2 | Rect2i, key?: unknown, pad?: boolean, tooltip?: string | NodePath, width_unit?: int, height_unit?: int, alt_text?: string | NodePath): void;
|
|
183
184
|
/** Adds raw non-BBCode-parsed text to the tag stack. */
|
|
184
185
|
add_text(text: string | NodePath): void;
|
|
185
186
|
/**
|
|
@@ -462,7 +463,7 @@ declare class RichTextLabel extends Control {
|
|
|
462
463
|
/**
|
|
463
464
|
* Updates the existing images with the key `key`. Only properties specified by `mask` bits are updated. See {@link add_image}.
|
|
464
465
|
*/
|
|
465
|
-
update_image(key: unknown, mask: int, image: Texture2D, width?:
|
|
466
|
+
update_image(key: unknown, mask: int, image: Texture2D, width?: float, height?: float, color?: Color, inline_align?: int, region?: Rect2 | Rect2i, pad?: boolean, tooltip?: string | NodePath, width_unit?: int, height_unit?: int): void;
|
|
466
467
|
|
|
467
468
|
/**
|
|
468
469
|
* Triggered when the document is fully loaded.
|
|
@@ -519,6 +520,13 @@ declare class RichTextLabel extends Control {
|
|
|
519
520
|
static readonly UPDATE_PAD: int;
|
|
520
521
|
/** If this bit is set, {@link update_image} changes image tooltip. */
|
|
521
522
|
static readonly UPDATE_TOOLTIP: int;
|
|
522
|
-
/** If this bit is set, {@link update_image} changes
|
|
523
|
-
static readonly
|
|
523
|
+
/** If this bit is set, {@link update_image} changes the units used to calculate image size. */
|
|
524
|
+
static readonly UPDATE_WIDTH_UNIT: int;
|
|
525
|
+
// enum ImageUnit
|
|
526
|
+
/** Images drawn with this unit will be in pixels. */
|
|
527
|
+
static readonly IMAGE_UNIT_PIXEL: int;
|
|
528
|
+
/** Images drawn with this unit will be in percentages of the control width. */
|
|
529
|
+
static readonly IMAGE_UNIT_PERCENT: int;
|
|
530
|
+
/** Images drawn with this unit will be in percentages of the surrounding font size. */
|
|
531
|
+
static readonly IMAGE_UNIT_EM: int;
|
|
524
532
|
}
|
|
@@ -93,8 +93,18 @@ declare class SceneTree extends MainLoop {
|
|
|
93
93
|
* Calls the given `method` on each node inside this tree added to the given `group`. Use `flags` to customize this method's behavior (see {@link GroupCallFlags}). Additional arguments for `method` can be passed at the end of this method. Nodes that cannot call `method` (either because the method doesn't exist or the arguments do not match) are ignored.
|
|
94
94
|
* **Note:** In C#, `method` must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the `MethodName` class to avoid allocating a new {@link StringName} on each call.
|
|
95
95
|
*/
|
|
96
|
-
call_group_flags(
|
|
97
|
-
|
|
96
|
+
call_group_flags(
|
|
97
|
+
flags: int,
|
|
98
|
+
group: GodotGroupNames,
|
|
99
|
+
method: string,
|
|
100
|
+
...args: any[]
|
|
101
|
+
): void;
|
|
102
|
+
call_group_flags(
|
|
103
|
+
flags: int,
|
|
104
|
+
group: string,
|
|
105
|
+
method: string,
|
|
106
|
+
...args: any[]
|
|
107
|
+
): void;
|
|
98
108
|
/**
|
|
99
109
|
* Changes the running scene to the one at the given `path`, after loading it into a {@link PackedScene} and creating a new instance.
|
|
100
110
|
* Returns {@link OK} on success, {@link ERR_CANT_OPEN} if the `path` cannot be loaded into a {@link PackedScene}, or {@link ERR_CANT_CREATE} if that scene cannot be instantiated.
|
|
@@ -174,7 +184,11 @@ declare class SceneTree extends MainLoop {
|
|
|
174
184
|
/**
|
|
175
185
|
* Calls {@link Object.notification} with the given `notification` to all nodes inside this tree added to the `group`. Use `call_flags` to customize this method's behavior (see {@link GroupCallFlags}).
|
|
176
186
|
*/
|
|
177
|
-
notify_group_flags(
|
|
187
|
+
notify_group_flags(
|
|
188
|
+
call_flags: int,
|
|
189
|
+
group: GodotGroupNames,
|
|
190
|
+
notification: int,
|
|
191
|
+
): void;
|
|
178
192
|
notify_group_flags(call_flags: int, group: string, notification: int): void;
|
|
179
193
|
/**
|
|
180
194
|
* Queues the given `obj` to be deleted, calling its {@link Object.free} at the end of the current frame. This method is similar to {@link Node.queue_free}.
|
|
@@ -202,8 +216,18 @@ declare class SceneTree extends MainLoop {
|
|
|
202
216
|
* Sets the given `property` to `value` on all nodes inside this tree added to the given `group`. Nodes that do not have the `property` are ignored. Use `call_flags` to customize this method's behavior (see {@link GroupCallFlags}).
|
|
203
217
|
* **Note:** In C#, `property` must be in snake_case when referring to built-in Godot properties. Prefer using the names exposed in the `PropertyName` class to avoid allocating a new {@link StringName} on each call.
|
|
204
218
|
*/
|
|
205
|
-
set_group_flags(
|
|
206
|
-
|
|
219
|
+
set_group_flags(
|
|
220
|
+
call_flags: int,
|
|
221
|
+
group: GodotGroupNames,
|
|
222
|
+
property: string,
|
|
223
|
+
value: unknown,
|
|
224
|
+
): void;
|
|
225
|
+
set_group_flags(
|
|
226
|
+
call_flags: int,
|
|
227
|
+
group: string,
|
|
228
|
+
property: string,
|
|
229
|
+
value: unknown,
|
|
230
|
+
): void;
|
|
207
231
|
/**
|
|
208
232
|
* Sets a custom {@link MultiplayerAPI} with the given `root_path` (controlling also the relative subpaths), or override the default one if `root_path` is empty.
|
|
209
233
|
* **Note:** No {@link MultiplayerAPI} must be configured for the subpath containing `root_path`, nested custom multiplayers are not allowed. I.e. if one is configured for `"/root/Foo"` setting one for `"/root/Foo/Bar"` will cause an error.
|
|
@@ -44,6 +44,8 @@ declare class Script extends Resource {
|
|
|
44
44
|
* **Note:** The dictionaries returned by this method are formatted identically to those returned by {@link Object.get_signal_list}.
|
|
45
45
|
*/
|
|
46
46
|
get_script_signal_list(): Array<Dictionary>;
|
|
47
|
+
/** Returns `true` if the script, or a base class, defines a method with the given name. */
|
|
48
|
+
has_script_method(method_name: string): boolean;
|
|
47
49
|
/** Returns `true` if the script, or a base class, defines a signal with the given name. */
|
|
48
50
|
has_script_signal(signal_name: string): boolean;
|
|
49
51
|
/**
|
|
@@ -8,6 +8,11 @@ declare class ScriptEditor extends PanelContainer {
|
|
|
8
8
|
* **Note:** This should be called whenever the script is changed to keep the open documentation state up to date.
|
|
9
9
|
*/
|
|
10
10
|
clear_docs_from_script(script: Script): void;
|
|
11
|
+
/**
|
|
12
|
+
* Closes the file at the given `path`, discarding any unsaved changes.
|
|
13
|
+
* Returns {@link OK} on success or {@link ERR_FILE_NOT_FOUND} if the file is not found.
|
|
14
|
+
*/
|
|
15
|
+
close_file(path: string | NodePath): int;
|
|
11
16
|
/** Returns array of breakpoints. */
|
|
12
17
|
get_breakpoints(): PackedStringArray;
|
|
13
18
|
/** Returns the {@link ScriptEditorBase} object that the user is currently editing. */
|
|
@@ -18,6 +23,8 @@ declare class ScriptEditor extends PanelContainer {
|
|
|
18
23
|
get_open_script_editors(): Array<ScriptEditorBase>;
|
|
19
24
|
/** Returns an array with all {@link Script} objects which are currently open in editor. */
|
|
20
25
|
get_open_scripts(): Array<Script>;
|
|
26
|
+
/** Returns an array of file paths of scripts with unsaved changes open in the editor. */
|
|
27
|
+
get_unsaved_files(): PackedStringArray;
|
|
21
28
|
/**
|
|
22
29
|
* Opens help for the given topic. The `topic` is an encoded string that controls which class, method, constant, signal, annotation, property, or theme item should be focused.
|
|
23
30
|
* The supported `topic` formats include `class_name:class`, `class_method:class:method`, `class_constant:class:constant`, `class_signal:class:signal`, `class_annotation:class:@annotation`, `class_property:class:property`, and `class_theme_item:class:item`, where `class` is the class name, `method` is the method name, `constant` is the constant name, `signal` is the signal name, `annotation` is the annotation name, `property` is the property name, and `item` is the theme item.
|
|
@@ -55,7 +55,13 @@ declare class ScriptLanguageExtension extends ScriptLanguage {
|
|
|
55
55
|
_profiling_start(): void;
|
|
56
56
|
_profiling_stop(): void;
|
|
57
57
|
_reload_all_scripts(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Reloads all `scripts` from disk and the specifics of how that happens is {@link ScriptLanguageExtension} specific.
|
|
60
|
+
*/
|
|
58
61
|
_reload_scripts(scripts: Array<unknown> | PackedByteArray | PackedColorArray | PackedFloat32Array | PackedFloat64Array | PackedInt32Array | PackedInt64Array | PackedStringArray | PackedVector2Array | PackedVector3Array | PackedVector4Array, soft_reload: boolean): void;
|
|
62
|
+
/**
|
|
63
|
+
* Reloads the given `script` from disk and the specifics of how that happens is {@link ScriptLanguageExtension} specific.
|
|
64
|
+
*/
|
|
59
65
|
_reload_tool_script(script: Script, soft_reload: boolean): void;
|
|
60
66
|
_remove_named_global_constant(name: string): void;
|
|
61
67
|
_supports_builtin_mode(): boolean;
|
|
@@ -106,5 +112,6 @@ declare class ScriptLanguageExtension extends ScriptLanguage {
|
|
|
106
112
|
static readonly CODE_COMPLETION_KIND_NODE_PATH: int;
|
|
107
113
|
static readonly CODE_COMPLETION_KIND_FILE_PATH: int;
|
|
108
114
|
static readonly CODE_COMPLETION_KIND_PLAIN_TEXT: int;
|
|
115
|
+
static readonly CODE_COMPLETION_KIND_KEYWORD: int;
|
|
109
116
|
static readonly CODE_COMPLETION_KIND_MAX: int;
|
|
110
117
|
}
|
|
@@ -14,8 +14,11 @@ declare class ScrollContainer extends Container {
|
|
|
14
14
|
follow_focus: boolean;
|
|
15
15
|
/** Controls whether horizontal scrollbar can be used and when it should be visible. */
|
|
16
16
|
horizontal_scroll_mode: int;
|
|
17
|
-
/**
|
|
18
|
-
|
|
17
|
+
/**
|
|
18
|
+
* <member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
|
|
19
|
+
* Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive.
|
|
20
|
+
*/
|
|
21
|
+
propagate_maximum_size: boolean;
|
|
19
22
|
/**
|
|
20
23
|
* The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
|
|
21
24
|
* **Note:** Hints won't be shown if the content can be scrolled both vertically and horizontally.
|
|
@@ -26,6 +29,11 @@ declare class ScrollContainer extends Container {
|
|
|
26
29
|
* **Note:** If you are setting this value in the {@link Node._ready} function or earlier, it needs to be wrapped with {@link Object.set_deferred}, since scroll bar's {@link Range.max_value} is not initialized yet.
|
|
27
30
|
*/
|
|
28
31
|
scroll_horizontal: int;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the mouse wheel scrolls the view horizontally, and holding `Shift` scrolls vertically.
|
|
34
|
+
* If `false` (default), the mouse wheel scrolls the view vertically, and holding `Shift` scrolls horizontally.
|
|
35
|
+
*/
|
|
36
|
+
scroll_horizontal_by_default: boolean;
|
|
29
37
|
/**
|
|
30
38
|
* Overrides the {@link ScrollBar.custom_step} used when clicking the internal scroll bar's horizontal increment and decrement buttons or when using arrow keys when the {@link ScrollBar} is focused.
|
|
31
39
|
*/
|
|
@@ -49,12 +57,12 @@ declare class ScrollContainer extends Container {
|
|
|
49
57
|
is_following_focus(): boolean;
|
|
50
58
|
set_horizontal_scroll_mode(value: int): void;
|
|
51
59
|
get_horizontal_scroll_mode(): int;
|
|
52
|
-
set_deadzone(value: int): void;
|
|
53
|
-
get_deadzone(): int;
|
|
54
60
|
set_scroll_hint_mode(value: int): void;
|
|
55
61
|
get_scroll_hint_mode(): int;
|
|
56
62
|
set_h_scroll(value: int): void;
|
|
57
63
|
get_h_scroll(): int;
|
|
64
|
+
set_scroll_horizontal_by_default(value: boolean): void;
|
|
65
|
+
is_scroll_horizontal_by_default(): boolean;
|
|
58
66
|
set_horizontal_custom_step(value: float): void;
|
|
59
67
|
get_horizontal_custom_step(): float;
|
|
60
68
|
set_v_scroll(value: int): void;
|
|
@@ -88,7 +96,7 @@ declare class ScrollContainer extends Container {
|
|
|
88
96
|
*/
|
|
89
97
|
scroll_ended: Signal<[]>;
|
|
90
98
|
/**
|
|
91
|
-
* Emitted when scrolling starts when dragging the scrollable area
|
|
99
|
+
* Emitted when scrolling starts when dragging the scrollable area *with a touch event*. This signal is *not* emitted when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events.
|
|
92
100
|
* **Note:** This signal is only emitted on Android or iOS, or on desktop/web platforms when {@link ProjectSettings.input_devices/pointing/emulate_touch_from_mouse} is enabled.
|
|
93
101
|
*/
|
|
94
102
|
scroll_started: Signal<[]>;
|
|
@@ -108,6 +116,10 @@ declare class ScrollContainer extends Container {
|
|
|
108
116
|
* Combines {@link SCROLL_MODE_AUTO} and {@link SCROLL_MODE_SHOW_ALWAYS}. The scrollbar is only visible if necessary, but the content size is adjusted as if it was always visible. It's useful for ensuring that content size stays the same regardless if the scrollbar is visible.
|
|
109
117
|
*/
|
|
110
118
|
static readonly SCROLL_MODE_RESERVE: int;
|
|
119
|
+
/**
|
|
120
|
+
* Behaves like {@link SCROLL_MODE_AUTO}, but makes the {@link ScrollContainer} report a minimum size based on its content (limited by {@link Control.custom_maximum_size} when set on the corresponding axis). This allows it to grow first and only start scrolling once constrained.
|
|
121
|
+
*/
|
|
122
|
+
static readonly SCROLL_MODE_MAXIMIZE_FIRST: int;
|
|
111
123
|
// enum ScrollHintMode
|
|
112
124
|
/** Scroll hints will never be shown. */
|
|
113
125
|
static readonly SCROLL_HINT_MODE_DISABLED: int;
|
|
@@ -66,6 +66,10 @@ declare class SkeletonModification2DJiggle extends SkeletonModification2D {
|
|
|
66
66
|
get_jiggle_joint_use_gravity(joint_idx: int): boolean;
|
|
67
67
|
/** Returns whether the jiggle modifier is taking physics colliders into account when solving. */
|
|
68
68
|
get_use_colliders(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Resets the internal jiggle simulation state to the current bone positions, clearing velocity, acceleration, and accumulated forces.
|
|
71
|
+
*/
|
|
72
|
+
reset(): void;
|
|
69
73
|
/**
|
|
70
74
|
* Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account.
|
|
71
75
|
*/
|
|
@@ -221,7 +221,8 @@ declare class SpringBoneSimulator3D extends SkeletonModifier3D {
|
|
|
221
221
|
set_joint_radius(index: int, joint: int, radius: float): void;
|
|
222
222
|
/**
|
|
223
223
|
* Sets the rotation axis at `joint` in the bone chain's joint list when {@link is_config_individual} is `true`.
|
|
224
|
-
* The axes are based on the
|
|
224
|
+
* The axes are based on the reference pose's space, if `axis` is {@link SkeletonModifier3D.ROTATION_AXIS_CUSTOM}, you can specify any axis.
|
|
225
|
+
* In here, the reference pose is the bone pose immediately before the simulation.
|
|
225
226
|
* **Note:** The rotation axis and the forward vector shouldn't be colinear to avoid unintended rotation since {@link SpringBoneSimulator3D} does not factor in twisting forces.
|
|
226
227
|
*/
|
|
227
228
|
set_joint_rotation_axis(index: int, joint: int, axis: int): void;
|
|
@@ -248,7 +249,8 @@ declare class SpringBoneSimulator3D extends SkeletonModifier3D {
|
|
|
248
249
|
set_root_bone_name(index: int, bone_name: string | NodePath): void;
|
|
249
250
|
/**
|
|
250
251
|
* Sets the rotation axis of the bone chain. If set to a specific axis, it acts like a hinge joint. The value is cached in each joint setting in the joint list.
|
|
251
|
-
* The axes are based on the
|
|
252
|
+
* The axes are based on the reference pose's space, if `axis` is {@link SkeletonModifier3D.ROTATION_AXIS_CUSTOM}, you can specify any axis.
|
|
253
|
+
* In here, the reference pose is the bone pose immediately before the simulation.
|
|
252
254
|
* **Note:** The rotation axis vector and the forward vector shouldn't be colinear to avoid unintended rotation since {@link SpringBoneSimulator3D} does not factor in twisting forces.
|
|
253
255
|
*/
|
|
254
256
|
set_rotation_axis(index: int, axis: int): void;
|