I have a scene that contains a Mesh with multiple materials. The mesh.child.material value is an array in these cases. Otherwise, it's just a three material type. The reset code when disabling PCSS shadows doesn't support the material array.
Relevant code:
// node_modules/@pmndrs/vanilla/core/pcss.js
function reset(gl, scene, camera) {
scene.traverse((object) => {
if (object.material) {
gl.properties.remove(object.material);
object.material.dispose();
}
});
three
version: 0.160.0@pmndrs/vanilla
version: 1.14.1node
version: 18npm
(oryarn
) version: 8.6Problem description:
I have a scene that contains a Mesh with multiple materials. The mesh.child.material value is an array in these cases. Otherwise, it's just a three material type. The reset code when disabling PCSS shadows doesn't support the material array.
Relevant code:
// node_modules/@pmndrs/vanilla/core/pcss.js
Suggested solution:
I'm not much of a programmer, but: