pmndrs / lamina

🍰 An extensible, layer based shader material for ThreeJS
MIT License
1.01k stars 41 forks source link

LayerMaterial clone() method doesn't works #39

Open bufffun opened 2 years ago

bufffun commented 2 years ago

clone material is not same as origin material

const material = new LayerMaterial({
      color: new THREE.Color(0xff0000),
      lighting: 'physical',
    });

const cube = new THREE.Mesh(geometry, material.clone());
Wrong Result, Should be red (0xff0000)
截屏2022-07-03 上午2 53 26

And no matter I clone multiple materials, the clone materials always have the same uuid ...

截屏2022-07-03 上午3 06 14
FarazzShaikh commented 2 years ago

Probably related to https://github.com/FarazzShaikh/THREE-CustomShaderMaterial/issues/20