@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.
Files changed (49) hide show
  1. package/README.md +19 -1
  2. package/gen/classes/ArrayOccluder3D.ts +1 -1
  3. package/gen/classes/CPUParticles2D.ts +3 -3
  4. package/gen/classes/CPUParticles3D.ts +3 -3
  5. package/gen/classes/CSGPolygon3D.ts +1 -1
  6. package/gen/classes/CollisionPolygon2D.ts +1 -1
  7. package/gen/classes/CollisionPolygon3D.ts +1 -1
  8. package/gen/classes/ColorPalette.ts +1 -1
  9. package/gen/classes/ConcavePolygonShape2D.ts +1 -1
  10. package/gen/classes/ConcavePolygonShape3D.ts +1 -1
  11. package/gen/classes/ConvexPolygonShape2D.ts +1 -1
  12. package/gen/classes/ConvexPolygonShape3D.ts +1 -1
  13. package/gen/classes/FontVariation.ts +1 -1
  14. package/gen/classes/Gradient.ts +1 -1
  15. package/gen/classes/Line2D.ts +1 -1
  16. package/gen/classes/MultiMesh.ts +4 -4
  17. package/gen/classes/NavigationMesh.ts +1 -1
  18. package/gen/classes/NavigationObstacle2D.ts +1 -1
  19. package/gen/classes/NavigationObstacle3D.ts +1 -1
  20. package/gen/classes/NavigationPathQueryResult2D.ts +1 -1
  21. package/gen/classes/NavigationPathQueryResult3D.ts +1 -1
  22. package/gen/classes/NavigationPolygon.ts +1 -1
  23. package/gen/classes/OccluderPolygon2D.ts +1 -1
  24. package/gen/classes/Polygon2D.ts +3 -3
  25. package/gen/classes/PolygonOccluder3D.ts +1 -1
  26. package/gen/classes/Window.ts +1 -1
  27. package/gen/index.ts +0 -3
  28. package/gen/utility-functions.ts +114 -114
  29. package/gen/value-types/AABB.ts +267 -277
  30. package/gen/value-types/Basis.ts +313 -264
  31. package/gen/value-types/Color.ts +398 -268
  32. package/gen/value-types/Plane.ts +121 -125
  33. package/gen/value-types/Projection.ts +178 -126
  34. package/gen/value-types/Quaternion.ts +180 -179
  35. package/gen/value-types/Rect2.ts +169 -171
  36. package/gen/value-types/Rect2i.ts +148 -150
  37. package/gen/value-types/Transform2D.ts +192 -194
  38. package/gen/value-types/Transform3D.ts +133 -126
  39. package/gen/value-types/Vector2.ts +370 -354
  40. package/gen/value-types/Vector2i.ts +192 -191
  41. package/gen/value-types/Vector3.ts +354 -354
  42. package/gen/value-types/Vector3i.ts +187 -192
  43. package/gen/value-types/Vector4.ts +263 -274
  44. package/gen/value-types/Vector4i.ts +187 -198
  45. package/gen/value-types/index.ts +16 -16
  46. package/package.json +20 -4
  47. package/src/debug.ts +30 -27
  48. package/src/index.ts +0 -2
  49. 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 { GodotVar, _C, _R, _get, _set } from '../../src/runtime.ts';
4
+ import { _V } from '../../src/runtime.ts';
5
5
  import type { GodotArray, GodotDictionary, Variant } from '../heap-types/index.ts';
6
- import type { Quaternion, Vector3 } from '../value-types/index.ts';
6
+ import type { Quaternion, Vector3 } from './index.ts';
7
7
 
8
8
  /**
9
9
  * The {@link Basis} built-in {@link Variant} type is a 3×3 [matrix](https://en.wikipedia.org/wiki/Matrix_(mathematics)) used to represent 3D rotation, scale, and shear. It is frequently used within a {@link Transform3D}.
@@ -19,265 +19,314 @@ import type { Quaternion, Vector3 } from '../value-types/index.ts';
19
19
  * **Note:** The basis matrices are exposed as [column-major](https://www.mindcontrol.org/~hplus/graphics/matrix-layout.html) order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX.
20
20
  * **Note:** In a boolean context, a basis will evaluate to `false` if it's equal to {@link IDENTITY}. Otherwise, a basis will always evaluate to `true`.
21
21
  */
22
- export class Basis extends GodotVar {
23
- /**
24
- * The basis's X axis, and the column `0` of the matrix.
25
- * On the identity basis, this vector points right ({@link Vector3.RIGHT}).
26
- */
27
- get x(): Vector3 { return _get(this, 14941) as Vector3; }
28
- set x(v: Vector3) { _set(this, 14941, v); }
29
-
30
- /**
31
- * The basis's Y axis, and the column `1` of the matrix.
32
- * On the identity basis, this vector points up ({@link Vector3.UP}).
33
- */
34
- get y(): Vector3 { return _get(this, 14952) as Vector3; }
35
- set y(v: Vector3) { _set(this, 14952, v); }
36
-
37
- /**
38
- * The basis's Z axis, and the column `2` of the matrix.
39
- * On the identity basis, this vector points back ({@link Vector3.BACK}).
40
- */
41
- get z(): Vector3 { return _get(this, 14956) as Vector3; }
42
- set z(v: Vector3) { _set(this, 14956, v); }
43
-
44
- constructor();
45
- constructor(from: Basis);
46
- constructor(from: Quaternion);
47
- constructor(axis: Vector3, angle: number);
48
- constructor(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3);
49
- constructor(...args: any[]) { super(17, ...args); }
50
-
51
- /**
52
- * Returns the [inverse of this basis's matrix](https://en.wikipedia.org/wiki/Invertible_matrix).
53
- */
54
- inverse(): Basis { return _C(this, 7714) as Basis; }
55
-
56
- /**
57
- * Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns.
58
- *
59
- *
60
- * ```gdscript
61
- *
62
- * var my_basis = Basis(
63
- * Vector3(1, 2, 3),
64
- * Vector3(4, 5, 6),
65
- * Vector3(7, 8, 9)
66
- * )
67
- * my_basis = my_basis.transposed()
68
- *
69
- * print(my_basis.x) # Prints (1.0, 4.0, 7.0)
70
- * print(my_basis.y) # Prints (2.0, 5.0, 8.0)
71
- * print(my_basis.z) # Prints (3.0, 6.0, 9.0)
72
- *
73
- * ```
74
- */
75
- transposed(): Basis { return _C(this, 14405) as Basis; }
76
-
77
- /**
78
- * Returns the orthonormalized version of this basis. 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.
79
- * It is often useful to call this method to avoid rounding errors on a rotating basis:
80
- *
81
- *
82
- * ```gdscript
83
- *
84
- * # Rotate this Node3D every frame.
85
- * func _process(delta):
86
- * basis = basis.rotated(Vector3.UP, TAU * delta)
87
- * basis = basis.rotated(Vector3.RIGHT, TAU * delta)
88
- * basis = basis.orthonormalized()
89
- *
90
- * ```
91
- */
92
- orthonormalized(): Basis { return _C(this, 9230) as Basis; }
93
-
94
- /**
95
- * Returns the [determinant](https://en.wikipedia.org/wiki/Determinant) of this basis's matrix. For advanced math, this number can be used to determine a few attributes:
96
- * - If the determinant is exactly `0.0`, the basis is not invertible (see {@link inverse}).
97
- * - If the determinant is a negative number, the basis represents a negative scale.
98
- * **Note:** If the basis's scale is the same for every axis, its determinant is always that scale by the power of 3.
99
- */
100
- determinant(): number { return _C(this, 2773) as number; }
101
-
102
- /**
103
- * Returns a copy of this basis rotated around the given `axis` by the given `angle` (in radians).
104
- * The `axis` must be a normalized vector (see {@link Vector3.normalized}). If `angle` is positive, the basis is rotated counter-clockwise around the axis.
105
- *
106
- *
107
- * ```gdscript
108
- *
109
- * var my_basis = Basis.IDENTITY
110
- * var angle = TAU / 2
111
- *
112
- * my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw).
113
- * my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch).
114
- * my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll).
115
- *
116
- * ```
117
- */
118
- rotated(axis: Vector3, angle: number): Basis { return _C(this, 10144, axis, angle) as Basis; }
119
-
120
- /**
121
- * Returns this basis with each axis's components scaled by the given `scale`'s components.
122
- * The basis matrix's rows are multiplied by `scale`'s components. This operation is a global scale (relative to the parent).
123
- *
124
- *
125
- * ```gdscript
126
- *
127
- * var my_basis = Basis(
128
- * Vector3(1, 1, 1),
129
- * Vector3(2, 2, 2),
130
- * Vector3(3, 3, 3)
131
- * )
132
- * my_basis = my_basis.scaled(Vector3(0, 2, -2))
133
- *
134
- * print(my_basis.x) # Prints (0.0, 2.0, -2.0)
135
- * print(my_basis.y) # Prints (0.0, 4.0, -4.0)
136
- * print(my_basis.z) # Prints (0.0, 6.0, -6.0)
137
- *
138
- * ```
139
- */
140
- scaled(scale: Vector3): Basis { return _C(this, 10232, scale) as Basis; }
141
-
142
- /**
143
- * Returns this basis with each axis scaled by the corresponding component in the given `scale`.
144
- * The basis matrix's columns are multiplied by `scale`'s components. This operation is a local scale (relative to self).
145
- *
146
- *
147
- * ```gdscript
148
- *
149
- * var my_basis = Basis(
150
- * Vector3(1, 1, 1),
151
- * Vector3(2, 2, 2),
152
- * Vector3(3, 3, 3)
153
- * )
154
- * my_basis = my_basis.scaled_local(Vector3(0, 2, -2))
155
- *
156
- * print(my_basis.x) # Prints (0.0, 0.0, 0.0)
157
- * print(my_basis.y) # Prints (4.0, 4.0, 4.0)
158
- * print(my_basis.z) # Prints (-6.0, -6.0, -6.0)
159
- *
160
- * ```
161
- */
162
- scaledLocal(scale: Vector3): Basis { return _C(this, 10233, scale) as Basis; }
163
-
164
- /**
165
- * Returns the length of each axis of this basis, as a {@link Vector3}. If the basis is not sheared, this value is the scaling factor. It is not affected by rotation.
166
- *
167
- *
168
- * ```gdscript
169
- *
170
- * var my_basis = Basis(
171
- * Vector3(2, 0, 0),
172
- * Vector3(0, 4, 0),
173
- * Vector3(0, 0, 8)
174
- * )
175
- * # Rotating the Basis in any way preserves its scale.
176
- * my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
177
- * my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
178
- *
179
- * print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0)
180
- *
181
- * ```
182
- *
183
- *
184
- *
185
- * **Note:** If the value returned by {@link determinant} is negative, the scale is also negative.
186
- */
187
- getScale(): Vector3 { return _C(this, 6236) as Vector3; }
188
-
189
- /**
190
- * Returns this basis's rotation as a {@link Vector3} of [Euler angles](https://en.wikipedia.org/wiki/Euler_angles), in radians. For the returned value:
191
- * - The {@link Vector3.x} contains the angle around the {@link x} axis (pitch);
192
- * - The {@link Vector3.y} contains the angle around the {@link y} axis (yaw);
193
- * - The {@link Vector3.z} contains the angle around the {@link z} axis (roll).
194
- * The order of each consecutive rotation can be changed with `order` (see {@link EulerOrder} constants). In Godot, Euler angles always use intrinsic order. By default, the intrinsic YXZ convention is used ({@link EULER_ORDER_YXZ}): since we are decomposing, local Z (roll) is calculated first, then local X (pitch), and lastly local Y (yaw). When using the opposite method {@link fromEuler} to compose a rotation, this order is reversed.
195
- * **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see {@link orthonormalized}).
196
- * **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the {@link getRotationQuaternion} method instead, which returns a {@link Quaternion}.
197
- * **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the {@link Node3D.rotation} property.
198
- */
199
- getEuler(order?: number /* = 2 */): Vector3 { return _C(this, 4689, order) as Vector3; }
200
-
201
- /**
202
- * Returns the transposed dot product between `with` and the {@link x} axis (see {@link transposed}).
203
- * This is equivalent to `basis.x.dot(vector)`.
204
- */
205
- tdotx(_with: Vector3): number { return _C(this, 14141, _with) as number; }
206
-
207
- /**
208
- * Returns the transposed dot product between `with` and the {@link y} axis (see {@link transposed}).
209
- * This is equivalent to `basis.y.dot(vector)`.
210
- */
211
- tdoty(_with: Vector3): number { return _C(this, 14142, _with) as number; }
212
-
213
- /**
214
- * Returns the transposed dot product between `with` and the {@link z} axis (see {@link transposed}).
215
- * This is equivalent to `basis.z.dot(vector)`.
216
- */
217
- tdotz(_with: Vector3): number { return _C(this, 14143, _with) as number; }
218
-
219
- /**
220
- * Performs a spherical-linear interpolation with the `to` basis, given a `weight`. Both this basis and `to` should represent a rotation.
221
- * **Example:** Smoothly rotate a {@link Node3D} to the target basis over time, with a {@link Tween}:
222
- *
223
- * ```text
224
- *
225
- * var start_basis = Basis.IDENTITY
226
- * var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)
227
- *
228
- * func _ready():
229
- * create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO)
230
- *
231
- * func interpolate(weight):
232
- * basis = start_basis.slerp(target_basis, weight)
233
- *
234
- * ```
235
- */
236
- slerp(to: Basis, weight: number): Basis { return _C(this, 13656, to, weight) as Basis; }
237
-
238
- /**
239
- * Returns `true` if this basis is conformal. A conformal basis is both *orthogonal* (the axes are perpendicular to each other) and *uniform* (the axes share the same length). This method can be especially useful during physics calculations.
240
- */
241
- isConformal(): boolean { return _C(this, 7854) as boolean; }
242
-
243
- /**
244
- * Returns `true` if this basis and `b` are approximately equal, by calling {@link isEqualApprox} on all vector components.
245
- */
246
- isEqualApprox(b: Basis): boolean { return _C(this, 7938, b) as boolean; }
247
-
248
- /**
249
- * Returns `true` if this basis is finite, by calling {@link isFinite} on all vector components.
250
- */
251
- isFinite(): boolean { return _C(this, 7951) as boolean; }
252
-
253
- /**
254
- * Returns `true` if this basis is orthonormal. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the length of every axis is `1.0`). This method can be especially useful during physics calculations.
255
- */
256
- isOrthonormal(): boolean { return _C(this, 8158) as boolean; }
257
-
258
- /**
259
- * Returns this basis's rotation as a {@link Quaternion}.
260
- * **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the {@link getEuler} method, which returns Euler angles.
261
- */
262
- getRotationQuaternion(): Quaternion { return _C(this, 6214) as Quaternion; }
263
-
264
- equals(other: Variant | Basis): boolean { return _C(this, -1, other) as boolean; }
265
-
266
- notEquals(other: Variant | Basis): boolean { return _C(this, -2, other) as boolean; }
267
-
268
- not(): boolean { return _C(this, -24, undefined) as boolean; }
269
-
270
- /**
271
- * Multiplies all components of the {@link Basis} by the given {@link int}. This affects the basis's scale uniformly, resizing all 3 axes by the `right` value.
272
- */
273
- mul(other: number | Vector3 | Basis): Basis { return _C(this, -9, other) as Basis; }
274
-
275
- /**
276
- * Divides all components of the {@link Basis} by the given {@link int}. This affects the basis's scale uniformly, resizing all 3 axes by the `right` value.
277
- */
278
- div(other: number): Basis { return _C(this, -10, other) as Basis; }
279
-
280
- contains(other: GodotDictionary | GodotArray): boolean { return _C(this, -25, other) as boolean; }
281
-
282
- static readonly name = _R(17, Basis);
283
- }
22
+ export type Basis = [x: Vector3, y: Vector3, z: Vector3];
23
+
24
+ /**
25
+ * Returns the [inverse of this basis's matrix](https://en.wikipedia.org/wiki/Invertible_matrix).
26
+ */
27
+ export function inverse(self: Basis): Basis { return _V(17, 7714, self) as Basis; }
28
+
29
+ /**
30
+ * Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns.
31
+ *
32
+ *
33
+ * ```gdscript
34
+ *
35
+ * var my_basis = Basis(
36
+ * Vector3(1, 2, 3),
37
+ * Vector3(4, 5, 6),
38
+ * Vector3(7, 8, 9)
39
+ * )
40
+ * my_basis = my_basis.transposed()
41
+ *
42
+ * print(my_basis.x) # Prints (1.0, 4.0, 7.0)
43
+ * print(my_basis.y) # Prints (2.0, 5.0, 8.0)
44
+ * print(my_basis.z) # Prints (3.0, 6.0, 9.0)
45
+ *
46
+ * ```
47
+ */
48
+ export function transposed(self: Basis): Basis { return _V(17, 14405, self) as Basis; }
49
+
50
+ /**
51
+ * Returns the orthonormalized version of this basis. 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.
52
+ * It is often useful to call this method to avoid rounding errors on a rotating basis:
53
+ *
54
+ *
55
+ * ```gdscript
56
+ *
57
+ * # Rotate this Node3D every frame.
58
+ * func _process(delta):
59
+ * basis = basis.rotated(Vector3.UP, TAU * delta)
60
+ * basis = basis.rotated(Vector3.RIGHT, TAU * delta)
61
+ * basis = basis.orthonormalized()
62
+ *
63
+ * ```
64
+ */
65
+ export function orthonormalized(self: Basis): Basis { return _V(17, 9230, self) as Basis; }
66
+
67
+ /**
68
+ * Returns the [determinant](https://en.wikipedia.org/wiki/Determinant) of this basis's matrix. For advanced math, this number can be used to determine a few attributes:
69
+ * - If the determinant is exactly `0.0`, the basis is not invertible (see {@link inverse}).
70
+ * - If the determinant is a negative number, the basis represents a negative scale.
71
+ * **Note:** If the basis's scale is the same for every axis, its determinant is always that scale by the power of 3.
72
+ */
73
+ export function determinant(self: Basis): number { return _V(17, 2773, self) as number; }
74
+
75
+ /**
76
+ * Returns a copy of this basis rotated around the given `axis` by the given `angle` (in radians).
77
+ * The `axis` must be a normalized vector (see {@link Vector3.normalized}). If `angle` is positive, the basis is rotated counter-clockwise around the axis.
78
+ *
79
+ *
80
+ * ```gdscript
81
+ *
82
+ * var my_basis = Basis.IDENTITY
83
+ * var angle = TAU / 2
84
+ *
85
+ * my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw).
86
+ * my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch).
87
+ * my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll).
88
+ *
89
+ * ```
90
+ */
91
+ export function rotated(self: Basis, axis: Vector3, angle: number): Basis { return _V(17, 10144, self, axis, angle) as Basis; }
92
+
93
+ /**
94
+ * Returns this basis with each axis's components scaled by the given `scale`'s components.
95
+ * The basis matrix's rows are multiplied by `scale`'s components. This operation is a global scale (relative to the parent).
96
+ *
97
+ *
98
+ * ```gdscript
99
+ *
100
+ * var my_basis = Basis(
101
+ * Vector3(1, 1, 1),
102
+ * Vector3(2, 2, 2),
103
+ * Vector3(3, 3, 3)
104
+ * )
105
+ * my_basis = my_basis.scaled(Vector3(0, 2, -2))
106
+ *
107
+ * print(my_basis.x) # Prints (0.0, 2.0, -2.0)
108
+ * print(my_basis.y) # Prints (0.0, 4.0, -4.0)
109
+ * print(my_basis.z) # Prints (0.0, 6.0, -6.0)
110
+ *
111
+ * ```
112
+ */
113
+ export function scaled(self: Basis, scale: Vector3): Basis { return _V(17, 10232, self, scale) as Basis; }
114
+
115
+ /**
116
+ * Returns this basis with each axis scaled by the corresponding component in the given `scale`.
117
+ * The basis matrix's columns are multiplied by `scale`'s components. This operation is a local scale (relative to self).
118
+ *
119
+ *
120
+ * ```gdscript
121
+ *
122
+ * var my_basis = Basis(
123
+ * Vector3(1, 1, 1),
124
+ * Vector3(2, 2, 2),
125
+ * Vector3(3, 3, 3)
126
+ * )
127
+ * my_basis = my_basis.scaled_local(Vector3(0, 2, -2))
128
+ *
129
+ * print(my_basis.x) # Prints (0.0, 0.0, 0.0)
130
+ * print(my_basis.y) # Prints (4.0, 4.0, 4.0)
131
+ * print(my_basis.z) # Prints (-6.0, -6.0, -6.0)
132
+ *
133
+ * ```
134
+ */
135
+ export function scaledLocal(self: Basis, scale: Vector3): Basis { return _V(17, 10233, self, scale) as Basis; }
136
+
137
+ /**
138
+ * Returns the length of each axis of this basis, as a {@link Vector3}. If the basis is not sheared, this value is the scaling factor. It is not affected by rotation.
139
+ *
140
+ *
141
+ * ```gdscript
142
+ *
143
+ * var my_basis = Basis(
144
+ * Vector3(2, 0, 0),
145
+ * Vector3(0, 4, 0),
146
+ * Vector3(0, 0, 8)
147
+ * )
148
+ * # Rotating the Basis in any way preserves its scale.
149
+ * my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
150
+ * my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
151
+ *
152
+ * print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0)
153
+ *
154
+ * ```
155
+ *
156
+ *
157
+ *
158
+ * **Note:** If the value returned by {@link determinant} is negative, the scale is also negative.
159
+ */
160
+ export function getScale(self: Basis): Vector3 { return _V(17, 6236, self) as Vector3; }
161
+
162
+ /**
163
+ * Returns this basis's rotation as a {@link Vector3} of [Euler angles](https://en.wikipedia.org/wiki/Euler_angles), in radians. For the returned value:
164
+ * - The {@link Vector3.x} contains the angle around the {@link x} axis (pitch);
165
+ * - The {@link Vector3.y} contains the angle around the {@link y} axis (yaw);
166
+ * - The {@link Vector3.z} contains the angle around the {@link z} axis (roll).
167
+ * The order of each consecutive rotation can be changed with `order` (see {@link EulerOrder} constants). In Godot, Euler angles always use intrinsic order. By default, the intrinsic YXZ convention is used ({@link EULER_ORDER_YXZ}): since we are decomposing, local Z (roll) is calculated first, then local X (pitch), and lastly local Y (yaw). When using the opposite method {@link fromEuler} to compose a rotation, this order is reversed.
168
+ * **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see {@link orthonormalized}).
169
+ * **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the {@link getRotationQuaternion} method instead, which returns a {@link Quaternion}.
170
+ * **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the {@link Node3D.rotation} property.
171
+ */
172
+ export function getEuler(self: Basis, order?: number /* = 2 */): Vector3 { return _V(17, 4689, self, order) as Vector3; }
173
+
174
+ /**
175
+ * Returns the transposed dot product between `with` and the {@link x} axis (see {@link transposed}).
176
+ * This is equivalent to `basis.x.dot(vector)`.
177
+ */
178
+ export function tdotx(self: Basis, _with: Vector3): number { return _V(17, 14141, self, _with) as number; }
179
+
180
+ /**
181
+ * Returns the transposed dot product between `with` and the {@link y} axis (see {@link transposed}).
182
+ * This is equivalent to `basis.y.dot(vector)`.
183
+ */
184
+ export function tdoty(self: Basis, _with: Vector3): number { return _V(17, 14142, self, _with) as number; }
185
+
186
+ /**
187
+ * Returns the transposed dot product between `with` and the {@link z} axis (see {@link transposed}).
188
+ * This is equivalent to `basis.z.dot(vector)`.
189
+ */
190
+ export function tdotz(self: Basis, _with: Vector3): number { return _V(17, 14143, self, _with) as number; }
191
+
192
+ /**
193
+ * Performs a spherical-linear interpolation with the `to` basis, given a `weight`. Both this basis and `to` should represent a rotation.
194
+ * **Example:** Smoothly rotate a {@link Node3D} to the target basis over time, with a {@link Tween}:
195
+ *
196
+ * ```text
197
+ *
198
+ * var start_basis = Basis.IDENTITY
199
+ * var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)
200
+ *
201
+ * func _ready():
202
+ * create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO)
203
+ *
204
+ * func interpolate(weight):
205
+ * basis = start_basis.slerp(target_basis, weight)
206
+ *
207
+ * ```
208
+ */
209
+ export function slerp(self: Basis, to: Basis, weight: number): Basis { return _V(17, 13656, self, to, weight) as Basis; }
210
+
211
+ /**
212
+ * Returns `true` if this basis is conformal. A conformal basis is both *orthogonal* (the axes are perpendicular to each other) and *uniform* (the axes share the same length). This method can be especially useful during physics calculations.
213
+ */
214
+ export function isConformal(self: Basis): boolean { return _V(17, 7854, self) as boolean; }
215
+
216
+ /**
217
+ * Returns `true` if this basis and `b` are approximately equal, by calling {@link isEqualApprox} on all vector components.
218
+ */
219
+ export function isEqualApprox(self: Basis, b: Basis): boolean { return _V(17, 7938, self, b) as boolean; }
220
+
221
+ /**
222
+ * Returns `true` if this basis is finite, by calling {@link isFinite} on all vector components.
223
+ */
224
+ export function isFinite(self: Basis): boolean { return _V(17, 7951, self) as boolean; }
225
+
226
+ /**
227
+ * Returns `true` if this basis is orthonormal. An orthonormal basis is both *orthogonal* (the axes are perpendicular to each other) and *normalized* (the length of every axis is `1.0`). This method can be especially useful during physics calculations.
228
+ */
229
+ export function isOrthonormal(self: Basis): boolean { return _V(17, 8158, self) as boolean; }
230
+
231
+ /**
232
+ * Returns this basis's rotation as a {@link Quaternion}.
233
+ * **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the {@link getEuler} method, which returns Euler angles.
234
+ */
235
+ export function getRotationQuaternion(self: Basis): Quaternion { return _V(17, 6214, self) as Quaternion; }
236
+
237
+ /**
238
+ * Creates a new {@link Basis} with a rotation such that the forward axis (-Z) points towards the `target` position.
239
+ * By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If `useModelFront` is `true`, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the `target` position.
240
+ * The up axis (+Y) points as close to the `up` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see {@link orthonormalized}).
241
+ * The `target` and the `up` cannot be {@link Vector3.ZERO}, and shouldn't be colinear to avoid unintended rotation around local Z axis.
242
+ */
243
+ export function lookingAt(target: Vector3, up?: Vector3 /* = Vector3(0, 1, 0) */, useModelFront?: boolean /* = false */): Basis { return _V(17, 8708, undefined, target, up, useModelFront) as Basis; }
244
+
245
+ /**
246
+ * Constructs a new {@link Basis} that only represents scale, with no rotation or shear, from the given `scale` vector.
247
+ *
248
+ *
249
+ * ```gdscript
250
+ *
251
+ * var my_basis = Basis.from_scale(Vector3(2, 4, 8))
252
+ *
253
+ * print(my_basis.x) # Prints (2.0, 0.0, 0.0)
254
+ * print(my_basis.y) # Prints (0.0, 4.0, 0.0)
255
+ * print(my_basis.z) # Prints (0.0, 0.0, 8.0)
256
+ *
257
+ * ```
258
+ *
259
+ *
260
+ *
261
+ * **Note:** In linear algebra, the matrix of this basis is also known as a [diagonal matrix](https://en.wikipedia.org/wiki/Diagonal_matrix).
262
+ */
263
+ export function fromScale(scale: Vector3): Basis { return _V(17, 3604, undefined, scale) as Basis; }
264
+
265
+ /**
266
+ * Constructs a new {@link Basis} that only represents rotation from the given {@link Vector3} of [Euler angles](https://en.wikipedia.org/wiki/Euler_angles), in radians.
267
+ * - The {@link Vector3.x} should contain the angle around the {@link x} axis (pitch);
268
+ * - The {@link Vector3.y} should contain the angle around the {@link y} axis (yaw);
269
+ * - The {@link Vector3.z} should contain the angle around the {@link z} axis (roll).
270
+ *
271
+ *
272
+ * ```gdscript
273
+ *
274
+ * # Creates a Basis whose z axis points down.
275
+ * var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))
276
+ *
277
+ * print(my_basis.z) # Prints (0.0, -1.0, 0.0)
278
+ *
279
+ * ```
280
+ *
281
+ *
282
+ *
283
+ * The order of each consecutive rotation can be changed with `order` (see {@link EulerOrder} constants). In Godot, Euler angles always use intrinsic order. By default, the intrinsic YXZ convention is used ({@link EULER_ORDER_YXZ}): the basis rotates first around the local Y axis (yaw), then local X (pitch), and lastly local Z (roll). When using the opposite method {@link getEuler} to decompose a rotation, this order is reversed.
284
+ */
285
+ export function fromEuler(euler: Vector3, order?: number /* = 2 */): Basis { return _V(17, 3595, undefined, euler, order) as Basis; }
286
+
287
+ export function equals(a: Basis, b: Variant | Basis): boolean { return _V(17, -1, a, b) as boolean; }
288
+
289
+ export function notEquals(a: Basis, b: Variant | Basis): boolean { return _V(17, -2, a, b) as boolean; }
290
+
291
+ export function not(self: Basis): boolean { return _V(17, -24, self, undefined) as boolean; }
292
+
293
+ /**
294
+ * Multiplies all components of the {@link Basis} by the given {@link int}. This affects the basis's scale uniformly, resizing all 3 axes by the `right` value.
295
+ */
296
+ export function mul(a: Basis, b: number | Vector3 | Basis): Basis { return _V(17, -9, a, b) as Basis; }
297
+
298
+ /**
299
+ * Divides all components of the {@link Basis} by the given {@link int}. This affects the basis's scale uniformly, resizing all 3 axes by the `right` value.
300
+ */
301
+ export function div(a: Basis, b: number): Basis { return _V(17, -10, a, b) as Basis; }
302
+
303
+ export function contains(a: Basis, b: GodotDictionary | GodotArray): boolean { return _V(17, -25, a, b) as boolean; }
304
+
305
+ /**
306
+ * Constructs a {@link Basis} identical to {@link IDENTITY}.
307
+ * **Note:** In C#, this constructs a {@link Basis} with all of its components set to {@link Vector3.ZERO}.
308
+ */
309
+ export function create(): Basis { return _V(17, -4096, 0) as Basis; }
310
+
311
+ /**
312
+ * Constructs a {@link Basis} as a copy of the given {@link Basis}.
313
+ */
314
+ export function fromBasis(from: Basis): Basis { return _V(17, -4096, 1, from) as Basis; }
315
+
316
+ /**
317
+ * Constructs a {@link Basis} that only represents rotation from the given {@link Quaternion}.
318
+ * **Note:** Quaternions *only* store rotation, not scale. Because of this, conversions from {@link Basis} to {@link Quaternion} cannot always be reversed.
319
+ */
320
+ export function fromQuaternion(from: Quaternion): Basis { return _V(17, -4096, 2, from) as Basis; }
321
+
322
+ /**
323
+ * Constructs a {@link Basis} that only represents rotation, rotated around the `axis` by the given `angle`, in radians. The axis must be a normalized vector.
324
+ * **Note:** This is the same as using {@link rotated} on the {@link IDENTITY} basis. With more than one angle consider using {@link fromEuler}, instead.
325
+ */
326
+ export function fromAxisAngle(axis: Vector3, angle: number): Basis { return _V(17, -4096, 3, axis, angle) as Basis; }
327
+
328
+ /**
329
+ * Constructs a {@link Basis} from 3 axis vectors. These are the columns of the basis matrix.
330
+ */
331
+ export function fromXAxisYAxisZAxis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Basis { return _V(17, -4096, 4, xAxis, yAxis, zAxis) as Basis; }
332
+