threejs紋理更新錯誤

threejs紋理更新錯誤

一個紋理的時候旋轉一次還行,用了兩個的時候得到的結果就不是你想象了。
這算是哪門子bug啊。

let map: any = new THREE.TextureLoader().load('map.png');
map.center = new THREE.Vector2(.5, .5);
map.rotation = Math.PI / 2;
map.matrixAutoUpdate = true;
const bumpmap: any = new THREE.TextureLoader().load('Bump.png');
bumpmap.center = new THREE.Vector2(.5, .5);
bumpmap.rotation = -Math.PI / 2;
bumpmap.matrixAutoUpdate = true;

const material = new THREE.MeshStandardMaterial({
      color: new THREE.Color("rgb(41, 65, 105)"),
      metalness: 0.5,      
      map: map,
      bumpMap: bumpmap,      
 });
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章