果粒橙 (@Pascal) 在 【求助】关于three.js贴图问题 中发帖
我想给一个房子屋顶的光伏板白膜添加贴图,但是没有添加贴图后只有颜色没有具体纹理,这是为什么
const loader = new GLTFLoader()
const textureLoader = new THREE.TextureLoader()
const topTexture = textureLoader.load(‘/images/top.png’)
loader.load(
‘/models/model.glb’,
(gltf) => {
scene.add(gltf.scene)
console.log(‘模型加载成功’)
isLoading.value = false
gltf.scene.traverse(child => {
if (child.isLight) {
scene.remove(child)
}
if (child.isMes...