@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 +29 -10
- package/lib/three-vrm.cjs +6646 -0
- package/lib/three-vrm.min.cjs +1052 -0
- package/lib/three-vrm.module.js +6514 -6794
- package/lib/three-vrm.module.min.js +1016 -19
- package/package.json +23 -23
- package/types/VRMUtils/removeUnnecessaryJoints.d.ts +11 -1
- package/lib/three-vrm.js +0 -6974
- package/lib/three-vrm.min.js +0 -54
- package/ts3.4/types/VRM.d.ts +0 -39
- package/ts3.4/types/VRMLoaderPlugin.d.ts +0 -31
- package/ts3.4/types/VRMLoaderPluginOptions.d.ts +0 -32
- package/ts3.4/types/VRMParameters.d.ts +0 -12
- package/ts3.4/types/VRMUtils/deepDispose.d.ts +0 -2
- package/ts3.4/types/VRMUtils/index.d.ts +0 -11
- package/ts3.4/types/VRMUtils/removeUnnecessaryJoints.d.ts +0 -9
- package/ts3.4/types/VRMUtils/removeUnnecessaryVertices.d.ts +0 -12
- package/ts3.4/types/VRMUtils/rotateVRM0.d.ts +0 -7
- package/ts3.4/types/index.d.ts +0 -9
- package/ts3.4/types/utils/Matrix4InverseCache.d.ts +0 -28
- package/ts3.4/types/utils/mat4InvertCompat.d.ts +0 -8
- package/ts3.4/types/utils/math.d.ts +0 -40
- package/ts3.4/types/utils/quatInvertCompat.d.ts +0 -8
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)
|