@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.
Files changed (63) hide show
  1. package/Debug/debugLayer.d.ts +3 -3
  2. package/Debug/debugLayer.js +2 -2
  3. package/Debug/debugLayer.js.map +1 -1
  4. package/Engines/thinEngine.js +6 -6
  5. package/Engines/thinEngine.js.map +1 -1
  6. package/Inputs/scene.inputManager.js +1 -1
  7. package/Inputs/scene.inputManager.js.map +1 -1
  8. package/Layers/glowLayer.d.ts +5 -0
  9. package/Layers/glowLayer.js +21 -8
  10. package/Layers/glowLayer.js.map +1 -1
  11. package/Loading/Plugins/babylonFileLoader.js +3 -3
  12. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  13. package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +1 -2
  14. package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
  15. package/Materials/PBR/pbrAnisotropicConfiguration.js +2 -0
  16. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  17. package/Materials/PBR/pbrClearCoatConfiguration.js +7 -0
  18. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  19. package/Materials/PBR/pbrIridescenceConfiguration.js +2 -0
  20. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  21. package/Materials/PBR/pbrSheenConfiguration.js +3 -0
  22. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  23. package/Materials/PBR/pbrSubSurfaceConfiguration.js +22 -0
  24. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  25. package/Materials/Textures/texture.d.ts +7 -2
  26. package/Materials/Textures/texture.js +33 -28
  27. package/Materials/Textures/texture.js.map +1 -1
  28. package/Maths/math.polar.d.ts +2 -2
  29. package/Maths/math.polar.js +4 -4
  30. package/Maths/math.polar.js.map +1 -1
  31. package/Maths/math.vector.d.ts +62 -1
  32. package/Maths/math.vector.js +62 -1
  33. package/Maths/math.vector.js.map +1 -1
  34. package/Meshes/abstractMesh.d.ts +8 -0
  35. package/Meshes/abstractMesh.js +12 -0
  36. package/Meshes/abstractMesh.js.map +1 -1
  37. package/Meshes/mesh.js +4 -1
  38. package/Meshes/mesh.js.map +1 -1
  39. package/Meshes/transformNode.js +4 -3
  40. package/Meshes/transformNode.js.map +1 -1
  41. package/Misc/screenshotTools.js +2 -12
  42. package/Misc/screenshotTools.js.map +1 -1
  43. package/Misc/tools.d.ts +2 -8
  44. package/Misc/tools.js +2 -2
  45. package/Misc/tools.js.map +1 -1
  46. package/PostProcesses/blackAndWhitePostProcess.d.ts +1 -1
  47. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  48. package/PostProcesses/colorCorrectionPostProcess.d.ts +1 -1
  49. package/PostProcesses/colorCorrectionPostProcess.js +2 -1
  50. package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
  51. package/PostProcesses/refractionPostProcess.d.ts +2 -1
  52. package/PostProcesses/refractionPostProcess.js.map +1 -1
  53. package/PostProcesses/tonemapPostProcess.d.ts +2 -1
  54. package/PostProcesses/tonemapPostProcess.js.map +1 -1
  55. package/PostProcesses/volumetricLightScatteringPostProcess.d.ts +2 -1
  56. package/PostProcesses/volumetricLightScatteringPostProcess.js +1 -1
  57. package/PostProcesses/volumetricLightScatteringPostProcess.js.map +1 -1
  58. package/PostProcesses/vrDistortionCorrectionPostProcess.d.ts +2 -1
  59. package/PostProcesses/vrDistortionCorrectionPostProcess.js.map +1 -1
  60. package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +2 -1
  61. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +3 -2
  62. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
  63. package/package.json +1 -1
@@ -11,6 +11,7 @@ const _ExtractAsInt = (value) => {
11
11
  };
12
12
  /**
13
13
  * Class representing a vector containing 2 coordinates
14
+ * Example Playground - Overview - https://playground.babylonjs.com/#QYBWV4#9
14
15
  */
15
16
  export class Vector2 {
16
17
  /**
@@ -54,6 +55,7 @@ export class Vector2 {
54
55
  // Operators
55
56
  /**
56
57
  * Sets the Vector2 coordinates in the given array or Float32Array from the given index.
58
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#15
57
59
  * @param array defines the source array
58
60
  * @param index defines the offset in source array
59
61
  * @returns the current Vector2
@@ -65,6 +67,7 @@ export class Vector2 {
65
67
  }
66
68
  /**
67
69
  * Update the current vector from an array
70
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#39
68
71
  * @param array defines the destination array
69
72
  * @param index defines the offset in the destination array
70
73
  * @returns the current Vector3
@@ -75,6 +78,7 @@ export class Vector2 {
75
78
  }
76
79
  /**
77
80
  * Copy the current vector to an array
81
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#40
78
82
  * @returns a new array with 2 elements: the Vector2 coordinates.
79
83
  */
80
84
  asArray() {
@@ -84,6 +88,7 @@ export class Vector2 {
84
88
  }
85
89
  /**
86
90
  * Sets the Vector2 coordinates with the given Vector2 coordinates
91
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#24
87
92
  * @param source defines the source Vector2
88
93
  * @returns the current updated Vector2
89
94
  */
@@ -94,6 +99,7 @@ export class Vector2 {
94
99
  }
95
100
  /**
96
101
  * Sets the Vector2 coordinates with the given floats
102
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#25
97
103
  * @param x defines the first coordinate
98
104
  * @param y defines the second coordinate
99
105
  * @returns the current updated Vector2
@@ -105,6 +111,7 @@ export class Vector2 {
105
111
  }
106
112
  /**
107
113
  * Sets the Vector2 coordinates with the given floats
114
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#62
108
115
  * @param x defines the first coordinate
109
116
  * @param y defines the second coordinate
110
117
  * @returns the current updated Vector2
@@ -114,6 +121,7 @@ export class Vector2 {
114
121
  }
115
122
  /**
116
123
  * Add another vector with the current one
124
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#11
117
125
  * @param otherVector defines the other vector
118
126
  * @returns a new Vector2 set with the addition of the current Vector2 and the given one coordinates
119
127
  */
@@ -122,6 +130,7 @@ export class Vector2 {
122
130
  }
123
131
  /**
124
132
  * Sets the "result" coordinates with the addition of the current Vector2 and the given one coordinates
133
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#12
125
134
  * @param otherVector defines the other vector
126
135
  * @param result defines the target vector
127
136
  * @returns the unmodified current Vector2
@@ -133,6 +142,7 @@ export class Vector2 {
133
142
  }
134
143
  /**
135
144
  * Set the Vector2 coordinates by adding the given Vector2 coordinates
145
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#13
136
146
  * @param otherVector defines the other vector
137
147
  * @returns the current updated Vector2
138
148
  */
@@ -143,6 +153,7 @@ export class Vector2 {
143
153
  }
144
154
  /**
145
155
  * Gets a new Vector2 by adding the current Vector2 coordinates to the given Vector3 x, y coordinates
156
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#14
146
157
  * @param otherVector defines the other vector
147
158
  * @returns a new Vector2
148
159
  */
@@ -151,6 +162,7 @@ export class Vector2 {
151
162
  }
152
163
  /**
153
164
  * Gets a new Vector2 set with the subtracted coordinates of the given one from the current Vector2
165
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#61
154
166
  * @param otherVector defines the other vector
155
167
  * @returns a new Vector2
156
168
  */
@@ -159,6 +171,7 @@ export class Vector2 {
159
171
  }
160
172
  /**
161
173
  * Sets the "result" coordinates with the subtraction of the given one from the current Vector2 coordinates.
174
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#63
162
175
  * @param otherVector defines the other vector
163
176
  * @param result defines the target vector
164
177
  * @returns the unmodified current Vector2
@@ -170,6 +183,7 @@ export class Vector2 {
170
183
  }
171
184
  /**
172
185
  * Sets the current Vector2 coordinates by subtracting from it the given one coordinates
186
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#88
173
187
  * @param otherVector defines the other vector
174
188
  * @returns the current updated Vector2
175
189
  */
@@ -180,6 +194,7 @@ export class Vector2 {
180
194
  }
181
195
  /**
182
196
  * Multiplies in place the current Vector2 coordinates by the given ones
197
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#43
183
198
  * @param otherVector defines the other vector
184
199
  * @returns the current updated Vector2
185
200
  */
@@ -190,6 +205,7 @@ export class Vector2 {
190
205
  }
191
206
  /**
192
207
  * Returns a new Vector2 set with the multiplication of the current Vector2 and the given one coordinates
208
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#42
193
209
  * @param otherVector defines the other vector
194
210
  * @returns a new Vector2
195
211
  */
@@ -198,6 +214,7 @@ export class Vector2 {
198
214
  }
199
215
  /**
200
216
  * Sets "result" coordinates with the multiplication of the current Vector2 and the given one coordinates
217
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#44
201
218
  * @param otherVector defines the other vector
202
219
  * @param result defines the target vector
203
220
  * @returns the unmodified current Vector2
@@ -209,6 +226,7 @@ export class Vector2 {
209
226
  }
210
227
  /**
211
228
  * Gets a new Vector2 set with the Vector2 coordinates multiplied by the given floats
229
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#89
212
230
  * @param x defines the first coordinate
213
231
  * @param y defines the second coordinate
214
232
  * @returns a new Vector2
@@ -218,6 +236,7 @@ export class Vector2 {
218
236
  }
219
237
  /**
220
238
  * Returns a new Vector2 set with the Vector2 coordinates divided by the given one coordinates
239
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#27
221
240
  * @param otherVector defines the other vector
222
241
  * @returns a new Vector2
223
242
  */
@@ -226,6 +245,7 @@ export class Vector2 {
226
245
  }
227
246
  /**
228
247
  * Sets the "result" coordinates with the Vector2 divided by the given one coordinates
248
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#30
229
249
  * @param otherVector defines the other vector
230
250
  * @param result defines the target vector
231
251
  * @returns the unmodified current Vector2
@@ -237,6 +257,7 @@ export class Vector2 {
237
257
  }
238
258
  /**
239
259
  * Divides the current Vector2 coordinates by the given ones
260
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#28
240
261
  * @param otherVector defines the other vector
241
262
  * @returns the current updated Vector2
242
263
  */
@@ -245,6 +266,7 @@ export class Vector2 {
245
266
  }
246
267
  /**
247
268
  * Gets a new Vector2 with current Vector2 negated coordinates
269
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#22
248
270
  * @returns a new Vector2
249
271
  */
250
272
  negate() {
@@ -252,6 +274,7 @@ export class Vector2 {
252
274
  }
253
275
  /**
254
276
  * Negate this vector in place
277
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#23
255
278
  * @returns this
256
279
  */
257
280
  negateInPlace() {
@@ -261,6 +284,7 @@ export class Vector2 {
261
284
  }
262
285
  /**
263
286
  * Negate the current Vector2 and stores the result in the given vector "result" coordinates
287
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#41
264
288
  * @param result defines the Vector3 object where to store the result
265
289
  * @returns the result
266
290
  */
@@ -268,7 +292,8 @@ export class Vector2 {
268
292
  return result.copyFromFloats(this.x * -1, this.y * -1);
269
293
  }
270
294
  /**
271
- * Multiply the Vector2 coordinates by scale
295
+ * Multiply the Vector2 coordinates by
296
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#59
272
297
  * @param scale defines the scaling factor
273
298
  * @returns the current updated Vector2
274
299
  */
@@ -279,6 +304,7 @@ export class Vector2 {
279
304
  }
280
305
  /**
281
306
  * Returns a new Vector2 scaled by "scale" from the current Vector2
307
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#52
282
308
  * @param scale defines the scaling factor
283
309
  * @returns a new Vector2
284
310
  */
@@ -289,6 +315,7 @@ export class Vector2 {
289
315
  }
290
316
  /**
291
317
  * Scale the current Vector2 values by a factor to a given Vector2
318
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#57
292
319
  * @param scale defines the scale factor
293
320
  * @param result defines the Vector2 object where to store the result
294
321
  * @returns the unmodified current Vector2
@@ -300,6 +327,7 @@ export class Vector2 {
300
327
  }
301
328
  /**
302
329
  * Scale the current Vector2 values by a factor and add the result to a given Vector2
330
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#58
303
331
  * @param scale defines the scale factor
304
332
  * @param result defines the Vector2 object where to store the result
305
333
  * @returns the unmodified current Vector2
@@ -311,6 +339,7 @@ export class Vector2 {
311
339
  }
312
340
  /**
313
341
  * Gets a boolean if two vectors are equals
342
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#31
314
343
  * @param otherVector defines the other vector
315
344
  * @returns true if the given vector coordinates strictly equal the current Vector2 ones
316
345
  */
@@ -319,6 +348,7 @@ export class Vector2 {
319
348
  }
320
349
  /**
321
350
  * Gets a boolean if two vectors are equals (using an epsilon value)
351
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#32
322
352
  * @param otherVector defines the other vector
323
353
  * @param epsilon defines the minimal distance to consider equality
324
354
  * @returns true if the given vector coordinates are close to the current ones by a distance of epsilon.
@@ -328,6 +358,7 @@ export class Vector2 {
328
358
  }
329
359
  /**
330
360
  * Gets a new Vector2 from current Vector2 floored values
361
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#35
331
362
  * eg (1.2, 2.31) returns (1, 2)
332
363
  * @returns a new Vector2
333
364
  */
@@ -336,6 +367,7 @@ export class Vector2 {
336
367
  }
337
368
  /**
338
369
  * Gets a new Vector2 from current Vector2 fractional values
370
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#34
339
371
  * eg (1.2, 2.31) returns (0.2, 0.31)
340
372
  * @returns a new Vector2
341
373
  */
@@ -344,6 +376,7 @@ export class Vector2 {
344
376
  }
345
377
  /**
346
378
  * Rotate the current vector into a given result vector
379
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#49
347
380
  * @param angle defines the rotation angle
348
381
  * @param result defines the result vector where to store the rotated vector
349
382
  * @returns the current vector
@@ -373,6 +406,7 @@ export class Vector2 {
373
406
  // Methods
374
407
  /**
375
408
  * Normalize the vector
409
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#48
376
410
  * @returns the current updated Vector2
377
411
  */
378
412
  normalize() {
@@ -381,6 +415,7 @@ export class Vector2 {
381
415
  }
382
416
  /**
383
417
  * Gets a new Vector2 copied from the Vector2
418
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#20
384
419
  * @returns a new Vector2
385
420
  */
386
421
  clone() {
@@ -409,6 +444,7 @@ export class Vector2 {
409
444
  }
410
445
  /**
411
446
  * Gets a new Vector2 set from the given index element of the given array
447
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#79
412
448
  * @param array defines the data source
413
449
  * @param offset defines the offset in the data source
414
450
  * @returns a new Vector2
@@ -418,6 +454,7 @@ export class Vector2 {
418
454
  }
419
455
  /**
420
456
  * Sets "result" from the given index element of the given array
457
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#80
421
458
  * @param array defines the data source
422
459
  * @param offset defines the offset in the data source
423
460
  * @param result defines the target vector
@@ -428,6 +465,7 @@ export class Vector2 {
428
465
  }
429
466
  /**
430
467
  * Gets a new Vector2 located for "amount" (float) on the CatmullRom spline defined by the given four Vector2
468
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#65
431
469
  * @param value1 defines 1st point of control
432
470
  * @param value2 defines 2nd point of control
433
471
  * @param value3 defines 3rd point of control
@@ -454,6 +492,7 @@ export class Vector2 {
454
492
  * 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".
455
493
  * If a coordinate of "value" is lower than "min" coordinates, the returned Vector2 is given this "min" coordinate.
456
494
  * If a coordinate of "value" is greater than "max" coordinates, the returned Vector2 is given this "max" coordinate
495
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#76
457
496
  * @param value defines the value to clamp
458
497
  * @param min defines the lower limit
459
498
  * @param max defines the upper limit
@@ -470,6 +509,7 @@ export class Vector2 {
470
509
  }
471
510
  /**
472
511
  * Returns a new Vector2 located for "amount" (float) on the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2"
512
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#81
473
513
  * @param value1 defines the 1st control point
474
514
  * @param tangent1 defines the outgoing tangent
475
515
  * @param value2 defines the 2nd control point
@@ -490,6 +530,7 @@ export class Vector2 {
490
530
  }
491
531
  /**
492
532
  * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
533
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#82
493
534
  * @param value1 defines the first control point
494
535
  * @param tangent1 defines the first tangent
495
536
  * @param value2 defines the second control point
@@ -504,6 +545,7 @@ export class Vector2 {
504
545
  }
505
546
  /**
506
547
  * Returns a new Vector2 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
548
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#83
507
549
  * @param value1 defines the first control point
508
550
  * @param tangent1 defines the first tangent
509
551
  * @param value2 defines the second control point
@@ -518,6 +560,7 @@ export class Vector2 {
518
560
  }
519
561
  /**
520
562
  * Returns a new Vector2 located for "amount" (float) on the linear interpolation between the vector "start" adn the vector "end".
563
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#84
521
564
  * @param start defines the start vector
522
565
  * @param end defines the end vector
523
566
  * @param amount defines the interpolation factor
@@ -530,6 +573,7 @@ export class Vector2 {
530
573
  }
531
574
  /**
532
575
  * Gets the dot product of the vector "left" and the vector "right"
576
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#90
533
577
  * @param left defines first vector
534
578
  * @param right defines second vector
535
579
  * @returns the dot product (float)
@@ -539,6 +583,7 @@ export class Vector2 {
539
583
  }
540
584
  /**
541
585
  * Returns a new Vector2 equal to the normalized given vector
586
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#46
542
587
  * @param vector defines the vector to normalize
543
588
  * @returns a new Vector2
544
589
  */
@@ -549,6 +594,7 @@ export class Vector2 {
549
594
  }
550
595
  /**
551
596
  * Normalize a given vector into a second one
597
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#50
552
598
  * @param vector defines the vector to normalize
553
599
  * @param result defines the vector where to store the result
554
600
  */
@@ -562,6 +608,7 @@ export class Vector2 {
562
608
  }
563
609
  /**
564
610
  * Gets a new Vector2 set with the minimal coordinate values from the "left" and "right" vectors
611
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#86
565
612
  * @param left defines 1st vector
566
613
  * @param right defines 2nd vector
567
614
  * @returns a new Vector2
@@ -573,6 +620,7 @@ export class Vector2 {
573
620
  }
574
621
  /**
575
622
  * Gets a new Vector2 set with the maximal coordinate values from the "left" and "right" vectors
623
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#86
576
624
  * @param left defines 1st vector
577
625
  * @param right defines 2nd vector
578
626
  * @returns a new Vector2
@@ -584,6 +632,7 @@ export class Vector2 {
584
632
  }
585
633
  /**
586
634
  * Gets a new Vector2 set with the transformed coordinates of the given vector by the given transformation matrix
635
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#17
587
636
  * @param vector defines the vector to transform
588
637
  * @param transformation defines the matrix to apply
589
638
  * @returns a new Vector2
@@ -595,6 +644,7 @@ export class Vector2 {
595
644
  }
596
645
  /**
597
646
  * Transforms the given vector coordinates by the given transformation matrix and stores the result in the vector "result" coordinates
647
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#19
598
648
  * @param vector defines the vector to transform
599
649
  * @param transformation defines the matrix to apply
600
650
  * @param result defines the target vector
@@ -608,6 +658,7 @@ export class Vector2 {
608
658
  }
609
659
  /**
610
660
  * Determines if a given vector is included in a triangle
661
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#87
611
662
  * @param p defines the vector to test
612
663
  * @param p0 defines 1st triangle point
613
664
  * @param p1 defines 2nd triangle point
@@ -623,6 +674,7 @@ export class Vector2 {
623
674
  }
624
675
  /**
625
676
  * Gets the distance between the vectors "value1" and "value2"
677
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#71
626
678
  * @param value1 defines first vector
627
679
  * @param value2 defines second vector
628
680
  * @returns the distance between vectors
@@ -632,6 +684,7 @@ export class Vector2 {
632
684
  }
633
685
  /**
634
686
  * Returns the squared distance between the vectors "value1" and "value2"
687
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#72
635
688
  * @param value1 defines first vector
636
689
  * @param value2 defines second vector
637
690
  * @returns the squared distance between vectors
@@ -643,6 +696,8 @@ export class Vector2 {
643
696
  }
644
697
  /**
645
698
  * Gets a new Vector2 located at the center of the vectors "value1" and "value2"
699
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#86
700
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#66
646
701
  * @param value1 defines first vector
647
702
  * @param value2 defines second vector
648
703
  * @returns a new Vector2
@@ -652,6 +707,7 @@ export class Vector2 {
652
707
  }
653
708
  /**
654
709
  * Gets the center of the vectors "value1" and "value2" and stores the result in the vector "ref"
710
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#66
655
711
  * @param value1 defines first vector
656
712
  * @param value2 defines second vector
657
713
  * @param ref defines third vector
@@ -662,6 +718,7 @@ export class Vector2 {
662
718
  }
663
719
  /**
664
720
  * Gets the shortest distance (float) between the point "p" and the segment defined by the two points "segA" and "segB".
721
+ * Example Playground https://playground.babylonjs.com/#QYBWV4#77
665
722
  * @param p defines the middle point
666
723
  * @param segA defines one point of the segment
667
724
  * @param segB defines the other point of the segment
@@ -1514,6 +1571,7 @@ export class Vector3 {
1514
1571
  }
1515
1572
  /**
1516
1573
  * 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
1574
+ * Example PG https://playground.babylonjs.com/#R1F8YU#189
1517
1575
  * @param start the starting point
1518
1576
  * @param target the target point
1519
1577
  * @param ref the vector3 to store the result
@@ -1529,6 +1587,7 @@ export class Vector3 {
1529
1587
  }
1530
1588
  /**
1531
1589
  * Gets the rotation that aligns the roll axis (Y) to the line joining the start point to the target point
1590
+ * Example PG https://playground.babylonjs.com/#R1F8YU#188
1532
1591
  * @param start the starting point
1533
1592
  * @param target the target point
1534
1593
  * @returns the rotation in the form (pitch, yaw, 0)
@@ -3663,6 +3722,7 @@ export class Quaternion {
3663
3722
  }
3664
3723
  /**
3665
3724
  * Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3
3725
+ * Example PG https://playground.babylonjs.com/#L49EJ7#2
3666
3726
  * @param fromVector the starting vector
3667
3727
  * @param toVector the ending vector
3668
3728
  * @returns the rotation quaternion needed
@@ -3673,6 +3733,7 @@ export class Quaternion {
3673
3733
  }
3674
3734
  /**
3675
3735
  * Creates the rotation quaternion needed to rotate from one Vector3 onto another Vector3 and stores in a result Quaternion
3736
+ * Example PG https://playground.babylonjs.com/#L49EJ7#3
3676
3737
  * @param fromVector the starting vector
3677
3738
  * @param toVector the ending vector
3678
3739
  * @param result the rotation quaternion needed