贴图问题
来源:3-1 使用缓冲区对象 - 绘制多个点
qq_馋嘴猫_0
2023-07-19
为啥贴图贴不上呢?
const geometry4 = new THREE.PlaneGeometry(204, 102);
const textLoader = new THREE.TextureLoader();
textLoader.setCrossOrigin( ‘Anonymous’);
textLoader.load(’./img/wall.jpg’, function(texture) {
debugger
const material11 = new THREE.MeshBasicMaterial({ color: 0xff0000 });
material11.map = texture;
const mesh10 = new THREE.Mesh(geometry4, material11)
mesh10.position.set(-100, 100, 100)
scene.add(mesh10)
},
undefined,
function ( err ) {
debugger
console.error( 'An error happened.' +err);
});
写回答
1回答
-
yancy
2023-08-16
这个我已经在群里回复了是吧?
00
相似问题