v3.0.0: WebGPU Support!
@pixiv/three-vrm v3 supports WebGPURenderer by using MToonNodeMaterial, the MToon material based on the new NodeMaterial system.
To use @pixiv/three-vrm
with WebGPURenderer, specify the WebGPU-compatible MToonNodeMaterial for the materialType option of MToonMaterialLoaderPlugin.
MToonNodeMaterial
only supports Three.js r167 or later.
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.
import { VRMLoaderPlugin } from '@pixiv/three-vrm';
import { MToonNodeMaterial } from '@pixiv/three-vrm/nodes';
// ...
// Register a VRMLoaderPlugin
loader.register((parser) => {
// create a WebGPU compatible MToonMaterialLoaderPlugin
const mtoonMaterialPlugin = new MToonMaterialLoaderPlugin(parser, {
// set the material type to MToonNodeMaterial
materialType: MToonNodeMaterial,
});
return new VRMLoaderPlugin(parser, {
// Specify the MToonMaterialLoaderPlugin to use in the VRMLoaderPlugin instance
mtoonMaterialPlugin,
});
});
See the example webgpu-dnd.html
for the complete example.
π¨ BREAKING CHANGES π¨
- #1302: Remove downlevel-dts
- If you are still using TypeScript 3.9 or earlier, you have to update your TypeScript.
- #1384:
gltf.userData.vrmMToonMaterials
might have materials other thanMToonMaterial
(namely,MToonNodeMaterial
)- This should not affect many users since the interface of
MToonNodeMaterial
is almost identical toMToonMaterial
.
- This should not affect many users since the interface of
- #1415:
needThumbnailImage
is now false by default- If you are using
meta.thumbnailImage
, you have to setplugin.metaPlugin.needThumbnailImage
totrue
.
- If you are using
β¨ New features
- #1384, #1420, #1424, #1427, #1429, #1438, #1446: WebGPU support (MToonNodeMaterial)
- #1432: Add
.resetValues
to VRMExpressionManager
π‘ Behavior changes
π Docs
- #1437: Improve README.md "How to Use" section
π§Ή Chores
- #1302: Remove downlevel-dts
- #1411, #1413, #1416: Migrate build system to esbuild
- #1428, #1445: Specify more appropriate Three.js versions in peerDependencies
- If you're using npm, you no longer have to specify
--legacy-peer-deps
π
- If you're using npm, you no longer have to specify