// 机柜
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)
}
网友评论