美文网首页
vue-three 几何体 多面贴图

vue-three 几何体 多面贴图

作者: name_howe | 来源:发表于2021-12-03 09:45 被阅读0次
    // 机柜
        chartlet(x, y, z){
          let map = new THREE.TextureLoader().load(require('@/assets/three/zhengm.png'));
          let map2 = new THREE.TextureLoader().load(require('@/assets/three/cem.png'));
          let map3 = new THREE.TextureLoader().load(require('@/assets/three/fanm.png'));
          let group = new THREE.Mesh();
          let color = 0x0c0c0c // 0x3C3B42
          let mats = [];
          mats.push(new THREE.MeshPhongMaterial({ map: map2 }));
          mats.push(new THREE.MeshPhongMaterial({ map: map2 }));
          mats.push(new THREE.MeshPhongMaterial({ color }));
          mats.push(new THREE.MeshPhongMaterial({ color }));
          mats.push(new THREE.MeshPhongMaterial({ map }));
          mats.push(new THREE.MeshPhongMaterial({ map: map3 }));
    
          let cubeGeom = new THREE.BoxBufferGeometry(700, 1200, 360);
          let cube = new THREE.Mesh(cubeGeom, mats);
          cube.position.set(x, y, z)
    
          group.add(cube);
          this.scene.add(group)
        }
    

    相关文章

      网友评论

          本文标题:vue-three 几何体 多面贴图

          本文链接:https://www.haomeiwen.com/subject/pfnqyltx.html