@galacean/effects-plugin-model 0.0.1-alpha.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/README.md +26 -0
- package/dist/gesture/controller.d.ts +95 -0
- package/dist/gesture/index.d.ts +38 -0
- package/dist/gesture/protocol.d.ts +143 -0
- package/dist/gltf/index.d.ts +3 -0
- package/dist/gltf/loader-ext.d.ts +53 -0
- package/dist/gltf/loader-helper.d.ts +18 -0
- package/dist/gltf/loader-impl.d.ts +84 -0
- package/dist/gltf/protocol.d.ts +90 -0
- package/dist/helper/index.d.ts +2 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +16137 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +9 -0
- package/dist/index.min.js.map +1 -0
- package/dist/index.mjs +16048 -0
- package/dist/index.mjs.map +1 -0
- package/dist/loader.d.ts +2 -0
- package/dist/loader.mjs +12040 -0
- package/dist/loader.mjs.map +1 -0
- package/dist/math/box3.d.ts +140 -0
- package/dist/math/euler.d.ts +139 -0
- package/dist/math/index.d.ts +11 -0
- package/dist/math/matrix2.d.ts +58 -0
- package/dist/math/matrix3.d.ts +113 -0
- package/dist/math/matrix4.d.ts +264 -0
- package/dist/math/quaternion.d.ts +214 -0
- package/dist/math/sphere.d.ts +81 -0
- package/dist/math/type.d.ts +29 -0
- package/dist/math/utilities/index.d.ts +9 -0
- package/dist/math/vector2.d.ts +394 -0
- package/dist/math/vector3.d.ts +164 -0
- package/dist/math/vector4.d.ts +132 -0
- package/dist/plugin/const.d.ts +2 -0
- package/dist/plugin/index.d.ts +6 -0
- package/dist/plugin/model-plugin.d.ts +48 -0
- package/dist/plugin/model-tree-item.d.ts +30 -0
- package/dist/plugin/model-tree-plugin.d.ts +13 -0
- package/dist/plugin/model-tree-vfx-item.d.ts +15 -0
- package/dist/plugin/model-vfx-item.d.ts +25 -0
- package/dist/runtime/anim-sampler.d.ts +13 -0
- package/dist/runtime/animation.d.ts +189 -0
- package/dist/runtime/cache.d.ts +34 -0
- package/dist/runtime/camera.d.ts +43 -0
- package/dist/runtime/common.d.ts +113 -0
- package/dist/runtime/index.d.ts +12 -0
- package/dist/runtime/light.d.ts +34 -0
- package/dist/runtime/material.d.ts +101 -0
- package/dist/runtime/mesh.d.ts +145 -0
- package/dist/runtime/object.d.ts +44 -0
- package/dist/runtime/scene.d.ts +131 -0
- package/dist/runtime/shader-libs/standard-shader-source.d.ts +3 -0
- package/dist/runtime/shader-libs/standard-shader.d.ts +6 -0
- package/dist/runtime/shader.d.ts +18 -0
- package/dist/runtime/shadow.d.ts +227 -0
- package/dist/runtime/skybox.d.ts +91 -0
- package/dist/utility/debug-helper.d.ts +7 -0
- package/dist/utility/hit-test-helper.d.ts +9 -0
- package/dist/utility/index.d.ts +6 -0
- package/dist/utility/plugin-helper.d.ts +197 -0
- package/dist/utility/ri-helper.d.ts +25 -0
- package/dist/utility/shader-helper.d.ts +13 -0
- package/dist/utility/ts-helper.d.ts +34 -0
- package/package.json +56 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import type { Sphere } from './sphere';
|
|
2
|
+
import { Matrix4 } from './matrix4';
|
|
3
|
+
import { Vector3 } from './vector3';
|
|
4
|
+
/**
|
|
5
|
+
* 三维包围盒
|
|
6
|
+
*/
|
|
7
|
+
declare class Box3 {
|
|
8
|
+
min: Vector3;
|
|
9
|
+
max: Vector3;
|
|
10
|
+
constructor(min?: Vector3, max?: Vector3);
|
|
11
|
+
set(min: Vector3, max: Vector3): Box3;
|
|
12
|
+
/**
|
|
13
|
+
* 由数组构建三维包围盒
|
|
14
|
+
* @param array
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
setFromArray(array: number[]): Box3;
|
|
18
|
+
/**
|
|
19
|
+
* 由三维空间点构建三维包围盒
|
|
20
|
+
* @param points
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
setFromPoints(points: Vector3[]): Box3;
|
|
24
|
+
/**
|
|
25
|
+
* 由三维空间点(包围盒中心)和大小确定包围盒
|
|
26
|
+
* @param center
|
|
27
|
+
* @param size
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
setFromCenterAndSize(center: Vector3, size: Vector3): Box3;
|
|
31
|
+
clone(): Box3;
|
|
32
|
+
copyFrom(box: Box3): Box3;
|
|
33
|
+
makeEmpty(): Box3;
|
|
34
|
+
isEmpty(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* 获取三维包围盒中心
|
|
37
|
+
* @param target
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
getCenter(target: Vector3): Vector3;
|
|
41
|
+
/**
|
|
42
|
+
* 获取三维包围盒大小
|
|
43
|
+
* @param target
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
getSize(target: Vector3): Vector3;
|
|
47
|
+
/**
|
|
48
|
+
* 通过三维空间点扩展三维包围盒
|
|
49
|
+
* @param point
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
expandByPoint(point: Vector3): Box3;
|
|
53
|
+
/**
|
|
54
|
+
* 通过三维向量扩展三维包围盒
|
|
55
|
+
* @param vector
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
expandByVector(vector: Vector3): Box3;
|
|
59
|
+
/**
|
|
60
|
+
* 通过实数扩展三维包围盒
|
|
61
|
+
* @param scalar
|
|
62
|
+
* @returns
|
|
63
|
+
*/
|
|
64
|
+
expandByScalar(scalar: number): Box3;
|
|
65
|
+
/**
|
|
66
|
+
* 通过包围盒扩展三维包围盒
|
|
67
|
+
* @param box
|
|
68
|
+
* @returns
|
|
69
|
+
*/
|
|
70
|
+
expandByBox(box: Box3): Box3;
|
|
71
|
+
/**
|
|
72
|
+
* 判断三维包围盒与三维空间点的关系
|
|
73
|
+
* @param point
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
containsPoint(point: Vector3): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* 判断 this 是否包含 other
|
|
79
|
+
* @param other
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
containsBox(other: Box3): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* 判断三维包围盒 this 与 other 是否相交
|
|
85
|
+
* @param other
|
|
86
|
+
* @returns
|
|
87
|
+
*/
|
|
88
|
+
intersectsBox(other: Box3): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 判断三维包围盒和球是否相交
|
|
91
|
+
* @param sphere
|
|
92
|
+
* @returns
|
|
93
|
+
*/
|
|
94
|
+
intersectsSphere(sphere: Sphere): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* 限制空间点位于三维包围盒内
|
|
97
|
+
* @param point
|
|
98
|
+
* @param target
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
clampPoint(point: Vector3, target: Vector3): Vector3;
|
|
102
|
+
/**
|
|
103
|
+
* 三维空间点到三维包围盒的距离
|
|
104
|
+
* @param point
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
distanceToPoint(point: Vector3): number;
|
|
108
|
+
/**
|
|
109
|
+
* 通过包围盒获取包围球
|
|
110
|
+
* @param target
|
|
111
|
+
* @returns
|
|
112
|
+
*/
|
|
113
|
+
getBoundingSphere(target: Sphere): Sphere;
|
|
114
|
+
/**
|
|
115
|
+
* 三维包围盒交集
|
|
116
|
+
* @param box
|
|
117
|
+
* @returns
|
|
118
|
+
*/
|
|
119
|
+
intersect(box: Box3): Box3;
|
|
120
|
+
/**
|
|
121
|
+
* 三维包围盒并集
|
|
122
|
+
* @param box
|
|
123
|
+
* @returns
|
|
124
|
+
*/
|
|
125
|
+
union(box: Box3): Box3;
|
|
126
|
+
/**
|
|
127
|
+
* 通过矩阵变化三维包围盒
|
|
128
|
+
* @param matrix
|
|
129
|
+
* @returns
|
|
130
|
+
*/
|
|
131
|
+
transform(matrix: Matrix4): Box3;
|
|
132
|
+
/**
|
|
133
|
+
* 根据向量改变三维包围盒位置
|
|
134
|
+
* @param offset
|
|
135
|
+
* @returns
|
|
136
|
+
*/
|
|
137
|
+
translate(offset: Vector3): Box3;
|
|
138
|
+
equals(other: Box3): boolean;
|
|
139
|
+
}
|
|
140
|
+
export { Box3 };
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { Vector3 } from './vector3';
|
|
2
|
+
import { Matrix4 } from './matrix4';
|
|
3
|
+
import { Quaternion } from './quaternion';
|
|
4
|
+
/**
|
|
5
|
+
* 欧拉角顺序,默认为 XYZ
|
|
6
|
+
*/
|
|
7
|
+
declare enum EulerOrder {
|
|
8
|
+
'XYZ' = 0,
|
|
9
|
+
'XZY' = 1,
|
|
10
|
+
'YXZ' = 2,
|
|
11
|
+
'YZX' = 3,
|
|
12
|
+
'ZXY' = 4,
|
|
13
|
+
'ZYX' = 5
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 欧拉角
|
|
17
|
+
*/
|
|
18
|
+
declare class Euler {
|
|
19
|
+
private _order;
|
|
20
|
+
private _data;
|
|
21
|
+
constructor(x?: number, y?: number, z?: number, _order?: EulerOrder);
|
|
22
|
+
get x(): number;
|
|
23
|
+
set x(value: number);
|
|
24
|
+
getX(): number;
|
|
25
|
+
setX(value: number): void;
|
|
26
|
+
get y(): number;
|
|
27
|
+
set y(value: number);
|
|
28
|
+
getY(): number;
|
|
29
|
+
setY(value: number): void;
|
|
30
|
+
get z(): number;
|
|
31
|
+
set z(value: number);
|
|
32
|
+
getZ(): number;
|
|
33
|
+
setZ(value: number): void;
|
|
34
|
+
get order(): EulerOrder;
|
|
35
|
+
set order(value: EulerOrder);
|
|
36
|
+
getOrder(): EulerOrder;
|
|
37
|
+
setOrder(value: EulerOrder): void;
|
|
38
|
+
set(x: number, y: number, z: number, order?: EulerOrder): Euler;
|
|
39
|
+
/**
|
|
40
|
+
* 使用欧拉角内部数据克隆出一个新的欧拉角
|
|
41
|
+
* @returns
|
|
42
|
+
*/
|
|
43
|
+
clone(): Euler;
|
|
44
|
+
/**
|
|
45
|
+
* 将欧拉角数据拷贝给 result
|
|
46
|
+
* @param result
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
copyTo(result: Euler): Euler;
|
|
50
|
+
/**
|
|
51
|
+
* 将欧拉角数据从 source 拷贝回来
|
|
52
|
+
* @param source
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
copyFrom(source: Euler): this;
|
|
56
|
+
/**
|
|
57
|
+
* 通过变换矩阵获取欧拉角
|
|
58
|
+
* @param m
|
|
59
|
+
* @param order
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
setFromRotationMatrix(m: Matrix4, order?: EulerOrder): Euler;
|
|
63
|
+
/**
|
|
64
|
+
* 通过四元数设置欧拉角
|
|
65
|
+
* @param quat
|
|
66
|
+
* @param order
|
|
67
|
+
* @returns
|
|
68
|
+
*/
|
|
69
|
+
setFromQuaternion(quat: Quaternion, order?: EulerOrder): Euler;
|
|
70
|
+
/**
|
|
71
|
+
* 通过三维向量值设置欧拉角(无几何意义)
|
|
72
|
+
* @param v
|
|
73
|
+
* @param order
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
setFromVector3(v: Vector3, order?: EulerOrder): Euler;
|
|
77
|
+
/**
|
|
78
|
+
* 修改欧拉角顺序
|
|
79
|
+
* @param newOrder
|
|
80
|
+
* @returns
|
|
81
|
+
*/
|
|
82
|
+
reorder(newOrder: EulerOrder): Euler;
|
|
83
|
+
equals(euler: Euler): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 通过数组设置欧拉角
|
|
86
|
+
* @param array
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
fromArray(array: number[]): Euler;
|
|
90
|
+
/**
|
|
91
|
+
* 将欧拉角保存为数组
|
|
92
|
+
* @param array
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
toArray(array?: number[], offset?: number): number[];
|
|
96
|
+
/**
|
|
97
|
+
* 通过向量保存欧拉角
|
|
98
|
+
* @param array
|
|
99
|
+
* @returns
|
|
100
|
+
*/
|
|
101
|
+
toVector3(result: Vector3): Vector3;
|
|
102
|
+
/**
|
|
103
|
+
* 从输入欧拉角克隆一个欧拉角
|
|
104
|
+
* @param eular
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
static clone(eular: Euler): Euler;
|
|
108
|
+
/**
|
|
109
|
+
* 欧拉角复制
|
|
110
|
+
* @param eular
|
|
111
|
+
* @param result
|
|
112
|
+
* @returns
|
|
113
|
+
*/
|
|
114
|
+
static copyTo(eular: Euler, result: Euler): Euler;
|
|
115
|
+
/**
|
|
116
|
+
* 从矩阵中的旋转分量设置欧拉角
|
|
117
|
+
* @param m
|
|
118
|
+
* @param order
|
|
119
|
+
* @param result
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
static setFromRotationMatrix(m: Matrix4, order: EulerOrder, result: Euler): Euler;
|
|
123
|
+
/**
|
|
124
|
+
* 通过四元数设置欧拉角
|
|
125
|
+
* @param quat
|
|
126
|
+
* @param order
|
|
127
|
+
* @param result
|
|
128
|
+
* @returns
|
|
129
|
+
*/
|
|
130
|
+
static setFromQuaternion(quat: Quaternion, order: EulerOrder, result: Euler): Euler;
|
|
131
|
+
/**
|
|
132
|
+
* 修改欧拉角顺序
|
|
133
|
+
* @param euler
|
|
134
|
+
* @param newOrder
|
|
135
|
+
* @returns
|
|
136
|
+
*/
|
|
137
|
+
static reorder(euler: Euler, newOrder: EulerOrder): Euler;
|
|
138
|
+
}
|
|
139
|
+
export { Euler, EulerOrder };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './type';
|
|
2
|
+
export * from './vector2';
|
|
3
|
+
export * from './vector3';
|
|
4
|
+
export * from './vector4';
|
|
5
|
+
export * from './matrix2';
|
|
6
|
+
export * from './matrix3';
|
|
7
|
+
export * from './matrix4';
|
|
8
|
+
export * from './quaternion';
|
|
9
|
+
export * from './euler';
|
|
10
|
+
export * from './box3';
|
|
11
|
+
export * from './sphere';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Mat2DataType } from './type';
|
|
2
|
+
import { Vector2 } from './vector2';
|
|
3
|
+
/**
|
|
4
|
+
* 2x2 矩阵内部按照列主序存储数据
|
|
5
|
+
*/
|
|
6
|
+
declare class Matrix2 {
|
|
7
|
+
private _data;
|
|
8
|
+
/**
|
|
9
|
+
* 按照行主序传入矩阵数据
|
|
10
|
+
* @param column0Row0 - 第0行0列
|
|
11
|
+
* @param column1Row0 - 第0行1列
|
|
12
|
+
* @param column0Row1
|
|
13
|
+
* @param column1Row1
|
|
14
|
+
*/
|
|
15
|
+
constructor(column0Row0?: number, column1Row0?: number, column0Row1?: number, column1Row1?: number);
|
|
16
|
+
getData(): Float32Array;
|
|
17
|
+
static pack(value: Matrix2, array: Mat2DataType, startingIndex?: number): Mat2DataType;
|
|
18
|
+
static unpack(array: Mat2DataType, startingIndex: number, result: Matrix2): Matrix2;
|
|
19
|
+
static packArray(array: Matrix2[], result: Mat2DataType): Mat2DataType;
|
|
20
|
+
static unpackArray(array: Mat2DataType, result: Matrix2[]): Matrix2[];
|
|
21
|
+
static clone(matrix: Matrix2): Matrix2;
|
|
22
|
+
static fromArray(array: Mat2DataType): Matrix2;
|
|
23
|
+
static fromColumnMajorArray(values: Mat2DataType, result: Matrix2): Matrix2;
|
|
24
|
+
static fromRowMajorArray(values: Mat2DataType, result: Matrix2): Matrix2;
|
|
25
|
+
static fromScale(scale: Vector2, result: Matrix2): Matrix2;
|
|
26
|
+
static fromUniformScale(scale: number, result: Matrix2): Matrix2;
|
|
27
|
+
static fromRotation(angle: number, result: Matrix2): Matrix2;
|
|
28
|
+
static toArray(matrix: Matrix2, result: Mat2DataType): Mat2DataType;
|
|
29
|
+
static getElement(matrix: Matrix2, column: number, row: number): number;
|
|
30
|
+
static getColumn(matrix: Matrix2, index: number, result: Vector2): Vector2;
|
|
31
|
+
static setColumn(matrix: Matrix2, index: number, cartesian: Vector2, result: Matrix2): Matrix2;
|
|
32
|
+
static getRow(matrix: Matrix2, index: number, result?: Vector2): Vector2;
|
|
33
|
+
static setRow(matrix: Matrix2, index: number, cartesian: Vector2, result: Matrix2): Matrix2;
|
|
34
|
+
static scale(matrix: Matrix2, scale: Vector2, result?: Matrix2): Matrix2;
|
|
35
|
+
static setUniformScale(matrix: Matrix2, scale: number, result?: Matrix2): Matrix2;
|
|
36
|
+
static getScale(matrix: Matrix2, result: Vector2): Vector2;
|
|
37
|
+
static getMaximumScale(matrix: Matrix2): number;
|
|
38
|
+
static setRotation(matrix: Matrix2, rotation: Matrix2, result: Matrix2): Matrix2;
|
|
39
|
+
static getRotation(matrix: Matrix2, result: Matrix2): Matrix2;
|
|
40
|
+
static multiply(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2;
|
|
41
|
+
static add(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2;
|
|
42
|
+
static subtract(left: Matrix2, right: Matrix2, result: Matrix2): Matrix2;
|
|
43
|
+
static multiplyByVector(matrix: Matrix2, cartesian: Vector2, result: Vector2): Vector2;
|
|
44
|
+
static multiplyByScalar(matrix: Matrix2, scalar: number, result: Matrix2): Matrix2;
|
|
45
|
+
static multiplyByScale(matrix: Matrix2, scale: Vector2, result: Matrix2): Matrix2;
|
|
46
|
+
static multiplyByUniformScale(matrix: Matrix2, scale: number, result: Matrix2): Matrix2;
|
|
47
|
+
static negate(matrix: Matrix2, result: Matrix2): Matrix2;
|
|
48
|
+
static transpose(matrix: Matrix2, result: Matrix2): Matrix2;
|
|
49
|
+
static abs(matrix: Matrix2, result: Matrix2): Matrix2;
|
|
50
|
+
static equals(left: Matrix2, right: Matrix2): boolean;
|
|
51
|
+
static equalsArray(matrix: Matrix2, array: Mat2DataType, offset?: number): boolean;
|
|
52
|
+
static equalsEpsilon(left: Matrix2, right: Matrix2, epsilon: number): boolean;
|
|
53
|
+
copyTo(result: Matrix2): Matrix2;
|
|
54
|
+
copyFrom(source: Matrix2): this;
|
|
55
|
+
static IDENTITY: Readonly<Matrix2>;
|
|
56
|
+
static ZERO: Readonly<Matrix2>;
|
|
57
|
+
}
|
|
58
|
+
export { Matrix2 };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Vector3 } from './vector3';
|
|
2
|
+
import type { Quaternion } from './quaternion';
|
|
3
|
+
import type { Mat3DataType } from './type';
|
|
4
|
+
declare class Matrix3 {
|
|
5
|
+
private _data;
|
|
6
|
+
constructor(column0Row0?: number, column1Row0?: number, column2Row0?: number, column0Row1?: number, column1Row1?: number, column2Row1?: number, column0Row2?: number, column1Row2?: number, column2Row2?: number);
|
|
7
|
+
getData(): Float32Array;
|
|
8
|
+
static pack(value: Matrix3, array: Mat3DataType, startingIndex?: number): Mat3DataType;
|
|
9
|
+
static unpack(array: Mat3DataType, startingIndex: number, result: Matrix3): Matrix3;
|
|
10
|
+
static packArray(array: Matrix3[], result: Mat3DataType): Mat3DataType;
|
|
11
|
+
static unpackArray(array: Mat3DataType, result: Matrix3[]): Matrix3[];
|
|
12
|
+
static clone(matrix: Matrix3): Matrix3;
|
|
13
|
+
static copyTo(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
14
|
+
static fromArray(array: Mat3DataType): Matrix3;
|
|
15
|
+
static fromColumnMajorArray(values: Mat3DataType, result: Matrix3): Matrix3;
|
|
16
|
+
static fromRowMajorArray(values: Mat3DataType, result: Matrix3): Matrix3;
|
|
17
|
+
static fromQuaternion(quaternion: Quaternion, result: Matrix3): Matrix3;
|
|
18
|
+
static fromHeadingPitchRoll(headingPitchRoll: {
|
|
19
|
+
heading: number;
|
|
20
|
+
pitch: number;
|
|
21
|
+
roll: number;
|
|
22
|
+
}, result: Matrix3): Matrix3;
|
|
23
|
+
static fromScale(scale: Vector3, result: Matrix3): Matrix3;
|
|
24
|
+
static fromUniformScale(scale: number, result: Matrix3): Matrix3;
|
|
25
|
+
static fromCrossProduct(vector: Vector3, result: Matrix3): Matrix3;
|
|
26
|
+
static fromRotationX(angle: number, result: Matrix3): Matrix3;
|
|
27
|
+
static fromRotationY(angle: number, result: Matrix3): Matrix3;
|
|
28
|
+
static fromRotationZ(angle: number, result: Matrix3): Matrix3;
|
|
29
|
+
static toArray(matrix: Matrix3, result: Mat3DataType): Mat3DataType;
|
|
30
|
+
static getElement(matrix: Matrix3, column: number, row: number): number;
|
|
31
|
+
static getColumn(matrix: Matrix3, index: number, result: Vector3): Vector3;
|
|
32
|
+
static setColumn(matrix: Matrix3, index: number, cartesian: Vector3, result: Matrix3): Matrix3;
|
|
33
|
+
static getRow(matrix: Matrix3, index: number, result: Vector3): Vector3;
|
|
34
|
+
static setRow(matrix: Matrix3, index: number, cartesian: Vector3, result: Matrix3): Matrix3;
|
|
35
|
+
static scale(matrix: Matrix3, scale: Vector3, result: Matrix3): Matrix3;
|
|
36
|
+
static setUniformScale(matrix: Matrix3, scale: number, result: Matrix3): Matrix3;
|
|
37
|
+
static getScale(matrix: Matrix3, result: Vector3): Vector3;
|
|
38
|
+
static getMaximumScale(matrix: Matrix3): number;
|
|
39
|
+
static setRotation(matrix: Matrix3, rotation: Matrix3, result: Matrix3): Matrix3;
|
|
40
|
+
static getRotation(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
41
|
+
static multiply(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3;
|
|
42
|
+
static add(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3;
|
|
43
|
+
static subtract(left: Matrix3, right: Matrix3, result: Matrix3): Matrix3;
|
|
44
|
+
static multiplyByVector(matrix: Matrix3, cartesian: Vector3, result: Vector3): Vector3;
|
|
45
|
+
static multiplyByScalar(matrix: Matrix3, scalar: number, result: Matrix3): Matrix3;
|
|
46
|
+
static multiplyByScale(matrix: Matrix3, scale: Vector3, result: Matrix3): Matrix3;
|
|
47
|
+
static multiplyByUniformScale(matrix: Matrix3, scale: number, result: Matrix3): Matrix3;
|
|
48
|
+
static negate(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
49
|
+
static transpose(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
50
|
+
static abs(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
51
|
+
static determinant(matrix: Matrix3): number;
|
|
52
|
+
static inverse(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
53
|
+
static inverseTranspose(matrix: Matrix3, result: Matrix3): Matrix3;
|
|
54
|
+
static equals(left: Matrix3, right: Matrix3): boolean;
|
|
55
|
+
static equalsEpsilon(left: Matrix3, right: Matrix3, epsilon: number): boolean;
|
|
56
|
+
static getElementIndex(column: number, row: number): number;
|
|
57
|
+
getElement(column: number, row: number): number;
|
|
58
|
+
clone(): Matrix3;
|
|
59
|
+
copyTo(result: Matrix3): Matrix3;
|
|
60
|
+
copyFrom(source: Matrix3): this;
|
|
61
|
+
scale(vector: Vector3): Matrix3;
|
|
62
|
+
multiply(matrix: Matrix3): Matrix3;
|
|
63
|
+
/**
|
|
64
|
+
* 将矩阵数据按照列主序导出为number[]对象。
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
toArray(): number[];
|
|
68
|
+
/**
|
|
69
|
+
* 将矩阵按照列主序方式导出为Float32Array对象。
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
toFloat32Array(): Float32Array;
|
|
73
|
+
/**
|
|
74
|
+
* 矩阵与四维向量相乘。
|
|
75
|
+
* @param vector
|
|
76
|
+
* @returns
|
|
77
|
+
*/
|
|
78
|
+
multiplyByVector3(vector: Vector3): Vector3;
|
|
79
|
+
/**
|
|
80
|
+
* 返回矩阵中指定索引位置数据
|
|
81
|
+
* @param index
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
at(index: number): number;
|
|
85
|
+
/**
|
|
86
|
+
* 矩阵乘一个旋转矩阵,矩阵乘一个绕axis轴旋转angle角度的旋转矩阵
|
|
87
|
+
* @param angle
|
|
88
|
+
* @param axis
|
|
89
|
+
* @returns
|
|
90
|
+
*/
|
|
91
|
+
rotate(angle: number, axis: Vector3): Matrix3 | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* 计算矩阵的逆矩阵,会修改矩阵数据
|
|
94
|
+
*/
|
|
95
|
+
inverse(): Matrix3;
|
|
96
|
+
/**
|
|
97
|
+
* 计算矩阵的转置,结果保存在原矩阵中(会修改矩阵数据)
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
transpose(): Matrix3;
|
|
101
|
+
static IDENTITY: Readonly<Matrix3>;
|
|
102
|
+
static ZERO: Readonly<Matrix3>;
|
|
103
|
+
static COLUMN0ROW0: number;
|
|
104
|
+
static COLUMN0ROW1: number;
|
|
105
|
+
static COLUMN0ROW2: number;
|
|
106
|
+
static COLUMN1ROW0: number;
|
|
107
|
+
static COLUMN1ROW1: number;
|
|
108
|
+
static COLUMN1ROW2: number;
|
|
109
|
+
static COLUMN2ROW0: number;
|
|
110
|
+
static COLUMN2ROW1: number;
|
|
111
|
+
static COLUMN2ROW2: number;
|
|
112
|
+
}
|
|
113
|
+
export { Matrix3 };
|