@pixiv/three-vrm-materials-mtoon 3.0.0-beta.1 → 3.0.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 +9 -2
- package/lib/nodes/index.cjs +115 -110
- package/lib/nodes/index.min.cjs +1 -1
- package/lib/nodes/index.module.js +115 -110
- package/lib/nodes/index.module.min.js +1 -1
- package/lib/three-vrm-materials-mtoon.cjs +4 -3
- package/lib/three-vrm-materials-mtoon.min.cjs +24 -6
- package/lib/three-vrm-materials-mtoon.module.js +4 -3
- package/lib/three-vrm-materials-mtoon.module.min.js +24 -6
- package/package.json +6 -6
- package/types/nodes/MToonAnimatedUVNode.d.ts +3 -3
- package/types/nodes/MToonLightingModel.d.ts +6 -5
- package/types/nodes/MToonNodeMaterial.d.ts +19 -20
- package/types/nodes/MToonNodeMaterialParameters.d.ts +10 -11
- package/types/nodes/immutableNodes.d.ts +8 -8
- package/types/nodes/materialReferences.d.ts +28 -28
- package/types/nodes/mtoonParametricRim.d.ts +6 -6
package/README.md
CHANGED
|
@@ -13,14 +13,17 @@ MToon (toon material) module for @pixiv/three-vrm
|
|
|
13
13
|
Starting from v3, we provide [WebGPURenderer](https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/webgpu/WebGPURenderer.js) compatibility.
|
|
14
14
|
To use MToon with WebGPURenderer, specify the WebGPU-compatible `MToonNodeMaterial` for the `materialType` option of `MToonMaterialLoaderPlugin`.
|
|
15
15
|
|
|
16
|
-
`MToonNodeMaterial` only supports Three.js
|
|
16
|
+
`MToonNodeMaterial` only supports Three.js r167 or later.
|
|
17
17
|
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.
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
20
|
import { MToonMaterialLoaderPlugin } from '@pixiv/three-vrm-materials-mtoon';
|
|
21
21
|
import { MToonNodeMaterial } from '@pixiv/three-vrm-materials-mtoon/nodes';
|
|
22
22
|
|
|
23
|
-
// ...
|
|
23
|
+
// ... Setup renderer, camera, scene ...
|
|
24
|
+
|
|
25
|
+
// Create a GLTFLoader
|
|
26
|
+
const loader = new GLTFLoader();
|
|
24
27
|
|
|
25
28
|
// Register a MToonMaterialLoaderPlugin with MToonNodeMaterial
|
|
26
29
|
loader.register((parser) => {
|
|
@@ -34,4 +37,8 @@ loader.register((parser) => {
|
|
|
34
37
|
});
|
|
35
38
|
|
|
36
39
|
});
|
|
40
|
+
|
|
41
|
+
// ... Load the VRM and perform the render loop ...
|
|
37
42
|
```
|
|
43
|
+
|
|
44
|
+
See the example for the complete code: https://github.com/pixiv/three-vrm/blob/release/packages/three-vrm-materials-mtoon/examples/webgpu-loader-plugin.html
|