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.
Files changed (56) hide show
  1. package/LICENSE +21 -0
  2. package/dist/acmi-parser.cjs +3 -45
  3. package/dist/acmi-parser.js +6118 -9090
  4. package/dist/types/acmi/acmiData.d.ts +41 -0
  5. package/dist/types/acmi/entity.d.ts +26 -0
  6. package/dist/types/acmi/frame.d.ts +17 -0
  7. package/dist/types/acmi/globalProperties.d.ts +30 -0
  8. package/dist/types/acmi/header.d.ts +7 -0
  9. package/dist/types/acmi/timeSpan.d.ts +12 -0
  10. package/dist/types/acmi/transform.d.ts +22 -0
  11. package/dist/types/index.d.ts +14 -0
  12. package/dist/types/math3d/core/classes/base/math-array.d.ts +66 -0
  13. package/dist/types/math3d/core/classes/base/matrix.d.ts +13 -0
  14. package/dist/types/math3d/core/classes/base/vector.d.ts +43 -0
  15. package/dist/types/math3d/core/classes/euler.d.ts +78 -0
  16. package/dist/types/math3d/core/classes/matrix3.d.ts +62 -0
  17. package/dist/types/math3d/core/classes/matrix4.d.ts +232 -0
  18. package/dist/types/math3d/core/classes/pose.d.ts +39 -0
  19. package/dist/types/math3d/core/classes/quaternion.d.ts +64 -0
  20. package/dist/types/math3d/core/classes/spherical-coordinates.d.ts +59 -0
  21. package/dist/types/math3d/core/classes/vector2.d.ts +54 -0
  22. package/dist/types/math3d/core/classes/vector3.d.ts +59 -0
  23. package/dist/types/math3d/core/classes/vector4.d.ts +40 -0
  24. package/dist/types/math3d/core/gl-matrix/common.d.ts +37 -0
  25. package/dist/types/math3d/core/gl-matrix/mat3.d.ts +286 -0
  26. package/dist/types/math3d/core/gl-matrix/mat4.d.ts +549 -0
  27. package/dist/types/math3d/core/gl-matrix/quat.d.ts +358 -0
  28. package/dist/types/math3d/core/gl-matrix/vec2.d.ts +362 -0
  29. package/dist/types/math3d/core/gl-matrix/vec3.d.ts +405 -0
  30. package/dist/types/math3d/core/gl-matrix/vec4.d.ts +329 -0
  31. package/dist/types/math3d/core/index.d.ts +29 -0
  32. package/dist/types/math3d/core/lib/assert.d.ts +1 -0
  33. package/dist/types/math3d/core/lib/common.d.ts +99 -0
  34. package/dist/types/math3d/core/lib/gl-matrix-extras.d.ts +6 -0
  35. package/dist/types/math3d/core/lib/math-utils.d.ts +24 -0
  36. package/dist/types/math3d/core/lib/validators.d.ts +5 -0
  37. package/dist/types/math3d/geoid/geoid.d.ts +73 -0
  38. package/dist/types/math3d/geoid/index.d.ts +2 -0
  39. package/dist/types/math3d/geoid/parse-pgm.d.ts +11 -0
  40. package/dist/types/math3d/geospatial/constants.d.ts +11 -0
  41. package/dist/types/math3d/geospatial/ellipsoid/ellipsoid.d.ts +69 -0
  42. package/dist/types/math3d/geospatial/ellipsoid/helpers/ellipsoid-transform.d.ts +4 -0
  43. package/dist/types/math3d/geospatial/ellipsoid/helpers/scale-to-geodetic-surface.d.ts +2 -0
  44. package/dist/types/math3d/geospatial/index.d.ts +2 -0
  45. package/dist/types/math3d/geospatial/type-utils.d.ts +23 -0
  46. package/dist/types/math3d/index.d.ts +4 -0
  47. package/dist/types/math3d/types/array-types.d.ts +14 -0
  48. package/dist/types/math3d/types/bigint.d.ts +20 -0
  49. package/dist/types/math3d/types/index.d.ts +2 -0
  50. package/dist/types/math3d/types/is-array.d.ts +13 -0
  51. package/dist/types/parser.d.ts +90 -0
  52. package/dist/types/trajectory/stateVector.d.ts +30 -0
  53. package/dist/types/trajectory/trajectory.d.ts +40 -0
  54. package/dist/types/trajectory/trajectorySample.d.ts +11 -0
  55. package/package.json +20 -18
  56. package/dist/types/acmi-parser.d.ts +0 -179
@@ -0,0 +1,362 @@
1
+ /**
2
+ * 2 Dimensional Vector
3
+ * @module vec2
4
+ */
5
+ /**
6
+ * Creates a new, empty vec2
7
+ *
8
+ * @returns {NumericArray} a new 2D vector
9
+ */
10
+ export declare function create(): any[] | Float32Array<ArrayBuffer>;
11
+ /**
12
+ * Creates a new vec2 initialized with values from an existing vector
13
+ *
14
+ * @param {Readonly<NumericArray>} a vector to clone
15
+ * @returns {NumericArray} a new 2D vector
16
+ */
17
+ export declare function clone(a: any): any[] | Float32Array<ArrayBuffer>;
18
+ /**
19
+ * Creates a new vec2 initialized with the given values
20
+ *
21
+ * @param {Number} x X component
22
+ * @param {Number} y Y component
23
+ * @returns {NumericArray} a new 2D vector
24
+ */
25
+ export declare function fromValues(x: any, y: any): any[] | Float32Array<ArrayBuffer>;
26
+ /**
27
+ * Copy the values from one vec2 to another
28
+ *
29
+ * @param {NumericArray} out the receiving vector
30
+ * @param {Readonly<NumericArray>} a the source vector
31
+ * @returns {NumericArray} out
32
+ */
33
+ export declare function copy(out: any, a: any): any;
34
+ /**
35
+ * Set the components of a vec2 to the given values
36
+ *
37
+ * @param {NumericArray} out the receiving vector
38
+ * @param {Number} x X component
39
+ * @param {Number} y Y component
40
+ * @returns {NumericArray} out
41
+ */
42
+ export declare function set(out: any, x: any, y: any): any;
43
+ /**
44
+ * Adds two vec2's
45
+ *
46
+ * @param {NumericArray} out the receiving vector
47
+ * @param {Readonly<NumericArray>} a the first operand
48
+ * @param {Readonly<NumericArray>} b the second operand
49
+ * @returns {NumericArray} out
50
+ */
51
+ export declare function add(out: any, a: any, b: any): any;
52
+ /**
53
+ * Subtracts vector b from vector a
54
+ *
55
+ * @param {NumericArray} out the receiving vector
56
+ * @param {Readonly<NumericArray>} a the first operand
57
+ * @param {Readonly<NumericArray>} b the second operand
58
+ * @returns {NumericArray} out
59
+ */
60
+ export declare function subtract(out: any, a: any, b: any): any;
61
+ /**
62
+ * Multiplies two vec2's
63
+ *
64
+ * @param {NumericArray} out the receiving vector
65
+ * @param {Readonly<NumericArray>} a the first operand
66
+ * @param {Readonly<NumericArray>} b the second operand
67
+ * @returns {NumericArray} out
68
+ */
69
+ export declare function multiply(out: any, a: any, b: any): any;
70
+ /**
71
+ * Divides two vec2's
72
+ *
73
+ * @param {NumericArray} out the receiving vector
74
+ * @param {Readonly<NumericArray>} a the first operand
75
+ * @param {Readonly<NumericArray>} b the second operand
76
+ * @returns {NumericArray} out
77
+ */
78
+ export declare function divide(out: any, a: any, b: any): any;
79
+ /**
80
+ * Math.ceil the components of a vec2
81
+ *
82
+ * @param {NumericArray} out the receiving vector
83
+ * @param {Readonly<NumericArray>} a vector to ceil
84
+ * @returns {NumericArray} out
85
+ */
86
+ export declare function ceil(out: any, a: any): any;
87
+ /**
88
+ * Math.floor the components of a vec2
89
+ *
90
+ * @param {NumericArray} out the receiving vector
91
+ * @param {Readonly<NumericArray>} a vector to floor
92
+ * @returns {NumericArray} out
93
+ */
94
+ export declare function floor(out: any, a: any): any;
95
+ /**
96
+ * Returns the minimum of two vec2's
97
+ *
98
+ * @param {NumericArray} out the receiving vector
99
+ * @param {Readonly<NumericArray>} a the first operand
100
+ * @param {Readonly<NumericArray>} b the second operand
101
+ * @returns {NumericArray} out
102
+ */
103
+ export declare function min(out: any, a: any, b: any): any;
104
+ /**
105
+ * Returns the maximum of two vec2's
106
+ *
107
+ * @param {NumericArray} out the receiving vector
108
+ * @param {Readonly<NumericArray>} a the first operand
109
+ * @param {Readonly<NumericArray>} b the second operand
110
+ * @returns {NumericArray} out
111
+ */
112
+ export declare function max(out: any, a: any, b: any): any;
113
+ /**
114
+ * symmetric round the components of a vec2
115
+ *
116
+ * @param {NumericArray} out the receiving vector
117
+ * @param {Readonly<NumericArray>} a vector to round
118
+ * @returns {NumericArray} out
119
+ */
120
+ export declare function round(out: any, a: any): any;
121
+ /**
122
+ * Scales a vec2 by a scalar number
123
+ *
124
+ * @param {NumericArray} out the receiving vector
125
+ * @param {Readonly<NumericArray>} a the vector to scale
126
+ * @param {Number} b amount to scale the vector by
127
+ * @returns {NumericArray} out
128
+ */
129
+ export declare function scale(out: any, a: any, b: any): any;
130
+ /**
131
+ * Adds two vec2's after scaling the second operand by a scalar value
132
+ *
133
+ * @param {NumericArray} out the receiving vector
134
+ * @param {Readonly<NumericArray>} a the first operand
135
+ * @param {Readonly<NumericArray>} b the second operand
136
+ * @param {Number} scale the amount to scale b by before adding
137
+ * @returns {NumericArray} out
138
+ */
139
+ export declare function scaleAndAdd(out: any, a: any, b: any, scale: any): any;
140
+ /**
141
+ * Calculates the euclidian distance between two vec2's
142
+ *
143
+ * @param {Readonly<NumericArray>} a the first operand
144
+ * @param {Readonly<NumericArray>} b the second operand
145
+ * @returns {Number} distance between a and b
146
+ */
147
+ export declare function distance(a: any, b: any): number;
148
+ /**
149
+ * Calculates the squared euclidian distance between two vec2's
150
+ *
151
+ * @param {Readonly<NumericArray>} a the first operand
152
+ * @param {Readonly<NumericArray>} b the second operand
153
+ * @returns {Number} squared distance between a and b
154
+ */
155
+ export declare function squaredDistance(a: any, b: any): number;
156
+ /**
157
+ * Calculates the length of a vec2
158
+ *
159
+ * @param {Readonly<NumericArray>} a vector to calculate length of
160
+ * @returns {Number} length of a
161
+ */
162
+ export declare function length(a: any): number;
163
+ /**
164
+ * Calculates the squared length of a vec2
165
+ *
166
+ * @param {Readonly<NumericArray>} a vector to calculate squared length of
167
+ * @returns {Number} squared length of a
168
+ */
169
+ export declare function squaredLength(a: any): number;
170
+ /**
171
+ * Negates the components of a vec2
172
+ *
173
+ * @param {NumericArray} out the receiving vector
174
+ * @param {Readonly<NumericArray>} a vector to negate
175
+ * @returns {NumericArray} out
176
+ */
177
+ export declare function negate(out: any, a: any): any;
178
+ /**
179
+ * Returns the inverse of the components of a vec2
180
+ *
181
+ * @param {NumericArray} out the receiving vector
182
+ * @param {Readonly<NumericArray>} a vector to invert
183
+ * @returns {NumericArray} out
184
+ */
185
+ export declare function inverse(out: any, a: any): any;
186
+ /**
187
+ * Normalize a vec2
188
+ *
189
+ * @param {NumericArray} out the receiving vector
190
+ * @param {Readonly<NumericArray>} a vector to normalize
191
+ * @returns {NumericArray} out
192
+ */
193
+ export declare function normalize(out: any, a: any): any;
194
+ /**
195
+ * Calculates the dot product of two vec2's
196
+ *
197
+ * @param {Readonly<NumericArray>} a the first operand
198
+ * @param {Readonly<NumericArray>} b the second operand
199
+ * @returns {Number} dot product of a and b
200
+ */
201
+ export declare function dot(a: any, b: any): number;
202
+ /**
203
+ * Computes the cross product of two vec2's
204
+ * Note that the cross product must by definition produce a 3D vector
205
+ *
206
+ * @param {vec3} out the receiving vector
207
+ * @param {Readonly<NumericArray>} a the first operand
208
+ * @param {Readonly<NumericArray>} b the second operand
209
+ * @returns {vec3} out
210
+ */
211
+ export declare function cross(out: any, a: any, b: any): any;
212
+ /**
213
+ * Performs a linear interpolation between two vec2's
214
+ *
215
+ * @param {NumericArray} out the receiving vector
216
+ * @param {Readonly<NumericArray>} a the first operand
217
+ * @param {Readonly<NumericArray>} b the second operand
218
+ * @param {Number} t interpolation amount, in the range [0-1], between the two inputs
219
+ * @returns {NumericArray} out
220
+ */
221
+ export declare function lerp(out: any, a: any, b: any, t: any): any;
222
+ /**
223
+ * Generates a random vector with the given scale
224
+ *
225
+ * @param {NumericArray} out the receiving vector
226
+ * @param {Number} [scale] Length of the resulting vector. If omitted, a unit vector will be returned
227
+ * @returns {NumericArray} out
228
+ */
229
+ export declare function random(out: any, scale: any): any;
230
+ /**
231
+ * Transforms the vec2 with a mat2
232
+ *
233
+ * @param {NumericArray} out the receiving vector
234
+ * @param {Readonly<NumericArray>} a the vector to transform
235
+ * @param {ReadonlyMat2} m matrix to transform with
236
+ * @returns {NumericArray} out
237
+ */
238
+ export declare function transformMat2(out: any, a: any, m: any): any;
239
+ /**
240
+ * Transforms the vec2 with a mat2d
241
+ *
242
+ * @param {NumericArray} out the receiving vector
243
+ * @param {Readonly<NumericArray>} a the vector to transform
244
+ * @param {ReadonlyMat2d} m matrix to transform with
245
+ * @returns {NumericArray} out
246
+ */
247
+ export declare function transformMat2d(out: any, a: any, m: any): any;
248
+ /**
249
+ * Transforms the vec2 with a mat3
250
+ * 3rd vector component is implicitly '1'
251
+ *
252
+ * @param {NumericArray} out the receiving vector
253
+ * @param {Readonly<NumericArray>} a the vector to transform
254
+ * @param {ReadonlyMat3} m matrix to transform with
255
+ * @returns {NumericArray} out
256
+ */
257
+ export declare function transformMat3(out: any, a: any, m: any): any;
258
+ /**
259
+ * Transforms the vec2 with a mat4
260
+ * 3rd vector component is implicitly '0'
261
+ * 4th vector component is implicitly '1'
262
+ *
263
+ * @param {NumericArray} out the receiving vector
264
+ * @param {Readonly<NumericArray>} a the vector to transform
265
+ * @param {ReadonlyMat4} m matrix to transform with
266
+ * @returns {NumericArray} out
267
+ */
268
+ export declare function transformMat4(out: any, a: any, m: any): any;
269
+ /**
270
+ * Rotate a 2D vector
271
+ * @param {NumericArray} out The receiving vec2
272
+ * @param {Readonly<NumericArray>} a The vec2 point to rotate
273
+ * @param {Readonly<NumericArray>} b The origin of the rotation
274
+ * @param {Number} rad The angle of rotation in radians
275
+ * @returns {NumericArray} out
276
+ */
277
+ export declare function rotate(out: any, a: any, b: any, rad: any): any;
278
+ /**
279
+ * Get the angle between two 2D vectors
280
+ * @param {Readonly<NumericArray>} a The first operand
281
+ * @param {Readonly<NumericArray>} b The second operand
282
+ * @returns {Number} The angle in radians
283
+ */
284
+ export declare function angle(a: any, b: any): number;
285
+ /**
286
+ * Set the components of a vec2 to zero
287
+ *
288
+ * @param {NumericArray} out the receiving vector
289
+ * @returns {NumericArray} out
290
+ */
291
+ export declare function zero(out: any): any;
292
+ /**
293
+ * Returns a string representation of a vector
294
+ *
295
+ * @param {Readonly<NumericArray>} a vector to represent as a string
296
+ * @returns {String} string representation of the vector
297
+ */
298
+ export declare function str(a: any): string;
299
+ /**
300
+ * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)
301
+ *
302
+ * @param {Readonly<NumericArray>} a The first vector.
303
+ * @param {Readonly<NumericArray>} b The second vector.
304
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
305
+ */
306
+ export declare function exactEquals(a: any, b: any): boolean;
307
+ /**
308
+ * Returns whether or not the vectors have approximately the same elements in the same position.
309
+ *
310
+ * @param {Readonly<NumericArray>} a The first vector.
311
+ * @param {Readonly<NumericArray>} b The second vector.
312
+ * @returns {Boolean} True if the vectors are equal, false otherwise.
313
+ */
314
+ export declare function equals(a: any, b: any): boolean;
315
+ /**
316
+ * Alias for {@link vec2.length}
317
+ * @function
318
+ */
319
+ export declare const len: typeof length;
320
+ /**
321
+ * Alias for {@link vec2.subtract}
322
+ * @function
323
+ */
324
+ export declare const sub: typeof subtract;
325
+ /**
326
+ * Alias for {@link vec2.multiply}
327
+ * @function
328
+ */
329
+ export declare const mul: typeof multiply;
330
+ /**
331
+ * Alias for {@link vec2.divide}
332
+ * @function
333
+ */
334
+ export declare const div: typeof divide;
335
+ /**
336
+ * Alias for {@link vec2.distance}
337
+ * @function
338
+ */
339
+ export declare const dist: typeof distance;
340
+ /**
341
+ * Alias for {@link vec2.squaredDistance}
342
+ * @function
343
+ */
344
+ export declare const sqrDist: typeof squaredDistance;
345
+ /**
346
+ * Alias for {@link vec2.squaredLength}
347
+ * @function
348
+ */
349
+ export declare const sqrLen: typeof squaredLength;
350
+ /**
351
+ * Perform some operation over an array of vec2s.
352
+ *
353
+ * @param {Array} a the array of vectors to iterate over
354
+ * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed
355
+ * @param {Number} offset Number of elements to skip at the beginning of the array
356
+ * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array
357
+ * @param {Function} fn Function to call for each vector in the array
358
+ * @param {Object} [arg] additional argument to pass to fn
359
+ * @returns {Array} a
360
+ * @function
361
+ */
362
+ export declare const forEach: (a: any, stride: any, offset: any, count: any, fn: any, arg: any) => any;