typescript-to-gdscript 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +229 -103
- package/dist/converter/common/index.d.ts +17 -1
- package/dist/converter/common/index.d.ts.map +1 -1
- package/dist/converter/common/index.js +69 -19
- package/dist/converter/common/index.js.map +1 -1
- package/dist/converter/ts-to-gd/class-members.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/class-members.js +5 -5
- package/dist/converter/ts-to-gd/class-members.js.map +1 -1
- package/dist/converter/ts-to-gd/expressions.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/expressions.js +1 -1
- package/dist/converter/ts-to-gd/expressions.js.map +1 -1
- package/dist/converter/ts-to-gd/file-scope.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/file-scope.js +1 -1
- package/dist/converter/ts-to-gd/file-scope.js.map +1 -1
- package/dist/converter/ts-to-gd/gd-getset.js +2 -2
- package/dist/converter/ts-to-gd/gd-getset.js.map +1 -1
- package/dist/converter/ts-to-gd/index.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/index.js +1 -0
- package/dist/converter/ts-to-gd/index.js.map +1 -1
- package/dist/converter/ts-to-gd/parameters.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/parameters.js +2 -2
- package/dist/converter/ts-to-gd/parameters.js.map +1 -1
- package/dist/converter/ts-to-gd/statements.d.ts.map +1 -1
- package/dist/converter/ts-to-gd/statements.js +1 -1
- package/dist/converter/ts-to-gd/statements.js.map +1 -1
- package/dist/typings/override-system.d.ts.map +1 -1
- package/dist/typings/override-system.js +6 -0
- package/dist/typings/override-system.js.map +1 -1
- package/package.json +6 -1
- package/typings/classes/AnimationNodeBlendSpace1D.d.ts +2 -17
- package/typings/classes/AnimationNodeBlendSpace2D.d.ts +2 -17
- package/typings/classes/Area3D.d.ts +7 -14
- package/typings/classes/ArrayMesh.d.ts +0 -15
- package/typings/classes/AudioEffectAmplify.d.ts +2 -2
- package/typings/classes/AudioEffectBandLimitFilter.d.ts +1 -1
- package/typings/classes/AudioEffectBandPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectCapture.d.ts +9 -10
- package/typings/classes/AudioEffectChorus.d.ts +28 -57
- package/typings/classes/AudioEffectCompressor.d.ts +9 -11
- package/typings/classes/AudioEffectDelay.d.ts +15 -21
- package/typings/classes/AudioEffectDistortion.d.ts +10 -19
- package/typings/classes/AudioEffectEQ.d.ts +2 -2
- package/typings/classes/AudioEffectEQ10.d.ts +2 -2
- package/typings/classes/AudioEffectEQ21.d.ts +2 -2
- package/typings/classes/AudioEffectEQ6.d.ts +2 -2
- package/typings/classes/AudioEffectFilter.d.ts +9 -25
- package/typings/classes/AudioEffectHardLimiter.d.ts +5 -8
- package/typings/classes/AudioEffectHighPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectHighShelfFilter.d.ts +1 -1
- package/typings/classes/AudioEffectLimiter.d.ts +4 -9
- package/typings/classes/AudioEffectLowPassFilter.d.ts +1 -1
- package/typings/classes/AudioEffectLowShelfFilter.d.ts +1 -1
- package/typings/classes/AudioEffectNotchFilter.d.ts +1 -1
- package/typings/classes/AudioEffectPanner.d.ts +2 -7
- package/typings/classes/AudioEffectPhaser.d.ts +7 -9
- package/typings/classes/AudioEffectPitchShift.d.ts +3 -3
- package/typings/classes/AudioEffectReverb.d.ts +8 -17
- package/typings/classes/AudioEffectSpectrumAnalyzer.d.ts +5 -4
- package/typings/classes/AudioEffectStereoEnhance.d.ts +4 -7
- package/typings/classes/AudioServer.d.ts +2 -2
- package/typings/classes/AudioStreamPlaybackResampled.d.ts +0 -8
- package/typings/classes/BaseButton.d.ts +1 -1
- package/typings/classes/Basis.d.ts +0 -4
- package/typings/classes/Camera3D.d.ts +1 -1
- package/typings/classes/CameraAttributes.d.ts +0 -1
- package/typings/classes/CameraFeed.d.ts +0 -4
- package/typings/classes/CanvasItem.d.ts +1 -1
- package/typings/classes/CodeEdit.d.ts +0 -4
- package/typings/classes/CollisionObject2D.d.ts +0 -6
- package/typings/classes/CollisionPolygon2D.d.ts +0 -5
- package/typings/classes/CollisionShape2D.d.ts +0 -5
- package/typings/classes/Container.d.ts +0 -6
- package/typings/classes/Control.d.ts +0 -59
- package/typings/classes/DPITexture.d.ts +0 -14
- package/typings/classes/Decal.d.ts +0 -1
- package/typings/classes/Dictionary.d.ts +0 -1
- package/typings/classes/DisplayServer.d.ts +1 -128
- package/typings/classes/EditorDock.d.ts +2 -8
- package/typings/classes/EditorExportPlugin.d.ts +0 -5
- package/typings/classes/EditorFileSystem.d.ts +0 -2
- package/typings/classes/EditorInterface.d.ts +2 -4
- package/typings/classes/EditorSettings.d.ts +133 -197
- package/typings/classes/EditorSpinSlider.d.ts +0 -6
- package/typings/classes/Environment.d.ts +2 -7
- package/typings/classes/FileAccess.d.ts +1 -1
- package/typings/classes/FileDialog.d.ts +1 -1
- package/typings/classes/FoldableContainer.d.ts +1 -1
- package/typings/classes/Font.d.ts +2 -2
- package/typings/classes/GPUParticles3D.d.ts +0 -4
- package/typings/classes/GeometryInstance3D.d.ts +1 -1
- package/typings/classes/GradientTexture2D.d.ts +0 -2
- package/typings/classes/Image.d.ts +0 -1
- package/typings/classes/ImageTexture.d.ts +2 -0
- package/typings/classes/ImporterMesh.d.ts +0 -6
- package/typings/classes/Input.d.ts +13 -148
- package/typings/classes/InputEvent.d.ts +0 -8
- package/typings/classes/InputEventGesture.d.ts +3 -2
- package/typings/classes/InputEventMouse.d.ts +3 -2
- package/typings/classes/InputEventWithModifiers.d.ts +3 -2
- package/typings/classes/InputMap.d.ts +0 -3
- package/typings/classes/ItemList.d.ts +2 -9
- package/typings/classes/Joint3D.d.ts +0 -1
- package/typings/classes/LookAtModifier3D.d.ts +1 -2
- package/typings/classes/MainLoop.d.ts +0 -4
- package/typings/classes/NativeMenu.d.ts +3 -10
- package/typings/classes/Node.d.ts +5 -9
- package/typings/classes/OS.d.ts +2 -2
- package/typings/classes/Object.d.ts +2 -5
- package/typings/classes/OptionButton.d.ts +0 -6
- package/typings/classes/PCKPacker.d.ts +0 -4
- package/typings/classes/ParticleProcessMaterial.d.ts +0 -5
- package/typings/classes/PhysicsDirectBodyState2D.d.ts +1 -2
- package/typings/classes/PhysicsDirectBodyState3D.d.ts +1 -2
- package/typings/classes/PhysicsServer2D.d.ts +2 -2
- package/typings/classes/PhysicsServer2DExtension.d.ts +1 -1
- package/typings/classes/PhysicsServer3D.d.ts +42 -145
- package/typings/classes/PopupMenu.d.ts +8 -22
- package/typings/classes/PopupPanel.d.ts +0 -2
- package/typings/classes/PortableCompressedTexture2D.d.ts +2 -0
- package/typings/classes/ProjectSettings.d.ts +60 -44
- package/typings/classes/RDShaderSPIRV.d.ts +0 -30
- package/typings/classes/RDShaderSource.d.ts +0 -10
- package/typings/classes/RenderingDevice.d.ts +0 -104
- package/typings/classes/RenderingServer.d.ts +11 -213
- package/typings/classes/Resource.d.ts +2 -2
- package/typings/classes/ResourceImporterDynamicFont.d.ts +1 -3
- package/typings/classes/ResourceImporterSVG.d.ts +0 -10
- package/typings/classes/ResourceImporterTexture.d.ts +2 -2
- package/typings/classes/SceneTree.d.ts +29 -5
- package/typings/classes/ScriptEditor.d.ts +0 -6
- package/typings/classes/Shader.d.ts +0 -2
- package/typings/classes/Shape3D.d.ts +0 -1
- package/typings/classes/SplitContainer.d.ts +0 -6
- package/typings/classes/String.d.ts +1 -1
- package/typings/classes/SubViewport.d.ts +0 -4
- package/typings/classes/TextEdit.d.ts +0 -3
- package/typings/classes/TextServer.d.ts +0 -2
- package/typings/classes/TextServerExtension.d.ts +0 -2
- package/typings/classes/Texture2D.d.ts +0 -14
- package/typings/classes/TextureRect.d.ts +1 -4
- package/typings/classes/Tree.d.ts +2 -9
- package/typings/classes/TreeItem.d.ts +0 -8
- package/typings/classes/Tween.d.ts +0 -13
- package/typings/classes/Viewport.d.ts +0 -10
- package/typings/classes/VisualShader.d.ts +0 -2
- package/typings/classes/VisualShaderNodeColorFunc.d.ts +2 -2
- package/typings/classes/VoxelGIData.d.ts +0 -10
- package/typings/classes/Window.d.ts +0 -23
- package/typings/classes/XRCamera3D.d.ts +1 -1
- package/typings/classes/XRServer.d.ts +0 -2
- package/typings/classes/_globals.d.ts +86 -45
- package/typings/classes/index.d.ts +0 -5
- package/typings/godot-class-registry.json +108 -1254
- package/typings/classes/AccessibilityServer.d.ts +0 -405
- package/typings/classes/AwaitTweener.d.ts +0 -10
- package/typings/classes/BlitMaterial.d.ts +0 -22
- package/typings/classes/DrawableTexture2D.d.ts +0 -47
- package/typings/classes/VirtualJoystick.d.ts +0 -94
|
@@ -297,7 +297,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
297
297
|
* This is useful when moving an occluder to a new location, to give an instantaneous change rather than interpolation from the previous location.
|
|
298
298
|
*/
|
|
299
299
|
canvas_light_occluder_reset_physics_interpolation(occluder: RID): void;
|
|
300
|
-
/** Enables or disables using the light occluder as a signed distance field for 2D particle collision. */
|
|
301
300
|
canvas_light_occluder_set_as_sdf_collision(occluder: RID, enable: boolean): void;
|
|
302
301
|
/** Enables or disables light occluder. */
|
|
303
302
|
canvas_light_occluder_set_enabled(occluder: RID, enabled: boolean): void;
|
|
@@ -378,11 +377,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
378
377
|
canvas_occluder_polygon_set_cull_mode(occluder_polygon: RID, mode: int): void;
|
|
379
378
|
/** Sets the shape of the occluder polygon. */
|
|
380
379
|
canvas_occluder_polygon_set_shape(occluder_polygon: RID, shape: PackedVector2Array | Array<unknown>, closed: boolean): void;
|
|
381
|
-
/**
|
|
382
|
-
* If `disable` is `true`, makes 2D rendering ignore the canvas scale defined for each canvas layer. This affects {@link CanvasLayer}s with the {@link CanvasLayer.follow_viewport_enabled} property set to `true`.
|
|
383
|
-
* In the editor, this is set to `true` by default, and set to `false` when **View > Preview Canvas Scale** is enabled at the top of the 2D editor viewport.
|
|
384
|
-
* **Note:** Setting this to `true` does not impact the behavior of {@link CanvasLayer.scale}, {@link Node2D.scale}, or {@link Control.scale}.
|
|
385
|
-
*/
|
|
386
380
|
canvas_set_disable_scale(disable: boolean): void;
|
|
387
381
|
/**
|
|
388
382
|
* A copy of the canvas item will be drawn with a local offset of the `mirroring`.
|
|
@@ -838,7 +832,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
838
832
|
*/
|
|
839
833
|
instance_set_extra_visibility_margin(instance: RID, margin: float): void;
|
|
840
834
|
/**
|
|
841
|
-
* If `true`, ignores
|
|
835
|
+
* If `true`, ignores both frustum and occlusion culling on the specified 3D geometry instance. This is not the same as {@link GeometryInstance3D.ignore_occlusion_culling}, which only ignores occlusion culling and leaves frustum culling intact.
|
|
842
836
|
*/
|
|
843
837
|
instance_set_ignore_culling(instance: RID, enabled: boolean): void;
|
|
844
838
|
/**
|
|
@@ -948,41 +942,17 @@ declare interface RenderingServer extends GodotObject {
|
|
|
948
942
|
* **Note:** The equivalent node is {@link LightmapGI}.
|
|
949
943
|
*/
|
|
950
944
|
lightmap_create(): RID;
|
|
951
|
-
/**
|
|
952
|
-
* Returns the BSP tree data used for accelerating probe lookups. The BSP data is structured as a series of six signed 32-bit values per BSP node in this order: `float plane_x`, `float plane_y`, `float plane_z`, `float plane_distance`, `int32_t over`, `int32_t under`. An empty leaf is denoted by the value `-2147483648` (the minimum 32-bit signed integer). See also {@link lightmap_set_probe_capture_data}.
|
|
953
|
-
*/
|
|
954
945
|
lightmap_get_probe_capture_bsp_tree(lightmap: RID): PackedInt32Array;
|
|
955
|
-
/**
|
|
956
|
-
* Returns the *local space* positions of each lightmap probe capture point. Keep in mind the lightmap instance may have a non-zero transform, which will affect the position of the probe capture points. See also {@link lightmap_set_probe_capture_data}.
|
|
957
|
-
*/
|
|
958
946
|
lightmap_get_probe_capture_points(lightmap: RID): PackedVector3Array;
|
|
959
|
-
/**
|
|
960
|
-
* Returns the L0, L1, and L2 spherical harmonics (https://en.wikipedia.org/wiki/Spherical_harmonics) data for each lightmap probe capture point. This is specified as 9 {@link Color} values per probe, which means the size of the returned data is always 9 times the number of probe points. See also {@link lightmap_set_probe_capture_data}.
|
|
961
|
-
*/
|
|
962
947
|
lightmap_get_probe_capture_sh(lightmap: RID): PackedColorArray;
|
|
963
|
-
/**
|
|
964
|
-
* Returns the tetrahedralization data used for interpolating between lightmap probe capture points. Each tetrahedron is specified as a series of 4 numbers, each being an index into the probe capture points array returned by {@link lightmap_get_probe_capture_points}. See also {@link lightmap_set_probe_capture_data}.
|
|
965
|
-
*/
|
|
966
948
|
lightmap_get_probe_capture_tetrahedra(lightmap: RID): PackedInt32Array;
|
|
967
949
|
/**
|
|
968
950
|
* Used to inform the renderer what exposure normalization value was used while baking the lightmap. This value will be used and modulated at run time to ensure that the lightmap maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see {@link camera_attributes_set_exposure}.
|
|
969
951
|
*/
|
|
970
952
|
lightmap_set_baked_exposure_normalization(lightmap: RID, baked_exposure: float): void;
|
|
971
|
-
/**
|
|
972
|
-
* Sets the bounds that this lightmap instance should visually affect, both in terms of static lightmap baking and probe-based global illumination.
|
|
973
|
-
*/
|
|
974
953
|
lightmap_set_probe_bounds(lightmap: RID, bounds: AABB): void;
|
|
975
|
-
/**
|
|
976
|
-
* Sets the probe capture data for the given lightmap instance. See {@link lightmap_get_probe_capture_points}, {@link lightmap_get_probe_capture_sh}, {@link lightmap_get_probe_capture_tetrahedra}, and {@link lightmap_get_probe_capture_bsp_tree} for the expected data formats.
|
|
977
|
-
*/
|
|
978
954
|
lightmap_set_probe_capture_data(lightmap: RID, points: PackedVector3Array | Array<unknown>, point_sh: PackedColorArray | Array<unknown>, tetrahedra: PackedInt32Array | Array<unknown>, bsp_tree: PackedInt32Array | Array<unknown>): void;
|
|
979
|
-
/**
|
|
980
|
-
* The framerate-independent update speed when representing dynamic object lighting from {@link LightmapProbe}s. Higher values make dynamic object lighting update faster. Higher values can prevent fast-moving objects from having "outdated" indirect lighting displayed on them, at the cost of possible flickering when an object moves from a bright area to a shaded area. See also {@link ProjectSettings.rendering/lightmapping/probe_capture/update_speed}.
|
|
981
|
-
*/
|
|
982
955
|
lightmap_set_probe_capture_update_speed(speed: float): void;
|
|
983
|
-
/**
|
|
984
|
-
* Sets whether the lightmap instance should be considered as interior (when `interior` is `true`). If the lightmap is marked as interior, environment lighting is ignored when baking lightmaps.
|
|
985
|
-
*/
|
|
986
956
|
lightmap_set_probe_interior(lightmap: RID, interior: boolean): void;
|
|
987
957
|
/**
|
|
988
958
|
* Set the textures on the given `lightmap` GI instance to the texture array pointed to by the `light` RID. If the lightmap texture was baked with {@link LightmapGI.directional} set to `true`, then `uses_sh` must also be `true`.
|
|
@@ -1018,21 +988,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1018
988
|
* See also {@link ProjectSettings.rendering/anti_aliasing/quality/use_debanding} and {@link RenderingServer.viewport_set_use_debanding}.
|
|
1019
989
|
*/
|
|
1020
990
|
material_set_use_debanding(enable: boolean): void;
|
|
1021
|
-
/**
|
|
1022
|
-
* Creates a new surface on the given `mesh`. Equivalent to {@link mesh_add_surface_from_arrays}, but takes a single {@link Dictionary} argument instead of separate arguments. The dictionary must follow this structure:
|
|
1023
|
-
* See also {@link mesh_get_surface}, which returns data in the same structure defined above.
|
|
1024
|
-
*/
|
|
1025
991
|
mesh_add_surface(mesh: RID, surface: Dictionary): void;
|
|
1026
|
-
/**
|
|
1027
|
-
* Creates a new surface on the given `mesh`. {@link mesh_get_surface_count} will become the surface index for this new surface.
|
|
1028
|
-
* Surfaces are created to be rendered using a `primitive`, which may be any of the values defined in {@link Mesh.PrimitiveType}.
|
|
1029
|
-
* The `arrays` argument is an array of arrays. Each of the {@link Mesh.ARRAY_MAX} elements contains an array with some of the mesh data for this surface as described by the corresponding member of {@link Mesh.ArrayType} or `null` if it is not used by the surface. For example, `arrays[0]` is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this surface into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array (or be an exact multiple of the vertex array's length, when multiple elements of a sub-array correspond to a single vertex) or be empty, except for {@link Mesh.ARRAY_INDEX} if it is used.
|
|
1030
|
-
* The `blend_shapes` argument is an array of vertex data for each blend shape. Each element is an array of the same structure as `arrays`, but {@link Mesh.ARRAY_VERTEX}, {@link Mesh.ARRAY_NORMAL}, and {@link Mesh.ARRAY_TANGENT} are set if and only if they are set in `arrays` and all other entries are `null`.
|
|
1031
|
-
* The `lods` argument is a dictionary with [float] keys and {@link PackedInt32Array} values. Each entry in the dictionary represents an LOD level of the surface, where the value is the {@link Mesh.ARRAY_INDEX} array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used.
|
|
1032
|
-
* The `compress_format` argument is the bitwise OR of, as required: One value of {@link ArrayFormat} left shifted by `ARRAY_FORMAT_CUSTOMn_SHIFT` for each custom channel in use, {@link ARRAY_FLAG_USE_DYNAMIC_UPDATE}, {@link ARRAY_FLAG_USE_8_BONE_WEIGHTS}, or {@link ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY}.
|
|
1033
|
-
* See {@link ArrayMesh.add_surface_from_arrays} and {@link ImporterMesh.add_surface} for higher-level equivalents of this method.
|
|
1034
|
-
* **Note:** When using indices, it is recommended to only use points, lines, or triangles.
|
|
1035
|
-
*/
|
|
1036
992
|
mesh_add_surface_from_arrays(mesh: RID, primitive: int, arrays: Array<unknown> | PackedByteArray | PackedColorArray | PackedFloat32Array | PackedFloat64Array | PackedInt32Array | PackedInt64Array | PackedStringArray | PackedVector2Array | PackedVector3Array | PackedVector4Array, blend_shapes?: Array<unknown> | PackedByteArray | PackedColorArray | PackedFloat32Array | PackedFloat64Array | PackedInt32Array | PackedInt64Array | PackedStringArray | PackedVector2Array | PackedVector3Array | PackedVector4Array, lods?: Dictionary, compress_format?: int): void;
|
|
1037
993
|
/** Removes all surfaces from a mesh. */
|
|
1038
994
|
mesh_clear(mesh: RID): void;
|
|
@@ -1043,13 +999,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1043
999
|
* **Note:** The equivalent resource is {@link Mesh}.
|
|
1044
1000
|
*/
|
|
1045
1001
|
mesh_create(): RID;
|
|
1046
|
-
/**
|
|
1047
|
-
* Creates a new mesh with predefined surfaces for it and adds the mesh to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `mesh_*` RenderingServer functions. This method is more efficient for creating meshes with multiple surfaces compared to creating an empty mesh with {@link mesh_create} and adding surfaces one by one with {@link mesh_add_surface}.
|
|
1048
|
-
* Each element in the `surfaces` array must follow the same structure as described in {@link mesh_add_surface}. The `blend_shape_count` parameter must match the blend shape data defined in all surfaces.
|
|
1049
|
-
* Once finished with your RID, you will want to free the RID using the RenderingServer's {@link free_rid} method.
|
|
1050
|
-
* To place in a scene, attach this mesh to an instance using {@link instance_set_base} using the returned RID.
|
|
1051
|
-
* **Note:** The equivalent resource is {@link Mesh}.
|
|
1052
|
-
*/
|
|
1053
1002
|
mesh_create_from_surfaces(surfaces: Array<Dictionary>, blend_shape_count?: int): RID;
|
|
1054
1003
|
/** Returns a mesh's blend shape count. */
|
|
1055
1004
|
mesh_get_blend_shape_count(mesh: RID): int;
|
|
@@ -1057,9 +1006,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1057
1006
|
mesh_get_blend_shape_mode(mesh: RID): int;
|
|
1058
1007
|
/** Returns a mesh's custom aabb. */
|
|
1059
1008
|
mesh_get_custom_aabb(mesh: RID): AABB;
|
|
1060
|
-
/**
|
|
1061
|
-
* Returns a mesh's surface as a dictionary following the same structure as described in {@link mesh_add_surface}.
|
|
1062
|
-
*/
|
|
1063
1009
|
mesh_get_surface(mesh: RID, surface: int): Dictionary;
|
|
1064
1010
|
/** Returns a mesh's number of surfaces. */
|
|
1065
1011
|
mesh_get_surface_count(mesh: RID): int;
|
|
@@ -1067,10 +1013,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1067
1013
|
mesh_set_blend_shape_mode(mesh: RID, mode: int): void;
|
|
1068
1014
|
/** Sets a mesh's custom aabb. */
|
|
1069
1015
|
mesh_set_custom_aabb(mesh: RID, aabb: AABB): void;
|
|
1070
|
-
/**
|
|
1071
|
-
* Sets an optional second mesh which can be used for rendering shadows and the depth prepass. Can be used to increase performance by supplying a mesh with fused vertices and only vertex position data (without normals, UVs, colors, etc.).
|
|
1072
|
-
* **Note:** This mesh must have exactly the same vertex positions as the source mesh (including the source mesh's LODs, if present). If vertex positions differ, then the mesh will not draw correctly.
|
|
1073
|
-
*/
|
|
1074
1016
|
mesh_set_shadow_mesh(mesh: RID, shadow_mesh: RID): void;
|
|
1075
1017
|
/** Returns a mesh's surface's buffer arrays. */
|
|
1076
1018
|
mesh_surface_get_arrays(mesh: RID, surface: int): Array<unknown>;
|
|
@@ -1100,31 +1042,13 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1100
1042
|
mesh_surface_remove(mesh: RID, surface: int): void;
|
|
1101
1043
|
/** Sets a mesh's surface's material. */
|
|
1102
1044
|
mesh_surface_set_material(mesh: RID, surface: int, material: RID): void;
|
|
1103
|
-
/**
|
|
1104
|
-
* Updates the attribute buffer of the mesh surface with the given `data`. The expected data per attribute is 8 or 12 bytes (4 bytes per float, 2 floats per {@link Vector2}, and 3 floats per {@link Vector3}) depending on if the mesh is using {@link Vector2} or {@link Vector3} vertices. This value can be determined with {@link mesh_surface_get_format_attribute_stride} instead.
|
|
1105
|
-
* The starting point of the updates can be changed with `offset`. The value of `offset` should be a multiple of 12 bytes in most cases to align to each attribute.
|
|
1106
|
-
* A {@link PackedVector3Array} of attribute locations can be converted into a {@link PackedByteArray} using {@link PackedVector3Array.to_byte_array} for use in `data`.
|
|
1107
|
-
*/
|
|
1108
1045
|
mesh_surface_update_attribute_region(mesh: RID, surface: int, offset: int, data: PackedByteArray | Array<unknown>): void;
|
|
1109
1046
|
/**
|
|
1110
1047
|
* Updates the index buffer of the mesh surface with the given `data`. The expected data are 16 or 32-bit unsigned integers, which can be determined with {@link mesh_surface_get_format_index_stride}.
|
|
1111
1048
|
*/
|
|
1112
1049
|
mesh_surface_update_index_region(mesh: RID, surface: int, offset: int, data: PackedByteArray | Array<unknown>): void;
|
|
1113
|
-
/**
|
|
1114
|
-
* Updates the skin buffer of the mesh surface with the given `data`. The expected data per skin is 8 or 12 bytes (4 bytes per float, 2 floats per {@link Vector2}, and 3 floats per {@link Vector3}) depending on if the mesh is using {@link Vector2} or {@link Vector3} vertices. This value can be determined with {@link mesh_surface_get_format_skin_stride} instead.
|
|
1115
|
-
* The starting point of the updates can be changed with `offset`. The value of `offset` should be a multiple of 12 bytes in most cases to align to each skin.
|
|
1116
|
-
* A {@link PackedVector3Array} of skin locations can be converted into a {@link PackedByteArray} using {@link PackedVector3Array.to_byte_array} for use in `data`.
|
|
1117
|
-
*/
|
|
1118
1050
|
mesh_surface_update_skin_region(mesh: RID, surface: int, offset: int, data: PackedByteArray | Array<unknown>): void;
|
|
1119
|
-
/**
|
|
1120
|
-
* Updates the vertex buffer of the mesh surface with the given `data`. The expected data per vertex is 8 or 12 bytes (4 bytes per float, 2 floats per {@link Vector2}, and 3 floats per {@link Vector3}) depending on if the mesh is using {@link Vector2} or {@link Vector3} vertices. This value can be determined with {@link mesh_surface_get_format_vertex_stride} instead.
|
|
1121
|
-
* The starting point of the updates can be changed with `offset`. The value of `offset` should be a multiple of 12 bytes in most cases to align to each vertex.
|
|
1122
|
-
* A {@link PackedVector3Array} of vertex locations can be converted into a {@link PackedByteArray} using {@link PackedVector3Array.to_byte_array} for use in `data`.
|
|
1123
|
-
*/
|
|
1124
1051
|
mesh_surface_update_vertex_region(mesh: RID, surface: int, offset: int, data: PackedByteArray | Array<unknown>): void;
|
|
1125
|
-
/**
|
|
1126
|
-
* Sets up the multimesh using the specified data. The number of instances is set by `instances`. The format of the instance transforms is set by `transform_format`, which should be set according to whether the multimesh is meant to be rendered in 2D or 3D. If `color_format` is `true`, each instance will have a color associated with it. If `custom_data_format` is `true`, each instance will have a custom data vector associated with it. If `use_indirect` is `true`, an indirect command buffer will be created for this multimesh, allowing the instance count to be modified directly on the GPU. See also {@link multimesh_get_command_buffer_rd_rid}.
|
|
1127
|
-
*/
|
|
1128
1052
|
multimesh_allocate_data(multimesh: RID, instances: int, transform_format: int, color_format?: boolean, custom_data_format?: boolean, use_indirect?: boolean): void;
|
|
1129
1053
|
/**
|
|
1130
1054
|
* Creates a new multimesh on the RenderingServer and returns an {@link RID} handle. This RID will be used in all `multimesh_*` RenderingServer functions.
|
|
@@ -1157,7 +1081,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1157
1081
|
* 2 - firstIndex;
|
|
1158
1082
|
* 3 - vertexOffset;
|
|
1159
1083
|
* 4 - firstInstance;
|
|
1160
|
-
* Non
|
|
1084
|
+
* Non Indexed:
|
|
1161
1085
|
* 0 - vertexCount;
|
|
1162
1086
|
* 1 - instanceCount;
|
|
1163
1087
|
* 2 - firstVertex;
|
|
@@ -1350,9 +1274,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1350
1274
|
* Sets the amount ratio for particles to be emitted. Equivalent to {@link GPUParticles3D.amount_ratio}.
|
|
1351
1275
|
*/
|
|
1352
1276
|
particles_set_amount_ratio(particles: RID, ratio: float): void;
|
|
1353
|
-
/**
|
|
1354
|
-
* Sets the base size for particle collision. Equivalent to {@link GPUParticles3D.collision_base_size}.
|
|
1355
|
-
*/
|
|
1356
1277
|
particles_set_collision_base_size(particles: RID, size: float): void;
|
|
1357
1278
|
/**
|
|
1358
1279
|
* Sets a custom axis-aligned bounding box for the particle system. Equivalent to {@link GPUParticles3D.visibility_aabb}.
|
|
@@ -1390,9 +1311,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1390
1311
|
* Sets the value that informs a {@link ParticleProcessMaterial} to rush all particles towards the end of their lifetime.
|
|
1391
1312
|
*/
|
|
1392
1313
|
particles_set_interp_to_end(particles: RID, factor: float): void;
|
|
1393
|
-
/**
|
|
1394
|
-
* Sets whether particles should use interpolation between fixed steps. Equivalent to {@link GPUParticles3D.interpolate}.
|
|
1395
|
-
*/
|
|
1396
1314
|
particles_set_interpolate(particles: RID, enable: boolean): void;
|
|
1397
1315
|
/** Sets the lifetime of each particle in the system. Equivalent to {@link GPUParticles3D.lifetime}. */
|
|
1398
1316
|
particles_set_lifetime(particles: RID, lifetime: float): void;
|
|
@@ -1417,21 +1335,12 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1417
1335
|
particles_set_randomness_ratio(particles: RID, ratio: float): void;
|
|
1418
1336
|
/** Sets the speed scale of the particle system. Equivalent to {@link GPUParticles3D.speed_scale}. */
|
|
1419
1337
|
particles_set_speed_scale(particles: RID, scale: float): void;
|
|
1420
|
-
/**
|
|
1421
|
-
* Sets the subemitter particles for the particle system. Equivalent to {@link GPUParticles3D.sub_emitter}.
|
|
1422
|
-
*/
|
|
1423
1338
|
particles_set_subemitter(particles: RID, subemitter_particles: RID): void;
|
|
1424
|
-
/**
|
|
1425
|
-
* Sets the trail bind poses for the particle system. This specified as an array of {@link Transform3D}s representing the bind pose for each draw pass. See {@link GPUParticles3D.draw_skin}, {@link Skin.get_bind_count}, and {@link Skin.get_bind_pose}. Set the value for each draw pass to {@link Transform3D.IDENTITY} to use the default behavior, which is what built-in trails use ({@link RibbonTrailMesh} and {@link TubeTrailMesh}).
|
|
1426
|
-
*/
|
|
1427
1339
|
particles_set_trail_bind_poses(particles: RID, bind_poses: Array<Transform3D>): void;
|
|
1428
1340
|
/**
|
|
1429
1341
|
* If `enable` is `true`, enables trails for the `particles` with the specified `length_sec` in seconds. Equivalent to {@link GPUParticles3D.trail_enabled} and {@link GPUParticles3D.trail_lifetime}.
|
|
1430
1342
|
*/
|
|
1431
1343
|
particles_set_trails(particles: RID, enable: boolean, length_sec: float): void;
|
|
1432
|
-
/**
|
|
1433
|
-
* Sets the transform alignment for the particle system. Equivalent to {@link GPUParticles3D.transform_align}.
|
|
1434
|
-
*/
|
|
1435
1344
|
particles_set_transform_align(particles: RID, align: int): void;
|
|
1436
1345
|
/**
|
|
1437
1346
|
* If `true`, particles use local coordinates. If `false` they use global coordinates. Equivalent to {@link GPUParticles3D.local_coords}.
|
|
@@ -1540,7 +1449,7 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1540
1449
|
set_boot_image_with_stretch(image: Image, color: Color, stretch_mode: int, use_filter?: boolean): void;
|
|
1541
1450
|
/**
|
|
1542
1451
|
* If `generate` is `true`, generates debug wireframes for all meshes that are loaded when using the Compatibility renderer. By default, the engine does not generate debug wireframes at runtime, since they slow down loading of assets and take up VRAM.
|
|
1543
|
-
* **Note:** You must call this method before loading any meshes when using the Compatibility renderer
|
|
1452
|
+
* **Note:** You must call this method before loading any meshes when using the Compatibility renderer, otherwise wireframes will not be used.
|
|
1544
1453
|
*/
|
|
1545
1454
|
set_debug_generate_wireframes(generate: boolean): void;
|
|
1546
1455
|
/**
|
|
@@ -1575,9 +1484,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1575
1484
|
* Sets the path hint for the specified shader. This should generally match the {@link Shader} resource's {@link Resource.resource_path}.
|
|
1576
1485
|
*/
|
|
1577
1486
|
shader_set_path_hint(shader: RID, path: string | NodePath): void;
|
|
1578
|
-
/**
|
|
1579
|
-
* Allocates data for this skeleton using the number of bones specified in `bones`. If `is_2d_skeleton` is `true`, the skeleton will be treated as a 2D skeleton instead of a 3D skeleton. See also {@link skeleton_get_bone_count}.
|
|
1580
|
-
*/
|
|
1581
1487
|
skeleton_allocate_data(skeleton: RID, bones: int, is_2d_skeleton?: boolean): void;
|
|
1582
1488
|
/** Returns the {@link Transform3D} set for a specific bone of this skeleton. */
|
|
1583
1489
|
skeleton_bone_get_transform(skeleton: RID, bone: int): Transform3D;
|
|
@@ -1592,9 +1498,8 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1592
1498
|
* Once finished with your RID, you will want to free the RID using the RenderingServer's {@link free_rid} method.
|
|
1593
1499
|
*/
|
|
1594
1500
|
skeleton_create(): RID;
|
|
1595
|
-
/** Returns the number of bones allocated for this skeleton.
|
|
1501
|
+
/** Returns the number of bones allocated for this skeleton. */
|
|
1596
1502
|
skeleton_get_bone_count(skeleton: RID): int;
|
|
1597
|
-
/** Sets the base {@link Transform2D} to use for the specified skeleton. */
|
|
1598
1503
|
skeleton_set_base_transform_2d(skeleton: RID, base_transform: Transform2D): void;
|
|
1599
1504
|
/**
|
|
1600
1505
|
* Generates and returns an {@link Image} containing the radiance map for the specified `sky` RID. This supports built-in sky material and custom sky shaders. If `bake_irradiance` is `true`, the irradiance map is saved instead of the radiance map. The radiance map is used to render reflected light, while the irradiance map is used to render ambient light. See also {@link environment_bake_panorama}.
|
|
@@ -1687,21 +1592,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1687
1592
|
* **Note:** If using only the rendering device renderer, it's recommend to use {@link RenderingDevice.texture_create_from_extension} together with {@link RenderingServer.texture_rd_create}, rather than this method. This way, the texture's format and usage can be controlled more effectively.
|
|
1688
1593
|
*/
|
|
1689
1594
|
texture_create_from_native_handle(type_: int, format: int, native_handle: int, width: int, height: int, depth: int, layers?: int, layered_type?: int): RID;
|
|
1690
|
-
/**
|
|
1691
|
-
* Draws to `rect` on up to 4 given Drawable `textures`, using a TextureBlit Shader from `material`. `modulate` and up to 4 `source_textures` are uniforms for the Shader to process with. `to_mipmap` can specify to perform this draw to a lower mipmap level.
|
|
1692
|
-
* **Note:** All `textures` must be the same size and format.
|
|
1693
|
-
*/
|
|
1694
|
-
texture_drawable_blit_rect(textures: Array<RID>, rect: Rect2i | Rect2, material: RID, modulate: Color, source_textures: Array<RID>, to_mipmap?: int): void;
|
|
1695
|
-
/**
|
|
1696
|
-
* Creates a 2-dimensional texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `texture_drawable*` RenderingServer functions.
|
|
1697
|
-
* Once finished with your RID, you will want to free the RID using the RenderingServer's {@link free_rid} method.
|
|
1698
|
-
* **Note:** The equivalent resource is {@link DrawableTexture2D}.
|
|
1699
|
-
*/
|
|
1700
|
-
texture_drawable_create(width: int, height: int, format: int, color?: Color, with_mipmaps?: boolean): RID;
|
|
1701
|
-
/** Calculates new MipMaps for the given Drawable `texture`. */
|
|
1702
|
-
texture_drawable_generate_mipmaps(texture: RID): void;
|
|
1703
|
-
/** Returns a ShaderMaterial with the default texture_blit Shader. */
|
|
1704
|
-
texture_drawable_get_default_material(): RID;
|
|
1705
1595
|
/** Returns the format for the texture. */
|
|
1706
1596
|
texture_get_format(texture: RID): int;
|
|
1707
1597
|
/**
|
|
@@ -1710,9 +1600,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1710
1600
|
* **Note:** This function returns a `uint64_t` which internally maps to a `GLuint` (OpenGL) or `VkImage` (Vulkan).
|
|
1711
1601
|
*/
|
|
1712
1602
|
texture_get_native_handle(texture: RID, srgb?: boolean): int;
|
|
1713
|
-
/**
|
|
1714
|
-
* Returns the resource path (starting with `res://` or `uid://`) for the specified texture RID. Returns an empty {@link String} if the resource is built-in. See also {@link texture_set_path}.
|
|
1715
|
-
*/
|
|
1716
1603
|
texture_get_path(texture: RID): string;
|
|
1717
1604
|
/**
|
|
1718
1605
|
* Returns a texture {@link RID} that can be used with {@link RenderingDevice}.
|
|
@@ -1733,18 +1620,8 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1733
1620
|
* Replaces `texture`'s texture data by the texture specified by the `by_texture` RID, without changing `texture`'s RID.
|
|
1734
1621
|
*/
|
|
1735
1622
|
texture_replace(texture: RID, by_texture: RID): void;
|
|
1736
|
-
/**
|
|
1737
|
-
* Sets whether the texture RID should force redrawing when it's visible on screen when {@link OS.low_processor_usage_mode} is `true`. This is used by {@link AnimatedTexture} to force redrawing.
|
|
1738
|
-
*/
|
|
1739
1623
|
texture_set_force_redraw_if_visible(texture: RID, enable: boolean): void;
|
|
1740
|
-
/**
|
|
1741
|
-
* Sets the resource path for this texture RID. See also {@link texture_get_path}.
|
|
1742
|
-
* **Note:** This is purely a hint and does not cause the texture to be automatically saved when set to a `res://` path.
|
|
1743
|
-
*/
|
|
1744
1624
|
texture_set_path(texture: RID, path: string | NodePath): void;
|
|
1745
|
-
/**
|
|
1746
|
-
* Sets the size at which the texture should be *displayed* in 2D, ignoring its original size. This does not rescale the texture data itself, only how it is drawn in 2D. Set `width` and `height` to 0 to disable the size override.
|
|
1747
|
-
*/
|
|
1748
1625
|
texture_set_size_override(texture: RID, width: int, height: int): void;
|
|
1749
1626
|
/** Sets a viewport's camera. */
|
|
1750
1627
|
viewport_attach_camera(viewport: RID, camera: RID): void;
|
|
@@ -1889,10 +1766,8 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1889
1766
|
* Sets the viewport's 2D signed distance field {@link ProjectSettings.rendering/2d/sdf/oversize} and {@link ProjectSettings.rendering/2d/sdf/scale}. This is used when sampling the signed distance field in {@link CanvasItem} shaders as well as {@link GPUParticles2D} collision. This is *not* used by SDFGI in 3D rendering.
|
|
1890
1767
|
*/
|
|
1891
1768
|
viewport_set_sdf_oversize_and_scale(viewport: RID, oversize: int, scale: int): void;
|
|
1892
|
-
/**
|
|
1893
|
-
|
|
1894
|
-
*/
|
|
1895
|
-
viewport_set_size(viewport: RID, width: int, height: int, view_count?: int): void;
|
|
1769
|
+
/** Sets the viewport's width and height in pixels. */
|
|
1770
|
+
viewport_set_size(viewport: RID, width: int, height: int): void;
|
|
1896
1771
|
/**
|
|
1897
1772
|
* If `true`, canvas item transforms (i.e. origin position) are snapped to the nearest pixel when rendering. This can lead to a crisper appearance at the cost of less smooth movement, especially when {@link Camera2D} smoothing is enabled. Equivalent to {@link ProjectSettings.rendering/2d/snap/snap_2d_transforms_to_pixel}.
|
|
1898
1773
|
*/
|
|
@@ -1949,13 +1824,8 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1949
1824
|
* **Note:** The equivalent node is {@link VisibleOnScreenNotifier3D}.
|
|
1950
1825
|
*/
|
|
1951
1826
|
visibility_notifier_create(): RID;
|
|
1952
|
-
/** Sets the AABB of the specified visibility notifier. */
|
|
1953
1827
|
visibility_notifier_set_aabb(notifier: RID, aabb: AABB): void;
|
|
1954
|
-
/** Sets the methods to be called when the notifier enters or exits the view. */
|
|
1955
1828
|
visibility_notifier_set_callbacks(notifier: RID, enter_callable: Callable, exit_callable: Callable): void;
|
|
1956
|
-
/**
|
|
1957
|
-
* Allocates and initializes the voxel GI data for the specified `voxel_gi` RID. `octree_cells` must be a multiple of 32. `octree_cells` must be double the size of `data_cells`. The allocated data can be retrieved later using the various `voxel_gi_get_*` methods.
|
|
1958
|
-
*/
|
|
1959
1829
|
voxel_gi_allocate_data(voxel_gi: RID, to_cell_xform: Transform3D | Projection, aabb: AABB, octree_size: Vector3i | Vector3, octree_cells: PackedByteArray | Array<unknown>, data_cells: PackedByteArray | Array<unknown>, distance_field: PackedByteArray | Array<unknown>, level_counts: PackedInt32Array | Array<unknown>): void;
|
|
1960
1830
|
/**
|
|
1961
1831
|
* Creates a new voxel-based global illumination object and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all `voxel_gi_*` RenderingServer functions.
|
|
@@ -1963,29 +1833,11 @@ declare interface RenderingServer extends GodotObject {
|
|
|
1963
1833
|
* **Note:** The equivalent node is {@link VoxelGI}.
|
|
1964
1834
|
*/
|
|
1965
1835
|
voxel_gi_create(): RID;
|
|
1966
|
-
/**
|
|
1967
|
-
* Returns the data cells for the specified voxel GI data instance. See also {@link voxel_gi_allocate_data}.
|
|
1968
|
-
*/
|
|
1969
1836
|
voxel_gi_get_data_cells(voxel_gi: RID): PackedByteArray;
|
|
1970
|
-
/**
|
|
1971
|
-
* Returns the distance field data for the specified voxel GI data instance. See also {@link voxel_gi_allocate_data}.
|
|
1972
|
-
*/
|
|
1973
1837
|
voxel_gi_get_distance_field(voxel_gi: RID): PackedByteArray;
|
|
1974
|
-
/**
|
|
1975
|
-
* Returns the level counts for the specified voxel GI data instance. See also {@link voxel_gi_allocate_data}.
|
|
1976
|
-
*/
|
|
1977
1838
|
voxel_gi_get_level_counts(voxel_gi: RID): PackedInt32Array;
|
|
1978
|
-
/**
|
|
1979
|
-
* Returns the octree cell data for the specified voxel GI data instance. See also {@link voxel_gi_allocate_data}.
|
|
1980
|
-
*/
|
|
1981
1839
|
voxel_gi_get_octree_cells(voxel_gi: RID): PackedByteArray;
|
|
1982
|
-
/**
|
|
1983
|
-
* Returns the octree size for the specified voxel GI data instance, which corresponds to the number of subdivisions per axis. This can be viewed in the editor by hovering the **Bake VoxelGI** button at the top of the 3D editor viewport when a {@link VoxelGI} node is selected and looking at the **Subdivisions** field in the tooltip.
|
|
1984
|
-
*/
|
|
1985
1840
|
voxel_gi_get_octree_size(voxel_gi: RID): Vector3i;
|
|
1986
|
-
/**
|
|
1987
|
-
* Returns the transform to cell space for the specified voxel GI data instance. See also {@link voxel_gi_allocate_data}.
|
|
1988
|
-
*/
|
|
1989
1841
|
voxel_gi_get_to_cell_xform(voxel_gi: RID): Transform3D;
|
|
1990
1842
|
/**
|
|
1991
1843
|
* Used to inform the renderer what exposure normalization value was used while baking the voxel gi. This value will be used and modulated at run time to ensure that the voxel gi maintains a consistent level of exposure even if the scene-wide exposure normalization is changed at run time. For more information see {@link camera_attributes_set_exposure}.
|
|
@@ -2044,22 +1896,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2044
1896
|
readonly CUBEMAP_LAYER_FRONT: int;
|
|
2045
1897
|
/** Back face of a {@link Cubemap}. */
|
|
2046
1898
|
readonly CUBEMAP_LAYER_BACK: int;
|
|
2047
|
-
// enum TextureDrawableFormat
|
|
2048
|
-
/** OpenGL texture format RGBA with four components, each with a bitdepth of 8. */
|
|
2049
|
-
readonly TEXTURE_DRAWABLE_FORMAT_RGBA8: int;
|
|
2050
|
-
/**
|
|
2051
|
-
* OpenGL texture format RGBA with four components, each with a bitdepth of 8.
|
|
2052
|
-
* When drawn to, an sRGB to linear color space conversion is performed.
|
|
2053
|
-
*/
|
|
2054
|
-
readonly TEXTURE_DRAWABLE_FORMAT_RGBA8_SRGB: int;
|
|
2055
|
-
/**
|
|
2056
|
-
* OpenGL texture format GL_RGBA16F where there are four components, each a 16-bit "half-precision" floating-point value.
|
|
2057
|
-
*/
|
|
2058
|
-
readonly TEXTURE_DRAWABLE_FORMAT_RGBAH: int;
|
|
2059
|
-
/**
|
|
2060
|
-
* OpenGL texture format GL_RGBA32F where there are four components, each a 32-bit floating-point value.
|
|
2061
|
-
*/
|
|
2062
|
-
readonly TEXTURE_DRAWABLE_FORMAT_RGBAF: int;
|
|
2063
1899
|
// enum ShaderMode
|
|
2064
1900
|
/** Shader is a 3D shader. */
|
|
2065
1901
|
readonly SHADER_SPATIAL: int;
|
|
@@ -2071,8 +1907,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2071
1907
|
readonly SHADER_SKY: int;
|
|
2072
1908
|
/** Shader is a 3D fog shader. */
|
|
2073
1909
|
readonly SHADER_FOG: int;
|
|
2074
|
-
/** Shader is a texture_blit shader. */
|
|
2075
|
-
readonly SHADER_TEXTURE_BLIT: int;
|
|
2076
1910
|
/** Represents the size of the {@link ShaderMode} enum. */
|
|
2077
1911
|
readonly SHADER_MAX: int;
|
|
2078
1912
|
// enum ArrayType
|
|
@@ -2463,13 +2297,9 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2463
2297
|
/** 3D particles. */
|
|
2464
2298
|
readonly PARTICLES_MODE_3D: int;
|
|
2465
2299
|
// enum ParticlesTransformAlign
|
|
2466
|
-
/** Do not align particle transforms relative to the camera or velocity. */
|
|
2467
2300
|
readonly PARTICLES_TRANSFORM_ALIGN_DISABLED: int;
|
|
2468
|
-
/** Align each particle's Z axis to face the camera. */
|
|
2469
2301
|
readonly PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD: int;
|
|
2470
|
-
/** Align each particle's Y axis to the velocity vector. */
|
|
2471
2302
|
readonly PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY: int;
|
|
2472
|
-
/** Align each particle's Z axis to face the camera and Y axis to the velocity vector. */
|
|
2473
2303
|
readonly PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY: int;
|
|
2474
2304
|
// enum ParticlesDrawOrder
|
|
2475
2305
|
/** Draw particles in the order that they appear in the particles array. */
|
|
@@ -2485,38 +2315,19 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2485
2315
|
/** Sort particles based on their distance to the camera. */
|
|
2486
2316
|
readonly PARTICLES_DRAW_ORDER_VIEW_DEPTH: int;
|
|
2487
2317
|
// enum ParticlesCollisionType
|
|
2488
|
-
/** Sphere attractor type for {@link GPUParticles3D} (see {@link GPUParticlesAttractorSphere3D}). */
|
|
2489
2318
|
readonly PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT: int;
|
|
2490
|
-
/** Box attractor type for {@link GPUParticles3D} (see {@link GPUParticlesAttractorBox3D}). */
|
|
2491
2319
|
readonly PARTICLES_COLLISION_TYPE_BOX_ATTRACT: int;
|
|
2492
|
-
/**
|
|
2493
|
-
* Vector field attractor type for {@link GPUParticles3D} (see {@link GPUParticlesAttractorVectorField3D}).
|
|
2494
|
-
*/
|
|
2495
2320
|
readonly PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT: int;
|
|
2496
|
-
/** Sphere collision type for {@link GPUParticles3D} (see {@link GPUParticlesCollisionSphere3D}). */
|
|
2497
2321
|
readonly PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE: int;
|
|
2498
|
-
/** Box collision type for {@link GPUParticles3D} (see {@link GPUParticlesCollisionBox3D}). */
|
|
2499
2322
|
readonly PARTICLES_COLLISION_TYPE_BOX_COLLIDE: int;
|
|
2500
|
-
/**
|
|
2501
|
-
* Signed distance field collision type for {@link GPUParticles3D} (see {@link GPUParticlesCollisionSDF3D}).
|
|
2502
|
-
*/
|
|
2503
2323
|
readonly PARTICLES_COLLISION_TYPE_SDF_COLLIDE: int;
|
|
2504
|
-
/**
|
|
2505
|
-
* Heightfield collision type for {@link GPUParticles3D} (see {@link GPUParticlesCollisionHeightField3D}).
|
|
2506
|
-
*/
|
|
2507
2324
|
readonly PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE: int;
|
|
2508
2325
|
// enum ParticlesCollisionHeightfieldResolution
|
|
2509
|
-
/** 256×256 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2510
2326
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256: int;
|
|
2511
|
-
/** 512×512 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2512
2327
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512: int;
|
|
2513
|
-
/** 1024×1024 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2514
2328
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024: int;
|
|
2515
|
-
/** 2048×2048 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2516
2329
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048: int;
|
|
2517
|
-
/** 4096×4096 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2518
2330
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096: int;
|
|
2519
|
-
/** 8192×8192 heightfield resolution for {@link GPUParticlesCollisionHeightField3D}. */
|
|
2520
2331
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192: int;
|
|
2521
2332
|
/** Represents the size of the {@link ParticlesCollisionHeightfieldResolution} enum. */
|
|
2522
2333
|
readonly PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX: int;
|
|
@@ -2713,7 +2524,6 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2713
2524
|
/**
|
|
2714
2525
|
* Debug draw draws objects in wireframe.
|
|
2715
2526
|
* **Note:** {@link set_debug_generate_wireframes} must be called before loading any meshes for wireframes to be visible when using the Compatibility renderer.
|
|
2716
|
-
* **Note:** In the Compatibility renderer, backfaces are always visible when using wireframe rendering. In the Forward+ and Mobile renderers, wireframes follow the material's backface culling properties instead.
|
|
2717
2527
|
*/
|
|
2718
2528
|
readonly VIEWPORT_DEBUG_DRAW_WIREFRAME: int;
|
|
2719
2529
|
/**
|
|
@@ -2927,23 +2737,18 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2927
2737
|
/** Use the {@link Sky} for reflections regardless of what the background is. */
|
|
2928
2738
|
readonly ENV_REFLECTION_SOURCE_SKY: int;
|
|
2929
2739
|
// enum EnvironmentGlowBlendMode
|
|
2930
|
-
/**
|
|
2740
|
+
/** Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources. */
|
|
2931
2741
|
readonly ENV_GLOW_BLEND_MODE_ADDITIVE: int;
|
|
2932
|
-
/**
|
|
2933
|
-
* Adds the glow effect to the scene after modifying the glow influence based on the scene value; dark values will be highly influenced by glow and bright values will not be influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. {@link Environment.tonemap_white} is used to determine the maximum scene value where the glow should have no influence. When {@link Environment.tonemap_mode} is set to {@link Environment.TONE_MAPPER_LINEAR} and {@link Viewport.use_hdr_2d} is `true`, the parent window's {@link Window.get_output_max_linear_value} will be used as the maximum scene value.
|
|
2934
|
-
*/
|
|
2742
|
+
/** Screen glow blending mode. Increases brightness, used frequently with bloom. */
|
|
2935
2743
|
readonly ENV_GLOW_BLEND_MODE_SCREEN: int;
|
|
2936
|
-
/**
|
|
2937
|
-
* Adds the glow effect to the tonemapped image after modifying the glow influence based on the image value; dark values and bright values will not be influenced by glow and mid-range values will be highly influenced by glow. This approach avoids bright values becoming overly bright from the glow effect. The glow will have the largest influence on image values of `0.25` and will have no influence when applied to image values greater than `1.0`.
|
|
2938
|
-
* **Note:** This blend mode does not support HDR output because expects a maximum output value of `1.0`. It is recommended to use a different blend mode when rendering to an HDR screen.
|
|
2939
|
-
*/
|
|
2744
|
+
/** Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). */
|
|
2940
2745
|
readonly ENV_GLOW_BLEND_MODE_SOFTLIGHT: int;
|
|
2941
2746
|
/**
|
|
2942
|
-
* Replaces all pixels' color by the glow
|
|
2747
|
+
* Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness.
|
|
2943
2748
|
*/
|
|
2944
2749
|
readonly ENV_GLOW_BLEND_MODE_REPLACE: int;
|
|
2945
2750
|
/**
|
|
2946
|
-
* Mixes the glow
|
|
2751
|
+
* Mixes the glow with the underlying color to avoid increasing brightness as much while still maintaining a glow effect.
|
|
2947
2752
|
*/
|
|
2948
2753
|
readonly ENV_GLOW_BLEND_MODE_MIX: int;
|
|
2949
2754
|
// enum EnvironmentFogMode
|
|
@@ -2965,13 +2770,11 @@ declare interface RenderingServer extends GodotObject {
|
|
|
2965
2770
|
readonly ENV_TONE_MAPPER_REINHARD: int;
|
|
2966
2771
|
/**
|
|
2967
2772
|
* Uses a film-like tonemapping curve to prevent clipping of bright values and provide better contrast than {@link ENV_TONE_MAPPER_REINHARD}. Slightly slower than {@link ENV_TONE_MAPPER_REINHARD}.
|
|
2968
|
-
* **Note:** This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.
|
|
2969
2773
|
*/
|
|
2970
2774
|
readonly ENV_TONE_MAPPER_FILMIC: int;
|
|
2971
2775
|
/**
|
|
2972
2776
|
* Uses a high-contrast film-like tonemapping curve and desaturates bright values for a more realistic appearance. Slightly slower than {@link ENV_TONE_MAPPER_FILMIC}.
|
|
2973
2777
|
* **Note:** This tonemapping operator is called "ACES Fitted" in Godot 3.x.
|
|
2974
|
-
* **Note:** This tonemapper does not support HDR output because it produces output in the SDR range. It is recommended to use a different tonemapper when rendering to an HDR screen.
|
|
2975
2778
|
*/
|
|
2976
2779
|
readonly ENV_TONE_MAPPER_ACES: int;
|
|
2977
2780
|
/**
|
|
@@ -3486,15 +3289,10 @@ declare interface RenderingServer extends GodotObject {
|
|
|
3486
3289
|
* The number of custom data arrays available ({@link ARRAY_CUSTOM0}, {@link ARRAY_CUSTOM1}, {@link ARRAY_CUSTOM2}, {@link ARRAY_CUSTOM3}).
|
|
3487
3290
|
*/
|
|
3488
3291
|
readonly ARRAY_CUSTOM_COUNT: int;
|
|
3489
|
-
/** Particle starts at the specified position. */
|
|
3490
3292
|
readonly PARTICLES_EMIT_FLAG_POSITION: int;
|
|
3491
|
-
/** Particle starts with specified rotation and scale. */
|
|
3492
3293
|
readonly PARTICLES_EMIT_FLAG_ROTATION_SCALE: int;
|
|
3493
|
-
/** Particle starts with the specified velocity vector, which defines the emission direction and speed. */
|
|
3494
3294
|
readonly PARTICLES_EMIT_FLAG_VELOCITY: int;
|
|
3495
|
-
/** Particle starts with specified color. */
|
|
3496
3295
|
readonly PARTICLES_EMIT_FLAG_COLOR: int;
|
|
3497
|
-
/** Particle starts with specified `CUSTOM` data. */
|
|
3498
3296
|
readonly PARTICLES_EMIT_FLAG_CUSTOM: int;
|
|
3499
3297
|
}
|
|
3500
3298
|
declare const RenderingServer: RenderingServer;
|
|
@@ -19,7 +19,7 @@ declare class Resource extends RefCounted {
|
|
|
19
19
|
*/
|
|
20
20
|
resource_path: string;
|
|
21
21
|
/**
|
|
22
|
-
* A unique identifier relative to this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a {@link PackedScene}. If the resource is not inside a scene, this property is empty by default.
|
|
22
|
+
* A unique identifier relative to the this resource's scene. If left empty, the ID is automatically generated when this resource is saved inside a {@link PackedScene}. If the resource is not inside a scene, this property is empty by default.
|
|
23
23
|
* **Note:** When the {@link PackedScene} is saved, if multiple resources in the same scene use the same ID, only the earliest resource in the scene hierarchy keeps the original ID. The other resources are assigned new IDs from {@link generate_scene_unique_id}.
|
|
24
24
|
* **Note:** Setting this property does not emit the {@link changed} signal.
|
|
25
25
|
* **Warning:** When setting, the ID must only consist of letters, numbers, and underscores. Otherwise, it will fail and default to a randomly generated ID.
|
|
@@ -118,7 +118,7 @@ declare class Resource extends RefCounted {
|
|
|
118
118
|
|
|
119
119
|
// enum DeepDuplicateMode
|
|
120
120
|
/**
|
|
121
|
-
* No
|
|
121
|
+
* No subresorces at all are duplicated. This is useful even in a deep duplication to have all the arrays and dictionaries duplicated but still pointing to the original resources.
|
|
122
122
|
*/
|
|
123
123
|
static readonly DEEP_DUPLICATE_NONE: int;
|
|
124
124
|
/** Only subresources without a path or with a scene-local path will be duplicated. */
|
|
@@ -39,8 +39,6 @@ declare class ResourceImporterDynamicFont extends ResourceImporter {
|
|
|
39
39
|
* **None:** Smoothest appearance, which can make the font look blurry at small sizes.
|
|
40
40
|
* **Light:** Sharp result by snapping glyph edges to pixels on the Y axis only.
|
|
41
41
|
* **Normal:** Sharpest by snapping glyph edges to pixels on both X and Y axes.
|
|
42
|
-
* **Light (Except Pixel Fonts):** **Disabled** for pixel style fonts (each glyph's contours contain only straight horizontal and vertical lines), **Light** for other fonts.
|
|
43
|
-
* **Normal (Except Pixel Fonts):** **Disabled** for pixel style fonts (each glyph's contours contain only straight horizontal and vertical lines), **Normal** for other fonts.
|
|
44
42
|
*/
|
|
45
43
|
hinting: int;
|
|
46
44
|
/**
|
|
@@ -90,7 +88,7 @@ declare class ResourceImporterDynamicFont extends ResourceImporter {
|
|
|
90
88
|
* **Auto:** Use subpixel positioning at small font sizes (the chosen quality varies depending on font size). Large fonts will not use subpixel positioning. This is a good tradeoff between performance and quality.
|
|
91
89
|
* **One Half of a Pixel:** Always perform intermediate subpixel positioning regardless of font size. High quality, slow rendering.
|
|
92
90
|
* **One Quarter of a Pixel:** Always perform precise subpixel positioning regardless of font size. Highest quality, slowest rendering.
|
|
93
|
-
* **Auto (Except Pixel Fonts):** **Disabled** for pixel style fonts (each glyph
|
|
91
|
+
* **Auto (Except Pixel Fonts):** **Disabled** for the pixel style fonts (each glyph contours contain only straight horizontal and vertical lines), **Auto** for the other fonts.
|
|
94
92
|
*/
|
|
95
93
|
subpixel_positioning: int;
|
|
96
94
|
}
|
|
@@ -9,16 +9,6 @@ declare class ResourceImporterSVG extends ResourceImporter {
|
|
|
9
9
|
color_map: Dictionary;
|
|
10
10
|
/** If `true`, uses lossless compression for the SVG source. */
|
|
11
11
|
compress: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* If `true`, puts pixels of the same surrounding color in transition from transparent to opaque areas. For textures displayed with bilinear filtering, this helps to reduce the outline effect when exporting images from an image editor.
|
|
14
|
-
*/
|
|
15
|
-
fix_alpha_border: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* An alternative to fixing darkened borders with {@link fix_alpha_border} is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly:
|
|
18
|
-
* - In 2D, a {@link CanvasItemMaterial} will need to be created and configured to use the {@link CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA} blend mode on {@link CanvasItem}s that use this texture. In custom `canvas_item` shaders, `render_mode blend_premul_alpha;` should be used.
|
|
19
|
-
* - In 3D, a {@link BaseMaterial3D} will need to be created and configured to use the {@link BaseMaterial3D.BLEND_MODE_PREMULT_ALPHA} blend mode on materials that use this texture. In custom `spatial` shaders, `render_mode blend_premul_alpha;` should be used.
|
|
20
|
-
*/
|
|
21
|
-
premult_alpha: boolean;
|
|
22
12
|
/** Overrides texture saturation. */
|
|
23
13
|
saturation: float;
|
|
24
14
|
}
|
|
@@ -61,7 +61,7 @@ declare class ResourceImporterTexture extends ResourceImporter {
|
|
|
61
61
|
*/
|
|
62
62
|
'editor/convert_colors_with_editor_theme': boolean;
|
|
63
63
|
/**
|
|
64
|
-
* If `true`, scales the imported image to match {@link EditorSettings.interface/editor/
|
|
64
|
+
* If `true`, scales the imported image to match {@link EditorSettings.interface/editor/custom_display_scale}. This should be enabled for editor plugin icons and custom class icons, but should be left disabled otherwise.
|
|
65
65
|
* **Note:** Only available for SVG images.
|
|
66
66
|
*/
|
|
67
67
|
'editor/scale_with_editor_scale': boolean;
|
|
@@ -158,7 +158,7 @@ declare class ResourceImporterTexture extends ResourceImporter {
|
|
|
158
158
|
'process/normal_map_invert_y': boolean;
|
|
159
159
|
/**
|
|
160
160
|
* An alternative to fixing darkened borders with {@link process/fix_alpha_border} is to use premultiplied alpha. By enabling this option, the texture will be converted to this format. A premultiplied alpha texture requires specific materials to be displayed correctly:
|
|
161
|
-
* - In 2D, a {@link CanvasItemMaterial} will need to be created and configured to use the {@link CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA} blend mode on {@link CanvasItem}s that use this texture. In custom
|
|
161
|
+
* - In 2D, a {@link CanvasItemMaterial} will need to be created and configured to use the {@link CanvasItemMaterial.BLEND_MODE_PREMULT_ALPHA} blend mode on {@link CanvasItem}s that use this texture. In custom `@canvas_item` shaders, `render_mode blend_premul_alpha;` should be used.
|
|
162
162
|
* - In 3D, a {@link BaseMaterial3D} will need to be created and configured to use the {@link BaseMaterial3D.BLEND_MODE_PREMULT_ALPHA} blend mode on materials that use this texture. In custom `spatial` shaders, `render_mode blend_premul_alpha;` should be used.
|
|
163
163
|
*/
|
|
164
164
|
'process/premult_alpha': boolean;
|