@babylonjs/core 5.17.1 → 5.20.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 (159) hide show
  1. package/Debug/debugLayer.d.ts +36 -0
  2. package/Debug/debugLayer.js.map +1 -1
  3. package/DeviceInput/InputDevices/deviceSource.d.ts +1 -1
  4. package/DeviceInput/InputDevices/deviceSource.js.map +1 -1
  5. package/DeviceInput/InputDevices/deviceSourceManager.d.ts +1 -1
  6. package/DeviceInput/InputDevices/deviceSourceManager.js +1 -1
  7. package/DeviceInput/InputDevices/deviceSourceManager.js.map +1 -1
  8. package/DeviceInput/{Helpers/eventFactory.d.ts → eventFactory.d.ts} +4 -4
  9. package/DeviceInput/{Helpers/eventFactory.js → eventFactory.js} +2 -2
  10. package/DeviceInput/eventFactory.js.map +1 -0
  11. package/DeviceInput/{InputDevices/inputInterfaces.d.ts → inputInterfaces.d.ts} +2 -2
  12. package/DeviceInput/{InputDevices/inputInterfaces.js → inputInterfaces.js} +0 -0
  13. package/DeviceInput/inputInterfaces.js.map +1 -0
  14. package/DeviceInput/{InputDevices/internalDeviceSourceManager.d.ts → internalDeviceSourceManager.d.ts} +7 -7
  15. package/DeviceInput/{InputDevices/internalDeviceSourceManager.js → internalDeviceSourceManager.js} +2 -2
  16. package/DeviceInput/internalDeviceSourceManager.js.map +1 -0
  17. package/DeviceInput/{InputDevices/nativeDeviceInputSystem.d.ts → nativeDeviceInputSystem.d.ts} +2 -2
  18. package/DeviceInput/{InputDevices/nativeDeviceInputSystem.js → nativeDeviceInputSystem.js} +2 -2
  19. package/DeviceInput/nativeDeviceInputSystem.js.map +1 -0
  20. package/DeviceInput/{InputDevices/webDeviceInputSystem.d.ts → webDeviceInputSystem.d.ts} +3 -3
  21. package/DeviceInput/{InputDevices/webDeviceInputSystem.js → webDeviceInputSystem.js} +4 -4
  22. package/DeviceInput/webDeviceInputSystem.js.map +1 -0
  23. package/Engines/Extensions/engine.query.js +5 -1
  24. package/Engines/Extensions/engine.query.js.map +1 -1
  25. package/Engines/Extensions/engine.transformFeedback.js +5 -1
  26. package/Engines/Extensions/engine.transformFeedback.js.map +1 -1
  27. package/Engines/Extensions/engine.views.d.ts +13 -0
  28. package/Engines/Extensions/engine.views.js +16 -1
  29. package/Engines/Extensions/engine.views.js.map +1 -1
  30. package/Engines/Native/nativeInterfaces.d.ts +1 -1
  31. package/Engines/Native/nativeInterfaces.js.map +1 -1
  32. package/Engines/engine.d.ts +15 -240
  33. package/Engines/engineFeatures.d.ts +2 -0
  34. package/Engines/engineFeatures.js.map +1 -1
  35. package/Engines/nativeEngine.js +1 -0
  36. package/Engines/nativeEngine.js.map +1 -1
  37. package/Engines/nullEngine.js +1 -0
  38. package/Engines/nullEngine.js.map +1 -1
  39. package/Engines/thinEngine.d.ts +1 -1
  40. package/Engines/thinEngine.js +14 -4
  41. package/Engines/thinEngine.js.map +1 -1
  42. package/Engines/webgpuEngine.js +1 -0
  43. package/Engines/webgpuEngine.js.map +1 -1
  44. package/Gizmos/axisDragGizmo.d.ts +31 -9
  45. package/Gizmos/axisDragGizmo.js.map +1 -1
  46. package/Gizmos/axisScaleGizmo.d.ts +46 -14
  47. package/Gizmos/axisScaleGizmo.js.map +1 -1
  48. package/Gizmos/boundingBoxGizmo.d.ts +94 -19
  49. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  50. package/Gizmos/cameraGizmo.d.ts +23 -6
  51. package/Gizmos/cameraGizmo.js.map +1 -1
  52. package/Gizmos/gizmo.d.ts +48 -6
  53. package/Gizmos/gizmo.js.map +1 -1
  54. package/Gizmos/gizmoManager.d.ts +25 -17
  55. package/Gizmos/gizmoManager.js.map +1 -1
  56. package/Gizmos/lightGizmo.d.ts +25 -8
  57. package/Gizmos/lightGizmo.js.map +1 -1
  58. package/Gizmos/planeDragGizmo.d.ts +30 -9
  59. package/Gizmos/planeDragGizmo.js.map +1 -1
  60. package/Gizmos/planeRotationGizmo.d.ts +45 -15
  61. package/Gizmos/planeRotationGizmo.js.map +1 -1
  62. package/Gizmos/positionGizmo.d.ts +53 -17
  63. package/Gizmos/positionGizmo.js +1 -1
  64. package/Gizmos/positionGizmo.js.map +1 -1
  65. package/Gizmos/rotationGizmo.d.ts +35 -10
  66. package/Gizmos/rotationGizmo.js.map +1 -1
  67. package/Gizmos/scaleGizmo.d.ts +49 -18
  68. package/Gizmos/scaleGizmo.js.map +1 -1
  69. package/Loading/Plugins/babylonFileLoader.js +16 -4
  70. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  71. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.d.ts +39 -0
  72. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +97 -0
  73. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -0
  74. package/Materials/Node/Blocks/Fragment/index.d.ts +1 -0
  75. package/Materials/Node/Blocks/Fragment/index.js +1 -0
  76. package/Materials/Node/Blocks/Fragment/index.js.map +1 -1
  77. package/Materials/Node/Blocks/Vertex/lightInformationBlock.d.ts +18 -0
  78. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +85 -1
  79. package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
  80. package/Materials/Node/nodeMaterial.d.ts +6 -0
  81. package/Materials/Node/nodeMaterial.js +11 -0
  82. package/Materials/Node/nodeMaterial.js.map +1 -1
  83. package/Materials/Textures/Procedurals/proceduralTexture.js +5 -1
  84. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  85. package/Materials/Textures/renderTargetTexture.js +3 -0
  86. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  87. package/Materials/Textures/texture.js +9 -5
  88. package/Materials/Textures/texture.js.map +1 -1
  89. package/Materials/index.d.ts +1 -0
  90. package/Materials/index.js +1 -0
  91. package/Materials/index.js.map +1 -1
  92. package/Maths/math.vector.d.ts +134 -8
  93. package/Maths/math.vector.js +168 -36
  94. package/Maths/math.vector.js.map +1 -1
  95. package/Meshes/Compression/dracoCompression.js +1 -1
  96. package/Meshes/Compression/dracoCompression.js.map +1 -1
  97. package/Meshes/groundMesh.js +1 -1
  98. package/Meshes/groundMesh.js.map +1 -1
  99. package/Meshes/mesh.js +1 -0
  100. package/Meshes/mesh.js.map +1 -1
  101. package/Meshes/transformNode.js +1 -0
  102. package/Meshes/transformNode.js.map +1 -1
  103. package/Misc/assetsManager.d.ts +9 -0
  104. package/Misc/assetsManager.js +3 -1
  105. package/Misc/assetsManager.js.map +1 -1
  106. package/Misc/basis.js +10 -4
  107. package/Misc/basis.js.map +1 -1
  108. package/Misc/computePressure.d.ts +9 -3
  109. package/Misc/computePressure.js +13 -5
  110. package/Misc/computePressure.js.map +1 -1
  111. package/Misc/fileTools.js +2 -2
  112. package/Misc/fileTools.js.map +1 -1
  113. package/Misc/iInspectable.d.ts +12 -2
  114. package/Misc/iInspectable.js +4 -0
  115. package/Misc/iInspectable.js.map +1 -1
  116. package/Misc/khronosTextureContainer2.js +1 -1
  117. package/Misc/khronosTextureContainer2.js.map +1 -1
  118. package/Misc/sceneSerializer.js +1 -1
  119. package/Misc/sceneSerializer.js.map +1 -1
  120. package/Misc/tools.d.ts +2 -2
  121. package/Misc/tools.js +4 -1
  122. package/Misc/tools.js.map +1 -1
  123. package/Offline/database.js +6 -8
  124. package/Offline/database.js.map +1 -1
  125. package/Particles/solidParticleSystem.d.ts +1 -0
  126. package/Particles/solidParticleSystem.js +4 -1
  127. package/Particles/solidParticleSystem.js.map +1 -1
  128. package/Physics/Plugins/ammoJSPlugin.d.ts +2 -2
  129. package/Physics/Plugins/ammoJSPlugin.js +29 -29
  130. package/Physics/Plugins/ammoJSPlugin.js.map +1 -1
  131. package/Physics/Plugins/cannonJSPlugin.d.ts +2 -2
  132. package/Physics/Plugins/cannonJSPlugin.js +26 -26
  133. package/Physics/Plugins/cannonJSPlugin.js.map +1 -1
  134. package/Physics/Plugins/oimoJSPlugin.js +9 -11
  135. package/Physics/Plugins/oimoJSPlugin.js.map +1 -1
  136. package/Physics/physicsImpostor.d.ts +6 -6
  137. package/Physics/physicsImpostor.js +15 -8
  138. package/Physics/physicsImpostor.js.map +1 -1
  139. package/Shaders/sprites.fragment.js +1 -1
  140. package/Shaders/sprites.fragment.js.map +1 -1
  141. package/Sprites/spriteRenderer.js +1 -1
  142. package/Sprites/spriteRenderer.js.map +1 -1
  143. package/XR/webXRDefaultExperience.d.ts +10 -0
  144. package/XR/webXRDefaultExperience.js +2 -12
  145. package/XR/webXRDefaultExperience.js.map +1 -1
  146. package/XR/webXRExperienceHelper.js +12 -12
  147. package/XR/webXRExperienceHelper.js.map +1 -1
  148. package/node.d.ts +2 -0
  149. package/node.js +2 -0
  150. package/node.js.map +1 -1
  151. package/package.json +1 -1
  152. package/scene.d.ts +1 -1
  153. package/scene.js +5 -3
  154. package/scene.js.map +1 -1
  155. package/DeviceInput/Helpers/eventFactory.js.map +0 -1
  156. package/DeviceInput/InputDevices/inputInterfaces.js.map +0 -1
  157. package/DeviceInput/InputDevices/internalDeviceSourceManager.js.map +0 -1
  158. package/DeviceInput/InputDevices/nativeDeviceInputSystem.js.map +0 -1
  159. package/DeviceInput/InputDevices/webDeviceInputSystem.js.map +0 -1
@@ -11,6 +11,7 @@ export declare class Vector2 {
11
11
  x: number;
12
12
  /** defines the second coordinate */
13
13
  y: number;
14
+ private static _ZeroReadOnly;
14
15
  /**
15
16
  * Creates a new Vector2 from the given x and y coordinates
16
17
  * @param x defines the first coordinate
@@ -268,6 +269,10 @@ export declare class Vector2 {
268
269
  * @returns a new Vector2
269
270
  */
270
271
  static One(): Vector2;
272
+ /**
273
+ * Gets a zero Vector2 that must not be updated
274
+ */
275
+ static get ZeroReadOnly(): DeepImmutable<Vector2>;
271
276
  /**
272
277
  * Gets a new Vector2 set from the given index element of the given array
273
278
  * @param array defines the data source
@@ -439,9 +444,11 @@ export declare class Vector2 {
439
444
  * A Vector3 is the main object used in 3D geometry
440
445
  * It can represent either the coordinates of a point the space, either a direction
441
446
  * Reminder: js uses a left handed forward facing system
447
+ * Example Playground - Overview - https://playground.babylonjs.com/#R1F8YU
442
448
  */
443
449
  export declare class Vector3 {
444
450
  private static _UpReadOnly;
451
+ private static _DownReadOnly;
445
452
  private static _LeftHandedForwardReadOnly;
446
453
  private static _RightHandedForwardReadOnly;
447
454
  private static _RightReadOnly;
@@ -473,6 +480,7 @@ export declare class Vector3 {
473
480
  constructor(x?: number, y?: number, z?: number);
474
481
  /**
475
482
  * Creates a string representation of the Vector3
483
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#67
476
484
  * @returns a string with the Vector3 coordinates.
477
485
  */
478
486
  toString(): string;
@@ -488,11 +496,13 @@ export declare class Vector3 {
488
496
  getHashCode(): number;
489
497
  /**
490
498
  * Creates an array containing three elements : the coordinates of the Vector3
499
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#10
491
500
  * @returns a new array of numbers
492
501
  */
493
502
  asArray(): number[];
494
503
  /**
495
504
  * Populates the given array or Float32Array from the given index with the successive coordinates of the Vector3
505
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#65
496
506
  * @param array defines the destination array
497
507
  * @param index defines the offset in the destination array
498
508
  * @returns the current Vector3
@@ -500,6 +510,7 @@ export declare class Vector3 {
500
510
  toArray(array: FloatArray, index?: number): Vector3;
501
511
  /**
502
512
  * Update the current vector from an array
513
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#24
503
514
  * @param array defines the destination array
504
515
  * @param index defines the offset in the destination array
505
516
  * @returns the current Vector3
@@ -507,17 +518,20 @@ export declare class Vector3 {
507
518
  fromArray(array: FloatArray, index?: number): Vector3;
508
519
  /**
509
520
  * Converts the current Vector3 into a quaternion (considering that the Vector3 contains Euler angles representation of a rotation)
521
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#66
510
522
  * @returns a new Quaternion object, computed from the Vector3 coordinates
511
523
  */
512
524
  toQuaternion(): Quaternion;
513
525
  /**
514
526
  * Adds the given vector to the current Vector3
527
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#4
515
528
  * @param otherVector defines the second operand
516
529
  * @returns the current updated Vector3
517
530
  */
518
531
  addInPlace(otherVector: DeepImmutable<Vector3>): Vector3;
519
532
  /**
520
533
  * Adds the given coordinates to the current Vector3
534
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#5
521
535
  * @param x defines the x coordinate of the operand
522
536
  * @param y defines the y coordinate of the operand
523
537
  * @param z defines the z coordinate of the operand
@@ -526,12 +540,14 @@ export declare class Vector3 {
526
540
  addInPlaceFromFloats(x: number, y: number, z: number): Vector3;
527
541
  /**
528
542
  * Gets a new Vector3, result of the addition the current Vector3 and the given vector
543
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#3
529
544
  * @param otherVector defines the second operand
530
545
  * @returns the resulting Vector3
531
546
  */
532
547
  add(otherVector: DeepImmutable<Vector3>): Vector3;
533
548
  /**
534
549
  * Adds the current Vector3 to the given one and stores the result in the vector "result"
550
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#6
535
551
  * @param otherVector defines the second operand
536
552
  * @param result defines the Vector3 object where to store the result
537
553
  * @returns the current Vector3
@@ -539,18 +555,21 @@ export declare class Vector3 {
539
555
  addToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3;
540
556
  /**
541
557
  * Subtract the given vector from the current Vector3
558
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#61
542
559
  * @param otherVector defines the second operand
543
560
  * @returns the current updated Vector3
544
561
  */
545
562
  subtractInPlace(otherVector: DeepImmutable<Vector3>): Vector3;
546
563
  /**
547
564
  * Returns a new Vector3, result of the subtraction of the given vector from the current Vector3
565
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#60
548
566
  * @param otherVector defines the second operand
549
567
  * @returns the resulting Vector3
550
568
  */
551
569
  subtract(otherVector: DeepImmutable<Vector3>): Vector3;
552
570
  /**
553
571
  * Subtracts the given vector from the current Vector3 and stores the result in the vector "result".
572
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#63
554
573
  * @param otherVector defines the second operand
555
574
  * @param result defines the Vector3 object where to store the result
556
575
  * @returns the current Vector3
@@ -558,6 +577,7 @@ export declare class Vector3 {
558
577
  subtractToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3;
559
578
  /**
560
579
  * Returns a new Vector3 set with the subtraction of the given floats from the current Vector3 coordinates
580
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#62
561
581
  * @param x defines the x coordinate of the operand
562
582
  * @param y defines the y coordinate of the operand
563
583
  * @param z defines the z coordinate of the operand
@@ -566,6 +586,7 @@ export declare class Vector3 {
566
586
  subtractFromFloats(x: number, y: number, z: number): Vector3;
567
587
  /**
568
588
  * Subtracts the given floats from the current Vector3 coordinates and set the given vector "result" with this result
589
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#64
569
590
  * @param x defines the x coordinate of the operand
570
591
  * @param y defines the y coordinate of the operand
571
592
  * @param z defines the z coordinate of the operand
@@ -575,34 +596,40 @@ export declare class Vector3 {
575
596
  subtractFromFloatsToRef(x: number, y: number, z: number, result: Vector3): Vector3;
576
597
  /**
577
598
  * Gets a new Vector3 set with the current Vector3 negated coordinates
599
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#35
578
600
  * @returns a new Vector3
579
601
  */
580
602
  negate(): Vector3;
581
603
  /**
582
604
  * Negate this vector in place
605
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#36
583
606
  * @returns this
584
607
  */
585
608
  negateInPlace(): Vector3;
586
609
  /**
587
610
  * Negate the current Vector3 and stores the result in the given vector "result" coordinates
611
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#37
588
612
  * @param result defines the Vector3 object where to store the result
589
613
  * @returns the current Vector3
590
614
  */
591
615
  negateToRef(result: Vector3): Vector3;
592
616
  /**
593
617
  * Multiplies the Vector3 coordinates by the float "scale"
618
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#56
594
619
  * @param scale defines the multiplier factor
595
620
  * @returns the current updated Vector3
596
621
  */
597
622
  scaleInPlace(scale: number): Vector3;
598
623
  /**
599
624
  * Returns a new Vector3 set with the current Vector3 coordinates multiplied by the float "scale"
625
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#53
600
626
  * @param scale defines the multiplier factor
601
627
  * @returns a new Vector3
602
628
  */
603
629
  scale(scale: number): Vector3;
604
630
  /**
605
631
  * Multiplies the current Vector3 coordinates by the float "scale" and stores the result in the given vector "result" coordinates
632
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#57
606
633
  * @param scale defines the multiplier factor
607
634
  * @param result defines the Vector3 object where to store the result
608
635
  * @returns the current Vector3
@@ -610,6 +637,7 @@ export declare class Vector3 {
610
637
  scaleToRef(scale: number, result: Vector3): Vector3;
611
638
  /**
612
639
  * Rotates the vector using the given unit quaternion and stores the new vector in result
640
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#9
613
641
  * @param q the unit quaternion representing the rotation
614
642
  * @param result the output vector
615
643
  * @returns the current Vector3
@@ -617,32 +645,37 @@ export declare class Vector3 {
617
645
  applyRotationQuaternionToRef(q: Quaternion, result: Vector3): Vector3;
618
646
  /**
619
647
  * Rotates the vector in place using the given unit quaternion
648
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#8
620
649
  * @param q the unit quaternion representing the rotation
621
650
  * @returns the current updated Vector3
622
651
  */
623
652
  applyRotationQuaternionInPlace(q: Quaternion): Vector3;
624
653
  /**
625
654
  * Rotates the vector using the given unit quaternion and returns the new vector
655
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#7
626
656
  * @param q the unit quaternion representing the rotation
627
657
  * @returns a new Vector3
628
658
  */
629
659
  applyRotationQuaternion(q: Quaternion): Vector3;
630
660
  /**
631
661
  * Scale the current Vector3 values by a factor and add the result to a given Vector3
662
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#55
632
663
  * @param scale defines the scale factor
633
664
  * @param result defines the Vector3 object where to store the result
634
665
  * @returns the unmodified current Vector3
635
666
  */
636
667
  scaleAndAddToRef(scale: number, result: Vector3): Vector3;
637
668
  /**
638
- * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.
669
+ * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
670
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#48
639
671
  * @param plane defines the plane to project to
640
672
  * @param origin defines the origin of the projection ray
641
673
  * @returns the projected vector3
642
674
  */
643
675
  projectOnPlane(plane: Plane, origin: Vector3): Vector3;
644
676
  /**
645
- * Projects the current vector3 to a plane along a ray starting from a specified origin and directed towards the point.
677
+ * Projects the current point Vector3 to a plane along a ray starting from a specified origin and passing through the current point Vector3.
678
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#49
646
679
  * @param plane defines the plane to project to
647
680
  * @param origin defines the origin of the projection ray
648
681
  * @param result defines the Vector3 where to store the result
@@ -650,12 +683,14 @@ export declare class Vector3 {
650
683
  projectOnPlaneToRef(plane: Plane, origin: Vector3, result: Vector3): void;
651
684
  /**
652
685
  * Returns true if the current Vector3 and the given vector coordinates are strictly equal
686
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#19
653
687
  * @param otherVector defines the second operand
654
688
  * @returns true if both vectors are equals
655
689
  */
656
690
  equals(otherVector: DeepImmutable<Vector3>): boolean;
657
691
  /**
658
692
  * Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon
693
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#21
659
694
  * @param otherVector defines the second operand
660
695
  * @param epsilon defines the minimal distance to define values as equals
661
696
  * @returns true if both vectors are distant less than epsilon
@@ -663,26 +698,30 @@ export declare class Vector3 {
663
698
  equalsWithEpsilon(otherVector: DeepImmutable<Vector3>, epsilon?: number): boolean;
664
699
  /**
665
700
  * Returns true if the current Vector3 coordinates equals the given floats
701
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#20
666
702
  * @param x defines the x coordinate of the operand
667
703
  * @param y defines the y coordinate of the operand
668
704
  * @param z defines the z coordinate of the operand
669
- * @returns true if both vectors are equals
705
+ * @returns true if both vectors are equal
670
706
  */
671
707
  equalsToFloats(x: number, y: number, z: number): boolean;
672
708
  /**
673
709
  * Multiplies the current Vector3 coordinates by the given ones
710
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#32
674
711
  * @param otherVector defines the second operand
675
712
  * @returns the current updated Vector3
676
713
  */
677
714
  multiplyInPlace(otherVector: DeepImmutable<Vector3>): Vector3;
678
715
  /**
679
716
  * Returns a new Vector3, result of the multiplication of the current Vector3 by the given vector
717
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#31
680
718
  * @param otherVector defines the second operand
681
719
  * @returns the new Vector3
682
720
  */
683
721
  multiply(otherVector: DeepImmutable<Vector3>): Vector3;
684
722
  /**
685
723
  * Multiplies the current Vector3 by the given one and stores the result in the given vector "result"
724
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#33
686
725
  * @param otherVector defines the second operand
687
726
  * @param result defines the Vector3 object where to store the result
688
727
  * @returns the current Vector3
@@ -690,6 +729,7 @@ export declare class Vector3 {
690
729
  multiplyToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3;
691
730
  /**
692
731
  * Returns a new Vector3 set with the result of the multiplication of the current Vector3 coordinates by the given floats
732
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#34
693
733
  * @param x defines the x coordinate of the operand
694
734
  * @param y defines the y coordinate of the operand
695
735
  * @param z defines the z coordinate of the operand
@@ -698,12 +738,14 @@ export declare class Vector3 {
698
738
  multiplyByFloats(x: number, y: number, z: number): Vector3;
699
739
  /**
700
740
  * Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones
741
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#16
701
742
  * @param otherVector defines the second operand
702
743
  * @returns the new Vector3
703
744
  */
704
745
  divide(otherVector: DeepImmutable<Vector3>): Vector3;
705
746
  /**
706
747
  * Divides the current Vector3 coordinates by the given ones and stores the result in the given vector "result"
748
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#18
707
749
  * @param otherVector defines the second operand
708
750
  * @param result defines the Vector3 object where to store the result
709
751
  * @returns the current Vector3
@@ -711,24 +753,28 @@ export declare class Vector3 {
711
753
  divideToRef(otherVector: DeepImmutable<Vector3>, result: Vector3): Vector3;
712
754
  /**
713
755
  * Divides the current Vector3 coordinates by the given ones.
756
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#17
714
757
  * @param otherVector defines the second operand
715
758
  * @returns the current updated Vector3
716
759
  */
717
760
  divideInPlace(otherVector: Vector3): Vector3;
718
761
  /**
719
762
  * Updates the current Vector3 with the minimal coordinate values between its and the given vector ones
763
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#29
720
764
  * @param other defines the second operand
721
765
  * @returns the current updated Vector3
722
766
  */
723
767
  minimizeInPlace(other: DeepImmutable<Vector3>): Vector3;
724
768
  /**
725
769
  * Updates the current Vector3 with the maximal coordinate values between its and the given vector ones.
770
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#27
726
771
  * @param other defines the second operand
727
772
  * @returns the current updated Vector3
728
773
  */
729
774
  maximizeInPlace(other: DeepImmutable<Vector3>): Vector3;
730
775
  /**
731
776
  * Updates the current Vector3 with the minimal coordinate values between its and the given coordinates
777
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#30
732
778
  * @param x defines the x coordinate of the operand
733
779
  * @param y defines the y coordinate of the operand
734
780
  * @param z defines the z coordinate of the operand
@@ -737,6 +783,7 @@ export declare class Vector3 {
737
783
  minimizeInPlaceFromFloats(x: number, y: number, z: number): Vector3;
738
784
  /**
739
785
  * Updates the current Vector3 with the maximal coordinate values between its and the given coordinates.
786
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#28
740
787
  * @param x defines the x coordinate of the operand
741
788
  * @param y defines the y coordinate of the operand
742
789
  * @param z defines the z coordinate of the operand
@@ -756,42 +803,50 @@ export declare class Vector3 {
756
803
  get isNonUniform(): boolean;
757
804
  /**
758
805
  * Gets a new Vector3 from current Vector3 floored values
806
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#22
759
807
  * @returns a new Vector3
760
808
  */
761
809
  floor(): Vector3;
762
810
  /**
763
- * Gets a new Vector3 from current Vector3 floored values
811
+ * Gets a new Vector3 from current Vector3 fractional values
812
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#23
764
813
  * @returns a new Vector3
765
814
  */
766
815
  fract(): Vector3;
767
816
  /**
768
817
  * Gets the length of the Vector3
818
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#25
769
819
  * @returns the length of the Vector3
770
820
  */
771
821
  length(): number;
772
822
  /**
773
823
  * Gets the squared length of the Vector3
824
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#26
774
825
  * @returns squared length of the Vector3
775
826
  */
776
827
  lengthSquared(): number;
777
828
  /**
778
829
  * Gets a boolean indicating if the vector contains a zero in one of its components
830
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#1
779
831
  */
780
832
  get hasAZeroComponent(): boolean;
781
833
  /**
782
834
  * Normalize the current Vector3.
783
835
  * Please note that this is an in place operation.
836
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#122
784
837
  * @returns the current updated Vector3
785
838
  */
786
839
  normalize(): Vector3;
787
840
  /**
788
841
  * Reorders the x y z properties of the vector in place
842
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#44
789
843
  * @param order new ordering of the properties (eg. for vector 1,2,3 with "ZYX" will produce 3,2,1)
790
844
  * @returns the current updated vector
791
845
  */
792
846
  reorderInPlace(order: string): this;
793
847
  /**
794
848
  * Rotates the vector around 0,0,0 by a quaternion
849
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#47
795
850
  * @param quaternion the rotation quaternion
796
851
  * @param result vector to store the result
797
852
  * @returns the resulting vector
@@ -799,6 +854,7 @@ export declare class Vector3 {
799
854
  rotateByQuaternionToRef(quaternion: Quaternion, result: Vector3): Vector3;
800
855
  /**
801
856
  * Rotates a vector around a given point
857
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#46
802
858
  * @param quaternion the rotation quaternion
803
859
  * @param point the point to rotate around
804
860
  * @param result vector to store the result
@@ -808,6 +864,7 @@ export declare class Vector3 {
808
864
  /**
809
865
  * Returns a new Vector3 as the cross product of the current vector and the "other" one
810
866
  * The cross product is then orthogonal to both current and "other"
867
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#14
811
868
  * @param other defines the right operand
812
869
  * @returns the cross product
813
870
  */
@@ -815,34 +872,40 @@ export declare class Vector3 {
815
872
  /**
816
873
  * Normalize the current Vector3 with the given input length.
817
874
  * Please note that this is an in place operation.
875
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#123
818
876
  * @param len the length of the vector
819
877
  * @returns the current updated Vector3
820
878
  */
821
879
  normalizeFromLength(len: number): Vector3;
822
880
  /**
823
881
  * Normalize the current Vector3 to a new vector
882
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#124
824
883
  * @returns the new Vector3
825
884
  */
826
885
  normalizeToNew(): Vector3;
827
886
  /**
828
887
  * Normalize the current Vector3 to the reference
888
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#125
829
889
  * @param reference define the Vector3 to update
830
890
  * @returns the updated Vector3
831
891
  */
832
892
  normalizeToRef(reference: Vector3): Vector3;
833
893
  /**
834
894
  * Creates a new Vector3 copied from the current Vector3
895
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#11
835
896
  * @returns the new Vector3
836
897
  */
837
898
  clone(): Vector3;
838
899
  /**
839
900
  * Copies the given vector coordinates to the current Vector3 ones
901
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#12
840
902
  * @param source defines the source Vector3
841
903
  * @returns the current updated Vector3
842
904
  */
843
905
  copyFrom(source: DeepImmutable<Vector3>): Vector3;
844
906
  /**
845
907
  * Copies the given floats to the current Vector3 coordinates
908
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#13
846
909
  * @param x defines the x coordinate of the operand
847
910
  * @param y defines the y coordinate of the operand
848
911
  * @param z defines the z coordinate of the operand
@@ -851,6 +914,7 @@ export declare class Vector3 {
851
914
  copyFromFloats(x: number, y: number, z: number): Vector3;
852
915
  /**
853
916
  * Copies the given floats to the current Vector3 coordinates
917
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#58
854
918
  * @param x defines the x coordinate of the operand
855
919
  * @param y defines the y coordinate of the operand
856
920
  * @param z defines the z coordinate of the operand
@@ -859,12 +923,14 @@ export declare class Vector3 {
859
923
  set(x: number, y: number, z: number): Vector3;
860
924
  /**
861
925
  * Copies the given float to the current Vector3 coordinates
926
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#59
862
927
  * @param v defines the x, y and z coordinates of the operand
863
928
  * @returns the current updated Vector3
864
929
  */
865
930
  setAll(v: number): Vector3;
866
931
  /**
867
932
  * Get the clip factor between two vectors
933
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#126
868
934
  * @param vector0 defines the first operand
869
935
  * @param vector1 defines the second operand
870
936
  * @param axis defines the axis to use
@@ -874,6 +940,7 @@ export declare class Vector3 {
874
940
  static GetClipFactor(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, axis: DeepImmutable<Vector3>, size: number): number;
875
941
  /**
876
942
  * Get angle between two vectors
943
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#86
877
944
  * @param vector0 angle between vector0 and vector1
878
945
  * @param vector1 angle between vector0 and vector1
879
946
  * @param normal direction of the normal
@@ -882,6 +949,7 @@ export declare class Vector3 {
882
949
  static GetAngleBetweenVectors(vector0: DeepImmutable<Vector3>, vector1: DeepImmutable<Vector3>, normal: DeepImmutable<Vector3>): number;
883
950
  /**
884
951
  * Get angle between two vectors projected on a plane
952
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#87
885
953
  * @param vector0 angle between vector0 and vector1
886
954
  * @param vector1 angle between vector0 and vector1
887
955
  * @param normal Normal of the projection plane
@@ -890,6 +958,10 @@ export declare class Vector3 {
890
958
  static GetAngleBetweenVectorsOnPlane(vector0: Vector3, vector1: Vector3, normal: Vector3): number;
891
959
  /**
892
960
  * Slerp between two vectors. See also `SmoothToRef`
961
+ * Slerp is a spherical linear interpolation
962
+ * giving a slow in and out effect
963
+ * Example Playground 1 https://playground.babylonjs.com/#R1F8YU#108
964
+ * Example Playground 2 https://playground.babylonjs.com/#R1F8YU#109
893
965
  * @param vector0 Start vector
894
966
  * @param vector1 End vector
895
967
  * @param slerp amount (will be clamped between 0 and 1)
@@ -898,6 +970,7 @@ export declare class Vector3 {
898
970
  static SlerpToRef(vector0: Vector3, vector1: Vector3, slerp: number, result: Vector3): void;
899
971
  /**
900
972
  * Smooth interpolation between two vectors using Slerp
973
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#110
901
974
  * @param source source vector
902
975
  * @param goal goal vector
903
976
  * @param deltaTime current interpolation frame
@@ -907,6 +980,7 @@ export declare class Vector3 {
907
980
  static SmoothToRef(source: Vector3, goal: Vector3, deltaTime: number, lerpTime: number, result: Vector3): void;
908
981
  /**
909
982
  * Returns a new Vector3 set from the index "offset" of the given array
983
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#83
910
984
  * @param array defines the source array
911
985
  * @param offset defines the offset in the source array
912
986
  * @returns the new Vector3
@@ -922,6 +996,7 @@ export declare class Vector3 {
922
996
  static FromFloatArray(array: DeepImmutable<Float32Array>, offset?: number): Vector3;
923
997
  /**
924
998
  * Sets the given vector "result" with the element values from the index "offset" of the given array
999
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#84
925
1000
  * @param array defines the source array
926
1001
  * @param offset defines the offset in the source array
927
1002
  * @param result defines the Vector3 where to store the result
@@ -937,6 +1012,7 @@ export declare class Vector3 {
937
1012
  static FromFloatArrayToRef(array: DeepImmutable<Float32Array>, offset: number, result: Vector3): void;
938
1013
  /**
939
1014
  * Sets the given vector "result" with the given floats.
1015
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#85
940
1016
  * @param x defines the x coordinate of the source
941
1017
  * @param y defines the y coordinate of the source
942
1018
  * @param z defines the z coordinate of the source
@@ -950,18 +1026,23 @@ export declare class Vector3 {
950
1026
  static Zero(): Vector3;
951
1027
  /**
952
1028
  * Returns a new Vector3 set to (1.0, 1.0, 1.0)
953
- * @returns a new unit Vector3
1029
+ * @returns a new Vector3
954
1030
  */
955
1031
  static One(): Vector3;
956
1032
  /**
957
1033
  * Returns a new Vector3 set to (0.0, 1.0, 0.0)
1034
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
958
1035
  * @returns a new up Vector3
959
1036
  */
960
1037
  static Up(): Vector3;
961
1038
  /**
962
- * Gets a up Vector3 that must not be updated
1039
+ * Gets an up Vector3 that must not be updated
963
1040
  */
964
1041
  static get UpReadOnly(): DeepImmutable<Vector3>;
1042
+ /**
1043
+ * Gets a down Vector3 that must not be updated
1044
+ */
1045
+ static get DownReadOnly(): DeepImmutable<Vector3>;
965
1046
  /**
966
1047
  * Gets a right Vector3 that must not be updated
967
1048
  */
@@ -984,34 +1065,40 @@ export declare class Vector3 {
984
1065
  static get ZeroReadOnly(): DeepImmutable<Vector3>;
985
1066
  /**
986
1067
  * Returns a new Vector3 set to (0.0, -1.0, 0.0)
1068
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
987
1069
  * @returns a new down Vector3
988
1070
  */
989
1071
  static Down(): Vector3;
990
1072
  /**
991
1073
  * Returns a new Vector3 set to (0.0, 0.0, 1.0)
1074
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
992
1075
  * @param rightHandedSystem is the scene right-handed (negative z)
993
1076
  * @returns a new forward Vector3
994
1077
  */
995
1078
  static Forward(rightHandedSystem?: boolean): Vector3;
996
1079
  /**
997
1080
  * Returns a new Vector3 set to (0.0, 0.0, -1.0)
1081
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
998
1082
  * @param rightHandedSystem is the scene right-handed (negative-z)
999
- * @returns a new forward Vector3
1083
+ * @returns a new Backward Vector3
1000
1084
  */
1001
1085
  static Backward(rightHandedSystem?: boolean): Vector3;
1002
1086
  /**
1003
1087
  * Returns a new Vector3 set to (1.0, 0.0, 0.0)
1088
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
1004
1089
  * @returns a new right Vector3
1005
1090
  */
1006
1091
  static Right(): Vector3;
1007
1092
  /**
1008
1093
  * Returns a new Vector3 set to (-1.0, 0.0, 0.0)
1094
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#71
1009
1095
  * @returns a new left Vector3
1010
1096
  */
1011
1097
  static Left(): Vector3;
1012
1098
  /**
1013
1099
  * Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.
1014
1100
  * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
1101
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#111
1015
1102
  * @param vector defines the Vector3 to transform
1016
1103
  * @param transformation defines the transformation matrix
1017
1104
  * @returns the transformed Vector3
@@ -1020,6 +1107,7 @@ export declare class Vector3 {
1020
1107
  /**
1021
1108
  * Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given vector
1022
1109
  * This method computes transformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
1110
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#113
1023
1111
  * @param vector defines the Vector3 to transform
1024
1112
  * @param transformation defines the transformation matrix
1025
1113
  * @param result defines the Vector3 where to store the result
@@ -1028,6 +1116,7 @@ export declare class Vector3 {
1028
1116
  /**
1029
1117
  * Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)
1030
1118
  * This method computes transformed coordinates only, not transformed direction vectors
1119
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#115
1031
1120
  * @param x define the x coordinate of the source vector
1032
1121
  * @param y define the y coordinate of the source vector
1033
1122
  * @param z define the z coordinate of the source vector
@@ -1038,6 +1127,7 @@ export declare class Vector3 {
1038
1127
  /**
1039
1128
  * Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector
1040
1129
  * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
1130
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#112
1041
1131
  * @param vector defines the Vector3 to transform
1042
1132
  * @param transformation defines the transformation matrix
1043
1133
  * @returns the new Vector3
@@ -1046,6 +1136,7 @@ export declare class Vector3 {
1046
1136
  /**
1047
1137
  * Sets the given vector "result" with the result of the normal transformation by the given matrix of the given vector
1048
1138
  * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
1139
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#114
1049
1140
  * @param vector defines the Vector3 to transform
1050
1141
  * @param transformation defines the transformation matrix
1051
1142
  * @param result defines the Vector3 where to store the result
@@ -1054,6 +1145,7 @@ export declare class Vector3 {
1054
1145
  /**
1055
1146
  * Sets the given vector "result" with the result of the normal transformation by the given matrix of the given floats (x, y, z)
1056
1147
  * This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
1148
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#116
1057
1149
  * @param x define the x coordinate of the source vector
1058
1150
  * @param y define the y coordinate of the source vector
1059
1151
  * @param z define the z coordinate of the source vector
@@ -1063,6 +1155,7 @@ export declare class Vector3 {
1063
1155
  static TransformNormalFromFloatsToRef(x: number, y: number, z: number, transformation: DeepImmutable<Matrix>, result: Vector3): void;
1064
1156
  /**
1065
1157
  * Returns a new Vector3 located for "amount" on the CatmullRom interpolation spline defined by the vectors "value1", "value2", "value3", "value4"
1158
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#69
1066
1159
  * @param value1 defines the first control point
1067
1160
  * @param value2 defines the second control point
1068
1161
  * @param value3 defines the third control point
@@ -1075,6 +1168,7 @@ export declare class Vector3 {
1075
1168
  * Returns a new Vector3 set with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max"
1076
1169
  * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
1077
1170
  * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
1171
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#76
1078
1172
  * @param value defines the current value
1079
1173
  * @param min defines the lower range value
1080
1174
  * @param max defines the upper range value
@@ -1085,6 +1179,7 @@ export declare class Vector3 {
1085
1179
  * Sets the given vector "result" with the coordinates of "value", if the vector "value" is in the cube defined by the vectors "min" and "max"
1086
1180
  * If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
1087
1181
  * If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
1182
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#77
1088
1183
  * @param value defines the current value
1089
1184
  * @param min defines the lower range value
1090
1185
  * @param max defines the upper range value
@@ -1093,6 +1188,7 @@ export declare class Vector3 {
1093
1188
  static ClampToRef(value: DeepImmutable<Vector3>, min: DeepImmutable<Vector3>, max: DeepImmutable<Vector3>, result: Vector3): void;
1094
1189
  /**
1095
1190
  * Checks if a given vector is inside a specific range
1191
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#75
1096
1192
  * @param v defines the vector to test
1097
1193
  * @param min defines the minimum range
1098
1194
  * @param max defines the maximum range
@@ -1100,6 +1196,7 @@ export declare class Vector3 {
1100
1196
  static CheckExtends(v: Vector3, min: Vector3, max: Vector3): void;
1101
1197
  /**
1102
1198
  * Returns a new Vector3 located for "amount" (float) on the Hermite interpolation spline defined by the vectors "value1", "tangent1", "value2", "tangent2"
1199
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#89
1103
1200
  * @param value1 defines the first control point
1104
1201
  * @param tangent1 defines the first tangent vector
1105
1202
  * @param value2 defines the second control point
@@ -1110,6 +1207,7 @@ export declare class Vector3 {
1110
1207
  static Hermite(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, amount: number): Vector3;
1111
1208
  /**
1112
1209
  * Returns a new Vector3 which is the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
1210
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#90
1113
1211
  * @param value1 defines the first control point
1114
1212
  * @param tangent1 defines the first tangent
1115
1213
  * @param value2 defines the second control point
@@ -1120,6 +1218,7 @@ export declare class Vector3 {
1120
1218
  static Hermite1stDerivative(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, time: number): Vector3;
1121
1219
  /**
1122
1220
  * Update a Vector3 with the 1st derivative of the Hermite spline defined by the vectors "value1", "value2", "tangent1", "tangent2".
1221
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#91
1123
1222
  * @param value1 defines the first control point
1124
1223
  * @param tangent1 defines the first tangent
1125
1224
  * @param value2 defines the second control point
@@ -1130,6 +1229,7 @@ export declare class Vector3 {
1130
1229
  static Hermite1stDerivativeToRef(value1: DeepImmutable<Vector3>, tangent1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>, tangent2: DeepImmutable<Vector3>, time: number, result: Vector3): void;
1131
1230
  /**
1132
1231
  * Returns a new Vector3 located for "amount" (float) on the linear interpolation between the vectors "start" and "end"
1232
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#95
1133
1233
  * @param start defines the start value
1134
1234
  * @param end defines the end value
1135
1235
  * @param amount max defines amount between both (between 0 and 1)
@@ -1138,6 +1238,7 @@ export declare class Vector3 {
1138
1238
  static Lerp(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number): Vector3;
1139
1239
  /**
1140
1240
  * Sets the given vector "result" with the result of the linear interpolation from the vector "start" for "amount" to the vector "end"
1241
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#93
1141
1242
  * @param start defines the start value
1142
1243
  * @param end defines the end value
1143
1244
  * @param amount max defines amount between both (between 0 and 1)
@@ -1146,6 +1247,7 @@ export declare class Vector3 {
1146
1247
  static LerpToRef(start: DeepImmutable<Vector3>, end: DeepImmutable<Vector3>, amount: number, result: Vector3): void;
1147
1248
  /**
1148
1249
  * Returns the dot product (float) between the vectors "left" and "right"
1250
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#82
1149
1251
  * @param left defines the left operand
1150
1252
  * @param right defines the right operand
1151
1253
  * @returns the dot product
@@ -1154,6 +1256,7 @@ export declare class Vector3 {
1154
1256
  /**
1155
1257
  * Returns a new Vector3 as the cross product of the vectors "left" and "right"
1156
1258
  * The cross product is then orthogonal to both "left" and "right"
1259
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#15
1157
1260
  * @param left defines the left operand
1158
1261
  * @param right defines the right operand
1159
1262
  * @returns the cross product
@@ -1162,6 +1265,7 @@ export declare class Vector3 {
1162
1265
  /**
1163
1266
  * Sets the given vector "result" with the cross product of "left" and "right"
1164
1267
  * The cross product is then orthogonal to both "left" and "right"
1268
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#78
1165
1269
  * @param left defines the left operand
1166
1270
  * @param right defines the right operand
1167
1271
  * @param result defines the Vector3 where to store the result
@@ -1169,18 +1273,21 @@ export declare class Vector3 {
1169
1273
  static CrossToRef(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>, result: Vector3): void;
1170
1274
  /**
1171
1275
  * Returns a new Vector3 as the normalization of the given vector
1276
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#98
1172
1277
  * @param vector defines the Vector3 to normalize
1173
1278
  * @returns the new Vector3
1174
1279
  */
1175
1280
  static Normalize(vector: DeepImmutable<Vector3>): Vector3;
1176
1281
  /**
1177
1282
  * Sets the given vector "result" with the normalization of the given first vector
1283
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#98
1178
1284
  * @param vector defines the Vector3 to normalize
1179
1285
  * @param result defines the Vector3 where to store the result
1180
1286
  */
1181
1287
  static NormalizeToRef(vector: DeepImmutable<Vector3>, result: Vector3): void;
1182
1288
  /**
1183
1289
  * Project a Vector3 onto screen space
1290
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#101
1184
1291
  * @param vector defines the Vector3 to project
1185
1292
  * @param world defines the world matrix to use
1186
1293
  * @param transform defines the transform (view x projection) matrix to use
@@ -1190,6 +1297,7 @@ export declare class Vector3 {
1190
1297
  static Project(vector: DeepImmutable<Vector3>, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>, viewport: DeepImmutable<Viewport>): Vector3;
1191
1298
  /**
1192
1299
  * Project a Vector3 onto screen space to reference
1300
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#102
1193
1301
  * @param vector defines the Vector3 to project
1194
1302
  * @param world defines the world matrix to use
1195
1303
  * @param transform defines the transform (view x projection) matrix to use
@@ -1207,6 +1315,7 @@ export declare class Vector3 {
1207
1315
  static _UnprojectFromInvertedMatrixToRef(source: DeepImmutable<Vector3>, matrix: DeepImmutable<Matrix>, result: Vector3): void;
1208
1316
  /**
1209
1317
  * Unproject from screen space to object space
1318
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#121
1210
1319
  * @param source defines the screen space Vector3 to use
1211
1320
  * @param viewportWidth defines the current width of the viewport
1212
1321
  * @param viewportHeight defines the current height of the viewport
@@ -1217,6 +1326,7 @@ export declare class Vector3 {
1217
1326
  static UnprojectFromTransform(source: Vector3, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, transform: DeepImmutable<Matrix>): Vector3;
1218
1327
  /**
1219
1328
  * Unproject from screen space to object space
1329
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#117
1220
1330
  * @param source defines the screen space Vector3 to use
1221
1331
  * @param viewportWidth defines the current width of the viewport
1222
1332
  * @param viewportHeight defines the current height of the viewport
@@ -1228,6 +1338,7 @@ export declare class Vector3 {
1228
1338
  static Unproject(source: DeepImmutable<Vector3>, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>): Vector3;
1229
1339
  /**
1230
1340
  * Unproject from screen space to object space
1341
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#119
1231
1342
  * @param source defines the screen space Vector3 to use
1232
1343
  * @param viewportWidth defines the current width of the viewport
1233
1344
  * @param viewportHeight defines the current height of the viewport
@@ -1239,6 +1350,7 @@ export declare class Vector3 {
1239
1350
  static UnprojectToRef(source: DeepImmutable<Vector3>, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>, result: Vector3): void;
1240
1351
  /**
1241
1352
  * Unproject from screen space to object space
1353
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#120
1242
1354
  * @param sourceX defines the screen space x coordinate to use
1243
1355
  * @param sourceY defines the screen space y coordinate to use
1244
1356
  * @param sourceZ defines the screen space z coordinate to use
@@ -1252,6 +1364,7 @@ export declare class Vector3 {
1252
1364
  static UnprojectFloatsToRef(sourceX: float, sourceY: float, sourceZ: float, viewportWidth: number, viewportHeight: number, world: DeepImmutable<Matrix>, view: DeepImmutable<Matrix>, projection: DeepImmutable<Matrix>, result: Vector3): void;
1253
1365
  /**
1254
1366
  * Gets the minimal coordinate values between two Vector3
1367
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#97
1255
1368
  * @param left defines the first operand
1256
1369
  * @param right defines the second operand
1257
1370
  * @returns the new Vector3
@@ -1259,6 +1372,7 @@ export declare class Vector3 {
1259
1372
  static Minimize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3;
1260
1373
  /**
1261
1374
  * Gets the maximal coordinate values between two Vector3
1375
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#96
1262
1376
  * @param left defines the first operand
1263
1377
  * @param right defines the second operand
1264
1378
  * @returns the new Vector3
@@ -1266,6 +1380,7 @@ export declare class Vector3 {
1266
1380
  static Maximize(left: DeepImmutable<Vector3>, right: DeepImmutable<Vector3>): Vector3;
1267
1381
  /**
1268
1382
  * Returns the distance between the vectors "value1" and "value2"
1383
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#81
1269
1384
  * @param value1 defines the first operand
1270
1385
  * @param value2 defines the second operand
1271
1386
  * @returns the distance
@@ -1273,6 +1388,7 @@ export declare class Vector3 {
1273
1388
  static Distance(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): number;
1274
1389
  /**
1275
1390
  * Returns the squared distance between the vectors "value1" and "value2"
1391
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#80
1276
1392
  * @param value1 defines the first operand
1277
1393
  * @param value2 defines the second operand
1278
1394
  * @returns the squared distance
@@ -1281,6 +1397,7 @@ export declare class Vector3 {
1281
1397
  /**
1282
1398
  * Projects "vector" on the triangle determined by its extremities "p0", "p1" and "p2", stores the result in "ref"
1283
1399
  * and returns the distance to the projected point.
1400
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#104
1284
1401
  * From http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.104.4264&rep=rep1&type=pdf
1285
1402
  *
1286
1403
  * @param vector the vector to get distance from
@@ -1293,6 +1410,7 @@ export declare class Vector3 {
1293
1410
  static ProjectOnTriangleToRef(vector: DeepImmutable<Vector3>, p0: DeepImmutable<Vector3>, p1: DeepImmutable<Vector3>, p2: DeepImmutable<Vector3>, ref: Vector3): number;
1294
1411
  /**
1295
1412
  * Returns a new Vector3 located at the center between "value1" and "value2"
1413
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#72
1296
1414
  * @param value1 defines the first operand
1297
1415
  * @param value2 defines the second operand
1298
1416
  * @returns the new Vector3
@@ -1300,6 +1418,7 @@ export declare class Vector3 {
1300
1418
  static Center(value1: DeepImmutable<Vector3>, value2: DeepImmutable<Vector3>): Vector3;
1301
1419
  /**
1302
1420
  * Gets the center of the vectors "value1" and "value2" and stores the result in the vector "ref"
1421
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#73
1303
1422
  * @param value1 defines first vector
1304
1423
  * @param value2 defines second vector
1305
1424
  * @param ref defines third vector
@@ -1311,6 +1430,7 @@ export declare class Vector3 {
1311
1430
  * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply
1312
1431
  * to something in order to rotate it from its local system to the given target system
1313
1432
  * Note: axis1, axis2 and axis3 are normalized during this operation
1433
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#106
1314
1434
  * @param axis1 defines the first axis
1315
1435
  * @param axis2 defines the second axis
1316
1436
  * @param axis3 defines the third axis
@@ -1320,6 +1440,7 @@ export declare class Vector3 {
1320
1440
  static RotationFromAxis(axis1: DeepImmutable<Vector3>, axis2: DeepImmutable<Vector3>, axis3: DeepImmutable<Vector3>): Vector3;
1321
1441
  /**
1322
1442
  * The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3
1443
+ * Example Playground https://playground.babylonjs.com/#R1F8YU#107
1323
1444
  * @param axis1 defines the first axis
1324
1445
  * @param axis2 defines the second axis
1325
1446
  * @param axis3 defines the third axis
@@ -1339,6 +1460,7 @@ export declare class Vector4 {
1339
1460
  z: number;
1340
1461
  /** w value of the vector */
1341
1462
  w: number;
1463
+ private static _ZeroReadOnly;
1342
1464
  /**
1343
1465
  * Creates a Vector4 object from the given floats.
1344
1466
  * @param x x value of the vector
@@ -1578,7 +1700,7 @@ export declare class Vector4 {
1578
1700
  */
1579
1701
  floor(): Vector4;
1580
1702
  /**
1581
- * Gets a new Vector4 from current Vector3 floored values
1703
+ * Gets a new Vector4 from current Vector4 fractional values
1582
1704
  * @returns a new Vector4
1583
1705
  */
1584
1706
  fract(): Vector4;
@@ -1677,6 +1799,10 @@ export declare class Vector4 {
1677
1799
  * @returns the new vector
1678
1800
  */
1679
1801
  static One(): Vector4;
1802
+ /**
1803
+ * Gets a zero Vector4 that must not be updated
1804
+ */
1805
+ static get ZeroReadOnly(): DeepImmutable<Vector4>;
1680
1806
  /**
1681
1807
  * Returns a new normalized Vector4 from the given one.
1682
1808
  * @param vector the vector to normalize