acmi-parser 1.0.0 → 1.2.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/LICENSE +21 -0
- package/dist/acmi-parser.cjs +3 -45
- package/dist/acmi-parser.js +6118 -9090
- package/dist/types/acmi/acmiData.d.ts +41 -0
- package/dist/types/acmi/entity.d.ts +26 -0
- package/dist/types/acmi/frame.d.ts +17 -0
- package/dist/types/acmi/globalProperties.d.ts +30 -0
- package/dist/types/acmi/header.d.ts +7 -0
- package/dist/types/acmi/timeSpan.d.ts +12 -0
- package/dist/types/acmi/transform.d.ts +22 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/math3d/core/classes/base/math-array.d.ts +66 -0
- package/dist/types/math3d/core/classes/base/matrix.d.ts +13 -0
- package/dist/types/math3d/core/classes/base/vector.d.ts +43 -0
- package/dist/types/math3d/core/classes/euler.d.ts +78 -0
- package/dist/types/math3d/core/classes/matrix3.d.ts +62 -0
- package/dist/types/math3d/core/classes/matrix4.d.ts +232 -0
- package/dist/types/math3d/core/classes/pose.d.ts +39 -0
- package/dist/types/math3d/core/classes/quaternion.d.ts +64 -0
- package/dist/types/math3d/core/classes/spherical-coordinates.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector2.d.ts +54 -0
- package/dist/types/math3d/core/classes/vector3.d.ts +59 -0
- package/dist/types/math3d/core/classes/vector4.d.ts +40 -0
- package/dist/types/math3d/core/gl-matrix/common.d.ts +37 -0
- package/dist/types/math3d/core/gl-matrix/mat3.d.ts +286 -0
- package/dist/types/math3d/core/gl-matrix/mat4.d.ts +549 -0
- package/dist/types/math3d/core/gl-matrix/quat.d.ts +358 -0
- package/dist/types/math3d/core/gl-matrix/vec2.d.ts +362 -0
- package/dist/types/math3d/core/gl-matrix/vec3.d.ts +405 -0
- package/dist/types/math3d/core/gl-matrix/vec4.d.ts +329 -0
- package/dist/types/math3d/core/index.d.ts +29 -0
- package/dist/types/math3d/core/lib/assert.d.ts +1 -0
- package/dist/types/math3d/core/lib/common.d.ts +99 -0
- package/dist/types/math3d/core/lib/gl-matrix-extras.d.ts +6 -0
- package/dist/types/math3d/core/lib/math-utils.d.ts +24 -0
- package/dist/types/math3d/core/lib/validators.d.ts +5 -0
- package/dist/types/math3d/geoid/geoid.d.ts +73 -0
- package/dist/types/math3d/geoid/index.d.ts +2 -0
- package/dist/types/math3d/geoid/parse-pgm.d.ts +11 -0
- package/dist/types/math3d/geospatial/constants.d.ts +11 -0
- package/dist/types/math3d/geospatial/ellipsoid/ellipsoid.d.ts +69 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/ellipsoid-transform.d.ts +4 -0
- package/dist/types/math3d/geospatial/ellipsoid/helpers/scale-to-geodetic-surface.d.ts +2 -0
- package/dist/types/math3d/geospatial/index.d.ts +2 -0
- package/dist/types/math3d/geospatial/type-utils.d.ts +23 -0
- package/dist/types/math3d/index.d.ts +4 -0
- package/dist/types/math3d/types/array-types.d.ts +14 -0
- package/dist/types/math3d/types/bigint.d.ts +20 -0
- package/dist/types/math3d/types/index.d.ts +2 -0
- package/dist/types/math3d/types/is-array.d.ts +13 -0
- package/dist/types/parser.d.ts +90 -0
- package/dist/types/trajectory/stateVector.d.ts +30 -0
- package/dist/types/trajectory/trajectory.d.ts +40 -0
- package/dist/types/trajectory/trajectorySample.d.ts +11 -0
- package/package.json +20 -18
- package/dist/types/acmi-parser.d.ts +0 -179
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import * as vec4 from "./vec4";
|
|
2
|
+
/**
|
|
3
|
+
* Quaternion in the format XYZW
|
|
4
|
+
* @module quat
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new identity quat
|
|
8
|
+
*
|
|
9
|
+
* @returns {quat} a new quaternion
|
|
10
|
+
*/
|
|
11
|
+
export declare function create(): any[] | Float32Array<ArrayBuffer>;
|
|
12
|
+
/**
|
|
13
|
+
* Set a quat to the identity quaternion
|
|
14
|
+
*
|
|
15
|
+
* @param {quat} out the receiving quaternion
|
|
16
|
+
* @returns {quat} out
|
|
17
|
+
*/
|
|
18
|
+
export declare function identity(out: any): any;
|
|
19
|
+
/**
|
|
20
|
+
* Sets a quat from the given angle and rotation axis,
|
|
21
|
+
* then returns it.
|
|
22
|
+
*
|
|
23
|
+
* @param {quat} out the receiving quaternion
|
|
24
|
+
* @param {ReadonlyVec3} axis the axis around which to rotate
|
|
25
|
+
* @param {Number} rad the angle in radians
|
|
26
|
+
* @returns {quat} out
|
|
27
|
+
**/
|
|
28
|
+
export declare function setAxisAngle(out: any, axis: any, rad: any): any;
|
|
29
|
+
/**
|
|
30
|
+
* Gets the rotation axis and angle for a given
|
|
31
|
+
* quaternion. If a quaternion is created with
|
|
32
|
+
* setAxisAngle, this method will return the same
|
|
33
|
+
* values as providied in the original parameter list
|
|
34
|
+
* OR functionally equivalent values.
|
|
35
|
+
* Example: The quaternion formed by axis [0, 0, 1] and
|
|
36
|
+
* angle -90 is the same as the quaternion formed by
|
|
37
|
+
* [0, 0, 1] and 270. This method favors the latter.
|
|
38
|
+
* @param {vec3} out_axis Vector receiving the axis of rotation
|
|
39
|
+
* @param {ReadonlyQuat} q Quaternion to be decomposed
|
|
40
|
+
* @return {Number} Angle, in radians, of the rotation
|
|
41
|
+
*/
|
|
42
|
+
export declare function getAxisAngle(out_axis: any, q: any): number;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the angular distance between two unit quaternions
|
|
45
|
+
*
|
|
46
|
+
* @param {ReadonlyQuat} a Origin unit quaternion
|
|
47
|
+
* @param {ReadonlyQuat} b Destination unit quaternion
|
|
48
|
+
* @return {Number} Angle, in radians, between the two quaternions
|
|
49
|
+
*/
|
|
50
|
+
export declare function getAngle(a: any, b: any): number;
|
|
51
|
+
/**
|
|
52
|
+
* Multiplies two quat's
|
|
53
|
+
*
|
|
54
|
+
* @param {quat} out the receiving quaternion
|
|
55
|
+
* @param {ReadonlyQuat} a the first operand
|
|
56
|
+
* @param {ReadonlyQuat} b the second operand
|
|
57
|
+
* @returns {quat} out
|
|
58
|
+
*/
|
|
59
|
+
export declare function multiply(out: any, a: any, b: any): any;
|
|
60
|
+
/**
|
|
61
|
+
* Rotates a quaternion by the given angle about the X axis
|
|
62
|
+
*
|
|
63
|
+
* @param {quat} out quat receiving operation result
|
|
64
|
+
* @param {ReadonlyQuat} a quat to rotate
|
|
65
|
+
* @param {number} rad angle (in radians) to rotate
|
|
66
|
+
* @returns {quat} out
|
|
67
|
+
*/
|
|
68
|
+
export declare function rotateX(out: any, a: any, rad: any): any;
|
|
69
|
+
/**
|
|
70
|
+
* Rotates a quaternion by the given angle about the Y axis
|
|
71
|
+
*
|
|
72
|
+
* @param {quat} out quat receiving operation result
|
|
73
|
+
* @param {ReadonlyQuat} a quat to rotate
|
|
74
|
+
* @param {number} rad angle (in radians) to rotate
|
|
75
|
+
* @returns {quat} out
|
|
76
|
+
*/
|
|
77
|
+
export declare function rotateY(out: any, a: any, rad: any): any;
|
|
78
|
+
/**
|
|
79
|
+
* Rotates a quaternion by the given angle about the Z axis
|
|
80
|
+
*
|
|
81
|
+
* @param {quat} out quat receiving operation result
|
|
82
|
+
* @param {ReadonlyQuat} a quat to rotate
|
|
83
|
+
* @param {number} rad angle (in radians) to rotate
|
|
84
|
+
* @returns {quat} out
|
|
85
|
+
*/
|
|
86
|
+
export declare function rotateZ(out: any, a: any, rad: any): any;
|
|
87
|
+
/**
|
|
88
|
+
* Calculates the W component of a quat from the X, Y, and Z components.
|
|
89
|
+
* Assumes that quaternion is 1 unit in length.
|
|
90
|
+
* Any existing W component will be ignored.
|
|
91
|
+
*
|
|
92
|
+
* @param {quat} out the receiving quaternion
|
|
93
|
+
* @param {ReadonlyQuat} a quat to calculate W component of
|
|
94
|
+
* @returns {quat} out
|
|
95
|
+
*/
|
|
96
|
+
export declare function calculateW(out: any, a: any): any;
|
|
97
|
+
/**
|
|
98
|
+
* Calculate the exponential of a unit quaternion.
|
|
99
|
+
*
|
|
100
|
+
* @param {quat} out the receiving quaternion
|
|
101
|
+
* @param {ReadonlyQuat} a quat to calculate the exponential of
|
|
102
|
+
* @returns {quat} out
|
|
103
|
+
*/
|
|
104
|
+
export declare function exp(out: any, a: any): any;
|
|
105
|
+
/**
|
|
106
|
+
* Calculate the natural logarithm of a unit quaternion.
|
|
107
|
+
*
|
|
108
|
+
* @param {quat} out the receiving quaternion
|
|
109
|
+
* @param {ReadonlyQuat} a quat to calculate the exponential of
|
|
110
|
+
* @returns {quat} out
|
|
111
|
+
*/
|
|
112
|
+
export declare function ln(out: any, a: any): any;
|
|
113
|
+
/**
|
|
114
|
+
* Calculate the scalar power of a unit quaternion.
|
|
115
|
+
*
|
|
116
|
+
* @param {quat} out the receiving quaternion
|
|
117
|
+
* @param {ReadonlyQuat} a quat to calculate the exponential of
|
|
118
|
+
* @param {Number} b amount to scale the quaternion by
|
|
119
|
+
* @returns {quat} out
|
|
120
|
+
*/
|
|
121
|
+
export declare function pow(out: any, a: any, b: any): any;
|
|
122
|
+
/**
|
|
123
|
+
* Performs a spherical linear interpolation between two quat
|
|
124
|
+
*
|
|
125
|
+
* @param {quat} out the receiving quaternion
|
|
126
|
+
* @param {ReadonlyQuat} a the first operand
|
|
127
|
+
* @param {ReadonlyQuat} b the second operand
|
|
128
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
129
|
+
* @returns {quat} out
|
|
130
|
+
*/
|
|
131
|
+
export declare function slerp(out: any, a: any, b: any, t: any): any;
|
|
132
|
+
/**
|
|
133
|
+
* Generates a random unit quaternion
|
|
134
|
+
*
|
|
135
|
+
* @param {quat} out the receiving quaternion
|
|
136
|
+
* @returns {quat} out
|
|
137
|
+
*/
|
|
138
|
+
export declare function random(out: any): any;
|
|
139
|
+
/**
|
|
140
|
+
* Calculates the inverse of a quat
|
|
141
|
+
*
|
|
142
|
+
* @param {quat} out the receiving quaternion
|
|
143
|
+
* @param {ReadonlyQuat} a quat to calculate inverse of
|
|
144
|
+
* @returns {quat} out
|
|
145
|
+
*/
|
|
146
|
+
export declare function invert(out: any, a: any): any;
|
|
147
|
+
/**
|
|
148
|
+
* Calculates the conjugate of a quat
|
|
149
|
+
* If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.
|
|
150
|
+
*
|
|
151
|
+
* @param {quat} out the receiving quaternion
|
|
152
|
+
* @param {ReadonlyQuat} a quat to calculate conjugate of
|
|
153
|
+
* @returns {quat} out
|
|
154
|
+
*/
|
|
155
|
+
export declare function conjugate(out: any, a: any): any;
|
|
156
|
+
/**
|
|
157
|
+
* Creates a quaternion from the given 3x3 rotation matrix.
|
|
158
|
+
*
|
|
159
|
+
* NOTE: The resultant quaternion is not normalized, so you should be sure
|
|
160
|
+
* to renormalize the quaternion yourself where necessary.
|
|
161
|
+
*
|
|
162
|
+
* @param {quat} out the receiving quaternion
|
|
163
|
+
* @param {ReadonlyMat3} m rotation matrix
|
|
164
|
+
* @returns {quat} out
|
|
165
|
+
* @function
|
|
166
|
+
*/
|
|
167
|
+
export declare function fromMat3(out: any, m: any): any;
|
|
168
|
+
/**
|
|
169
|
+
* Creates a quaternion from the given euler angle x, y, z using the provided intrinsic order for the conversion.
|
|
170
|
+
*
|
|
171
|
+
* @param {quat} out the receiving quaternion
|
|
172
|
+
* @param {Number} x Angle to rotate around X axis in degrees.
|
|
173
|
+
* @param {Number} y Angle to rotate around Y axis in degrees.
|
|
174
|
+
* @param {Number} z Angle to rotate around Z axis in degrees.
|
|
175
|
+
* @param {'zyx'|'xyz'|'yxz'|'yzx'|'zxy'|'zyx'} order Intrinsic order for conversion, default is zyx.
|
|
176
|
+
* @returns {quat} out
|
|
177
|
+
* @function
|
|
178
|
+
*/
|
|
179
|
+
export declare function fromEuler(out: any, x: any, y: any, z: any, order?: number): any;
|
|
180
|
+
/**
|
|
181
|
+
* Returns a string representation of a quaternion
|
|
182
|
+
*
|
|
183
|
+
* @param {ReadonlyQuat} a vector to represent as a string
|
|
184
|
+
* @returns {String} string representation of the vector
|
|
185
|
+
*/
|
|
186
|
+
export declare function str(a: any): string;
|
|
187
|
+
/**
|
|
188
|
+
* Creates a new quat initialized with values from an existing quaternion
|
|
189
|
+
*
|
|
190
|
+
* @param {ReadonlyQuat} a quaternion to clone
|
|
191
|
+
* @returns {quat} a new quaternion
|
|
192
|
+
* @function
|
|
193
|
+
*/
|
|
194
|
+
export declare const clone: typeof vec4.clone;
|
|
195
|
+
/**
|
|
196
|
+
* Creates a new quat initialized with the given values
|
|
197
|
+
*
|
|
198
|
+
* @param {Number} x X component
|
|
199
|
+
* @param {Number} y Y component
|
|
200
|
+
* @param {Number} z Z component
|
|
201
|
+
* @param {Number} w W component
|
|
202
|
+
* @returns {quat} a new quaternion
|
|
203
|
+
* @function
|
|
204
|
+
*/
|
|
205
|
+
export declare const fromValues: typeof vec4.fromValues;
|
|
206
|
+
/**
|
|
207
|
+
* Copy the values from one quat to another
|
|
208
|
+
*
|
|
209
|
+
* @param {quat} out the receiving quaternion
|
|
210
|
+
* @param {ReadonlyQuat} a the source quaternion
|
|
211
|
+
* @returns {quat} out
|
|
212
|
+
* @function
|
|
213
|
+
*/
|
|
214
|
+
export declare const copy: typeof vec4.copy;
|
|
215
|
+
/**
|
|
216
|
+
* Set the components of a quat to the given values
|
|
217
|
+
*
|
|
218
|
+
* @param {quat} out the receiving quaternion
|
|
219
|
+
* @param {Number} x X component
|
|
220
|
+
* @param {Number} y Y component
|
|
221
|
+
* @param {Number} z Z component
|
|
222
|
+
* @param {Number} w W component
|
|
223
|
+
* @returns {quat} out
|
|
224
|
+
* @function
|
|
225
|
+
*/
|
|
226
|
+
export declare const set: typeof vec4.set;
|
|
227
|
+
/**
|
|
228
|
+
* Adds two quat's
|
|
229
|
+
*
|
|
230
|
+
* @param {quat} out the receiving quaternion
|
|
231
|
+
* @param {ReadonlyQuat} a the first operand
|
|
232
|
+
* @param {ReadonlyQuat} b the second operand
|
|
233
|
+
* @returns {quat} out
|
|
234
|
+
* @function
|
|
235
|
+
*/
|
|
236
|
+
export declare const add: typeof vec4.add;
|
|
237
|
+
/**
|
|
238
|
+
* Alias for {@link quat.multiply}
|
|
239
|
+
* @function
|
|
240
|
+
*/
|
|
241
|
+
export declare const mul: typeof multiply;
|
|
242
|
+
/**
|
|
243
|
+
* Scales a quat by a scalar number
|
|
244
|
+
*
|
|
245
|
+
* @param {quat} out the receiving vector
|
|
246
|
+
* @param {ReadonlyQuat} a the vector to scale
|
|
247
|
+
* @param {Number} b amount to scale the vector by
|
|
248
|
+
* @returns {quat} out
|
|
249
|
+
* @function
|
|
250
|
+
*/
|
|
251
|
+
export declare const scale: typeof vec4.scale;
|
|
252
|
+
/**
|
|
253
|
+
* Calculates the dot product of two quat's
|
|
254
|
+
*
|
|
255
|
+
* @param {ReadonlyQuat} a the first operand
|
|
256
|
+
* @param {ReadonlyQuat} b the second operand
|
|
257
|
+
* @returns {Number} dot product of a and b
|
|
258
|
+
* @function
|
|
259
|
+
*/
|
|
260
|
+
export declare const dot: typeof vec4.dot;
|
|
261
|
+
/**
|
|
262
|
+
* Performs a linear interpolation between two quat's
|
|
263
|
+
*
|
|
264
|
+
* @param {quat} out the receiving quaternion
|
|
265
|
+
* @param {ReadonlyQuat} a the first operand
|
|
266
|
+
* @param {ReadonlyQuat} b the second operand
|
|
267
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
268
|
+
* @returns {quat} out
|
|
269
|
+
* @function
|
|
270
|
+
*/
|
|
271
|
+
export declare const lerp: typeof vec4.lerp;
|
|
272
|
+
/**
|
|
273
|
+
* Calculates the length of a quat
|
|
274
|
+
*
|
|
275
|
+
* @param {ReadonlyQuat} a vector to calculate length of
|
|
276
|
+
* @returns {Number} length of a
|
|
277
|
+
*/
|
|
278
|
+
export declare const length: typeof vec4.length;
|
|
279
|
+
/**
|
|
280
|
+
* Alias for {@link quat.length}
|
|
281
|
+
* @function
|
|
282
|
+
*/
|
|
283
|
+
export declare const len: typeof vec4.length;
|
|
284
|
+
/**
|
|
285
|
+
* Calculates the squared length of a quat
|
|
286
|
+
*
|
|
287
|
+
* @param {ReadonlyQuat} a vector to calculate squared length of
|
|
288
|
+
* @returns {Number} squared length of a
|
|
289
|
+
* @function
|
|
290
|
+
*/
|
|
291
|
+
export declare const squaredLength: typeof vec4.squaredLength;
|
|
292
|
+
/**
|
|
293
|
+
* Alias for {@link quat.squaredLength}
|
|
294
|
+
* @function
|
|
295
|
+
*/
|
|
296
|
+
export declare const sqrLen: typeof vec4.squaredLength;
|
|
297
|
+
/**
|
|
298
|
+
* Normalize a quat
|
|
299
|
+
*
|
|
300
|
+
* @param {quat} out the receiving quaternion
|
|
301
|
+
* @param {ReadonlyQuat} a quaternion to normalize
|
|
302
|
+
* @returns {quat} out
|
|
303
|
+
* @function
|
|
304
|
+
*/
|
|
305
|
+
export declare const normalize: typeof vec4.normalize;
|
|
306
|
+
/**
|
|
307
|
+
* Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)
|
|
308
|
+
*
|
|
309
|
+
* @param {ReadonlyQuat} a The first quaternion.
|
|
310
|
+
* @param {ReadonlyQuat} b The second quaternion.
|
|
311
|
+
* @returns {Boolean} True if the vectors are equal, false otherwise.
|
|
312
|
+
*/
|
|
313
|
+
export declare const exactEquals: typeof vec4.exactEquals;
|
|
314
|
+
/**
|
|
315
|
+
* Returns whether or not the quaternions point approximately to the same direction.
|
|
316
|
+
*
|
|
317
|
+
* Both quaternions are assumed to be unit length.
|
|
318
|
+
*
|
|
319
|
+
* @param {ReadonlyQuat} a The first unit quaternion.
|
|
320
|
+
* @param {ReadonlyQuat} b The second unit quaternion.
|
|
321
|
+
* @returns {Boolean} True if the quaternions are equal, false otherwise.
|
|
322
|
+
*/
|
|
323
|
+
export declare function equals(a: any, b: any): boolean;
|
|
324
|
+
/**
|
|
325
|
+
* Sets a quaternion to represent the shortest rotation from one
|
|
326
|
+
* vector to another.
|
|
327
|
+
*
|
|
328
|
+
* Both vectors are assumed to be unit length.
|
|
329
|
+
*
|
|
330
|
+
* @param {quat} out the receiving quaternion.
|
|
331
|
+
* @param {ReadonlyVec3} a the initial vector
|
|
332
|
+
* @param {ReadonlyVec3} b the destination vector
|
|
333
|
+
* @returns {quat} out
|
|
334
|
+
*/
|
|
335
|
+
export declare const rotationTo: (out: any, a: any, b: any) => any;
|
|
336
|
+
/**
|
|
337
|
+
* Performs a spherical linear interpolation with two control points
|
|
338
|
+
*
|
|
339
|
+
* @param {quat} out the receiving quaternion
|
|
340
|
+
* @param {ReadonlyQuat} a the first operand
|
|
341
|
+
* @param {ReadonlyQuat} b the second operand
|
|
342
|
+
* @param {ReadonlyQuat} c the third operand
|
|
343
|
+
* @param {ReadonlyQuat} d the fourth operand
|
|
344
|
+
* @param {Number} t interpolation amount, in the range [0-1], between the two inputs
|
|
345
|
+
* @returns {quat} out
|
|
346
|
+
*/
|
|
347
|
+
export declare const sqlerp: (out: any, a: any, b: any, c: any, d: any, t: any) => any;
|
|
348
|
+
/**
|
|
349
|
+
* Sets the specified quaternion with values corresponding to the given
|
|
350
|
+
* axes. Each axis is a vec3 and is expected to be unit length and
|
|
351
|
+
* perpendicular to all other specified axes.
|
|
352
|
+
*
|
|
353
|
+
* @param {ReadonlyVec3} view the vector representing the viewing direction
|
|
354
|
+
* @param {ReadonlyVec3} right the vector representing the local "right" direction
|
|
355
|
+
* @param {ReadonlyVec3} up the vector representing the local "up" direction
|
|
356
|
+
* @returns {quat} out
|
|
357
|
+
*/
|
|
358
|
+
export declare const setAxes: (out: any, view: any, right: any, up: any) => any;
|