diff --git a/src/assets/img/Factory/wood4.jpg b/src/assets/img/Factory/wood4.jpg new file mode 100644 index 0000000..3428a73 Binary files /dev/null and b/src/assets/img/Factory/wood4.jpg differ diff --git a/src/views/FactoryView/threeMap.vue b/src/views/FactoryView/threeMap.vue index 5cc75f3..45c4058 100644 --- a/src/views/FactoryView/threeMap.vue +++ b/src/views/FactoryView/threeMap.vue @@ -60,7 +60,7 @@ const requires = { '燃气': require('@/assets/img/Factory/ranqi.jpg'), '设备': require('@/assets/img/Factory/shebei.jpg'), 'ny': require("@/assets/img/Factory/ny.jpg"), - 'wood': require("@/assets/img/Factory/wood.jpg"), + 'wood': require("@/assets/img/Factory/wood4.jpg"), // 'wall1': require("@/assets/img/Factory/floor1.jpeg"), 'wall1': require("@/assets/img/Factory/wall1.jpg"), 'tile': require("@/assets/img/Factory/tile.jpg"), @@ -424,7 +424,7 @@ const init = () => { /*创建红线******************/ - let redLine = 0xff0000; + let redLine = 0xF47378; createLine(redLine, [{ x: -346.00, y: 23.6, z: 59.40 }, { x: -160.50, y: 2, z: 142.08 }]) //服装 createLine(redLine, [ @@ -460,7 +460,7 @@ const init = () => { ]) //创建黄线 - let yellowLine = 0xffff00; + let yellowLine = 0xFFF766; //横线 主干道 createLine(yellowLine, [ { x: -341.87, y: 2, z: 30.98 }, @@ -696,8 +696,16 @@ function createLine(color: number, pointsList: any) { const material = new LineMaterial({ color: color, - linewidth: 5 + transparent:true, + opacity: 0.5, + dashed:true, + dashScale: 1, + dashSize: 3, + gapSize: 1, + linewidth: 4 }) + //console.log(material,'material'); + material.resolution.set(iw, ih) // 5. 创建 Line2 var line = new Line2(geometry, material); @@ -972,7 +980,7 @@ function createFloor(houseName: string, baseWidth: number, baseLength: number, p const texture = new THREE.TextureLoader().load(requires.wood); //设置地板大小,由于后面将要生成墙体存在设置为1的厚度,因此这里对地板的x,z均-2 const floor = new THREE.BoxGeometry(baseWidth - 2, 1, baseLength); - const material = new THREE.MeshPhongMaterial({ map: texture, transparent: true }); + const material = new THREE.MeshPhongMaterial({ map: texture, transparent: true}); const mesh = new THREE.Mesh(floor, material); const { x, y, z } = position mesh.position.set(x, y + 1 / 2, z); @@ -987,6 +995,8 @@ function createWall(baseWidth: number = 10, baseHeght: number, baseLength: numbe const wall = new THREE.BoxGeometry(baseLength, baseHeght, baseWidth); const wallMaterial = new THREE.MeshPhongMaterial({ map: wallTexture, + color: 0xffffff, + transparent: true, }); //墙体的网格 const wallMesh = new THREE.Mesh(wall, wallMaterial);