@pixiv/three-vrm-materials-mtoon 2.1.1 → 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 -0
- package/lib/three-vrm-materials-mtoon.cjs +1345 -0
- package/lib/three-vrm-materials-mtoon.min.cjs +1004 -0
- package/lib/three-vrm-materials-mtoon.module.js +1281 -861
- package/lib/three-vrm-materials-mtoon.module.min.js +1004 -2
- package/package.json +23 -22
- package/types/MToonMaterialLoaderPlugin.d.ts +8 -1
- package/types/MToonMaterialLoaderPluginOptions.d.ts +2 -2
- package/types/index.d.ts +1 -0
- package/types/nodes/MToonAnimatedUVNode.d.ts +6 -0
- package/types/nodes/MToonLightingModel.d.ts +7 -0
- package/types/nodes/MToonNodeMaterial.d.ts +78 -0
- package/types/nodes/MToonNodeMaterialLoaderPlugin.d.ts +37 -0
- package/types/nodes/MToonNodeMaterialLoaderPluginOptions.d.ts +8 -0
- package/types/nodes/MToonNodeMaterialParameters.d.ts +14 -0
- package/types/nodes/immutableNodes.d.ts +8 -0
- package/types/nodes/index.d.ts +4 -0
- package/types/nodes/materialReferences.d.ts +28 -0
- package/types/nodes/mtoonParametricRim.d.ts +6 -0
- package/lib/three-vrm-materials-mtoon.js +0 -928
- package/lib/three-vrm-materials-mtoon.min.js +0 -2
- package/ts3.4/types/GLTFMToonMaterialParamsAssignHelper.d.ts +0 -20
- package/ts3.4/types/MToonMaterial.d.ts +0 -167
- package/ts3.4/types/MToonMaterialDebugMode.d.ts +0 -24
- package/ts3.4/types/MToonMaterialLoaderPlugin.d.ts +0 -68
- package/ts3.4/types/MToonMaterialLoaderPluginOptions.d.ts +0 -23
- package/ts3.4/types/MToonMaterialOutlineWidthMode.d.ts +0 -6
- package/ts3.4/types/MToonMaterialParameters.d.ts +0 -68
- package/ts3.4/types/index.d.ts +0 -6
- package/ts3.4/types/utils/getTextureColorSpace.d.ts +0 -11
- package/ts3.4/types/utils/setTextureColorSpace.d.ts +0 -12
package/README.md
CHANGED
|
@@ -7,3 +7,32 @@ MToon (toon material) module for @pixiv/three-vrm
|
|
|
7
7
|
[Examples](https://pixiv.github.io/three-vrm/packages/three-vrm-materials-mtoon/examples)
|
|
8
8
|
|
|
9
9
|
[Documentation](https://pixiv.github.io/three-vrm/packages/three-vrm-materials-mtoon/docs)
|
|
10
|
+
|
|
11
|
+
## WebGPU Support
|
|
12
|
+
|
|
13
|
+
Starting from v3, we provide [WebGPURenderer](https://github.com/mrdoob/three.js/blob/master/examples/jsm/renderers/webgpu/WebGPURenderer.js) compatibility.
|
|
14
|
+
To use three-vrm with WebGPURenderer, specify the WebGPU-compatible `MToonNodeMaterialLoaderPlugin` for the `mtoonMaterialPlugin` option of `VRMLoaderPlugin`.
|
|
15
|
+
|
|
16
|
+
`MToonNodeMaterial` only supports Three.js r161 or later.
|
|
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
|
+
|
|
19
|
+
```js
|
|
20
|
+
import { VRMLoaderPlugin, MToonNodeMaterialLoaderPlugin } from '@pixiv/three-vrm';
|
|
21
|
+
|
|
22
|
+
// ...
|
|
23
|
+
|
|
24
|
+
// Register a VRMLoaderPlugin
|
|
25
|
+
loader.register((parser) => {
|
|
26
|
+
|
|
27
|
+
// create a WebGPU compatible MToon loader plugin
|
|
28
|
+
const mtoonMaterialPlugin = new MToonNodeMaterialLoaderPlugin(parser);
|
|
29
|
+
|
|
30
|
+
return new VRMLoaderPlugin(parser, {
|
|
31
|
+
|
|
32
|
+
// Specify the MToon loader plugin to use in the VRMLoaderPlugin instance
|
|
33
|
+
mtoonMaterialPlugin,
|
|
34
|
+
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
});
|
|
38
|
+
```
|