修改3D分布图
This commit is contained in:
parent
5a7fc3b03c
commit
65dc4db91a
BIN
src/assets/img/Factory/wood4.jpg
Normal file
BIN
src/assets/img/Factory/wood4.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user