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