@pixiv/three-vrm 0.6.10 → 1.0.0-beta.10
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 +30 -18
- package/lib/three-vrm.js +4993 -2572
- package/lib/three-vrm.min.js +138 -2
- package/lib/three-vrm.module.js +4949 -2546
- package/lib/three-vrm.module.min.js +136 -1
- package/package.json +19 -13
- package/ts3.4/types/VRM.d.ts +11 -82
- package/ts3.4/types/VRMLoaderPlugin.d.ts +31 -0
- package/ts3.4/types/VRMLoaderPluginOptions.d.ts +25 -0
- package/ts3.4/types/VRMParameters.d.ts +11 -0
- package/ts3.4/types/{utils/disposer.d.ts → VRMUtils/deepDispose.d.ts} +0 -0
- package/ts3.4/types/VRMUtils/index.d.ts +4 -2
- package/ts3.4/types/VRMUtils/rotateVRM0.d.ts +2 -0
- package/ts3.4/types/index.d.ts +8 -11
- package/types/VRM.d.ts +11 -82
- package/types/VRMLoaderPlugin.d.ts +31 -0
- package/types/VRMLoaderPluginOptions.d.ts +25 -0
- package/types/VRMParameters.d.ts +11 -0
- package/types/{utils/disposer.d.ts → VRMUtils/deepDispose.d.ts} +0 -0
- package/types/VRMUtils/index.d.ts +4 -2
- package/types/VRMUtils/rotateVRM0.d.ts +2 -0
- package/types/index.d.ts +8 -11
- package/ts3.4/types/VRMImporter.d.ts +0 -42
- package/ts3.4/types/VRMUtils/extractThumbnailBlob.d.ts +0 -10
- package/ts3.4/types/blendshape/VRMBlendShapeGroup.d.ts +0 -50
- package/ts3.4/types/blendshape/VRMBlendShapeImporter.d.ts +0 -13
- package/ts3.4/types/blendshape/VRMBlendShapeProxy.d.ts +0 -91
- package/ts3.4/types/blendshape/index.d.ts +0 -3
- package/ts3.4/types/debug/VRMDebug.d.ts +0 -28
- package/ts3.4/types/debug/VRMDebugOptions.d.ts +0 -10
- package/ts3.4/types/debug/VRMImporterDebug.d.ts +0 -11
- package/ts3.4/types/debug/VRMLookAtHeadDebug.d.ts +0 -8
- package/ts3.4/types/debug/VRMLookAtImporterDebug.d.ts +0 -9
- package/ts3.4/types/debug/VRMSpringBoneDebug.d.ts +0 -14
- package/ts3.4/types/debug/VRMSpringBoneImporterDebug.d.ts +0 -10
- package/ts3.4/types/debug/VRMSpringBoneManagerDebug.d.ts +0 -11
- package/ts3.4/types/debug/index.d.ts +0 -4
- package/ts3.4/types/firstperson/VRMFirstPerson.d.ts +0 -116
- package/ts3.4/types/firstperson/VRMFirstPersonImporter.d.ts +0 -15
- package/ts3.4/types/firstperson/index.d.ts +0 -2
- package/ts3.4/types/humanoid/VRMHumanBone.d.ts +0 -22
- package/ts3.4/types/humanoid/VRMHumanBoneArray.d.ts +0 -9
- package/ts3.4/types/humanoid/VRMHumanBones.d.ts +0 -8
- package/ts3.4/types/humanoid/VRMHumanDescription.d.ts +0 -14
- package/ts3.4/types/humanoid/VRMHumanLimit.d.ts +0 -12
- package/ts3.4/types/humanoid/VRMHumanoid.d.ts +0 -87
- package/ts3.4/types/humanoid/VRMHumanoidImporter.d.ts +0 -13
- package/ts3.4/types/humanoid/index.d.ts +0 -6
- package/ts3.4/types/lookat/VRMCurveMapper.d.ts +0 -36
- package/ts3.4/types/lookat/VRMLookAtApplyer.d.ts +0 -18
- package/ts3.4/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +0 -26
- package/ts3.4/types/lookat/VRMLookAtBoneApplyer.d.ts +0 -28
- package/ts3.4/types/lookat/VRMLookAtHead.d.ts +0 -57
- package/ts3.4/types/lookat/VRMLookAtImporter.d.ts +0 -23
- package/ts3.4/types/lookat/index.d.ts +0 -6
- package/ts3.4/types/material/MToonMaterial.d.ts +0 -194
- package/ts3.4/types/material/VRMMaterialImporter.d.ts +0 -50
- package/ts3.4/types/material/VRMUnlitMaterial.d.ts +0 -44
- package/ts3.4/types/material/getTexelDecodingFunction.d.ts +0 -16
- package/ts3.4/types/material/index.d.ts +0 -3
- package/ts3.4/types/meta/VRMMeta.d.ts +0 -59
- package/ts3.4/types/meta/VRMMetaImporter.d.ts +0 -14
- package/ts3.4/types/meta/VRMMetaImporterOptions.d.ts +0 -9
- package/ts3.4/types/meta/index.d.ts +0 -3
- package/ts3.4/types/springbone/VRMSpringBone.d.ts +0 -129
- package/ts3.4/types/springbone/VRMSpringBoneColliderGroup.d.ts +0 -15
- package/ts3.4/types/springbone/VRMSpringBoneImporter.d.ts +0 -34
- package/ts3.4/types/springbone/VRMSpringBoneManager.d.ts +0 -35
- package/ts3.4/types/springbone/VRMSpringBoneParameters.d.ts +0 -9
- package/ts3.4/types/springbone/index.d.ts +0 -5
- package/ts3.4/types/types/GLTFSchema.d.ts +0 -887
- package/ts3.4/types/types/VRMSchema.d.ts +0 -440
- package/ts3.4/types/types/index.d.ts +0 -3
- package/ts3.4/types/types/types.d.ts +0 -73
- package/ts3.4/types/utils/gltfExtractPrimitivesFromNode.d.ts +0 -22
- package/types/VRMImporter.d.ts +0 -42
- package/types/VRMUtils/extractThumbnailBlob.d.ts +0 -10
- package/types/blendshape/VRMBlendShapeGroup.d.ts +0 -50
- package/types/blendshape/VRMBlendShapeImporter.d.ts +0 -13
- package/types/blendshape/VRMBlendShapeProxy.d.ts +0 -91
- package/types/blendshape/index.d.ts +0 -3
- package/types/debug/VRMDebug.d.ts +0 -28
- package/types/debug/VRMDebugOptions.d.ts +0 -10
- package/types/debug/VRMImporterDebug.d.ts +0 -11
- package/types/debug/VRMLookAtHeadDebug.d.ts +0 -8
- package/types/debug/VRMLookAtImporterDebug.d.ts +0 -9
- package/types/debug/VRMSpringBoneDebug.d.ts +0 -14
- package/types/debug/VRMSpringBoneImporterDebug.d.ts +0 -10
- package/types/debug/VRMSpringBoneManagerDebug.d.ts +0 -11
- package/types/debug/index.d.ts +0 -4
- package/types/firstperson/VRMFirstPerson.d.ts +0 -116
- package/types/firstperson/VRMFirstPersonImporter.d.ts +0 -15
- package/types/firstperson/index.d.ts +0 -2
- package/types/humanoid/VRMHumanBone.d.ts +0 -22
- package/types/humanoid/VRMHumanBoneArray.d.ts +0 -9
- package/types/humanoid/VRMHumanBones.d.ts +0 -8
- package/types/humanoid/VRMHumanDescription.d.ts +0 -14
- package/types/humanoid/VRMHumanLimit.d.ts +0 -12
- package/types/humanoid/VRMHumanoid.d.ts +0 -87
- package/types/humanoid/VRMHumanoidImporter.d.ts +0 -13
- package/types/humanoid/index.d.ts +0 -6
- package/types/lookat/VRMCurveMapper.d.ts +0 -36
- package/types/lookat/VRMLookAtApplyer.d.ts +0 -18
- package/types/lookat/VRMLookAtBlendShapeApplyer.d.ts +0 -26
- package/types/lookat/VRMLookAtBoneApplyer.d.ts +0 -28
- package/types/lookat/VRMLookAtHead.d.ts +0 -57
- package/types/lookat/VRMLookAtImporter.d.ts +0 -23
- package/types/lookat/index.d.ts +0 -6
- package/types/material/MToonMaterial.d.ts +0 -206
- package/types/material/VRMMaterialImporter.d.ts +0 -50
- package/types/material/VRMUnlitMaterial.d.ts +0 -46
- package/types/material/getTexelDecodingFunction.d.ts +0 -13
- package/types/material/index.d.ts +0 -3
- package/types/meta/VRMMeta.d.ts +0 -59
- package/types/meta/VRMMetaImporter.d.ts +0 -14
- package/types/meta/VRMMetaImporterOptions.d.ts +0 -9
- package/types/meta/index.d.ts +0 -3
- package/types/springbone/VRMSpringBone.d.ts +0 -130
- package/types/springbone/VRMSpringBoneColliderGroup.d.ts +0 -15
- package/types/springbone/VRMSpringBoneImporter.d.ts +0 -34
- package/types/springbone/VRMSpringBoneManager.d.ts +0 -35
- package/types/springbone/VRMSpringBoneParameters.d.ts +0 -9
- package/types/springbone/index.d.ts +0 -5
- package/types/types/GLTFSchema.d.ts +0 -887
- package/types/types/VRMSchema.d.ts +0 -440
- package/types/types/index.d.ts +0 -3
- package/types/types/types.d.ts +0 -64
- package/types/utils/gltfExtractPrimitivesFromNode.d.ts +0 -22
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Use [VRM](https://vrm.dev/) on [three.js](https://threejs.org/)
|
|
|
10
10
|
|
|
11
11
|
[Documentation](https://pixiv.github.io/three-vrm/packages/three-vrm/docs)
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## How to Use
|
|
14
14
|
|
|
15
15
|
### from HTML
|
|
16
16
|
|
|
@@ -33,6 +33,14 @@ Code like this:
|
|
|
33
33
|
const scene = new THREE.Scene();
|
|
34
34
|
|
|
35
35
|
const loader = new THREE.GLTFLoader();
|
|
36
|
+
|
|
37
|
+
// Install GLTFLoader plugin
|
|
38
|
+
loader.register( ( parser ) => {
|
|
39
|
+
|
|
40
|
+
return new THREE_VRM.VRMLoaderPlugin( parser );
|
|
41
|
+
|
|
42
|
+
} );
|
|
43
|
+
|
|
36
44
|
loader.load(
|
|
37
45
|
|
|
38
46
|
// URL of the VRM you want to load
|
|
@@ -41,16 +49,14 @@ loader.load(
|
|
|
41
49
|
// called when the resource is loaded
|
|
42
50
|
( gltf ) => {
|
|
43
51
|
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// add the loaded vrm to the scene
|
|
48
|
-
scene.add( vrm.scene );
|
|
52
|
+
// retrieve a VRM instance from gltf
|
|
53
|
+
const vrm = gltf.userData.vrm;
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
// add the loaded vrm to the scene
|
|
56
|
+
scene.add( vrm.scene );
|
|
52
57
|
|
|
53
|
-
|
|
58
|
+
// deal with vrm features
|
|
59
|
+
console.log( vrm );
|
|
54
60
|
|
|
55
61
|
},
|
|
56
62
|
|
|
@@ -77,11 +83,19 @@ Code like this:
|
|
|
77
83
|
```javascript
|
|
78
84
|
import * as THREE from 'three';
|
|
79
85
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
80
|
-
import {
|
|
86
|
+
import { VRMLoaderPlugin } from '@pixiv/three-vrm';
|
|
81
87
|
|
|
82
88
|
const scene = new THREE.Scene();
|
|
83
89
|
|
|
84
90
|
const loader = new GLTFLoader();
|
|
91
|
+
|
|
92
|
+
// Install GLTFLoader plugin
|
|
93
|
+
loader.register( ( parser ) => {
|
|
94
|
+
|
|
95
|
+
return new VRMLoaderPlugin( parser );
|
|
96
|
+
|
|
97
|
+
} );
|
|
98
|
+
|
|
85
99
|
loader.load(
|
|
86
100
|
|
|
87
101
|
// URL of the VRM you want to load
|
|
@@ -90,16 +104,14 @@ loader.load(
|
|
|
90
104
|
// called when the resource is loaded
|
|
91
105
|
( gltf ) => {
|
|
92
106
|
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// add the loaded vrm to the scene
|
|
97
|
-
scene.add( vrm.scene );
|
|
107
|
+
// retrieve a VRM instance from gltf
|
|
108
|
+
const vrm = gltf.userData.vrm;
|
|
98
109
|
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
// add the loaded vrm to the scene
|
|
111
|
+
scene.add( vrm.scene );
|
|
101
112
|
|
|
102
|
-
|
|
113
|
+
// deal with vrm features
|
|
114
|
+
console.log( vrm );
|
|
103
115
|
|
|
104
116
|
},
|
|
105
117
|
|