@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 CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2022 pixiv Inc.
1
+ Copyright (c) 2019-2023 pixiv Inc.
2
2
 
3
3
  MIT License
4
4
 
package/README.md CHANGED
@@ -39,18 +39,32 @@ You will need:
39
39
  Code like this:
40
40
 
41
41
  ```html
42
- <script src="three.js"></script>
43
- <script src="GLTFLoader.js"></script>
44
- <script src="three-vrm.js"></script>
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 THREE.GLTFLoader();
63
+ const loader = new GLTFLoader();
50
64
 
51
65
  // Install GLTFLoader plugin
52
66
  loader.register((parser) => {
53
- return new THREE_VRM.VRMLoaderPlugin(parser);
67
+ return new VRMLoaderPlugin(parser);
54
68
  });
55
69
 
56
70
  loader.load(