@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.
- package/LICENSE +22 -0
- package/lib/three-vrm.js +8 -8
- package/lib/three-vrm.min.js +6 -6
- package/lib/three-vrm.module.js +8 -8
- package/lib/three-vrm.module.min.js +6 -6
- package/package.json +9 -8
- package/ts3.4/types/VRM.d.ts +39 -0
- package/ts3.4/types/VRMLoaderPlugin.d.ts +31 -0
- package/ts3.4/types/VRMLoaderPluginOptions.d.ts +32 -0
- package/ts3.4/types/VRMParameters.d.ts +11 -0
- package/ts3.4/types/VRMUtils/deepDispose.d.ts +2 -0
- package/ts3.4/types/VRMUtils/index.d.ts +11 -0
- package/ts3.4/types/VRMUtils/removeUnnecessaryJoints.d.ts +9 -0
- package/ts3.4/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -0
- package/ts3.4/types/VRMUtils/rotateVRM0.d.ts +7 -0
- package/ts3.4/types/index.d.ts +9 -0
- package/ts3.4/types/utils/Matrix4InverseCache.d.ts +28 -0
- package/ts3.4/types/utils/mat4InvertCompat.d.ts +8 -0
- package/ts3.4/types/utils/math.d.ts +40 -0
- package/ts3.4/types/utils/quatInvertCompat.d.ts +8 -0
|
@@ -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;
|