修改3D分布图

This commit is contained in:
hzz 2023-05-23 14:09:21 +08:00
parent 5a7fc3b03c
commit 65dc4db91a
2 changed files with 15 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -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);
//1xz-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);