math-rust-lib 0.1.1 → 0.1.2
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/math_rust_lib.d.ts +2 -1
- package/math_rust_lib.js +12 -2
- package/math_rust_lib_bg.wasm +0 -0
- package/package.json +6 -1
package/math_rust_lib.d.ts
CHANGED
|
@@ -31,11 +31,12 @@ export class Quat {
|
|
|
31
31
|
static rotation_yaw_pitch_roll(yaw: number, pitch: number, roll: number): Quat;
|
|
32
32
|
static from_unit_vectors_to_ref(vec_from: Vec3, vec_to: Vec3, result: Quat, epsilon: number): Quat;
|
|
33
33
|
constructor(x: number, y: number, z: number, w: number);
|
|
34
|
-
set(x: number, y: number, z: number): Quat;
|
|
34
|
+
set(x: number, y: number, z: number, w: number): Quat;
|
|
35
35
|
clone(): Quat;
|
|
36
36
|
static slerp(a: Quat, b: Quat, t: number): Quat;
|
|
37
37
|
static identity(): Quat;
|
|
38
38
|
multiply(other: Quat): Quat;
|
|
39
|
+
to_array(): Float32Array;
|
|
39
40
|
normalize(): Quat;
|
|
40
41
|
x: number;
|
|
41
42
|
y: number;
|
package/math_rust_lib.js
CHANGED
|
@@ -391,11 +391,12 @@ class Quat {
|
|
|
391
391
|
* @param {number} x
|
|
392
392
|
* @param {number} y
|
|
393
393
|
* @param {number} z
|
|
394
|
+
* @param {number} w
|
|
394
395
|
* @returns {Quat}
|
|
395
396
|
*/
|
|
396
|
-
set(x, y, z) {
|
|
397
|
+
set(x, y, z, w) {
|
|
397
398
|
const ptr = this.__destroy_into_raw();
|
|
398
|
-
const ret = wasm.quat_set(ptr, x, y, z);
|
|
399
|
+
const ret = wasm.quat_set(ptr, x, y, z, w);
|
|
399
400
|
return Quat.__wrap(ret);
|
|
400
401
|
}
|
|
401
402
|
/**
|
|
@@ -434,6 +435,15 @@ class Quat {
|
|
|
434
435
|
const ret = wasm.quat_multiply(this.__wbg_ptr, ptr0);
|
|
435
436
|
return Quat.__wrap(ret);
|
|
436
437
|
}
|
|
438
|
+
/**
|
|
439
|
+
* @returns {Float32Array}
|
|
440
|
+
*/
|
|
441
|
+
to_array() {
|
|
442
|
+
const ret = wasm.quat_to_array(this.__wbg_ptr);
|
|
443
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
444
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
445
|
+
return v1;
|
|
446
|
+
}
|
|
437
447
|
/**
|
|
438
448
|
* @returns {Quat}
|
|
439
449
|
*/
|
package/math_rust_lib_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED