首页 > 解决方案 > 从 Blender 到三个 js 的 3d 模型遇到问题

问题描述

我正在经历的 GiF 当我使用 dat.gui 时,x 和 z 坐标都在做同样的事情,我也改变了 3 模型的颜色并导入它,我的模型仍然是黑色的?

[import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';

const gltfLoader = new GLTFLoader()


gltfLoader.load('./CellPhone_IP6.gltf', (gltf) => {
    
    gltf.scene.scale.set(0.3, 0.3, 0.3)
        gltf.scene.rotation.set(0, 5, 0);

    scene.add(gltf.scene)

    gui.add(gltf.scene.rotation,'x').min(-10).max(9)
    gui.add(gltf.scene.rotation,'y').min(-10).max(9)
    gui.add(gltf.scene.rotation,'z').min(-10).max(9)
});

我试过重新启动我的开发环境

寻找完成的项目代码进行故障排除

从头开始重新启动教程 [教程][1]

标签: three.jsblender

解决方案


推荐阅读