@dcl/sdk 7.0.0-3040969877.commit-184260d → 7.0.0-3045967591.commit-85b242a
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/dist/ecs7/index.d.ts +406 -92
- package/dist/ecs7/index.js +2897 -373
- package/dist/ecs7/index.min.js +1 -1
- package/dist/ecs7/index.min.js.map +1 -1
- package/package.json +4 -4
- package/types/ecs7/index.d.ts +405 -91
package/dist/ecs7/index.d.ts
CHANGED
@@ -443,14 +443,6 @@ export declare const CylinderShape: ComponentDefinition<ISchema<PBCylinderShape>
|
|
443
443
|
*/
|
444
444
|
export declare type DeepReadonly<T> = T extends ReadonlyPrimitive ? T : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
445
445
|
|
446
|
-
/**
|
447
|
-
* Make each field readonly deeply
|
448
|
-
* @public
|
449
|
-
*/
|
450
|
-
declare type DeepReadonly_2<T> = {
|
451
|
-
readonly [P in keyof T]: DeepReadonly_2<T[P]>;
|
452
|
-
};
|
453
|
-
|
454
446
|
/**
|
455
447
|
* @public
|
456
448
|
*/
|
@@ -508,9 +500,6 @@ declare function defineSdkComponents(engine: PreEngine): {
|
|
508
500
|
*/
|
509
501
|
export declare const DEG2RAD: number;
|
510
502
|
|
511
|
-
/** @public */
|
512
|
-
export declare type double = number;
|
513
|
-
|
514
503
|
/**
|
515
504
|
* @public
|
516
505
|
*/
|
@@ -532,12 +521,6 @@ export declare type Entity = number & {
|
|
532
521
|
|
533
522
|
declare const entitySymbol: unique symbol;
|
534
523
|
|
535
|
-
/**
|
536
|
-
* Constant used to define the minimal number value in Babylon.js
|
537
|
-
* @public
|
538
|
-
*/
|
539
|
-
export declare const Epsilon = 0.000001;
|
540
|
-
|
541
524
|
export declare const error: (message: string | Error, data?: any) => void;
|
542
525
|
|
543
526
|
/** Excludes property keys from T where the property is assignable to U */
|
@@ -553,10 +536,7 @@ declare const enum FilterMode {
|
|
553
536
|
}
|
554
537
|
|
555
538
|
/** @public */
|
556
|
-
|
557
|
-
|
558
|
-
/** @public */
|
559
|
-
export declare type FloatArray = number[];
|
539
|
+
declare type FloatArray = number[];
|
560
540
|
|
561
541
|
declare const enum Font {
|
562
542
|
LiberationSans = 0,
|
@@ -707,21 +687,6 @@ export declare type ISchema<T = any> = {
|
|
707
687
|
create(): T;
|
708
688
|
};
|
709
689
|
|
710
|
-
/**
|
711
|
-
* Interface for the size containing width and height
|
712
|
-
* @public
|
713
|
-
*/
|
714
|
-
export declare interface ISize {
|
715
|
-
/**
|
716
|
-
* Width
|
717
|
-
*/
|
718
|
-
width: number;
|
719
|
-
/**
|
720
|
-
* Heighht
|
721
|
-
*/
|
722
|
-
height: number;
|
723
|
-
}
|
724
|
-
|
725
690
|
/**
|
726
691
|
* Check if a pointer event has been emited in the last tick-update.
|
727
692
|
* @param entity the entity to query, for global clicks use `engine.RootEntity`
|
@@ -774,11 +739,23 @@ declare namespace Matrix {
|
|
774
739
|
_isIdentity3x2Dirty: boolean;
|
775
740
|
_m: Matrix4x4;
|
776
741
|
};
|
777
|
-
type ReadonlyMatrix =
|
742
|
+
type ReadonlyMatrix = {
|
743
|
+
/**
|
744
|
+
* Gets the update flag of the matrix which is an unique number for the matrix.
|
745
|
+
* It will be incremented every time the matrix data change.
|
746
|
+
* You can use it to speed the comparison between two versions of the same matrix.
|
747
|
+
*/
|
748
|
+
readonly updateFlag: number;
|
749
|
+
readonly isIdentity: boolean;
|
750
|
+
readonly isIdentity3x2: boolean;
|
751
|
+
readonly _isIdentityDirty: boolean;
|
752
|
+
readonly _isIdentity3x2Dirty: boolean;
|
753
|
+
readonly _m: Matrix4x4;
|
754
|
+
};
|
778
755
|
/**
|
779
756
|
* Gets the internal data of the matrix
|
780
757
|
*/
|
781
|
-
function m(self: MutableMatrix):
|
758
|
+
function m(self: MutableMatrix): Matrix4x4;
|
782
759
|
/**
|
783
760
|
* Gets an identity matrix that must not be updated
|
784
761
|
*/
|
@@ -793,14 +770,14 @@ declare namespace Matrix {
|
|
793
770
|
* @param offset - defines an offset in the source array
|
794
771
|
* @returns a new Matrix set from the starting index of the given array
|
795
772
|
*/
|
796
|
-
function fromArray(array:
|
773
|
+
function fromArray(array: Matrix4x4, offset?: number): MutableMatrix;
|
797
774
|
/**
|
798
775
|
* Copy the content of an array into a given matrix
|
799
776
|
* @param array - defines the source array
|
800
777
|
* @param offset - defines an offset in the source array
|
801
778
|
* @param result - defines the target matrix
|
802
779
|
*/
|
803
|
-
function fromArrayToRef(array:
|
780
|
+
function fromArrayToRef(array: Matrix4x4, offset: number, result: MutableMatrix): void;
|
804
781
|
/**
|
805
782
|
* Stores an array into a matrix after having multiplied each component by a given factor
|
806
783
|
* @param array - defines the source array
|
@@ -1246,12 +1223,12 @@ declare namespace Matrix {
|
|
1246
1223
|
* Returns the matrix as a FloatArray
|
1247
1224
|
* @returns the matrix underlying array
|
1248
1225
|
*/
|
1249
|
-
function toArray(self: ReadonlyMatrix):
|
1226
|
+
function toArray(self: ReadonlyMatrix): Matrix4x4;
|
1250
1227
|
/**
|
1251
1228
|
* Returns the matrix as a FloatArray
|
1252
1229
|
* @returns the matrix underlying array.
|
1253
1230
|
*/
|
1254
|
-
function asArray(self: ReadonlyMatrix):
|
1231
|
+
function asArray(self: ReadonlyMatrix): Matrix4x4;
|
1255
1232
|
/**
|
1256
1233
|
* Sets all the matrix elements to zero
|
1257
1234
|
* @returns the current matrix
|
@@ -1466,9 +1443,6 @@ export declare const MeshRenderer: ComponentDefinition<ISchema<PBMeshRenderer>,
|
|
1466
1443
|
/** @public */
|
1467
1444
|
export declare const NFTShape: ComponentDefinition<ISchema<PBNFTShape>, PBNFTShape>;
|
1468
1445
|
|
1469
|
-
/** @public */
|
1470
|
-
export declare type Nullable<T> = T | null;
|
1471
|
-
|
1472
1446
|
/**
|
1473
1447
|
* The Observable class is a simple implementation of the Observable pattern.
|
1474
1448
|
*
|
@@ -1815,19 +1789,6 @@ export declare const onVideoEvent: Observable<{
|
|
1815
1789
|
totalVideoLength: number;
|
1816
1790
|
}>;
|
1817
1791
|
|
1818
|
-
/**
|
1819
|
-
* Defines potential orientation for back face culling
|
1820
|
-
* @public
|
1821
|
-
*/
|
1822
|
-
export declare enum Orientation {
|
1823
|
-
/**
|
1824
|
-
* Clockwise
|
1825
|
-
*/
|
1826
|
-
CW = 0,
|
1827
|
-
/** Counter clockwise */
|
1828
|
-
CCW = 1
|
1829
|
-
}
|
1830
|
-
|
1831
1792
|
declare interface PBAnimationState {
|
1832
1793
|
name: string;
|
1833
1794
|
clip: string;
|
@@ -2301,7 +2262,16 @@ declare namespace Plane {
|
|
2301
2262
|
*/
|
2302
2263
|
d: number;
|
2303
2264
|
};
|
2304
|
-
type ReadonlyPlane =
|
2265
|
+
type ReadonlyPlane = {
|
2266
|
+
/**
|
2267
|
+
* Normal of the plane (a,b,c)
|
2268
|
+
*/
|
2269
|
+
normal: Vector3.ReadonlyVector3;
|
2270
|
+
/**
|
2271
|
+
* d component of the plane
|
2272
|
+
*/
|
2273
|
+
d: number;
|
2274
|
+
};
|
2305
2275
|
/**
|
2306
2276
|
* Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0
|
2307
2277
|
* @param a - a component of the plane
|
@@ -2318,7 +2288,7 @@ declare namespace Plane {
|
|
2318
2288
|
* @param array - the array to create a plane from
|
2319
2289
|
* @returns a new Plane from the given array.
|
2320
2290
|
*/
|
2321
|
-
function fromArray(array:
|
2291
|
+
function fromArray(array: number[]): MutablePlane;
|
2322
2292
|
/**
|
2323
2293
|
* Creates a plane from three points
|
2324
2294
|
* @param point1 - point used to create the plane
|
@@ -2456,7 +2426,12 @@ export declare namespace Quaternion {
|
|
2456
2426
|
/**
|
2457
2427
|
* @public
|
2458
2428
|
*/
|
2459
|
-
export type ReadonlyQuaternion =
|
2429
|
+
export type ReadonlyQuaternion = {
|
2430
|
+
readonly y: number;
|
2431
|
+
readonly x: number;
|
2432
|
+
readonly z: number;
|
2433
|
+
readonly w: number;
|
2434
|
+
};
|
2460
2435
|
/**
|
2461
2436
|
* Creates a new Quaternion from the given floats
|
2462
2437
|
* @param x - defines the first component (0 by default)
|
@@ -2598,6 +2573,22 @@ export declare namespace Quaternion {
|
|
2598
2573
|
*/
|
2599
2574
|
export function multiplyToRef(self: ReadonlyQuaternion, q1: ReadonlyQuaternion, result: MutableQuaternion): void;
|
2600
2575
|
export function angleAxis(degress: number, axis: Vector3.ReadonlyVector3): MutableQuaternion;
|
2576
|
+
/**
|
2577
|
+
* Creates a new quaternion containing the rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation)
|
2578
|
+
* @param axis1 - defines the first axis
|
2579
|
+
* @param axis2 - defines the second axis
|
2580
|
+
* @param axis3 - defines the third axis
|
2581
|
+
* @returns the new quaternion
|
2582
|
+
*/
|
2583
|
+
export function rotationQuaternionFromAxis(axis1: Vector3.ReadonlyVector3, axis2: Vector3.ReadonlyVector3, axis3: Vector3.ReadonlyVector3): MutableQuaternion;
|
2584
|
+
/**
|
2585
|
+
* Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion
|
2586
|
+
* @param axis1 - defines the first axis
|
2587
|
+
* @param axis2 - defines the second axis
|
2588
|
+
* @param axis3 - defines the third axis
|
2589
|
+
* @param ref - defines the target quaternion
|
2590
|
+
*/
|
2591
|
+
export function rotationQuaternionFromAxisToRef(axis1: Vector3.ReadonlyVector3, axis2: Vector3.ReadonlyVector3, axis3: Vector3.ReadonlyVector3, ref: MutableQuaternion): void;
|
2601
2592
|
/**
|
2602
2593
|
* Returns a zero filled quaternion
|
2603
2594
|
*/
|
@@ -2687,19 +2678,6 @@ export declare namespace Schemas {
|
|
2687
2678
|
*/
|
2688
2679
|
export declare type SdkComponents = ReturnType<typeof defineSdkComponents>;
|
2689
2680
|
|
2690
|
-
/**
|
2691
|
-
* Defines supported spaces
|
2692
|
-
* @public
|
2693
|
-
*/
|
2694
|
-
export declare enum Space {
|
2695
|
-
/** Local (object) space */
|
2696
|
-
LOCAL = 0,
|
2697
|
-
/** World space */
|
2698
|
-
WORLD = 1,
|
2699
|
-
/** Bone space */
|
2700
|
-
BONE = 2
|
2701
|
-
}
|
2702
|
-
|
2703
2681
|
/**
|
2704
2682
|
* @public
|
2705
2683
|
*/
|
@@ -2733,18 +2711,6 @@ declare const enum TextureWrapMode {
|
|
2733
2711
|
UNRECOGNIZED = -1
|
2734
2712
|
}
|
2735
2713
|
|
2736
|
-
/**
|
2737
|
-
* Constant used to convert a value to gamma space
|
2738
|
-
* @public
|
2739
|
-
*/
|
2740
|
-
export declare const ToGammaSpace: number;
|
2741
|
-
|
2742
|
-
/**
|
2743
|
-
* Constant used to convert a value to linear space
|
2744
|
-
* @public
|
2745
|
-
*/
|
2746
|
-
export declare const ToLinearSpace = 2.2;
|
2747
|
-
|
2748
2714
|
declare type ToOptional<T> = OnlyOptionalUndefinedTypes<T> & OnlyNonUndefinedTypes<T>;
|
2749
2715
|
|
2750
2716
|
/** @public */
|
@@ -2812,14 +2778,23 @@ export declare namespace Vector3 {
|
|
2812
2778
|
* @public
|
2813
2779
|
*/
|
2814
2780
|
export type MutableVector3 = {
|
2815
|
-
y: number;
|
2816
2781
|
x: number;
|
2782
|
+
y: number;
|
2817
2783
|
z: number;
|
2818
2784
|
};
|
2819
2785
|
/**
|
2820
2786
|
* @public
|
2821
2787
|
*/
|
2822
|
-
export type ReadonlyVector3 =
|
2788
|
+
export type ReadonlyVector3 = {
|
2789
|
+
readonly x: number;
|
2790
|
+
readonly y: number;
|
2791
|
+
readonly z: number;
|
2792
|
+
};
|
2793
|
+
/**
|
2794
|
+
* Gets a boolean indicating that the vector is non uniform meaning x, y or z are not all the same
|
2795
|
+
* @param vector - vector to check
|
2796
|
+
*/
|
2797
|
+
export function isNonUniform(vector: ReadonlyVector3): boolean;
|
2823
2798
|
/**
|
2824
2799
|
* Creates a new Vector3 object from the given x, y, z (floats) coordinates.
|
2825
2800
|
* @param x - defines the first coordinates (on X axis)
|
@@ -2846,31 +2821,100 @@ export declare namespace Vector3 {
|
|
2846
2821
|
* @returns the resulting vector
|
2847
2822
|
*/
|
2848
2823
|
export function add(vector1: ReadonlyVector3, vector2: ReadonlyVector3): MutableVector3;
|
2824
|
+
/**
|
2825
|
+
* Add component by component the vector2 into dest
|
2826
|
+
* @param dest - the first vector and destination of addition
|
2827
|
+
* @param vector2 - the second vector
|
2828
|
+
*/
|
2829
|
+
export function addToRef(vector1: ReadonlyVector3, vector2: ReadonlyVector3, result: MutableVector3): void;
|
2849
2830
|
/**
|
2850
2831
|
* Returns a new Vector3 as the result of the substraction of the two given vectors.
|
2851
2832
|
* @returns the resulting vector
|
2852
2833
|
*/
|
2853
|
-
export function subtract(
|
2834
|
+
export function subtract(vector1: ReadonlyVector3, vector2: ReadonlyVector3): MutableVector3;
|
2854
2835
|
/**
|
2855
2836
|
* Returns a new Vector3 as the result of the substraction of the two given vectors.
|
2856
2837
|
* @returns the resulting vector
|
2857
2838
|
*/
|
2858
|
-
export function subtractToRef(
|
2839
|
+
export function subtractToRef(vector1: ReadonlyVector3, vector2: ReadonlyVector3, result: MutableVector3): void;
|
2840
|
+
/**
|
2841
|
+
* Subtracts the given floats from the current Vector3 coordinates and set the given vector "result" with this result
|
2842
|
+
* @param x - defines the x coordinate of the operand
|
2843
|
+
* @param y - defines the y coordinate of the operand
|
2844
|
+
* @param z - defines the z coordinate of the operand
|
2845
|
+
* @param result - defines the Vector3 object where to store the result
|
2846
|
+
*/
|
2847
|
+
export function subtractFromFloatsToRef(vector1: ReadonlyVector3, x: number, y: number, z: number, result: MutableVector3): void;
|
2859
2848
|
/**
|
2860
2849
|
* Returns a new Vector3 with the other sign
|
2861
2850
|
* @returns the resulting vector
|
2862
2851
|
*/
|
2863
|
-
export function
|
2852
|
+
export function negate(value: ReadonlyVector3): MutableVector3;
|
2864
2853
|
/**
|
2865
2854
|
* Copy source into dest
|
2866
2855
|
*
|
2867
2856
|
*/
|
2868
2857
|
export function copy(source: ReadonlyVector3, dest: MutableVector3): void;
|
2858
|
+
/**
|
2859
|
+
* Sets the given vector "dest" with the given floats.
|
2860
|
+
* @param x - defines the x coordinate of the source
|
2861
|
+
* @param y - defines the y coordinate of the source
|
2862
|
+
* @param z - defines the z coordinate of the source
|
2863
|
+
* @param dest - defines the Vector3 where to store the result
|
2864
|
+
*/
|
2865
|
+
export function copyFromFloats(x: number, y: number, z: number, dest: MutableVector3): void;
|
2869
2866
|
/**
|
2870
2867
|
* Returns a new Vector3 with the same value
|
2871
2868
|
* @returns the resulting vector
|
2872
2869
|
*/
|
2873
2870
|
export function clone(source: ReadonlyVector3): MutableVector3;
|
2871
|
+
/**
|
2872
|
+
* Get the clip factor between two vectors
|
2873
|
+
* @param vector0 - defines the first operand
|
2874
|
+
* @param vector1 - defines the second operand
|
2875
|
+
* @param axis - defines the axis to use
|
2876
|
+
* @param size - defines the size along the axis
|
2877
|
+
* @returns the clip factor
|
2878
|
+
*/
|
2879
|
+
export function getClipFactor(vector0: ReadonlyVector3, vector1: ReadonlyVector3, axis: ReadonlyVector3, size: number): number;
|
2880
|
+
/**
|
2881
|
+
* Get angle between two vectors
|
2882
|
+
* @param vector0 - angle between vector0 and vector1
|
2883
|
+
* @param vector1 - angle between vector0 and vector1
|
2884
|
+
* @param normal - direction of the normal
|
2885
|
+
* @returns the angle between vector0 and vector1
|
2886
|
+
*/
|
2887
|
+
export function getAngleBetweenVectors(vector0: ReadonlyVector3, vector1: ReadonlyVector3, normal: ReadonlyVector3): number;
|
2888
|
+
/**
|
2889
|
+
* Returns a new Vector3 set from the index "offset" of the given array
|
2890
|
+
* @param array - defines the source array
|
2891
|
+
* @param offset - defines the offset in the source array
|
2892
|
+
* @returns the new Vector3
|
2893
|
+
*/
|
2894
|
+
export function fromArray(array: FloatArray, offset?: number): MutableVector3;
|
2895
|
+
/**
|
2896
|
+
* Returns a new Vector3 set from the index "offset" of the given FloatArray
|
2897
|
+
* This function is deprecated. Use FromArray instead
|
2898
|
+
* @param array - defines the source array
|
2899
|
+
* @param offset - defines the offset in the source array
|
2900
|
+
* @returns the new Vector3
|
2901
|
+
*/
|
2902
|
+
export function fromFloatArray(array: FloatArray, offset?: number): MutableVector3;
|
2903
|
+
/**
|
2904
|
+
* Sets the given vector "result" with the element values from the index "offset" of the given array
|
2905
|
+
* @param array - defines the source array
|
2906
|
+
* @param offset - defines the offset in the source array
|
2907
|
+
* @param result - defines the Vector3 where to store the result
|
2908
|
+
*/
|
2909
|
+
export function fromArrayToRef(array: number[], offset: number, result: MutableVector3): void;
|
2910
|
+
/**
|
2911
|
+
* Sets the given vector "result" with the element values from the index "offset" of the given FloatArray
|
2912
|
+
* This function is deprecated. Use FromArrayToRef instead.
|
2913
|
+
* @param array - defines the source array
|
2914
|
+
* @param offset - defines the offset in the source array
|
2915
|
+
* @param result - defines the Vector3 where to store the result
|
2916
|
+
*/
|
2917
|
+
export function fromFloatArrayToRef(array: FloatArray, offset: number, result: MutableVector3): void;
|
2874
2918
|
/**
|
2875
2919
|
* Gets the length of the Vector3
|
2876
2920
|
* @returns the length of the Vecto3
|
@@ -2926,13 +2970,31 @@ export declare namespace Vector3 {
|
|
2926
2970
|
* @returns the dot product
|
2927
2971
|
*/
|
2928
2972
|
export function dot(left: ReadonlyVector3, right: ReadonlyVector3): number;
|
2973
|
+
/**
|
2974
|
+
* Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective
|
2975
|
+
* @param matrix - The transformation matrix
|
2976
|
+
* @returns result Vector3
|
2977
|
+
*/
|
2978
|
+
export function applyMatrix4(vector: ReadonlyVector3, matrix: Matrix.ReadonlyMatrix): MutableVector3;
|
2979
|
+
/**
|
2980
|
+
* Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective and set the given vector "result" with this result
|
2981
|
+
* @param matrix - The transformation matrix
|
2982
|
+
* @param result - defines the Vector3 object where to store the result
|
2983
|
+
*/
|
2984
|
+
export function applyMatrix4ToRef(vector: ReadonlyVector3, matrix: Matrix.ReadonlyMatrix, result: MutableVector3): void;
|
2985
|
+
/**
|
2986
|
+
* Rotates the current Vector3 based on the given quaternion
|
2987
|
+
* @param q - defines the Quaternion
|
2988
|
+
* @returns the current Vector3
|
2989
|
+
*/
|
2990
|
+
export function rotate(vector: ReadonlyVector3, q: Quaternion.ReadonlyQuaternion): MutableVector3;
|
2929
2991
|
/**
|
2930
2992
|
* Rotates current Vector3 based on the given quaternion, but applies the rotation to target Vector3.
|
2931
2993
|
* @param q - defines the Quaternion
|
2932
2994
|
* @param result - defines the target Vector3
|
2933
2995
|
* @returns the current Vector3
|
2934
2996
|
*/
|
2935
|
-
export function
|
2997
|
+
export function rotateToRef(vector: ReadonlyVector3, q: Quaternion.ReadonlyQuaternion, result: MutableVector3): void;
|
2936
2998
|
/**
|
2937
2999
|
* Returns a new Vector3 located for "amount" (float) on the linear interpolation between the vectors "start" and "end"
|
2938
3000
|
* @param start - defines the start value
|
@@ -2965,6 +3027,253 @@ export declare namespace Vector3 {
|
|
2965
3027
|
* @param result - defines the Vector3 where to store the result
|
2966
3028
|
*/
|
2967
3029
|
export function crossToRef(left: ReadonlyVector3, right: ReadonlyVector3, result: MutableVector3): void;
|
3030
|
+
/**
|
3031
|
+
* Returns a new Vector3 set with the result of the transformation by the given matrix of the given vector.
|
3032
|
+
* This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
|
3033
|
+
* @param vector - defines the Vector3 to transform
|
3034
|
+
* @param transformation - defines the transformation matrix
|
3035
|
+
* @returns the transformed Vector3
|
3036
|
+
*/
|
3037
|
+
export function transformCoordinates(vector: ReadonlyVector3, transformation: Matrix.ReadonlyMatrix): MutableVector3;
|
3038
|
+
/**
|
3039
|
+
* Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given vector
|
3040
|
+
* This method computes tranformed coordinates only, not transformed direction vectors (ie. it takes translation in account)
|
3041
|
+
* @param vector - defines the Vector3 to transform
|
3042
|
+
* @param transformation - defines the transformation matrix
|
3043
|
+
* @param result - defines the Vector3 where to store the result
|
3044
|
+
*/
|
3045
|
+
export function transformCoordinatesToRef(vector: ReadonlyVector3, transformation: Matrix.ReadonlyMatrix, result: MutableVector3): void;
|
3046
|
+
/**
|
3047
|
+
* Sets the given vector "result" coordinates with the result of the transformation by the given matrix of the given floats (x, y, z)
|
3048
|
+
* This method computes tranformed coordinates only, not transformed direction vectors
|
3049
|
+
* @param x - define the x coordinate of the source vector
|
3050
|
+
* @param y - define the y coordinate of the source vector
|
3051
|
+
* @param z - define the z coordinate of the source vector
|
3052
|
+
* @param transformation - defines the transformation matrix
|
3053
|
+
* @param result - defines the Vector3 where to store the result
|
3054
|
+
*/
|
3055
|
+
export function transformCoordinatesFromFloatsToRef(x: number, y: number, z: number, transformation: Matrix.ReadonlyMatrix, result: MutableVector3): void;
|
3056
|
+
/**
|
3057
|
+
* Returns a new Vector3 set with the result of the normal transformation by the given matrix of the given vector
|
3058
|
+
* This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
|
3059
|
+
* @param vector - defines the Vector3 to transform
|
3060
|
+
* @param transformation - defines the transformation matrix
|
3061
|
+
* @returns the new Vector3
|
3062
|
+
*/
|
3063
|
+
export function transformNormal(vector: ReadonlyVector3, transformation: Matrix.ReadonlyMatrix): MutableVector3;
|
3064
|
+
/**
|
3065
|
+
* Sets the given vector "result" with the result of the normal transformation by the given matrix of the given vector
|
3066
|
+
* This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
|
3067
|
+
* @param vector - defines the Vector3 to transform
|
3068
|
+
* @param transformation - defines the transformation matrix
|
3069
|
+
* @param result - defines the Vector3 where to store the result
|
3070
|
+
*/
|
3071
|
+
export function transformNormalToRef(vector: ReadonlyVector3, transformation: Matrix.ReadonlyMatrix, result: MutableVector3): void;
|
3072
|
+
/**
|
3073
|
+
* Sets the given vector "result" with the result of the normal transformation by the given matrix of the given floats (x, y, z)
|
3074
|
+
* This methods computes transformed normalized direction vectors only (ie. it does not apply translation)
|
3075
|
+
* @param x - define the x coordinate of the source vector
|
3076
|
+
* @param y - define the y coordinate of the source vector
|
3077
|
+
* @param z - define the z coordinate of the source vector
|
3078
|
+
* @param transformation - defines the transformation matrix
|
3079
|
+
* @param result - defines the Vector3 where to store the result
|
3080
|
+
*/
|
3081
|
+
export function transformNormalFromFloatsToRef(x: number, y: number, z: number, transformation: Matrix.ReadonlyMatrix, result: MutableVector3): void;
|
3082
|
+
/**
|
3083
|
+
* Returns a new Vector3 located for "amount" on the CatmullRom interpolation spline defined by the vectors "value1", "value2", "value3", "value4"
|
3084
|
+
* @param value1 - defines the first control point
|
3085
|
+
* @param value2 - defines the second control point
|
3086
|
+
* @param value3 - defines the third control point
|
3087
|
+
* @param value4 - defines the fourth control point
|
3088
|
+
* @param amount - defines the amount on the spline to use
|
3089
|
+
* @returns the new Vector3
|
3090
|
+
*/
|
3091
|
+
export function catmullRom(value1: ReadonlyVector3, value2: ReadonlyVector3, value3: ReadonlyVector3, value4: ReadonlyVector3, amount: number): MutableVector3;
|
3092
|
+
/**
|
3093
|
+
* 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"
|
3094
|
+
* If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
|
3095
|
+
* If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
|
3096
|
+
* @param value - defines the current value
|
3097
|
+
* @param min - defines the lower range value
|
3098
|
+
* @param max - defines the upper range value
|
3099
|
+
* @returns the new Vector3
|
3100
|
+
*/
|
3101
|
+
export function clamp(value: ReadonlyVector3, min: ReadonlyVector3, max: ReadonlyVector3): MutableVector3;
|
3102
|
+
/**
|
3103
|
+
* 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"
|
3104
|
+
* If a coordinate value of "value" is lower than one of the "min" coordinate, then this "value" coordinate is set with the "min" one
|
3105
|
+
* If a coordinate value of "value" is greater than one of the "max" coordinate, then this "value" coordinate is set with the "max" one
|
3106
|
+
* @param value - defines the current value
|
3107
|
+
* @param min - defines the lower range value
|
3108
|
+
* @param max - defines the upper range value
|
3109
|
+
* @param result - defines the Vector3 where to store the result
|
3110
|
+
*/
|
3111
|
+
export function clampToRef(value: ReadonlyVector3, min: ReadonlyVector3, max: ReadonlyVector3, result: MutableVector3): void;
|
3112
|
+
/**
|
3113
|
+
* Returns a new Vector3 located for "amount" (float) on the Hermite interpolation spline defined by the vectors "value1", "tangent1", "value2", "tangent2"
|
3114
|
+
* @param value1 - defines the first control point
|
3115
|
+
* @param tangent1 - defines the first tangent vector
|
3116
|
+
* @param value2 - defines the second control point
|
3117
|
+
* @param tangent2 - defines the second tangent vector
|
3118
|
+
* @param amount - defines the amount on the interpolation spline (between 0 and 1)
|
3119
|
+
* @returns the new Vector3
|
3120
|
+
*/
|
3121
|
+
export function hermite(value1: ReadonlyVector3, tangent1: ReadonlyVector3, value2: ReadonlyVector3, tangent2: ReadonlyVector3, amount: number): MutableVector3;
|
3122
|
+
/**
|
3123
|
+
* Gets the minimal coordinate values between two Vector3
|
3124
|
+
* @param left - defines the first operand
|
3125
|
+
* @param right - defines the second operand
|
3126
|
+
* @returns the new Vector3
|
3127
|
+
*/
|
3128
|
+
export function minimize(left: ReadonlyVector3, right: ReadonlyVector3): MutableVector3;
|
3129
|
+
/**
|
3130
|
+
* Gets the maximal coordinate values between two Vector3
|
3131
|
+
* @param left - defines the first operand
|
3132
|
+
* @param right - defines the second operand
|
3133
|
+
* @returns the new Vector3
|
3134
|
+
*/
|
3135
|
+
export function maximize(left: MutableVector3, right: MutableVector3): MutableVector3;
|
3136
|
+
/**
|
3137
|
+
* Returns the distance between the vectors "value1" and "value2"
|
3138
|
+
* @param value1 - defines the first operand
|
3139
|
+
* @param value2 - defines the second operand
|
3140
|
+
* @returns the distance
|
3141
|
+
*/
|
3142
|
+
export function distance(value1: ReadonlyVector3, value2: ReadonlyVector3): number;
|
3143
|
+
/**
|
3144
|
+
* Returns the squared distance between the vectors "value1" and "value2"
|
3145
|
+
* @param value1 - defines the first operand
|
3146
|
+
* @param value2 - defines the second operand
|
3147
|
+
* @returns the squared distance
|
3148
|
+
*/
|
3149
|
+
export function distanceSquared(value1: ReadonlyVector3, value2: ReadonlyVector3): number;
|
3150
|
+
/**
|
3151
|
+
* Returns a new Vector3 located at the center between "value1" and "value2"
|
3152
|
+
* @param value1 - defines the first operand
|
3153
|
+
* @param value2 - defines the second operand
|
3154
|
+
* @returns the new Vector3
|
3155
|
+
*/
|
3156
|
+
export function center(value1: ReadonlyVector3, value2: ReadonlyVector3): MutableVector3;
|
3157
|
+
/**
|
3158
|
+
* Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),
|
3159
|
+
* RotationFromAxis() returns the rotation Euler angles (ex : rotation.x, rotation.y, rotation.z) to apply
|
3160
|
+
* to something in order to rotate it from its local system to the given target system
|
3161
|
+
* Note: axis1, axis2 and axis3 are normalized during this operation
|
3162
|
+
* @param axis1 - defines the first axis
|
3163
|
+
* @param axis2 - defines the second axis
|
3164
|
+
* @param axis3 - defines the third axis
|
3165
|
+
* @returns a new Vector3
|
3166
|
+
*/
|
3167
|
+
export function rotationFromAxis(axis1: MutableVector3, axis2: MutableVector3, axis3: MutableVector3): MutableVector3;
|
3168
|
+
/**
|
3169
|
+
* The same than RotationFromAxis but updates the given ref Vector3 parameter instead of returning a new Vector3
|
3170
|
+
* @param axis1 - defines the first axis
|
3171
|
+
* @param axis2 - defines the second axis
|
3172
|
+
* @param axis3 - defines the third axis
|
3173
|
+
* @param ref - defines the Vector3 where to store the result
|
3174
|
+
*/
|
3175
|
+
export function rotationFromAxisToRef(axis1: MutableVector3, axis2: MutableVector3, axis3: MutableVector3, result: MutableVector3): void;
|
3176
|
+
/**
|
3177
|
+
* Creates a string representation of the Vector3
|
3178
|
+
* @returns a string with the Vector3 coordinates.
|
3179
|
+
*/
|
3180
|
+
export function toString(vector: ReadonlyVector3): string;
|
3181
|
+
/**
|
3182
|
+
* Creates the Vector3 hash code
|
3183
|
+
* @returns a number which tends to be unique between Vector3 instances
|
3184
|
+
*/
|
3185
|
+
export function getHashCode(vector: ReadonlyVector3): number;
|
3186
|
+
/**
|
3187
|
+
* Returns true if the vector1 and the vector2 coordinates are strictly equal
|
3188
|
+
* @param vector1 - defines the first operand
|
3189
|
+
* @param vector2 - defines the second operand
|
3190
|
+
* @returns true if both vectors are equals
|
3191
|
+
*/
|
3192
|
+
export function equals(vector1: ReadonlyVector3, vector2: ReadonlyVector3): boolean;
|
3193
|
+
/**
|
3194
|
+
* Returns true if the current Vector3 and the given vector coordinates are distant less than epsilon
|
3195
|
+
* @param otherVector - defines the second operand
|
3196
|
+
* @param epsilon - defines the minimal distance to define values as equals
|
3197
|
+
* @returns true if both vectors are distant less than epsilon
|
3198
|
+
*/
|
3199
|
+
export function equalsWithEpsilon(vector1: ReadonlyVector3, vector2: ReadonlyVector3, epsilon?: number): boolean;
|
3200
|
+
/**
|
3201
|
+
* Returns true if the current Vector3 coordinates equals the given floats
|
3202
|
+
* @param x - defines the x coordinate of the operand
|
3203
|
+
* @param y - defines the y coordinate of the operand
|
3204
|
+
* @param z - defines the z coordinate of the operand
|
3205
|
+
* @returns true if both vectors are equals
|
3206
|
+
*/
|
3207
|
+
export function equalsToFloats(vector: ReadonlyVector3, x: number, y: number, z: number): boolean;
|
3208
|
+
/**
|
3209
|
+
* Returns a new Vector3, result of the multiplication of vector1 by the vector2
|
3210
|
+
* @param vector1 - defines the first operand
|
3211
|
+
* @param vector2 - defines the second operand
|
3212
|
+
* @returns the new Vector3
|
3213
|
+
*/
|
3214
|
+
export function multiply(vector1: ReadonlyVector3, vector2: ReadonlyVector3): MutableVector3;
|
3215
|
+
/**
|
3216
|
+
* Multiplies the current Vector3 by the given one and stores the result in the given vector "result"
|
3217
|
+
* @param otherVector - defines the second operand
|
3218
|
+
* @param result - defines the Vector3 object where to store the result
|
3219
|
+
* @returns the current Vector3
|
3220
|
+
*/
|
3221
|
+
export function multiplyToRef(vector1: ReadonlyVector3, vector2: ReadonlyVector3, result: MutableVector3): void;
|
3222
|
+
/**
|
3223
|
+
* Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats
|
3224
|
+
* @param x - defines the x coordinate of the operand
|
3225
|
+
* @param y - defines the y coordinate of the operand
|
3226
|
+
* @param z - defines the z coordinate of the operand
|
3227
|
+
* @returns the new Vector3
|
3228
|
+
*/
|
3229
|
+
export function multiplyByFloatsToRef(vector1: ReadonlyVector3, x: number, y: number, z: number, result: MutableVector3): void;
|
3230
|
+
/**
|
3231
|
+
* Returns a new Vector3 set with the result of the mulliplication of the current Vector3 coordinates by the given floats
|
3232
|
+
* @param x - defines the x coordinate of the operand
|
3233
|
+
* @param y - defines the y coordinate of the operand
|
3234
|
+
* @param z - defines the z coordinate of the operand
|
3235
|
+
* @returns the new Vector3
|
3236
|
+
*/
|
3237
|
+
export function multiplyByFloats(vector1: ReadonlyVector3, x: number, y: number, z: number): MutableVector3;
|
3238
|
+
/**
|
3239
|
+
* Returns a new Vector3 set with the result of the division of the current Vector3 coordinates by the given ones
|
3240
|
+
* @param otherVector - defines the second operand
|
3241
|
+
* @returns the new Vector3
|
3242
|
+
*/
|
3243
|
+
export function divide(vector1: ReadonlyVector3, vector2: ReadonlyVector3): MutableVector3;
|
3244
|
+
/**
|
3245
|
+
* Divides the current Vector3 coordinates by the given ones and stores the result in the given vector "result"
|
3246
|
+
* @param otherVector - defines the second operand
|
3247
|
+
* @param result - defines the Vector3 object where to store the result
|
3248
|
+
* @returns the current Vector3
|
3249
|
+
*/
|
3250
|
+
export function divideToRef(vector1: ReadonlyVector3, vector2: ReadonlyVector3, result: MutableVector3): void;
|
3251
|
+
/**
|
3252
|
+
* Set result Vector3 with the maximal coordinate values between vector1 and the given coordinates
|
3253
|
+
* @param x - defines the x coordinate of the operand
|
3254
|
+
* @param y - defines the y coordinate of the operand
|
3255
|
+
* @param z - defines the z coordinate of the operand
|
3256
|
+
* @param result - the set Vector3
|
3257
|
+
*/
|
3258
|
+
export function maximizeInPlaceFromFloatsToRef(vector1: ReadonlyVector3, x: number, y: number, z: number, result: MutableVector3): void;
|
3259
|
+
/**
|
3260
|
+
* Set result Vector3 with the minimal coordinate values between vector1 and the given coordinates
|
3261
|
+
* @param x - defines the x coordinate of the operand
|
3262
|
+
* @param y - defines the y coordinate of the operand
|
3263
|
+
* @param z - defines the z coordinate of the operand
|
3264
|
+
* @param result - the set Vector3
|
3265
|
+
*/
|
3266
|
+
export function minimizeInPlaceFromFloatsToRef(vector1: ReadonlyVector3, x: number, y: number, z: number, result: MutableVector3): void;
|
3267
|
+
/**
|
3268
|
+
* Gets a new Vector3 from vector1 floored values
|
3269
|
+
* @returns a new Vector3
|
3270
|
+
*/
|
3271
|
+
export function floor(vector1: ReadonlyVector3): MutableVector3;
|
3272
|
+
/**
|
3273
|
+
* Gets a new Vector3 from vector1 floored values
|
3274
|
+
* @returns a new Vector3
|
3275
|
+
*/
|
3276
|
+
export function fract(vector1: ReadonlyVector3): MutableVector3;
|
2968
3277
|
/**
|
2969
3278
|
* Returns a new Vector3 set to (0.0, 0.0, 0.0)
|
2970
3279
|
* @returns a new empty Vector3
|
@@ -3005,6 +3314,11 @@ export declare namespace Vector3 {
|
|
3005
3314
|
* @returns a new left Vector3
|
3006
3315
|
*/
|
3007
3316
|
export function Left(): MutableVector3;
|
3317
|
+
/**
|
3318
|
+
* Returns a new random Vector3
|
3319
|
+
* @returns a random Vector3
|
3320
|
+
*/
|
3321
|
+
export function Random(): MutableVector3;
|
3008
3322
|
}
|
3009
3323
|
|
3010
3324
|
declare interface Vector3_2 {
|