@pixiv/three-vrm 2.1.0-beta.3 → 2.1.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.
@@ -0,0 +1,40 @@
1
+ import * as THREE from 'three';
2
+ /**
3
+ * Clamp an input number within [ `0.0` - `1.0` ].
4
+ *
5
+ * @param value The input value
6
+ */
7
+ export declare function saturate(value: number): number;
8
+ /**
9
+ * Map the range of an input value from [ `min` - `max` ] to [ `0.0` - `1.0` ].
10
+ * If input value is less than `min` , it returns `0.0`.
11
+ * If input value is greater than `max` , it returns `1.0`.
12
+ *
13
+ * See also: https://threejs.org/docs/#api/en/math/Math.smoothstep
14
+ *
15
+ * @param x The value that will be mapped into the specified range
16
+ * @param min Minimum value of the range
17
+ * @param max Maximum value of the range
18
+ */
19
+ export declare function linstep(x: number, min: number, max: number): number;
20
+ /**
21
+ * Extract world position of an object from its world space matrix, in cheaper way.
22
+ *
23
+ * @param object The object
24
+ * @param out Target vector
25
+ */
26
+ export declare function getWorldPositionLite(object: THREE.Object3D, out: THREE.Vector3): THREE.Vector3;
27
+ /**
28
+ * Extract world scale of an object from its world space matrix, in cheaper way.
29
+ *
30
+ * @param object The object
31
+ * @param out Target vector
32
+ */
33
+ export declare function getWorldScaleLite(object: THREE.Object3D, out: THREE.Vector3): THREE.Vector3;
34
+ /**
35
+ * Extract world rotation of an object from its world space matrix, in cheaper way.
36
+ *
37
+ * @param object The object
38
+ * @param out Target vector
39
+ */
40
+ export declare function getWorldQuaternionLite(object: THREE.Object3D, out: THREE.Quaternion): THREE.Quaternion;
@@ -0,0 +1,8 @@
1
+ import * as THREE from 'three';
2
+ /**
3
+ * A compat function for `Quaternion.invert()` / `Quaternion.inverse()`.
4
+ * `Quaternion.invert()` is introduced in r123 and `Quaternion.inverse()` emits a warning.
5
+ * We are going to use this compat for a while.
6
+ * @param target A target quaternion
7
+ */
8
+ export declare function quatInvertCompat<T extends THREE.Quaternion>(target: T): T;