threejs相关

 // gltf.scene.traverse(function (child: any) {
        //   if (child.isMesh) {
        //     child.material = new THREE.MeshLambertMaterial({
        //       map: child.material.map,
        //       color: child.material.color,
        //     });
        //     // child.material.emissive = child.material.color;
        //     // child.material.emissiveMap = child.material.map;
        //   }
        // });

    处理threejs加载gltf模型颜色与blender不对,进行相应的处理
    this.renderer.outputEncoding = THREE.sRGBEncoding;
    // 设置渲染效果
    // this.renderer.toneMapping = THREE.ACESFilmicToneMapping;
    //设置物理渲染
    this.renderer.physicallyCorrectLights = true;



posted @ 2023-02-24 10:05  古德拉克  阅读(45)  评论(0编辑  收藏  举报