@pixiv/three-vrm 0.6.4 → 0.6.8
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/README.md +2 -2
- package/lib/three-vrm.js +3664 -3472
- package/lib/three-vrm.min.js +2 -2
- package/lib/three-vrm.module.js +3644 -3483
- package/lib/three-vrm.module.min.js +2 -2
- package/package.json +6 -9
- package/ts3.4/types/VRMUtils/index.d.ts +2 -0
- package/ts3.4/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -0
- package/ts3.4/types/material/getTexelDecodingFunction.d.ts +6 -0
- package/types/VRM.d.ts +110 -110
- package/types/VRMImporter.d.ts +42 -42
- package/types/VRMUtils/extractThumbnailBlob.d.ts +10 -10
- package/types/VRMUtils/index.d.ts +9 -7
- package/types/VRMUtils/removeUnnecessaryJoints.d.ts +9 -9
- package/types/VRMUtils/removeUnnecessaryVertices.d.ts +12 -0
- package/types/blendshape/VRMBlendShapeGroup.d.ts +50 -50
- package/types/blendshape/VRMBlendShapeImporter.d.ts +13 -13
- package/types/blendshape/VRMBlendShapeProxy.d.ts +91 -91
- package/types/blendshape/index.d.ts +3 -3
- package/types/debug/VRMDebug.d.ts +28 -28
- package/types/debug/VRMDebugOptions.d.ts +10 -10
- package/types/debug/VRMImporterDebug.d.ts +11 -11
- package/types/debug/VRMLookAtHeadDebug.d.ts +8 -8
- package/types/debug/VRMLookAtImporterDebug.d.ts +9 -9
- package/types/debug/VRMSpringBoneDebug.d.ts +14 -14
- package/types/debug/VRMSpringBoneImporterDebug.d.ts +10 -10
- package/types/debug/VRMSpringBoneManagerDebug.d.ts +11 -11
- package/types/debug/index.d.ts +4 -4
- package/types/firstperson/VRMFirstPerson.d.ts +116 -116
- package/types/firstperson/VRMFirstPersonImporter.d.ts +15 -15
- package/types/firstperson/index.d.ts +2 -2
- package/types/humanoid/VRMHumanBone.d.ts +22 -22
- package/types/humanoid/VRMHumanBoneArray.d.ts +9 -9
- package/types/humanoid/VRMHumanBones.d.ts +8 -8
- package/types/humanoid/VRMHumanDescription.d.ts +14 -14
- package/types/humanoid/VRMHumanLimit.d.ts +12 -12
- package/types/humanoid/VRMHumanoid.d.ts +87 -87
- package/types/humanoid/VRMHumanoidImporter.d.ts +13 -13
- package/types/humanoid/index.d.ts +6 -6
- package/types/index.d.ts +12 -12
- package/types/lookat/VRMCurveMapper.d.ts +36 -36
- package/types/lookat/VRMLookAtApplyer.d.ts +18 -18
- package/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +26 -26
- package/types/lookat/VRMLookAtBoneApplyer.d.ts +28 -28
- package/types/lookat/VRMLookAtHead.d.ts +57 -57
- package/types/lookat/VRMLookAtImporter.d.ts +23 -23
- package/types/lookat/index.d.ts +6 -6
- package/types/material/MToonMaterial.d.ts +206 -206
- package/types/material/VRMMaterialImporter.d.ts +50 -50
- package/types/material/VRMUnlitMaterial.d.ts +46 -46
- package/types/material/getTexelDecodingFunction.d.ts +9 -3
- package/types/material/index.d.ts +3 -3
- package/types/meta/VRMMeta.d.ts +59 -59
- package/types/meta/VRMMetaImporter.d.ts +14 -14
- package/types/meta/VRMMetaImporterOptions.d.ts +9 -9
- package/types/meta/index.d.ts +3 -3
- package/types/springbone/VRMSpringBone.d.ts +130 -130
- package/types/springbone/VRMSpringBoneColliderGroup.d.ts +15 -15
- package/types/springbone/VRMSpringBoneImporter.d.ts +34 -34
- package/types/springbone/VRMSpringBoneManager.d.ts +35 -35
- package/types/springbone/VRMSpringBoneParameters.d.ts +9 -9
- package/types/springbone/index.d.ts +5 -5
- package/types/types/GLTFSchema.d.ts +887 -887
- package/types/types/VRMSchema.d.ts +440 -440
- package/types/types/index.d.ts +3 -3
- package/types/types/types.d.ts +64 -64
- package/types/utils/Matrix4InverseCache.d.ts +28 -28
- package/types/utils/disposer.d.ts +2 -2
- package/types/utils/gltfExtractPrimitivesFromNode.d.ts +22 -22
- package/types/utils/mat4InvertCompat.d.ts +8 -8
- package/types/utils/math.d.ts +40 -40
- package/types/utils/quatInvertCompat.d.ts +8 -8
- package/types/utils/renameMaterialProperty.d.ts +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
2
|
-
import { VRMHumanoid } from '../humanoid';
|
|
3
|
-
import { VRMFirstPerson } from './VRMFirstPerson';
|
|
4
|
-
/**
|
|
5
|
-
* An importer that imports a [[VRMFirstPerson]] from a VRM extension of a GLTF.
|
|
6
|
-
*/
|
|
7
|
-
export declare class VRMFirstPersonImporter {
|
|
8
|
-
/**
|
|
9
|
-
* Import a [[VRMFirstPerson]] from a VRM.
|
|
10
|
-
*
|
|
11
|
-
* @param gltf A parsed result of GLTF taken from GLTFLoader
|
|
12
|
-
* @param humanoid A [[VRMHumanoid]] instance that represents the VRM
|
|
13
|
-
*/
|
|
14
|
-
import(gltf: GLTF, humanoid: VRMHumanoid): Promise<VRMFirstPerson | null>;
|
|
15
|
-
}
|
|
1
|
+
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
2
|
+
import { VRMHumanoid } from '../humanoid';
|
|
3
|
+
import { VRMFirstPerson } from './VRMFirstPerson';
|
|
4
|
+
/**
|
|
5
|
+
* An importer that imports a [[VRMFirstPerson]] from a VRM extension of a GLTF.
|
|
6
|
+
*/
|
|
7
|
+
export declare class VRMFirstPersonImporter {
|
|
8
|
+
/**
|
|
9
|
+
* Import a [[VRMFirstPerson]] from a VRM.
|
|
10
|
+
*
|
|
11
|
+
* @param gltf A parsed result of GLTF taken from GLTFLoader
|
|
12
|
+
* @param humanoid A [[VRMHumanoid]] instance that represents the VRM
|
|
13
|
+
*/
|
|
14
|
+
import(gltf: GLTF, humanoid: VRMHumanoid): Promise<VRMFirstPerson | null>;
|
|
15
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './VRMFirstPerson';
|
|
2
|
-
export * from './VRMFirstPersonImporter';
|
|
1
|
+
export * from './VRMFirstPerson';
|
|
2
|
+
export * from './VRMFirstPersonImporter';
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { GLTFNode } from '../types';
|
|
2
|
-
import { VRMHumanLimit } from './VRMHumanLimit';
|
|
3
|
-
/**
|
|
4
|
-
* A class represents a single `humanBone` of a VRM.
|
|
5
|
-
*/
|
|
6
|
-
export declare class VRMHumanBone {
|
|
7
|
-
/**
|
|
8
|
-
* A [[GLTFNode]] (that actually is a `THREE.Object3D`) that represents the bone.
|
|
9
|
-
*/
|
|
10
|
-
readonly node: GLTFNode;
|
|
11
|
-
/**
|
|
12
|
-
* A [[VRMHumanLimit]] object that represents properties of the bone.
|
|
13
|
-
*/
|
|
14
|
-
readonly humanLimit: VRMHumanLimit;
|
|
15
|
-
/**
|
|
16
|
-
* Create a new VRMHumanBone.
|
|
17
|
-
*
|
|
18
|
-
* @param node A [[GLTFNode]] that represents the new bone
|
|
19
|
-
* @param humanLimit A [[VRMHumanLimit]] object that represents properties of the new bone
|
|
20
|
-
*/
|
|
21
|
-
constructor(node: GLTFNode, humanLimit: VRMHumanLimit);
|
|
22
|
-
}
|
|
1
|
+
import { GLTFNode } from '../types';
|
|
2
|
+
import { VRMHumanLimit } from './VRMHumanLimit';
|
|
3
|
+
/**
|
|
4
|
+
* A class represents a single `humanBone` of a VRM.
|
|
5
|
+
*/
|
|
6
|
+
export declare class VRMHumanBone {
|
|
7
|
+
/**
|
|
8
|
+
* A [[GLTFNode]] (that actually is a `THREE.Object3D`) that represents the bone.
|
|
9
|
+
*/
|
|
10
|
+
readonly node: GLTFNode;
|
|
11
|
+
/**
|
|
12
|
+
* A [[VRMHumanLimit]] object that represents properties of the bone.
|
|
13
|
+
*/
|
|
14
|
+
readonly humanLimit: VRMHumanLimit;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new VRMHumanBone.
|
|
17
|
+
*
|
|
18
|
+
* @param node A [[GLTFNode]] that represents the new bone
|
|
19
|
+
* @param humanLimit A [[VRMHumanLimit]] object that represents properties of the new bone
|
|
20
|
+
*/
|
|
21
|
+
constructor(node: GLTFNode, humanLimit: VRMHumanLimit);
|
|
22
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { VRMSchema } from '../types';
|
|
2
|
-
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
-
/**
|
|
4
|
-
* An array represents a `vrm.humanoid.humanBones` field of VRM specification.
|
|
5
|
-
*/
|
|
6
|
-
export declare type VRMHumanBoneArray = Array<{
|
|
7
|
-
name: VRMSchema.HumanoidBoneName;
|
|
8
|
-
bone: VRMHumanBone;
|
|
9
|
-
}>;
|
|
1
|
+
import { VRMSchema } from '../types';
|
|
2
|
+
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
+
/**
|
|
4
|
+
* An array represents a `vrm.humanoid.humanBones` field of VRM specification.
|
|
5
|
+
*/
|
|
6
|
+
export declare type VRMHumanBoneArray = Array<{
|
|
7
|
+
name: VRMSchema.HumanoidBoneName;
|
|
8
|
+
bone: VRMHumanBone;
|
|
9
|
+
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { VRMSchema } from '../types';
|
|
2
|
-
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
-
/**
|
|
4
|
-
* This object is a object variant of [[VRMHumanBoneArray]], used internally in [[VRMHumanoid]].
|
|
5
|
-
*/
|
|
6
|
-
export declare type VRMHumanBones = {
|
|
7
|
-
[name in VRMSchema.HumanoidBoneName]: VRMHumanBone[];
|
|
8
|
-
};
|
|
1
|
+
import { VRMSchema } from '../types';
|
|
2
|
+
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
+
/**
|
|
4
|
+
* This object is a object variant of [[VRMHumanBoneArray]], used internally in [[VRMHumanoid]].
|
|
5
|
+
*/
|
|
6
|
+
export declare type VRMHumanBones = {
|
|
7
|
+
[name in VRMSchema.HumanoidBoneName]: VRMHumanBone[];
|
|
8
|
+
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An interface represents a `HumanDescription` defined in VRM specification.
|
|
3
|
-
* These fields are not used in this implementation.
|
|
4
|
-
*/
|
|
5
|
-
export interface VRMHumanDescription {
|
|
6
|
-
armStretch?: number;
|
|
7
|
-
legStretch?: number;
|
|
8
|
-
upperArmTwist?: number;
|
|
9
|
-
lowerArmTwist?: number;
|
|
10
|
-
upperLegTwist?: number;
|
|
11
|
-
lowerLegTwist?: number;
|
|
12
|
-
feetSpacing?: number;
|
|
13
|
-
hasTranslationDoF?: boolean;
|
|
14
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* An interface represents a `HumanDescription` defined in VRM specification.
|
|
3
|
+
* These fields are not used in this implementation.
|
|
4
|
+
*/
|
|
5
|
+
export interface VRMHumanDescription {
|
|
6
|
+
armStretch?: number;
|
|
7
|
+
legStretch?: number;
|
|
8
|
+
upperArmTwist?: number;
|
|
9
|
+
lowerArmTwist?: number;
|
|
10
|
+
upperLegTwist?: number;
|
|
11
|
+
lowerLegTwist?: number;
|
|
12
|
+
feetSpacing?: number;
|
|
13
|
+
hasTranslationDoF?: boolean;
|
|
14
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
/**
|
|
3
|
-
* An interface represents a `HumanLimit` defined in VRM specification.
|
|
4
|
-
* These fields are not used in this implementation.
|
|
5
|
-
*/
|
|
6
|
-
export interface VRMHumanLimit {
|
|
7
|
-
useDefaultValues?: boolean;
|
|
8
|
-
min?: THREE.Vector3;
|
|
9
|
-
max?: THREE.Vector3;
|
|
10
|
-
center?: THREE.Vector3;
|
|
11
|
-
axisLength?: number;
|
|
12
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
/**
|
|
3
|
+
* An interface represents a `HumanLimit` defined in VRM specification.
|
|
4
|
+
* These fields are not used in this implementation.
|
|
5
|
+
*/
|
|
6
|
+
export interface VRMHumanLimit {
|
|
7
|
+
useDefaultValues?: boolean;
|
|
8
|
+
min?: THREE.Vector3;
|
|
9
|
+
max?: THREE.Vector3;
|
|
10
|
+
center?: THREE.Vector3;
|
|
11
|
+
axisLength?: number;
|
|
12
|
+
}
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { GLTFNode, VRMPose, VRMSchema } from '../types';
|
|
2
|
-
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
-
import { VRMHumanBoneArray } from './VRMHumanBoneArray';
|
|
4
|
-
import { VRMHumanBones } from './VRMHumanBones';
|
|
5
|
-
import { VRMHumanDescription } from './VRMHumanDescription';
|
|
6
|
-
/**
|
|
7
|
-
* A class represents humanoid of a VRM.
|
|
8
|
-
*/
|
|
9
|
-
export declare class VRMHumanoid {
|
|
10
|
-
/**
|
|
11
|
-
* A [[VRMHumanBones]] that contains all the human bones of the VRM.
|
|
12
|
-
* You might want to get these bones using [[VRMHumanoid.getBone]].
|
|
13
|
-
*/
|
|
14
|
-
readonly humanBones: VRMHumanBones;
|
|
15
|
-
/**
|
|
16
|
-
* A [[VRMHumanDescription]] that represents properties of the humanoid.
|
|
17
|
-
*/
|
|
18
|
-
readonly humanDescription: VRMHumanDescription;
|
|
19
|
-
/**
|
|
20
|
-
* A [[VRMPose]] that is its default state.
|
|
21
|
-
* Note that it's not compatible with `setPose` and `getPose`, since it contains non-relative values of each local transforms.
|
|
22
|
-
*/
|
|
23
|
-
readonly restPose: VRMPose;
|
|
24
|
-
/**
|
|
25
|
-
* Create a new [[VRMHumanoid]].
|
|
26
|
-
* @param boneArray A [[VRMHumanBoneArray]] contains all the bones of the new humanoid
|
|
27
|
-
* @param humanDescription A [[VRMHumanDescription]] that represents properties of the new humanoid
|
|
28
|
-
*/
|
|
29
|
-
constructor(boneArray: VRMHumanBoneArray, humanDescription: VRMHumanDescription);
|
|
30
|
-
/**
|
|
31
|
-
* Return the current pose of this humanoid as a [[VRMPose]].
|
|
32
|
-
*
|
|
33
|
-
* Each transform is a local transform relative from rest pose (T-pose).
|
|
34
|
-
*/
|
|
35
|
-
getPose(): VRMPose;
|
|
36
|
-
/**
|
|
37
|
-
* Let the humanoid do a specified pose.
|
|
38
|
-
*
|
|
39
|
-
* Each transform have to be a local transform relative from rest pose (T-pose).
|
|
40
|
-
* You can pass what you got from {@link getPose}.
|
|
41
|
-
*
|
|
42
|
-
* @param poseObject A [[VRMPose]] that represents a single pose
|
|
43
|
-
*/
|
|
44
|
-
setPose(poseObject: VRMPose): void;
|
|
45
|
-
/**
|
|
46
|
-
* Reset the humanoid to its rest pose.
|
|
47
|
-
*/
|
|
48
|
-
resetPose(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Return a bone bound to a specified [[HumanBone]], as a [[VRMHumanBone]].
|
|
51
|
-
*
|
|
52
|
-
* See also: [[VRMHumanoid.getBones]]
|
|
53
|
-
*
|
|
54
|
-
* @param name Name of the bone you want
|
|
55
|
-
*/
|
|
56
|
-
getBone(name: VRMSchema.HumanoidBoneName): VRMHumanBone | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Return bones bound to a specified [[HumanBone]], as an array of [[VRMHumanBone]].
|
|
59
|
-
* If there are no bones bound to the specified HumanBone, it will return an empty array.
|
|
60
|
-
*
|
|
61
|
-
* See also: [[VRMHumanoid.getBone]]
|
|
62
|
-
*
|
|
63
|
-
* @param name Name of the bone you want
|
|
64
|
-
*/
|
|
65
|
-
getBones(name: VRMSchema.HumanoidBoneName): VRMHumanBone[];
|
|
66
|
-
/**
|
|
67
|
-
* Return a bone bound to a specified [[HumanBone]], as a THREE.Object3D.
|
|
68
|
-
*
|
|
69
|
-
* See also: [[VRMHumanoid.getBoneNodes]]
|
|
70
|
-
*
|
|
71
|
-
* @param name Name of the bone you want
|
|
72
|
-
*/
|
|
73
|
-
getBoneNode(name: VRMSchema.HumanoidBoneName): GLTFNode | null;
|
|
74
|
-
/**
|
|
75
|
-
* Return bones bound to a specified [[HumanBone]], as an array of THREE.Object3D.
|
|
76
|
-
* If there are no bones bound to the specified HumanBone, it will return an empty array.
|
|
77
|
-
*
|
|
78
|
-
* See also: [[VRMHumanoid.getBoneNode]]
|
|
79
|
-
*
|
|
80
|
-
* @param name Name of the bone you want
|
|
81
|
-
*/
|
|
82
|
-
getBoneNodes(name: VRMSchema.HumanoidBoneName): GLTFNode[];
|
|
83
|
-
/**
|
|
84
|
-
* Prepare a [[VRMHumanBones]] from a [[VRMHumanBoneArray]].
|
|
85
|
-
*/
|
|
86
|
-
private _createHumanBones;
|
|
87
|
-
}
|
|
1
|
+
import { GLTFNode, VRMPose, VRMSchema } from '../types';
|
|
2
|
+
import { VRMHumanBone } from './VRMHumanBone';
|
|
3
|
+
import { VRMHumanBoneArray } from './VRMHumanBoneArray';
|
|
4
|
+
import { VRMHumanBones } from './VRMHumanBones';
|
|
5
|
+
import { VRMHumanDescription } from './VRMHumanDescription';
|
|
6
|
+
/**
|
|
7
|
+
* A class represents humanoid of a VRM.
|
|
8
|
+
*/
|
|
9
|
+
export declare class VRMHumanoid {
|
|
10
|
+
/**
|
|
11
|
+
* A [[VRMHumanBones]] that contains all the human bones of the VRM.
|
|
12
|
+
* You might want to get these bones using [[VRMHumanoid.getBone]].
|
|
13
|
+
*/
|
|
14
|
+
readonly humanBones: VRMHumanBones;
|
|
15
|
+
/**
|
|
16
|
+
* A [[VRMHumanDescription]] that represents properties of the humanoid.
|
|
17
|
+
*/
|
|
18
|
+
readonly humanDescription: VRMHumanDescription;
|
|
19
|
+
/**
|
|
20
|
+
* A [[VRMPose]] that is its default state.
|
|
21
|
+
* Note that it's not compatible with `setPose` and `getPose`, since it contains non-relative values of each local transforms.
|
|
22
|
+
*/
|
|
23
|
+
readonly restPose: VRMPose;
|
|
24
|
+
/**
|
|
25
|
+
* Create a new [[VRMHumanoid]].
|
|
26
|
+
* @param boneArray A [[VRMHumanBoneArray]] contains all the bones of the new humanoid
|
|
27
|
+
* @param humanDescription A [[VRMHumanDescription]] that represents properties of the new humanoid
|
|
28
|
+
*/
|
|
29
|
+
constructor(boneArray: VRMHumanBoneArray, humanDescription: VRMHumanDescription);
|
|
30
|
+
/**
|
|
31
|
+
* Return the current pose of this humanoid as a [[VRMPose]].
|
|
32
|
+
*
|
|
33
|
+
* Each transform is a local transform relative from rest pose (T-pose).
|
|
34
|
+
*/
|
|
35
|
+
getPose(): VRMPose;
|
|
36
|
+
/**
|
|
37
|
+
* Let the humanoid do a specified pose.
|
|
38
|
+
*
|
|
39
|
+
* Each transform have to be a local transform relative from rest pose (T-pose).
|
|
40
|
+
* You can pass what you got from {@link getPose}.
|
|
41
|
+
*
|
|
42
|
+
* @param poseObject A [[VRMPose]] that represents a single pose
|
|
43
|
+
*/
|
|
44
|
+
setPose(poseObject: VRMPose): void;
|
|
45
|
+
/**
|
|
46
|
+
* Reset the humanoid to its rest pose.
|
|
47
|
+
*/
|
|
48
|
+
resetPose(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Return a bone bound to a specified [[HumanBone]], as a [[VRMHumanBone]].
|
|
51
|
+
*
|
|
52
|
+
* See also: [[VRMHumanoid.getBones]]
|
|
53
|
+
*
|
|
54
|
+
* @param name Name of the bone you want
|
|
55
|
+
*/
|
|
56
|
+
getBone(name: VRMSchema.HumanoidBoneName): VRMHumanBone | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Return bones bound to a specified [[HumanBone]], as an array of [[VRMHumanBone]].
|
|
59
|
+
* If there are no bones bound to the specified HumanBone, it will return an empty array.
|
|
60
|
+
*
|
|
61
|
+
* See also: [[VRMHumanoid.getBone]]
|
|
62
|
+
*
|
|
63
|
+
* @param name Name of the bone you want
|
|
64
|
+
*/
|
|
65
|
+
getBones(name: VRMSchema.HumanoidBoneName): VRMHumanBone[];
|
|
66
|
+
/**
|
|
67
|
+
* Return a bone bound to a specified [[HumanBone]], as a THREE.Object3D.
|
|
68
|
+
*
|
|
69
|
+
* See also: [[VRMHumanoid.getBoneNodes]]
|
|
70
|
+
*
|
|
71
|
+
* @param name Name of the bone you want
|
|
72
|
+
*/
|
|
73
|
+
getBoneNode(name: VRMSchema.HumanoidBoneName): GLTFNode | null;
|
|
74
|
+
/**
|
|
75
|
+
* Return bones bound to a specified [[HumanBone]], as an array of THREE.Object3D.
|
|
76
|
+
* If there are no bones bound to the specified HumanBone, it will return an empty array.
|
|
77
|
+
*
|
|
78
|
+
* See also: [[VRMHumanoid.getBoneNode]]
|
|
79
|
+
*
|
|
80
|
+
* @param name Name of the bone you want
|
|
81
|
+
*/
|
|
82
|
+
getBoneNodes(name: VRMSchema.HumanoidBoneName): GLTFNode[];
|
|
83
|
+
/**
|
|
84
|
+
* Prepare a [[VRMHumanBones]] from a [[VRMHumanBoneArray]].
|
|
85
|
+
*/
|
|
86
|
+
private _createHumanBones;
|
|
87
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
2
|
-
import { VRMHumanoid } from './VRMHumanoid';
|
|
3
|
-
/**
|
|
4
|
-
* An importer that imports a [[VRMHumanoid]] from a VRM extension of a GLTF.
|
|
5
|
-
*/
|
|
6
|
-
export declare class VRMHumanoidImporter {
|
|
7
|
-
/**
|
|
8
|
-
* Import a [[VRMHumanoid]] from a VRM.
|
|
9
|
-
*
|
|
10
|
-
* @param gltf A parsed result of GLTF taken from GLTFLoader
|
|
11
|
-
*/
|
|
12
|
-
import(gltf: GLTF): Promise<VRMHumanoid | null>;
|
|
13
|
-
}
|
|
1
|
+
import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
2
|
+
import { VRMHumanoid } from './VRMHumanoid';
|
|
3
|
+
/**
|
|
4
|
+
* An importer that imports a [[VRMHumanoid]] from a VRM extension of a GLTF.
|
|
5
|
+
*/
|
|
6
|
+
export declare class VRMHumanoidImporter {
|
|
7
|
+
/**
|
|
8
|
+
* Import a [[VRMHumanoid]] from a VRM.
|
|
9
|
+
*
|
|
10
|
+
* @param gltf A parsed result of GLTF taken from GLTFLoader
|
|
11
|
+
*/
|
|
12
|
+
import(gltf: GLTF): Promise<VRMHumanoid | null>;
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './VRMHumanBone';
|
|
2
|
-
export * from './VRMHumanBones';
|
|
3
|
-
export * from './VRMHumanDescription';
|
|
4
|
-
export * from './VRMHumanLimit';
|
|
5
|
-
export * from './VRMHumanoid';
|
|
6
|
-
export * from './VRMHumanoidImporter';
|
|
1
|
+
export * from './VRMHumanBone';
|
|
2
|
+
export * from './VRMHumanBones';
|
|
3
|
+
export * from './VRMHumanDescription';
|
|
4
|
+
export * from './VRMHumanLimit';
|
|
5
|
+
export * from './VRMHumanoid';
|
|
6
|
+
export * from './VRMHumanoidImporter';
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from './VRM';
|
|
2
|
-
export * from './VRMImporter';
|
|
3
|
-
export * from './VRMUtils';
|
|
4
|
-
export * from './blendshape';
|
|
5
|
-
export * from './debug';
|
|
6
|
-
export * from './firstperson';
|
|
7
|
-
export * from './humanoid';
|
|
8
|
-
export * from './lookat';
|
|
9
|
-
export * from './springbone';
|
|
10
|
-
export * from './types';
|
|
11
|
-
export * from './material';
|
|
12
|
-
export * from './meta';
|
|
1
|
+
export * from './VRM';
|
|
2
|
+
export * from './VRMImporter';
|
|
3
|
+
export * from './VRMUtils';
|
|
4
|
+
export * from './blendshape';
|
|
5
|
+
export * from './debug';
|
|
6
|
+
export * from './firstperson';
|
|
7
|
+
export * from './humanoid';
|
|
8
|
+
export * from './lookat';
|
|
9
|
+
export * from './springbone';
|
|
10
|
+
export * from './types';
|
|
11
|
+
export * from './material';
|
|
12
|
+
export * from './meta';
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is an equivalent of CurveMapper class defined in UniVRM.
|
|
3
|
-
* Will be used for [[VRMLookAtApplyer]]s, to define behavior of LookAt.
|
|
4
|
-
*
|
|
5
|
-
* See: https://github.com/vrm-c/UniVRM/blob/master/Assets/VRM/UniVRM/Scripts/LookAt/CurveMapper.cs
|
|
6
|
-
*/
|
|
7
|
-
export declare class VRMCurveMapper {
|
|
8
|
-
/**
|
|
9
|
-
* An array represents the curve. See AnimationCurve class of Unity for its details.
|
|
10
|
-
*
|
|
11
|
-
* See: https://docs.unity3d.com/ja/current/ScriptReference/AnimationCurve.html
|
|
12
|
-
*/
|
|
13
|
-
curve: number[];
|
|
14
|
-
/**
|
|
15
|
-
* The maximum input range of the [[VRMCurveMapper]].
|
|
16
|
-
*/
|
|
17
|
-
curveXRangeDegree: number;
|
|
18
|
-
/**
|
|
19
|
-
* The maximum output value of the [[VRMCurveMapper]].
|
|
20
|
-
*/
|
|
21
|
-
curveYRangeDegree: number;
|
|
22
|
-
/**
|
|
23
|
-
* Create a new [[VRMCurveMapper]].
|
|
24
|
-
*
|
|
25
|
-
* @param xRange The maximum input range
|
|
26
|
-
* @param yRange The maximum output value
|
|
27
|
-
* @param curve An array represents the curve
|
|
28
|
-
*/
|
|
29
|
-
constructor(xRange?: number, yRange?: number, curve?: number[]);
|
|
30
|
-
/**
|
|
31
|
-
* Evaluate an input value and output a mapped value.
|
|
32
|
-
*
|
|
33
|
-
* @param src The input value
|
|
34
|
-
*/
|
|
35
|
-
map(src: number): number;
|
|
36
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This is an equivalent of CurveMapper class defined in UniVRM.
|
|
3
|
+
* Will be used for [[VRMLookAtApplyer]]s, to define behavior of LookAt.
|
|
4
|
+
*
|
|
5
|
+
* See: https://github.com/vrm-c/UniVRM/blob/master/Assets/VRM/UniVRM/Scripts/LookAt/CurveMapper.cs
|
|
6
|
+
*/
|
|
7
|
+
export declare class VRMCurveMapper {
|
|
8
|
+
/**
|
|
9
|
+
* An array represents the curve. See AnimationCurve class of Unity for its details.
|
|
10
|
+
*
|
|
11
|
+
* See: https://docs.unity3d.com/ja/current/ScriptReference/AnimationCurve.html
|
|
12
|
+
*/
|
|
13
|
+
curve: number[];
|
|
14
|
+
/**
|
|
15
|
+
* The maximum input range of the [[VRMCurveMapper]].
|
|
16
|
+
*/
|
|
17
|
+
curveXRangeDegree: number;
|
|
18
|
+
/**
|
|
19
|
+
* The maximum output value of the [[VRMCurveMapper]].
|
|
20
|
+
*/
|
|
21
|
+
curveYRangeDegree: number;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new [[VRMCurveMapper]].
|
|
24
|
+
*
|
|
25
|
+
* @param xRange The maximum input range
|
|
26
|
+
* @param yRange The maximum output value
|
|
27
|
+
* @param curve An array represents the curve
|
|
28
|
+
*/
|
|
29
|
+
constructor(xRange?: number, yRange?: number, curve?: number[]);
|
|
30
|
+
/**
|
|
31
|
+
* Evaluate an input value and output a mapped value.
|
|
32
|
+
*
|
|
33
|
+
* @param src The input value
|
|
34
|
+
*/
|
|
35
|
+
map(src: number): number;
|
|
36
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { VRMSchema } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* This class is used by [[VRMLookAtHead]], applies look at direction.
|
|
5
|
-
* There are currently two variant of applier: [[VRMLookAtBoneApplyer]] and [[VRMLookAtBlendShapeApplyer]].
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class VRMLookAtApplyer {
|
|
8
|
-
/**
|
|
9
|
-
* It represents its type of applier.
|
|
10
|
-
*/
|
|
11
|
-
abstract readonly type: VRMSchema.FirstPersonLookAtTypeName;
|
|
12
|
-
/**
|
|
13
|
-
* Apply look at direction to its associated VRM model.
|
|
14
|
-
*
|
|
15
|
-
* @param euler `THREE.Euler` object that represents the look at direction
|
|
16
|
-
*/
|
|
17
|
-
abstract lookAt(euler: THREE.Euler): void;
|
|
18
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { VRMSchema } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* This class is used by [[VRMLookAtHead]], applies look at direction.
|
|
5
|
+
* There are currently two variant of applier: [[VRMLookAtBoneApplyer]] and [[VRMLookAtBlendShapeApplyer]].
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class VRMLookAtApplyer {
|
|
8
|
+
/**
|
|
9
|
+
* It represents its type of applier.
|
|
10
|
+
*/
|
|
11
|
+
abstract readonly type: VRMSchema.FirstPersonLookAtTypeName;
|
|
12
|
+
/**
|
|
13
|
+
* Apply look at direction to its associated VRM model.
|
|
14
|
+
*
|
|
15
|
+
* @param euler `THREE.Euler` object that represents the look at direction
|
|
16
|
+
*/
|
|
17
|
+
abstract lookAt(euler: THREE.Euler): void;
|
|
18
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { VRMBlendShapeProxy } from '../blendshape';
|
|
3
|
-
import { VRMSchema } from '../types';
|
|
4
|
-
import { VRMCurveMapper } from './VRMCurveMapper';
|
|
5
|
-
import { VRMLookAtApplyer } from './VRMLookAtApplyer';
|
|
6
|
-
/**
|
|
7
|
-
* This class is used by [[VRMLookAtHead]], applies look at direction to eye blend shapes of a VRM.
|
|
8
|
-
*/
|
|
9
|
-
export declare class VRMLookAtBlendShapeApplyer extends VRMLookAtApplyer {
|
|
10
|
-
readonly type = VRMSchema.FirstPersonLookAtTypeName.BlendShape;
|
|
11
|
-
private readonly _curveHorizontal;
|
|
12
|
-
private readonly _curveVerticalDown;
|
|
13
|
-
private readonly _curveVerticalUp;
|
|
14
|
-
private readonly _blendShapeProxy;
|
|
15
|
-
/**
|
|
16
|
-
* Create a new VRMLookAtBlendShapeApplyer.
|
|
17
|
-
*
|
|
18
|
-
* @param blendShapeProxy A [[VRMBlendShapeProxy]] used by this applier
|
|
19
|
-
* @param curveHorizontal A [[VRMCurveMapper]] used for transverse direction
|
|
20
|
-
* @param curveVerticalDown A [[VRMCurveMapper]] used for down direction
|
|
21
|
-
* @param curveVerticalUp A [[VRMCurveMapper]] used for up direction
|
|
22
|
-
*/
|
|
23
|
-
constructor(blendShapeProxy: VRMBlendShapeProxy, curveHorizontal: VRMCurveMapper, curveVerticalDown: VRMCurveMapper, curveVerticalUp: VRMCurveMapper);
|
|
24
|
-
name(): VRMSchema.FirstPersonLookAtTypeName;
|
|
25
|
-
lookAt(euler: THREE.Euler): void;
|
|
26
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { VRMBlendShapeProxy } from '../blendshape';
|
|
3
|
+
import { VRMSchema } from '../types';
|
|
4
|
+
import { VRMCurveMapper } from './VRMCurveMapper';
|
|
5
|
+
import { VRMLookAtApplyer } from './VRMLookAtApplyer';
|
|
6
|
+
/**
|
|
7
|
+
* This class is used by [[VRMLookAtHead]], applies look at direction to eye blend shapes of a VRM.
|
|
8
|
+
*/
|
|
9
|
+
export declare class VRMLookAtBlendShapeApplyer extends VRMLookAtApplyer {
|
|
10
|
+
readonly type = VRMSchema.FirstPersonLookAtTypeName.BlendShape;
|
|
11
|
+
private readonly _curveHorizontal;
|
|
12
|
+
private readonly _curveVerticalDown;
|
|
13
|
+
private readonly _curveVerticalUp;
|
|
14
|
+
private readonly _blendShapeProxy;
|
|
15
|
+
/**
|
|
16
|
+
* Create a new VRMLookAtBlendShapeApplyer.
|
|
17
|
+
*
|
|
18
|
+
* @param blendShapeProxy A [[VRMBlendShapeProxy]] used by this applier
|
|
19
|
+
* @param curveHorizontal A [[VRMCurveMapper]] used for transverse direction
|
|
20
|
+
* @param curveVerticalDown A [[VRMCurveMapper]] used for down direction
|
|
21
|
+
* @param curveVerticalUp A [[VRMCurveMapper]] used for up direction
|
|
22
|
+
*/
|
|
23
|
+
constructor(blendShapeProxy: VRMBlendShapeProxy, curveHorizontal: VRMCurveMapper, curveVerticalDown: VRMCurveMapper, curveVerticalUp: VRMCurveMapper);
|
|
24
|
+
name(): VRMSchema.FirstPersonLookAtTypeName;
|
|
25
|
+
lookAt(euler: THREE.Euler): void;
|
|
26
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
import { VRMHumanoid } from '../humanoid';
|
|
3
|
-
import { VRMSchema } from '../types';
|
|
4
|
-
import { VRMCurveMapper } from './VRMCurveMapper';
|
|
5
|
-
import { VRMLookAtApplyer } from './VRMLookAtApplyer';
|
|
6
|
-
/**
|
|
7
|
-
* This class is used by [[VRMLookAtHead]], applies look at direction to eye bones of a VRM.
|
|
8
|
-
*/
|
|
9
|
-
export declare class VRMLookAtBoneApplyer extends VRMLookAtApplyer {
|
|
10
|
-
readonly type = VRMSchema.FirstPersonLookAtTypeName.Bone;
|
|
11
|
-
private readonly _curveHorizontalInner;
|
|
12
|
-
private readonly _curveHorizontalOuter;
|
|
13
|
-
private readonly _curveVerticalDown;
|
|
14
|
-
private readonly _curveVerticalUp;
|
|
15
|
-
private readonly _leftEye;
|
|
16
|
-
private readonly _rightEye;
|
|
17
|
-
/**
|
|
18
|
-
* Create a new VRMLookAtBoneApplyer.
|
|
19
|
-
*
|
|
20
|
-
* @param humanoid A [[VRMHumanoid]] used by this applier
|
|
21
|
-
* @param curveHorizontalInner A [[VRMCurveMapper]] used for inner transverse direction
|
|
22
|
-
* @param curveHorizontalOuter A [[VRMCurveMapper]] used for outer transverse direction
|
|
23
|
-
* @param curveVerticalDown A [[VRMCurveMapper]] used for down direction
|
|
24
|
-
* @param curveVerticalUp A [[VRMCurveMapper]] used for up direction
|
|
25
|
-
*/
|
|
26
|
-
constructor(humanoid: VRMHumanoid, curveHorizontalInner: VRMCurveMapper, curveHorizontalOuter: VRMCurveMapper, curveVerticalDown: VRMCurveMapper, curveVerticalUp: VRMCurveMapper);
|
|
27
|
-
lookAt(euler: THREE.Euler): void;
|
|
28
|
-
}
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { VRMHumanoid } from '../humanoid';
|
|
3
|
+
import { VRMSchema } from '../types';
|
|
4
|
+
import { VRMCurveMapper } from './VRMCurveMapper';
|
|
5
|
+
import { VRMLookAtApplyer } from './VRMLookAtApplyer';
|
|
6
|
+
/**
|
|
7
|
+
* This class is used by [[VRMLookAtHead]], applies look at direction to eye bones of a VRM.
|
|
8
|
+
*/
|
|
9
|
+
export declare class VRMLookAtBoneApplyer extends VRMLookAtApplyer {
|
|
10
|
+
readonly type = VRMSchema.FirstPersonLookAtTypeName.Bone;
|
|
11
|
+
private readonly _curveHorizontalInner;
|
|
12
|
+
private readonly _curveHorizontalOuter;
|
|
13
|
+
private readonly _curveVerticalDown;
|
|
14
|
+
private readonly _curveVerticalUp;
|
|
15
|
+
private readonly _leftEye;
|
|
16
|
+
private readonly _rightEye;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new VRMLookAtBoneApplyer.
|
|
19
|
+
*
|
|
20
|
+
* @param humanoid A [[VRMHumanoid]] used by this applier
|
|
21
|
+
* @param curveHorizontalInner A [[VRMCurveMapper]] used for inner transverse direction
|
|
22
|
+
* @param curveHorizontalOuter A [[VRMCurveMapper]] used for outer transverse direction
|
|
23
|
+
* @param curveVerticalDown A [[VRMCurveMapper]] used for down direction
|
|
24
|
+
* @param curveVerticalUp A [[VRMCurveMapper]] used for up direction
|
|
25
|
+
*/
|
|
26
|
+
constructor(humanoid: VRMHumanoid, curveHorizontalInner: VRMCurveMapper, curveHorizontalOuter: VRMCurveMapper, curveVerticalDown: VRMCurveMapper, curveVerticalUp: VRMCurveMapper);
|
|
27
|
+
lookAt(euler: THREE.Euler): void;
|
|
28
|
+
}
|