From 150d637a61e683a3d26f35a7c354da2efa26fd66 Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Tue, 23 Jul 2024 20:28:56 +0900 Subject: [PATCH 1/8] BREAKING feature: preparing for Three.js r167 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 Some codes inside MToonNodeMaterial emit type errors because of recent @types/three changes I'm asking Methuselar96 why the change is made See: https://github.com/three-types/three-ts-types/pull/1023#issuecomment-2244842594 --- .../examples/webgpu-feature-test.html | 10 +- .../examples/webgpu-loader-plugin.html | 10 +- .../src/nodes/MToonAnimatedUVNode.ts | 28 ++-- .../src/nodes/MToonLightingModel.ts | 64 ++++---- .../src/nodes/MToonNodeMaterial.ts | 138 +++++++++--------- .../src/nodes/MToonNodeMaterialParameters.ts | 21 ++- .../src/nodes/immutableNodes.ts | 16 +- .../src/nodes/materialReferences.ts | 56 +++---- .../src/nodes/mtoonParametricRim.ts | 16 +- packages/three-vrm/examples/webgpu-dnd.html | 12 +- 10 files changed, 185 insertions(+), 186 deletions(-) diff --git a/packages/three-vrm-materials-mtoon/examples/webgpu-feature-test.html b/packages/three-vrm-materials-mtoon/examples/webgpu-feature-test.html index d5e50d366..41baa238b 100644 --- a/packages/three-vrm-materials-mtoon/examples/webgpu-feature-test.html +++ b/packages/three-vrm-materials-mtoon/examples/webgpu-feature-test.html @@ -23,8 +23,9 @@