@pixiv/three-vrm 1.0.6 → 1.0.7
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 +1 -1
- package/README.md +20 -6
- package/lib/three-vrm.js +41 -24
- package/lib/three-vrm.min.js +14 -14
- package/lib/three-vrm.module.js +41 -24
- package/lib/three-vrm.module.min.js +14 -14
- package/package.json +12 -12
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -39,18 +39,32 @@ You will need:
|
|
|
39
39
|
Code like this:
|
|
40
40
|
|
|
41
41
|
```html
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<script src="
|
|
42
|
+
<!-- About import maps, see the Three.js official docs: -->
|
|
43
|
+
<!-- https://threejs.org/docs/#manual/en/introduction/Installation -->
|
|
44
|
+
<script async src="https://unpkg.com/es-module-shims@1.3.6/dist/es-module-shims.js"></script>
|
|
45
|
+
|
|
46
|
+
<script type="importmap">
|
|
47
|
+
{
|
|
48
|
+
"imports": {
|
|
49
|
+
"three": "https://unpkg.com/three@0.148.0/build/three.module.js",
|
|
50
|
+
"three/addons/": "https://unpkg.com/three@0.148.0/examples/jsm/",
|
|
51
|
+
"@pixiv/three-vrm": "three-vrm.module.js"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<script type="module">
|
|
57
|
+
import * as THREE from 'three';
|
|
58
|
+
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
|
|
59
|
+
import { VRMLoaderPlugin } from '@pixiv/three-vrm';
|
|
45
60
|
|
|
46
|
-
<script>
|
|
47
61
|
const scene = new THREE.Scene();
|
|
48
62
|
|
|
49
|
-
const loader = new
|
|
63
|
+
const loader = new GLTFLoader();
|
|
50
64
|
|
|
51
65
|
// Install GLTFLoader plugin
|
|
52
66
|
loader.register((parser) => {
|
|
53
|
-
return new
|
|
67
|
+
return new VRMLoaderPlugin(parser);
|
|
54
68
|
});
|
|
55
69
|
|
|
56
70
|
loader.load(
|