pixiv / three-vrm

Use VRM on Three.js
MIT License
1.31k stars 110 forks source link

BREAKING feature: preparing for Three.js r167 #1446

Closed 0b5vr closed 4 months ago

0b5vr commented 4 months ago

This PR adapts usage of WebGPU stuff to the r167 way.

import WebGPU / NodeMaterial stuff from three/webgpu. See: https://github.com/mrdoob/three.js/pull/28650

Three.js r167 is not released yet! I tested the behavior by using yarn link on three and @types/three.

importmaps for Three.js in webgpu examples are temporarily replaced to node_modules, please change them back before merging.

This PR also bumps Three.js to r167. Several changes are made even outside the WebGPU scope in order to follow r167 changes.

MToonNodeMaterial now requires r167 or higher. The main WebGL module should still work in r137-r166.

0b5vr commented 4 months ago

The failing test says Cannot find module 'three/webgpu' or its corresponding type declarations.. It's an expected result, should be fixed once we import r167

lin72h commented 4 months ago

r167 just released! looking forward to 3.0 release

0b5vr commented 4 months ago

So we will rename exports in another PR?

No, we're going to go @pixiv/three-vrm/nodes as is instead of renaming it to @pixiv/three-vrm/webgpu. Naming it @pixiv/three-vrm/webgpu makes users misunderstand that the export includes the entire library with NodeMaterial stuff, considering how Three.js exports three/webgpu.