@ringozz/godot 4.7.2-583 → 4.7.2-592
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 +19 -1
- package/gen/classes/ArrayOccluder3D.ts +1 -1
- package/gen/classes/CPUParticles2D.ts +3 -3
- package/gen/classes/CPUParticles3D.ts +3 -3
- package/gen/classes/CSGPolygon3D.ts +1 -1
- package/gen/classes/CollisionPolygon2D.ts +1 -1
- package/gen/classes/CollisionPolygon3D.ts +1 -1
- package/gen/classes/ColorPalette.ts +1 -1
- package/gen/classes/ConcavePolygonShape2D.ts +1 -1
- package/gen/classes/ConcavePolygonShape3D.ts +1 -1
- package/gen/classes/ConvexPolygonShape2D.ts +1 -1
- package/gen/classes/ConvexPolygonShape3D.ts +1 -1
- package/gen/classes/FontVariation.ts +1 -1
- package/gen/classes/Gradient.ts +1 -1
- package/gen/classes/Line2D.ts +1 -1
- package/gen/classes/MultiMesh.ts +4 -4
- package/gen/classes/NavigationMesh.ts +1 -1
- package/gen/classes/NavigationObstacle2D.ts +1 -1
- package/gen/classes/NavigationObstacle3D.ts +1 -1
- package/gen/classes/NavigationPathQueryResult2D.ts +1 -1
- package/gen/classes/NavigationPathQueryResult3D.ts +1 -1
- package/gen/classes/NavigationPolygon.ts +1 -1
- package/gen/classes/OccluderPolygon2D.ts +1 -1
- package/gen/classes/Polygon2D.ts +3 -3
- package/gen/classes/PolygonOccluder3D.ts +1 -1
- package/gen/classes/Window.ts +1 -1
- package/gen/index.ts +0 -3
- package/gen/utility-functions.ts +114 -114
- package/gen/value-types/AABB.ts +267 -277
- package/gen/value-types/Basis.ts +313 -264
- package/gen/value-types/Color.ts +398 -268
- package/gen/value-types/Plane.ts +121 -125
- package/gen/value-types/Projection.ts +178 -126
- package/gen/value-types/Quaternion.ts +180 -179
- package/gen/value-types/Rect2.ts +169 -171
- package/gen/value-types/Rect2i.ts +148 -150
- package/gen/value-types/Transform2D.ts +192 -194
- package/gen/value-types/Transform3D.ts +133 -126
- package/gen/value-types/Vector2.ts +370 -354
- package/gen/value-types/Vector2i.ts +192 -191
- package/gen/value-types/Vector3.ts +354 -354
- package/gen/value-types/Vector3i.ts +187 -192
- package/gen/value-types/Vector4.ts +263 -274
- package/gen/value-types/Vector4i.ts +187 -198
- package/gen/value-types/index.ts +16 -16
- package/package.json +20 -4
- package/src/debug.ts +30 -27
- package/src/index.ts +0 -2
- package/src/runtime.ts +16 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Auto-generated from extension_api.json - DO NOT EDIT
|
|
2
2
|
// Generated by dev/codegen.ts
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { _V } from '../../src/runtime.ts';
|
|
5
5
|
import type { GodotArray, GodotDictionary, PackedVector3Array, Variant } from '../heap-types/index.ts';
|
|
6
|
-
import type { AABB, Basis, Plane, Projection, Vector3 } from '
|
|
6
|
+
import type { AABB, Basis, Plane, Projection, Vector3 } from './index.ts';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The {@link Transform3D} built-in {@link Variant} type is a 3×4 matrix representing a transformation in 3D space. It contains a {@link Basis}, which on its own can represent rotation, scale, and shear. Additionally, combined with its own {@link origin}, the transform can also represent a translation.
|
|
@@ -11,127 +11,134 @@ import type { AABB, Basis, Plane, Projection, Vector3 } from '../value-types/ind
|
|
|
11
11
|
* **Note:** Godot uses a [right-handed coordinate system](https://en.wikipedia.org/wiki/Right-hand_rule), which is a common standard. For directions, the convention for built-in types like {@link Camera3D} is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [3D asset direction conventions]($DOCS_URL/tutorials/assets_pipeline/importing_3d_scenes/model_export_considerations.html#d-asset-direction-conventions) tutorial.
|
|
12
12
|
* **Note:** In a boolean context, a Transform3D will evaluate to `false` if it's equal to {@link IDENTITY}. Otherwise, a Transform3D will always evaluate to `true`.
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
14
|
+
export type Transform3D = [x: Vector3, y: Vector3, z: Vector3, origin: Vector3];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Returns the [inverted version of this transform](https://en.wikipedia.org/wiki/Invertible_matrix). See also {@link Basis.inverse}.
|
|
18
|
+
* **Note:** For this method to return correctly, the transform's {@link basis} needs to be *orthonormal* (see {@link orthonormalized}). That means the basis should only represent a rotation. If it does not, use {@link affineInverse} instead.
|
|
19
|
+
*/
|
|
20
|
+
export function inverse(self: Transform3D): Transform3D { return _V(18, 7714, self) as Transform3D; }
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns the inverted version of this transform. Unlike {@link inverse}, this method works with almost any {@link basis}, including non-uniform ones, but is slower. See also {@link Basis.inverse}.
|
|
24
|
+
* **Note:** For this method to return correctly, the transform's {@link basis} needs to have a determinant that is not exactly `0.0` (see {@link Basis.determinant}).
|
|
25
|
+
*/
|
|
26
|
+
export function affineInverse(self: Transform3D): Transform3D { return _V(18, 1354, self) as Transform3D; }
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns a copy of this transform with its {@link basis} orthonormalized. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the axes have a length of `1.0`), which also means it can only represent a rotation. See also {@link Basis.orthonormalized}.
|
|
30
|
+
*/
|
|
31
|
+
export function orthonormalized(self: Transform3D): Transform3D { return _V(18, 9230, self) as Transform3D; }
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Returns a copy of this transform rotated around the given `axis` by the given `angle` (in radians).
|
|
35
|
+
* The `axis` must be a normalized vector (see {@link Vector3.normalized}). If `angle` is positive, the basis is rotated counter-clockwise around the axis.
|
|
36
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding rotation transform `R` from the left, i.e., `R * X`.
|
|
37
|
+
* This can be seen as transforming with respect to the global/parent frame.
|
|
38
|
+
*/
|
|
39
|
+
export function rotated(self: Transform3D, axis: Vector3, angle: number): Transform3D { return _V(18, 10144, self, axis, angle) as Transform3D; }
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns a copy of this transform rotated around the given `axis` by the given `angle` (in radians).
|
|
43
|
+
* The `axis` must be a normalized vector in the transform's local coordinate system. For example, to rotate around the local X-axis, use {@link Vector3.RIGHT}.
|
|
44
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding rotation transform `R` from the right, i.e., `X * R`.
|
|
45
|
+
* This can be seen as transforming with respect to the local frame.
|
|
46
|
+
*/
|
|
47
|
+
export function rotatedLocal(self: Transform3D, axis: Vector3, angle: number): Transform3D { return _V(18, 10145, self, axis, angle) as Transform3D; }
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Returns a copy of this transform scaled by the given `scale` factor.
|
|
51
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding scaling transform `S` from the left, i.e., `S * X`.
|
|
52
|
+
* This can be seen as transforming with respect to the global/parent frame.
|
|
53
|
+
*/
|
|
54
|
+
export function scaled(self: Transform3D, scale: Vector3): Transform3D { return _V(18, 10232, self, scale) as Transform3D; }
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns a copy of this transform scaled by the given `scale` factor.
|
|
58
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding scaling transform `S` from the right, i.e., `X * S`.
|
|
59
|
+
* This can be seen as transforming with respect to the local frame.
|
|
60
|
+
*/
|
|
61
|
+
export function scaledLocal(self: Transform3D, scale: Vector3): Transform3D { return _V(18, 10233, self, scale) as Transform3D; }
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Returns a copy of this transform translated by the given `offset`.
|
|
65
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding translation transform `T` from the left, i.e., `T * X`.
|
|
66
|
+
* This can be seen as transforming with respect to the global/parent frame.
|
|
67
|
+
*/
|
|
68
|
+
export function translated(self: Transform3D, offset: Vector3): Transform3D { return _V(18, 14398, self, offset) as Transform3D; }
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Returns a copy of this transform translated by the given `offset`.
|
|
72
|
+
* This method is an optimized version of multiplying the given transform `X` with a corresponding translation transform `T` from the right, i.e., `X * T`.
|
|
73
|
+
* This can be seen as transforming with respect to the local frame.
|
|
74
|
+
*/
|
|
75
|
+
export function translatedLocal(self: Transform3D, offset: Vector3): Transform3D { return _V(18, 14399, self, offset) as Transform3D; }
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Returns a copy of this transform rotated so that the forward axis (-Z) points towards the `target` position.
|
|
79
|
+
* The up axis (+Y) points as close to the `up` vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The `target` and `up` vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space.
|
|
80
|
+
* If `useModelFront` is `true`, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the `target` position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
|
|
81
|
+
*/
|
|
82
|
+
export function lookingAt(self: Transform3D, target: Vector3, up?: Vector3 /* = Vector3(0, 1, 0) */, useModelFront?: boolean /* = false */): Transform3D { return _V(18, 8708, self, target, up, useModelFront) as Transform3D; }
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Returns the result of the linear interpolation between this transform and `xform` by the given `weight`.
|
|
86
|
+
* The `weight` should be between `0.0` and `1.0` (inclusive). Values outside this range are allowed and can be used to perform *extrapolation* instead.
|
|
87
|
+
*/
|
|
88
|
+
export function interpolateWith(self: Transform3D, xform: Transform3D, weight: number): Transform3D { return _V(18, 7694, self, xform, weight) as Transform3D; }
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Returns `true` if this transform and `xform` are approximately equal, by running {@link isEqualApprox} on each component.
|
|
92
|
+
*/
|
|
93
|
+
export function isEqualApprox(self: Transform3D, xform: Transform3D): boolean { return _V(18, 7938, self, xform) as boolean; }
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Returns `true` if this transform is finite, by calling {@link isFinite} on each component.
|
|
97
|
+
*/
|
|
98
|
+
export function isFinite(self: Transform3D): boolean { return _V(18, 7951, self) as boolean; }
|
|
99
|
+
|
|
100
|
+
export function equals(a: Transform3D, b: Variant | Transform3D): boolean { return _V(18, -1, a, b) as boolean; }
|
|
101
|
+
|
|
102
|
+
export function notEquals(a: Transform3D, b: Variant | Transform3D): boolean { return _V(18, -2, a, b) as boolean; }
|
|
103
|
+
|
|
104
|
+
export function not(self: Transform3D): boolean { return _V(18, -24, self, undefined) as boolean; }
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Multiplies all components of the {@link Transform3D} by the given {@link int}, including the {@link origin}. This affects the transform's scale uniformly, scaling the {@link basis}.
|
|
108
|
+
*/
|
|
109
|
+
export function mul(a: Transform3D, b: number | Vector3 | Plane | AABB | Transform3D | PackedVector3Array): Transform3D { return _V(18, -9, a, b) as Transform3D; }
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Divides all components of the {@link Transform3D} by the given {@link int}, including the {@link origin}. This affects the transform's scale uniformly, scaling the {@link basis}.
|
|
113
|
+
*/
|
|
114
|
+
export function div(a: Transform3D, b: number): Transform3D { return _V(18, -10, a, b) as Transform3D; }
|
|
115
|
+
|
|
116
|
+
export function contains(a: Transform3D, b: GodotDictionary | GodotArray): boolean { return _V(18, -25, a, b) as boolean; }
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Constructs a {@link Transform3D} identical to {@link IDENTITY}.
|
|
120
|
+
* **Note:** In C#, this constructs a {@link Transform3D} with its {@link origin} and the components of its {@link basis} set to {@link Vector3.ZERO}.
|
|
121
|
+
*/
|
|
122
|
+
export function create(): Transform3D { return _V(18, -4096, 0) as Transform3D; }
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Constructs a {@link Transform3D} as a copy of the given {@link Transform3D}.
|
|
126
|
+
*/
|
|
127
|
+
export function fromTransform3D(from: Transform3D): Transform3D { return _V(18, -4096, 1, from) as Transform3D; }
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Constructs a {@link Transform3D} from a {@link Basis} and {@link Vector3}.
|
|
131
|
+
*/
|
|
132
|
+
export function fromBasisOrigin(basis: Basis, origin: Vector3): Transform3D { return _V(18, -4096, 2, basis, origin) as Transform3D; }
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Constructs a {@link Transform3D} from four {@link Vector3} values (also called matrix columns).
|
|
136
|
+
* The first three arguments are the {@link basis}'s axes ({@link Basis.x}, {@link Basis.y}, and {@link Basis.z}).
|
|
137
|
+
*/
|
|
138
|
+
export function fromXAxisYAxisZAxisOrigin(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3, origin: Vector3): Transform3D { return _V(18, -4096, 3, xAxis, yAxis, zAxis, origin) as Transform3D; }
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Constructs a {@link Transform3D} from a {@link Projection}. Because {@link Transform3D} is a 3×4 matrix and {@link Projection} is a 4×4 matrix, this operation trims the last row of the projection matrix (`from.x.w`, `from.y.w`, `from.z.w`, and `from.w.w` are not included in the new transform).
|
|
142
|
+
*/
|
|
143
|
+
export function fromProjection(from: Projection): Transform3D { return _V(18, -4096, 4, from) as Transform3D; }
|
|
144
|
+
|