@babylonjs/core 5.26.0 → 5.27.0
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/Debug/debugLayer.d.ts +3 -3
- package/Debug/debugLayer.js +2 -2
- package/Debug/debugLayer.js.map +1 -1
- package/Engines/thinEngine.js +6 -6
- package/Engines/thinEngine.js.map +1 -1
- package/Inputs/scene.inputManager.js +1 -1
- package/Inputs/scene.inputManager.js.map +1 -1
- package/Layers/glowLayer.d.ts +5 -0
- package/Layers/glowLayer.js +21 -8
- package/Layers/glowLayer.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +3 -3
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +1 -2
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.js +2 -0
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.js +7 -0
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.js +2 -0
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.js +3 -0
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +22 -0
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/texture.d.ts +7 -2
- package/Materials/Textures/texture.js +33 -28
- package/Materials/Textures/texture.js.map +1 -1
- package/Maths/math.polar.d.ts +2 -2
- package/Maths/math.polar.js +4 -4
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.vector.d.ts +62 -1
- package/Maths/math.vector.js +62 -1
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +8 -0
- package/Meshes/abstractMesh.js +12 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/mesh.js +4 -1
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/transformNode.js +4 -3
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/screenshotTools.js +2 -12
- package/Misc/screenshotTools.js.map +1 -1
- package/Misc/tools.d.ts +2 -8
- package/Misc/tools.js +2 -2
- package/Misc/tools.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.d.ts +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.d.ts +1 -1
- package/PostProcesses/colorCorrectionPostProcess.js +2 -1
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/refractionPostProcess.d.ts +2 -1
- package/PostProcesses/refractionPostProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.d.ts +2 -1
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +2 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
- package/PostProcesses/vrDistortionCorrectionPostProcess.d.ts +2 -1
- package/PostProcesses/vrDistortionCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +2 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +3 -2
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
- package/package.json +1 -1
package/Maths/math.vector.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { Plane } from "./math.plane";
|
|
|
5
5
|
declare type TransformNode = import("../Meshes/transformNode").TransformNode;
|
|
6
6
|
/**
|
|
7
7
|
* Class representing a vector containing 2 coordinates
|
|
8
|
+
* Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9
|
|
8
9
|
*/
|
|
9
10
|
export declare class Vector2 {
|
|
10
11
|
/** defines the first coordinate */
|
|
@@ -39,6 +40,7 @@ export declare class Vector2 {
|
|
|
39
40
|
getHashCode(): number;
|
|
40
41
|
/**
|
|
41
42
|
* Sets the Vector2 coordinates in the given array or Float32Array from the given index.
|
|
43
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#15
|
|
42
44
|
* @param array defines the source array
|
|
43
45
|
* @param index defines the offset in source array
|
|
44
46
|
* @returns the current Vector2
|
|
@@ -46,6 +48,7 @@ export declare class Vector2 {
|
|
|
46
48
|
toArray(array: FloatArray, index?: number): Vector2;
|
|
47
49
|
/**
|
|
48
50
|
* Update the current vector from an array
|
|
51
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#39
|
|
49
52
|
* @param array defines the destination array
|
|
50
53
|
* @param index defines the offset in the destination array
|
|
51
54
|
* @returns the current Vector3
|
|
@@ -53,17 +56,20 @@ export declare class Vector2 {
|
|
|
53
56
|
fromArray(array: FloatArray, index?: number): Vector2;
|
|
54
57
|
/**
|
|
55
58
|
* Copy the current vector to an array
|
|
59
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#40
|
|
56
60
|
* @returns a new array with 2 elements: the Vector2 coordinates.
|
|
57
61
|
*/
|
|
58
62
|
asArray(): number[];
|
|
59
63
|
/**
|
|
60
64
|
* Sets the Vector2 coordinates with the given Vector2 coordinates
|
|
65
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#24
|
|
61
66
|
* @param source defines the source Vector2
|
|
62
67
|
* @returns the current updated Vector2
|
|
63
68
|
*/
|
|
64
69
|
copyFrom(source: DeepImmutable<Vector2>): Vector2;
|
|
65
70
|
/**
|
|
66
71
|
* Sets the Vector2 coordinates with the given floats
|
|
72
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#25
|
|
67
73
|
* @param x defines the first coordinate
|
|
68
74
|
* @param y defines the second coordinate
|
|
69
75
|
* @returns the current updated Vector2
|
|
@@ -71,6 +77,7 @@ export declare class Vector2 {
|
|
|
71
77
|
copyFromFloats(x: number, y: number): Vector2;
|
|
72
78
|
/**
|
|
73
79
|
* Sets the Vector2 coordinates with the given floats
|
|
80
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#62
|
|
74
81
|
* @param x defines the first coordinate
|
|
75
82
|
* @param y defines the second coordinate
|
|
76
83
|
* @returns the current updated Vector2
|
|
@@ -78,12 +85,14 @@ export declare class Vector2 {
|
|
|
78
85
|
set(x: number, y: number): Vector2;
|
|
79
86
|
/**
|
|
80
87
|
* Add another vector with the current one
|
|
88
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#11
|
|
81
89
|
* @param otherVector defines the other vector
|
|
82
90
|
* @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates
|
|
83
91
|
*/
|
|
84
92
|
add(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
85
93
|
/**
|
|
86
94
|
* Sets the "result" coordinates with the addition of the current Vector2 and the given one coordinates
|
|
95
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#12
|
|
87
96
|
* @param otherVector defines the other vector
|
|
88
97
|
* @param result defines the target vector
|
|
89
98
|
* @returns the unmodified current Vector2
|
|
@@ -91,24 +100,28 @@ export declare class Vector2 {
|
|
|
91
100
|
addToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2;
|
|
92
101
|
/**
|
|
93
102
|
* Set the Vector2 coordinates by adding the given Vector2 coordinates
|
|
103
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#13
|
|
94
104
|
* @param otherVector defines the other vector
|
|
95
105
|
* @returns the current updated Vector2
|
|
96
106
|
*/
|
|
97
107
|
addInPlace(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
98
108
|
/**
|
|
99
109
|
* Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates
|
|
110
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#14
|
|
100
111
|
* @param otherVector defines the other vector
|
|
101
112
|
* @returns a new Vector2
|
|
102
113
|
*/
|
|
103
114
|
addVector3(otherVector: Vector3): Vector2;
|
|
104
115
|
/**
|
|
105
116
|
* Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2
|
|
117
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#61
|
|
106
118
|
* @param otherVector defines the other vector
|
|
107
119
|
* @returns a new Vector2
|
|
108
120
|
*/
|
|
109
121
|
subtract(otherVector: Vector2): Vector2;
|
|
110
122
|
/**
|
|
111
123
|
* Sets the "result" coordinates with the subtraction of the given one from the current Vector2 coordinates.
|
|
124
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#63
|
|
112
125
|
* @param otherVector defines the other vector
|
|
113
126
|
* @param result defines the target vector
|
|
114
127
|
* @returns the unmodified current Vector2
|
|
@@ -116,24 +129,28 @@ export declare class Vector2 {
|
|
|
116
129
|
subtractToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2;
|
|
117
130
|
/**
|
|
118
131
|
* Sets the current Vector2 coordinates by subtracting from it the given one coordinates
|
|
132
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#88
|
|
119
133
|
* @param otherVector defines the other vector
|
|
120
134
|
* @returns the current updated Vector2
|
|
121
135
|
*/
|
|
122
136
|
subtractInPlace(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
123
137
|
/**
|
|
124
138
|
* Multiplies in place the current Vector2 coordinates by the given ones
|
|
139
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#43
|
|
125
140
|
* @param otherVector defines the other vector
|
|
126
141
|
* @returns the current updated Vector2
|
|
127
142
|
*/
|
|
128
143
|
multiplyInPlace(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
129
144
|
/**
|
|
130
145
|
* Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates
|
|
146
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#42
|
|
131
147
|
* @param otherVector defines the other vector
|
|
132
148
|
* @returns a new Vector2
|
|
133
149
|
*/
|
|
134
150
|
multiply(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
135
151
|
/**
|
|
136
152
|
* Sets "result" coordinates with the multiplication of the current Vector2 and the given one coordinates
|
|
153
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#44
|
|
137
154
|
* @param otherVector defines the other vector
|
|
138
155
|
* @param result defines the target vector
|
|
139
156
|
* @returns the unmodified current Vector2
|
|
@@ -141,6 +158,7 @@ export declare class Vector2 {
|
|
|
141
158
|
multiplyToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2;
|
|
142
159
|
/**
|
|
143
160
|
* Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats
|
|
161
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#89
|
|
144
162
|
* @param x defines the first coordinate
|
|
145
163
|
* @param y defines the second coordinate
|
|
146
164
|
* @returns a new Vector2
|
|
@@ -148,12 +166,14 @@ export declare class Vector2 {
|
|
|
148
166
|
multiplyByFloats(x: number, y: number): Vector2;
|
|
149
167
|
/**
|
|
150
168
|
* Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates
|
|
169
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#27
|
|
151
170
|
* @param otherVector defines the other vector
|
|
152
171
|
* @returns a new Vector2
|
|
153
172
|
*/
|
|
154
173
|
divide(otherVector: Vector2): Vector2;
|
|
155
174
|
/**
|
|
156
175
|
* Sets the "result" coordinates with the Vector2 divided by the given one coordinates
|
|
176
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#30
|
|
157
177
|
* @param otherVector defines the other vector
|
|
158
178
|
* @param result defines the target vector
|
|
159
179
|
* @returns the unmodified current Vector2
|
|
@@ -161,40 +181,47 @@ export declare class Vector2 {
|
|
|
161
181
|
divideToRef(otherVector: DeepImmutable<Vector2>, result: Vector2): Vector2;
|
|
162
182
|
/**
|
|
163
183
|
* Divides the current Vector2 coordinates by the given ones
|
|
184
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#28
|
|
164
185
|
* @param otherVector defines the other vector
|
|
165
186
|
* @returns the current updated Vector2
|
|
166
187
|
*/
|
|
167
188
|
divideInPlace(otherVector: DeepImmutable<Vector2>): Vector2;
|
|
168
189
|
/**
|
|
169
190
|
* Gets a new Vector2 with current Vector2 negated coordinates
|
|
191
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#22
|
|
170
192
|
* @returns a new Vector2
|
|
171
193
|
*/
|
|
172
194
|
negate(): Vector2;
|
|
173
195
|
/**
|
|
174
196
|
* Negate this vector in place
|
|
197
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#23
|
|
175
198
|
* @returns this
|
|
176
199
|
*/
|
|
177
200
|
negateInPlace(): Vector2;
|
|
178
201
|
/**
|
|
179
202
|
* Negate the current Vector2 and stores the result in the given vector "result" coordinates
|
|
203
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#41
|
|
180
204
|
* @param result defines the Vector3 object where to store the result
|
|
181
205
|
* @returns the result
|
|
182
206
|
*/
|
|
183
207
|
negateToRef(result: Vector2): Vector2;
|
|
184
208
|
/**
|
|
185
|
-
* Multiply the Vector2 coordinates by
|
|
209
|
+
* Multiply the Vector2 coordinates by
|
|
210
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#59
|
|
186
211
|
* @param scale defines the scaling factor
|
|
187
212
|
* @returns the current updated Vector2
|
|
188
213
|
*/
|
|
189
214
|
scaleInPlace(scale: number): Vector2;
|
|
190
215
|
/**
|
|
191
216
|
* Returns a new Vector2 scaled by "scale" from the current Vector2
|
|
217
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#52
|
|
192
218
|
* @param scale defines the scaling factor
|
|
193
219
|
* @returns a new Vector2
|
|
194
220
|
*/
|
|
195
221
|
scale(scale: number): Vector2;
|
|
196
222
|
/**
|
|
197
223
|
* Scale the current Vector2 values by a factor to a given Vector2
|
|
224
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#57
|
|
198
225
|
* @param scale defines the scale factor
|
|
199
226
|
* @param result defines the Vector2 object where to store the result
|
|
200
227
|
* @returns the unmodified current Vector2
|
|
@@ -202,6 +229,7 @@ export declare class Vector2 {
|
|
|
202
229
|
scaleToRef(scale: number, result: Vector2): Vector2;
|
|
203
230
|
/**
|
|
204
231
|
* Scale the current Vector2 values by a factor and add the result to a given Vector2
|
|
232
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#58
|
|
205
233
|
* @param scale defines the scale factor
|
|
206
234
|
* @param result defines the Vector2 object where to store the result
|
|
207
235
|
* @returns the unmodified current Vector2
|
|
@@ -209,12 +237,14 @@ export declare class Vector2 {
|
|
|
209
237
|
scaleAndAddToRef(scale: number, result: Vector2): Vector2;
|
|
210
238
|
/**
|
|
211
239
|
* Gets a boolean if two vectors are equals
|
|
240
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#31
|
|
212
241
|
* @param otherVector defines the other vector
|
|
213
242
|
* @returns true if the given vector coordinates strictly equal the current Vector2 ones
|
|
214
243
|
*/
|
|
215
244
|
equals(otherVector: DeepImmutable<Vector2>): boolean;
|
|
216
245
|
/**
|
|
217
246
|
* Gets a boolean if two vectors are equals (using an epsilon value)
|
|
247
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#32
|
|
218
248
|
* @param otherVector defines the other vector
|
|
219
249
|
* @param epsilon defines the minimal distance to consider equality
|
|
220
250
|
* @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.
|
|
@@ -222,18 +252,21 @@ export declare class Vector2 {
|
|
|
222
252
|
equalsWithEpsilon(otherVector: DeepImmutable<Vector2>, epsilon?: number): boolean;
|
|
223
253
|
/**
|
|
224
254
|
* Gets a new Vector2 from current Vector2 floored values
|
|
255
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#35
|
|
225
256
|
* eg (1.2, 2.31) returns (1, 2)
|
|
226
257
|
* @returns a new Vector2
|
|
227
258
|
*/
|
|
228
259
|
floor(): Vector2;
|
|
229
260
|
/**
|
|
230
261
|
* Gets a new Vector2 from current Vector2 fractional values
|
|
262
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#34
|
|
231
263
|
* eg (1.2, 2.31) returns (0.2, 0.31)
|
|
232
264
|
* @returns a new Vector2
|
|
233
265
|
*/
|
|
234
266
|
fract(): Vector2;
|
|
235
267
|
/**
|
|
236
268
|
* Rotate the current vector into a given result vector
|
|
269
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#49
|
|
237
270
|
* @param angle defines the rotation angle
|
|
238
271
|
* @param result defines the result vector where to store the rotated vector
|
|
239
272
|
* @returns the current vector
|
|
@@ -251,11 +284,13 @@ export declare class Vector2 {
|
|
|
251
284
|
lengthSquared(): number;
|
|
252
285
|
/**
|
|
253
286
|
* Normalize the vector
|
|
287
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#48
|
|
254
288
|
* @returns the current updated Vector2
|
|
255
289
|
*/
|
|
256
290
|
normalize(): Vector2;
|
|
257
291
|
/**
|
|
258
292
|
* Gets a new Vector2 copied from the Vector2
|
|
293
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#20
|
|
259
294
|
* @returns a new Vector2
|
|
260
295
|
*/
|
|
261
296
|
clone(): Vector2;
|
|
@@ -275,6 +310,7 @@ export declare class Vector2 {
|
|
|
275
310
|
static get ZeroReadOnly(): DeepImmutable<Vector2>;
|
|
276
311
|
/**
|
|
277
312
|
* Gets a new Vector2 set from the given index element of the given array
|
|
313
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#79
|
|
278
314
|
* @param array defines the data source
|
|
279
315
|
* @param offset defines the offset in the data source
|
|
280
316
|
* @returns a new Vector2
|
|
@@ -282,6 +318,7 @@ export declare class Vector2 {
|
|
|
282
318
|
static FromArray(array: DeepImmutable<ArrayLike<number>>, offset?: number): Vector2;
|
|
283
319
|
/**
|
|
284
320
|
* Sets "result" from the given index element of the given array
|
|
321
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#80
|
|
285
322
|
* @param array defines the data source
|
|
286
323
|
* @param offset defines the offset in the data source
|
|
287
324
|
* @param result defines the target vector
|
|
@@ -289,6 +326,7 @@ export declare class Vector2 {
|
|
|
289
326
|
static FromArrayToRef(array: DeepImmutable<ArrayLike<number>>, offset: number, result: Vector2): void;
|
|
290
327
|
/**
|
|
291
328
|
* Gets a new Vector2 located for "amount" (float) on the CatmullRom spline defined by the given four Vector2
|
|
329
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#65
|
|
292
330
|
* @param value1 defines 1st point of control
|
|
293
331
|
* @param value2 defines 2nd point of control
|
|
294
332
|
* @param value3 defines 3rd point of control
|
|
@@ -301,6 +339,7 @@ export declare class Vector2 {
|
|
|
301
339
|
* Returns a new Vector2 set with same the coordinates than "value" ones if the vector "value" is in the square defined by "min" and "max".
|
|
302
340
|
* If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
|
|
303
341
|
* If a coordinate of "value" is greater than "max" coordinates, the returned Vector2 is given this "max" coordinate
|
|
342
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#76
|
|
304
343
|
* @param value defines the value to clamp
|
|
305
344
|
* @param min defines the lower limit
|
|
306
345
|
* @param max defines the upper limit
|
|
@@ -309,6 +348,7 @@ export declare class Vector2 {
|
|
|
309
348
|
static Clamp(value: DeepImmutable<Vector2>, min: DeepImmutable<Vector2>, max: DeepImmutable<Vector2>): Vector2;
|
|
310
349
|
/**
|
|
311
350
|
* Returns a new Vector2 located for "amount" (float) on the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2"
|
|
351
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#81
|
|
312
352
|
* @param value1 defines the 1st control point
|
|
313
353
|
* @param tangent1 defines the outgoing tangent
|
|
314
354
|
* @param value2 defines the 2nd control point
|
|
@@ -319,6 +359,7 @@ export declare class Vector2 {
|
|
|
319
359
|
static Hermite(value1: DeepImmutable<Vector2>, tangent1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, tangent2: DeepImmutable<Vector2>, amount: number): Vector2;
|
|
320
360
|
/**
|
|
321
361
|
* Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
362
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#82
|
|
322
363
|
* @param value1 defines the first control point
|
|
323
364
|
* @param tangent1 defines the first tangent
|
|
324
365
|
* @param value2 defines the second control point
|
|
@@ -329,6 +370,7 @@ export declare class Vector2 {
|
|
|
329
370
|
static Hermite1stDerivative(value1: DeepImmutable<Vector2>, tangent1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, tangent2: DeepImmutable<Vector2>, time: number): Vector2;
|
|
330
371
|
/**
|
|
331
372
|
* Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
|
|
373
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#83
|
|
332
374
|
* @param value1 defines the first control point
|
|
333
375
|
* @param tangent1 defines the first tangent
|
|
334
376
|
* @param value2 defines the second control point
|
|
@@ -339,6 +381,7 @@ export declare class Vector2 {
|
|
|
339
381
|
static Hermite1stDerivativeToRef(value1: DeepImmutable<Vector2>, tangent1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, tangent2: DeepImmutable<Vector2>, time: number, result: Vector2): void;
|
|
340
382
|
/**
|
|
341
383
|
* Returns a new Vector2 located for "amount" (float) on the linear interpolation between the vector "start" adn the vector "end".
|
|
384
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#84
|
|
342
385
|
* @param start defines the start vector
|
|
343
386
|
* @param end defines the end vector
|
|
344
387
|
* @param amount defines the interpolation factor
|
|
@@ -347,6 +390,7 @@ export declare class Vector2 {
|
|
|
347
390
|
static Lerp(start: DeepImmutable<Vector2>, end: DeepImmutable<Vector2>, amount: number): Vector2;
|
|
348
391
|
/**
|
|
349
392
|
* Gets the dot product of the vector "left" and the vector "right"
|
|
393
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#90
|
|
350
394
|
* @param left defines first vector
|
|
351
395
|
* @param right defines second vector
|
|
352
396
|
* @returns the dot product (float)
|
|
@@ -354,18 +398,21 @@ export declare class Vector2 {
|
|
|
354
398
|
static Dot(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): number;
|
|
355
399
|
/**
|
|
356
400
|
* Returns a new Vector2 equal to the normalized given vector
|
|
401
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#46
|
|
357
402
|
* @param vector defines the vector to normalize
|
|
358
403
|
* @returns a new Vector2
|
|
359
404
|
*/
|
|
360
405
|
static Normalize(vector: DeepImmutable<Vector2>): Vector2;
|
|
361
406
|
/**
|
|
362
407
|
* Normalize a given vector into a second one
|
|
408
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#50
|
|
363
409
|
* @param vector defines the vector to normalize
|
|
364
410
|
* @param result defines the vector where to store the result
|
|
365
411
|
*/
|
|
366
412
|
static NormalizeToRef(vector: DeepImmutable<Vector2>, result: Vector2): void;
|
|
367
413
|
/**
|
|
368
414
|
* Gets a new Vector2 set with the minimal coordinate values from the "left" and "right" vectors
|
|
415
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#86
|
|
369
416
|
* @param left defines 1st vector
|
|
370
417
|
* @param right defines 2nd vector
|
|
371
418
|
* @returns a new Vector2
|
|
@@ -373,6 +420,7 @@ export declare class Vector2 {
|
|
|
373
420
|
static Minimize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2;
|
|
374
421
|
/**
|
|
375
422
|
* Gets a new Vector2 set with the maximal coordinate values from the "left" and "right" vectors
|
|
423
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#86
|
|
376
424
|
* @param left defines 1st vector
|
|
377
425
|
* @param right defines 2nd vector
|
|
378
426
|
* @returns a new Vector2
|
|
@@ -380,6 +428,7 @@ export declare class Vector2 {
|
|
|
380
428
|
static Maximize(left: DeepImmutable<Vector2>, right: DeepImmutable<Vector2>): Vector2;
|
|
381
429
|
/**
|
|
382
430
|
* Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix
|
|
431
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#17
|
|
383
432
|
* @param vector defines the vector to transform
|
|
384
433
|
* @param transformation defines the matrix to apply
|
|
385
434
|
* @returns a new Vector2
|
|
@@ -387,6 +436,7 @@ export declare class Vector2 {
|
|
|
387
436
|
static Transform(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>): Vector2;
|
|
388
437
|
/**
|
|
389
438
|
* Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector "result" coordinates
|
|
439
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#19
|
|
390
440
|
* @param vector defines the vector to transform
|
|
391
441
|
* @param transformation defines the matrix to apply
|
|
392
442
|
* @param result defines the target vector
|
|
@@ -394,6 +444,7 @@ export declare class Vector2 {
|
|
|
394
444
|
static TransformToRef(vector: DeepImmutable<Vector2>, transformation: DeepImmutable<Matrix>, result: Vector2): void;
|
|
395
445
|
/**
|
|
396
446
|
* Determines if a given vector is included in a triangle
|
|
447
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#87
|
|
397
448
|
* @param p defines the vector to test
|
|
398
449
|
* @param p0 defines 1st triangle point
|
|
399
450
|
* @param p1 defines 2nd triangle point
|
|
@@ -403,6 +454,7 @@ export declare class Vector2 {
|
|
|
403
454
|
static PointInTriangle(p: DeepImmutable<Vector2>, p0: DeepImmutable<Vector2>, p1: DeepImmutable<Vector2>, p2: DeepImmutable<Vector2>): boolean;
|
|
404
455
|
/**
|
|
405
456
|
* Gets the distance between the vectors "value1" and "value2"
|
|
457
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#71
|
|
406
458
|
* @param value1 defines first vector
|
|
407
459
|
* @param value2 defines second vector
|
|
408
460
|
* @returns the distance between vectors
|
|
@@ -410,6 +462,7 @@ export declare class Vector2 {
|
|
|
410
462
|
static Distance(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number;
|
|
411
463
|
/**
|
|
412
464
|
* Returns the squared distance between the vectors "value1" and "value2"
|
|
465
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#72
|
|
413
466
|
* @param value1 defines first vector
|
|
414
467
|
* @param value2 defines second vector
|
|
415
468
|
* @returns the squared distance between vectors
|
|
@@ -417,6 +470,8 @@ export declare class Vector2 {
|
|
|
417
470
|
static DistanceSquared(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): number;
|
|
418
471
|
/**
|
|
419
472
|
* Gets a new Vector2 located at the center of the vectors "value1" and "value2"
|
|
473
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#86
|
|
474
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#66
|
|
420
475
|
* @param value1 defines first vector
|
|
421
476
|
* @param value2 defines second vector
|
|
422
477
|
* @returns a new Vector2
|
|
@@ -424,6 +479,7 @@ export declare class Vector2 {
|
|
|
424
479
|
static Center(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>): Vector2;
|
|
425
480
|
/**
|
|
426
481
|
* Gets the center of the vectors "value1" and "value2" and stores the result in the vector "ref"
|
|
482
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#66
|
|
427
483
|
* @param value1 defines first vector
|
|
428
484
|
* @param value2 defines second vector
|
|
429
485
|
* @param ref defines third vector
|
|
@@ -432,6 +488,7 @@ export declare class Vector2 {
|
|
|
432
488
|
static CenterToRef(value1: DeepImmutable<Vector2>, value2: DeepImmutable<Vector2>, ref: DeepImmutable<Vector2>): Vector2;
|
|
433
489
|
/**
|
|
434
490
|
* Gets the shortest distance (float) between the point "p" and the segment defined by the two points "segA" and "segB".
|
|
491
|
+
* Example Playground https://playground.babylonjs.com/#QYBWV4#77
|
|
435
492
|
* @param p defines the middle point
|
|
436
493
|
* @param segA defines one point of the segment
|
|
437
494
|
* @param segB defines the other point of the segment
|
|
@@ -966,6 +1023,7 @@ export declare class Vector3 {
|
|
|
966
1023
|
static GetAngleBetweenVectorsOnPlane(vector0: Vector3, vector1: Vector3, normal: Vector3): number;
|
|
967
1024
|
/**
|
|
968
1025
|
* Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point and stores it in the ref Vector3
|
|
1026
|
+
* Example PG https://playground.babylonjs.com/#R1F8YU#189
|
|
969
1027
|
* @param start the starting point
|
|
970
1028
|
* @param target the target point
|
|
971
1029
|
* @param ref the vector3 to store the result
|
|
@@ -974,6 +1032,7 @@ export declare class Vector3 {
|
|
|
974
1032
|
static PitchYawRollToMoveBetweenPointsToRef(start: Vector3, target: Vector3, ref: Vector3): Vector3;
|
|
975
1033
|
/**
|
|
976
1034
|
* Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point
|
|
1035
|
+
* Example PG https://playground.babylonjs.com/#R1F8YU#188
|
|
977
1036
|
* @param start the starting point
|
|
978
1037
|
* @param target the target point
|
|
979
1038
|
* @returns the rotation in the form (pitch, yaw, 0)
|
|
@@ -2201,6 +2260,7 @@ export declare class Quaternion {
|
|
|
2201
2260
|
static FromRotationMatrixToRef(matrix: DeepImmutable<Matrix>, result: Quaternion): void;
|
|
2202
2261
|
/**
|
|
2203
2262
|
* Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3
|
|
2263
|
+
* Example PG https://playground.babylonjs.com/#L49EJ7#2
|
|
2204
2264
|
* @param fromVector the starting vector
|
|
2205
2265
|
* @param toVector the ending vector
|
|
2206
2266
|
* @returns the rotation quaternion needed
|
|
@@ -2208,6 +2268,7 @@ export declare class Quaternion {
|
|
|
2208
2268
|
static RotationQuaternionFromOnto(fromVector: DeepImmutable<Vector3>, toVector: DeepImmutable<Vector3>): Quaternion;
|
|
2209
2269
|
/**
|
|
2210
2270
|
* Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3 and stores in a result Quaternion
|
|
2271
|
+
* Example PG https://playground.babylonjs.com/#L49EJ7#3
|
|
2211
2272
|
* @param fromVector the starting vector
|
|
2212
2273
|
* @param toVector the ending vector
|
|
2213
2274
|
* @param result the rotation quaternion needed
|