@pixiv/three-vrm 0.6.8 → 0.6.9

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 (84) hide show
  1. package/lib/three-vrm.js +3654 -3640
  2. package/lib/three-vrm.min.js +1 -1
  3. package/lib/three-vrm.module.js +3654 -3640
  4. package/lib/three-vrm.module.min.js +1 -1
  5. package/package.json +6 -6
  6. package/ts3.4/types/VRM.d.ts +1 -1
  7. package/ts3.4/types/VRMImporter.d.ts +1 -1
  8. package/ts3.4/types/blendshape/VRMBlendShapeImporter.d.ts +1 -1
  9. package/ts3.4/types/debug/VRMDebug.d.ts +1 -1
  10. package/ts3.4/types/debug/VRMImporterDebug.d.ts +1 -1
  11. package/ts3.4/types/debug/VRMLookAtImporterDebug.d.ts +1 -1
  12. package/ts3.4/types/debug/VRMSpringBoneImporterDebug.d.ts +1 -1
  13. package/ts3.4/types/firstperson/VRMFirstPersonImporter.d.ts +1 -1
  14. package/ts3.4/types/humanoid/VRMHumanoidImporter.d.ts +1 -1
  15. package/ts3.4/types/lookat/VRMLookAtImporter.d.ts +1 -1
  16. package/ts3.4/types/material/VRMMaterialImporter.d.ts +1 -1
  17. package/ts3.4/types/material/getTexelDecodingFunction.d.ts +4 -0
  18. package/ts3.4/types/meta/VRMMetaImporter.d.ts +1 -1
  19. package/ts3.4/types/springbone/VRMSpringBoneImporter.d.ts +1 -1
  20. package/ts3.4/types/utils/gltfExtractPrimitivesFromNode.d.ts +1 -1
  21. package/types/VRM.d.ts +110 -110
  22. package/types/VRMImporter.d.ts +42 -42
  23. package/types/VRMUtils/extractThumbnailBlob.d.ts +10 -10
  24. package/types/VRMUtils/index.d.ts +9 -9
  25. package/types/VRMUtils/removeUnnecessaryJoints.d.ts +9 -9
  26. package/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -12
  27. package/types/blendshape/VRMBlendShapeGroup.d.ts +50 -50
  28. package/types/blendshape/VRMBlendShapeImporter.d.ts +13 -13
  29. package/types/blendshape/VRMBlendShapeProxy.d.ts +91 -91
  30. package/types/blendshape/index.d.ts +3 -3
  31. package/types/debug/VRMDebug.d.ts +28 -28
  32. package/types/debug/VRMDebugOptions.d.ts +10 -10
  33. package/types/debug/VRMImporterDebug.d.ts +11 -11
  34. package/types/debug/VRMLookAtHeadDebug.d.ts +8 -8
  35. package/types/debug/VRMLookAtImporterDebug.d.ts +9 -9
  36. package/types/debug/VRMSpringBoneDebug.d.ts +14 -14
  37. package/types/debug/VRMSpringBoneImporterDebug.d.ts +10 -10
  38. package/types/debug/VRMSpringBoneManagerDebug.d.ts +11 -11
  39. package/types/debug/index.d.ts +4 -4
  40. package/types/firstperson/VRMFirstPerson.d.ts +116 -116
  41. package/types/firstperson/VRMFirstPersonImporter.d.ts +15 -15
  42. package/types/firstperson/index.d.ts +2 -2
  43. package/types/humanoid/VRMHumanBone.d.ts +22 -22
  44. package/types/humanoid/VRMHumanBoneArray.d.ts +9 -9
  45. package/types/humanoid/VRMHumanBones.d.ts +8 -8
  46. package/types/humanoid/VRMHumanDescription.d.ts +14 -14
  47. package/types/humanoid/VRMHumanLimit.d.ts +12 -12
  48. package/types/humanoid/VRMHumanoid.d.ts +87 -87
  49. package/types/humanoid/VRMHumanoidImporter.d.ts +13 -13
  50. package/types/humanoid/index.d.ts +6 -6
  51. package/types/index.d.ts +12 -12
  52. package/types/lookat/VRMCurveMapper.d.ts +36 -36
  53. package/types/lookat/VRMLookAtApplyer.d.ts +18 -18
  54. package/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +26 -26
  55. package/types/lookat/VRMLookAtBoneApplyer.d.ts +28 -28
  56. package/types/lookat/VRMLookAtHead.d.ts +57 -57
  57. package/types/lookat/VRMLookAtImporter.d.ts +23 -23
  58. package/types/lookat/index.d.ts +6 -6
  59. package/types/material/MToonMaterial.d.ts +206 -206
  60. package/types/material/VRMMaterialImporter.d.ts +50 -50
  61. package/types/material/VRMUnlitMaterial.d.ts +46 -46
  62. package/types/material/getTexelDecodingFunction.d.ts +13 -9
  63. package/types/material/index.d.ts +3 -3
  64. package/types/meta/VRMMeta.d.ts +59 -59
  65. package/types/meta/VRMMetaImporter.d.ts +14 -14
  66. package/types/meta/VRMMetaImporterOptions.d.ts +9 -9
  67. package/types/meta/index.d.ts +3 -3
  68. package/types/springbone/VRMSpringBone.d.ts +130 -130
  69. package/types/springbone/VRMSpringBoneColliderGroup.d.ts +15 -15
  70. package/types/springbone/VRMSpringBoneImporter.d.ts +34 -34
  71. package/types/springbone/VRMSpringBoneManager.d.ts +35 -35
  72. package/types/springbone/VRMSpringBoneParameters.d.ts +9 -9
  73. package/types/springbone/index.d.ts +5 -5
  74. package/types/types/GLTFSchema.d.ts +887 -887
  75. package/types/types/VRMSchema.d.ts +440 -440
  76. package/types/types/index.d.ts +3 -3
  77. package/types/types/types.d.ts +64 -64
  78. package/types/utils/Matrix4InverseCache.d.ts +28 -28
  79. package/types/utils/disposer.d.ts +2 -2
  80. package/types/utils/gltfExtractPrimitivesFromNode.d.ts +22 -22
  81. package/types/utils/mat4InvertCompat.d.ts +8 -8
  82. package/types/utils/math.d.ts +40 -40
  83. package/types/utils/quatInvertCompat.d.ts +8 -8
  84. package/types/utils/renameMaterialProperty.d.ts +1 -1
@@ -1,3 +1,3 @@
1
- export * from './GLTFSchema';
2
- export * from './VRMSchema';
3
- export * from './types';
1
+ export * from './GLTFSchema';
2
+ export * from './VRMSchema';
3
+ export * from './types';
@@ -1,64 +1,64 @@
1
- import * as THREE from 'three';
2
- /**
3
- * A single node of GLTFs, represented as a Three.js object.
4
- *
5
- * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy
6
- */
7
- export declare type GLTFNode = THREE.Object3D;
8
- /**
9
- * A single primitive of GLTFs, represented as a Three.js object.
10
- *
11
- * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes
12
- */
13
- export declare type GLTFPrimitive = THREE.Mesh | THREE.SkinnedMesh;
14
- /**
15
- * A single mesh of GLTFs, represented as a Three.js object;
16
- *
17
- * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes
18
- */
19
- export declare type GLTFMesh = THREE.Group | THREE.Mesh | THREE.SkinnedMesh;
20
- /**
21
- * Represents a transform of a single bone of [[VRMPose]].
22
- * Both `position` and `rotation` are optional.
23
- */
24
- export interface VRMPoseTransform {
25
- /**
26
- * Position of the transform.
27
- */
28
- position?: RawVector3;
29
- /**
30
- * Rotation of the transform.
31
- * Note that it's a quaternion.
32
- */
33
- rotation?: RawVector4;
34
- }
35
- /**
36
- * Represents a pose that VRM can do.
37
- *
38
- * See [[HumanBone]] for complete list of bone names.
39
- * Note that certain VRM models might not have every bones defined in [[HumanBone]].
40
- *
41
- * @example An example of VRMPose interface
42
- * ```js
43
- * {
44
- * [HumanBone.LeftUpperLeg] : {
45
- * rotation: [ 0.000, 0.000, -0.454, 0.891 ],
46
- * position: [ 0.000, 0.000, 0.000 ] // position is not required though
47
- * },
48
- * [HumanBone.LeftLowerLeg] : {
49
- * rotation: [ -0.454, 0.000, 0.000, 0.891 ]
50
- * },
51
- * }
52
- * ```
53
- */
54
- export interface VRMPose {
55
- [boneName: string]: VRMPoseTransform | undefined;
56
- }
57
- /**
58
- * Vector3 but it's a raw array.
59
- */
60
- export declare type RawVector3 = [number, number, number];
61
- /**
62
- * Vector4 but it's a raw array.
63
- */
64
- export declare type RawVector4 = [number, number, number, number];
1
+ import * as THREE from 'three';
2
+ /**
3
+ * A single node of GLTFs, represented as a Three.js object.
4
+ *
5
+ * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy
6
+ */
7
+ export declare type GLTFNode = THREE.Object3D;
8
+ /**
9
+ * A single primitive of GLTFs, represented as a Three.js object.
10
+ *
11
+ * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes
12
+ */
13
+ export declare type GLTFPrimitive = THREE.Mesh | THREE.SkinnedMesh;
14
+ /**
15
+ * A single mesh of GLTFs, represented as a Three.js object;
16
+ *
17
+ * See: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#meshes
18
+ */
19
+ export declare type GLTFMesh = THREE.Group | THREE.Mesh | THREE.SkinnedMesh;
20
+ /**
21
+ * Represents a transform of a single bone of [[VRMPose]].
22
+ * Both `position` and `rotation` are optional.
23
+ */
24
+ export interface VRMPoseTransform {
25
+ /**
26
+ * Position of the transform.
27
+ */
28
+ position?: RawVector3;
29
+ /**
30
+ * Rotation of the transform.
31
+ * Note that it's a quaternion.
32
+ */
33
+ rotation?: RawVector4;
34
+ }
35
+ /**
36
+ * Represents a pose that VRM can do.
37
+ *
38
+ * See [[HumanBone]] for complete list of bone names.
39
+ * Note that certain VRM models might not have every bones defined in [[HumanBone]].
40
+ *
41
+ * @example An example of VRMPose interface
42
+ * ```js
43
+ * {
44
+ * [HumanBone.LeftUpperLeg] : {
45
+ * rotation: [ 0.000, 0.000, -0.454, 0.891 ],
46
+ * position: [ 0.000, 0.000, 0.000 ] // position is not required though
47
+ * },
48
+ * [HumanBone.LeftLowerLeg] : {
49
+ * rotation: [ -0.454, 0.000, 0.000, 0.891 ]
50
+ * },
51
+ * }
52
+ * ```
53
+ */
54
+ export interface VRMPose {
55
+ [boneName: string]: VRMPoseTransform | undefined;
56
+ }
57
+ /**
58
+ * Vector3 but it's a raw array.
59
+ */
60
+ export declare type RawVector3 = [number, number, number];
61
+ /**
62
+ * Vector4 but it's a raw array.
63
+ */
64
+ export declare type RawVector4 = [number, number, number, number];
@@ -1,28 +1,28 @@
1
- import * as THREE from 'three';
2
- export declare class Matrix4InverseCache {
3
- /**
4
- * The target matrix.
5
- */
6
- readonly matrix: THREE.Matrix4;
7
- /**
8
- * A cache of inverse of current matrix.
9
- */
10
- private readonly _inverseCache;
11
- /**
12
- * A flag that makes it want to recalculate its {@link _inverseCache}.
13
- * Will be set `true` when `elements` are mutated and be used in `getInverse`.
14
- */
15
- private _shouldUpdateInverse;
16
- /**
17
- * The original of `matrix.elements`
18
- */
19
- private readonly _originalElements;
20
- /**
21
- * Inverse of given matrix.
22
- * Note that it will return its internal private instance.
23
- * Make sure copying this before mutate this.
24
- */
25
- get inverse(): THREE.Matrix4;
26
- constructor(matrix: THREE.Matrix4);
27
- revert(): void;
28
- }
1
+ import * as THREE from 'three';
2
+ export declare class Matrix4InverseCache {
3
+ /**
4
+ * The target matrix.
5
+ */
6
+ readonly matrix: THREE.Matrix4;
7
+ /**
8
+ * A cache of inverse of current matrix.
9
+ */
10
+ private readonly _inverseCache;
11
+ /**
12
+ * A flag that makes it want to recalculate its {@link _inverseCache}.
13
+ * Will be set `true` when `elements` are mutated and be used in `getInverse`.
14
+ */
15
+ private _shouldUpdateInverse;
16
+ /**
17
+ * The original of `matrix.elements`
18
+ */
19
+ private readonly _originalElements;
20
+ /**
21
+ * Inverse of given matrix.
22
+ * Note that it will return its internal private instance.
23
+ * Make sure copying this before mutate this.
24
+ */
25
+ get inverse(): THREE.Matrix4;
26
+ constructor(matrix: THREE.Matrix4);
27
+ revert(): void;
28
+ }
@@ -1,2 +1,2 @@
1
- import * as THREE from 'three';
2
- export declare function deepDispose(object3D: THREE.Object3D): void;
1
+ import * as THREE from 'three';
2
+ export declare function deepDispose(object3D: THREE.Object3D): void;
@@ -1,22 +1,22 @@
1
- import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
2
- import type { GLTFPrimitive } from '../types';
3
- /**
4
- * Extract primitives ( `THREE.Mesh[]` ) of a node from a loaded GLTF.
5
- * The main purpose of this function is to distinguish primitives and children from a node that has both meshes and children.
6
- *
7
- * It utilizes the behavior that GLTFLoader adds mesh primitives to the node object ( `THREE.Group` ) first then adds its children.
8
- *
9
- * @param gltf A GLTF object taken from GLTFLoader
10
- * @param nodeIndex The index of the node
11
- */
12
- export declare function gltfExtractPrimitivesFromNode(gltf: GLTF, nodeIndex: number): Promise<GLTFPrimitive[] | null>;
13
- /**
14
- * Extract primitives ( `THREE.Mesh[]` ) of nodes from a loaded GLTF.
15
- * See {@link gltfExtractPrimitivesFromNode} for more details.
16
- *
17
- * It returns a map from node index to extraction result.
18
- * If a node does not have a mesh, the entry for the node will not be put in the returning map.
19
- *
20
- * @param gltf A GLTF object taken from GLTFLoader
21
- */
22
- export declare function gltfExtractPrimitivesFromNodes(gltf: GLTF): Promise<Map<number, GLTFPrimitive[]>>;
1
+ import type { GLTF } from 'three/examples/jsm/loaders/GLTFLoader.js';
2
+ import type { GLTFPrimitive } from '../types';
3
+ /**
4
+ * Extract primitives ( `THREE.Mesh[]` ) of a node from a loaded GLTF.
5
+ * The main purpose of this function is to distinguish primitives and children from a node that has both meshes and children.
6
+ *
7
+ * It utilizes the behavior that GLTFLoader adds mesh primitives to the node object ( `THREE.Group` ) first then adds its children.
8
+ *
9
+ * @param gltf A GLTF object taken from GLTFLoader
10
+ * @param nodeIndex The index of the node
11
+ */
12
+ export declare function gltfExtractPrimitivesFromNode(gltf: GLTF, nodeIndex: number): Promise<GLTFPrimitive[] | null>;
13
+ /**
14
+ * Extract primitives ( `THREE.Mesh[]` ) of nodes from a loaded GLTF.
15
+ * See {@link gltfExtractPrimitivesFromNode} for more details.
16
+ *
17
+ * It returns a map from node index to extraction result.
18
+ * If a node does not have a mesh, the entry for the node will not be put in the returning map.
19
+ *
20
+ * @param gltf A GLTF object taken from GLTFLoader
21
+ */
22
+ export declare function gltfExtractPrimitivesFromNodes(gltf: GLTF): Promise<Map<number, GLTFPrimitive[]>>;
@@ -1,8 +1,8 @@
1
- import * as THREE from 'three';
2
- /**
3
- * A compat function for `Matrix4.invert()` / `Matrix4.getInverse()`.
4
- * `Matrix4.invert()` is introduced in r123 and `Matrix4.getInverse()` emits a warning.
5
- * We are going to use this compat for a while.
6
- * @param target A target matrix
7
- */
8
- export declare function mat4InvertCompat<T extends THREE.Matrix4>(target: T): T;
1
+ import * as THREE from 'three';
2
+ /**
3
+ * A compat function for `Matrix4.invert()` / `Matrix4.getInverse()`.
4
+ * `Matrix4.invert()` is introduced in r123 and `Matrix4.getInverse()` emits a warning.
5
+ * We are going to use this compat for a while.
6
+ * @param target A target matrix
7
+ */
8
+ export declare function mat4InvertCompat<T extends THREE.Matrix4>(target: T): T;
@@ -1,40 +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;
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;
@@ -1,8 +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;
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;
@@ -1 +1 @@
1
- export declare function renameMaterialProperty(name: string): string;
1
+ export declare function renameMaterialProperty(name: string): string;