@pixiv/three-vrm 2.1.2 → 3.0.0-beta.0

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 CHANGED
@@ -14,16 +14,6 @@ Use [VRM](https://vrm.dev/) on [three.js](https://threejs.org/)
14
14
 
15
15
  [API Reference](https://pixiv.github.io/three-vrm/packages/three-vrm/docs)
16
16
 
17
- ## v1
18
-
19
- **three-vrm v1 has been released!**
20
-
21
- three-vrm v1 supports [VRM1.0](https://vrm.dev/vrm1/), which is a new version of VRM format (the previous version of VRM is also supported, don't worry!).
22
- It also adopts the GLTFLoader plugin system which is a relatively new feature of GLTFLoader.
23
-
24
- There are a lot of breaking changes!
25
- See [the migration guide](https://github.com/pixiv/three-vrm/blob/dev/docs/migration-guide-1.0.md) for more info.
26
-
27
17
  ## How to Use
28
18
 
29
19
  ### from HTML
@@ -138,6 +128,35 @@ loader.load(
138
128
  );
139
129
  ```
140
130
 
131
+ ### Use with WebGPURenderer
132
+
133
+ Starting from v3, we provide [WebGPURenderer](https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/webgpu/WebGPURenderer.js) compatibility.
134
+ To use three-vrm with WebGPURenderer, specify the WebGPU-compatible `MToonNodeMaterialLoaderPlugin` for the `mtoonMaterialPlugin` option of `VRMLoaderPlugin`.
135
+
136
+ `MToonNodeMaterial` only supports Three.js r161 or later.
137
+ The NodeMaterial system of Three.js is still under development, so we may break compatibility with older versions of Three.js more frequently than other parts of three-vrm.
138
+
139
+ ```js
140
+ import { VRMLoaderPlugin, MToonNodeMaterialLoaderPlugin } from '@pixiv/three-vrm';
141
+
142
+ // ...
143
+
144
+ // Register a VRMLoaderPlugin
145
+ loader.register((parser) => {
146
+
147
+ // create a WebGPU compatible MToon loader plugin
148
+ const mtoonMaterialPlugin = new MToonNodeMaterialLoaderPlugin(parser);
149
+
150
+ return new VRMLoaderPlugin(parser, {
151
+
152
+ // Specify the MToon loader plugin to use in the VRMLoaderPlugin instance
153
+ mtoonMaterialPlugin,
154
+
155
+ });
156
+
157
+ });
158
+ ```
159
+
141
160
  ## Contributing
142
161
 
143
162
  See: [CONTRIBUTING.md](CONTRIBUTING.md)