|
@@ -54,26 +54,6 @@ class GasAssessmen {
|
|
|
render() {
|
|
|
this.model.renderer?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
|
|
|
}
|
|
|
- // 绘制抽采单元
|
|
|
- setPlanes1 = (n, colors = new Array(n).fill(new THREE.Color('rgb(100%, 0%, 0%)'))) => {
|
|
|
- const sizeList = [0.2, 0.3, 0.1, 0.4];
|
|
|
- // width = 7.713 height =3.717
|
|
|
- colors = gradientColors('#00FF2C', '#FF0000', n, 2);
|
|
|
- this.planeNum = n;
|
|
|
- const lenScale = 0.77 / n;
|
|
|
- const planeGeo = new THREE.PlaneGeometry();
|
|
|
- planeGeo.applyMatrix4(new THREE.Matrix4().makeTranslation(-1, 0, 0));
|
|
|
- for (let i = 0; i < n; i++) {
|
|
|
- const material = new THREE.MeshBasicMaterial({ color: colors[i], transparent: true, opacity: 0.6, depthTest: false, depthWrite: false });
|
|
|
- const plane = new THREE.Mesh(planeGeo, material);
|
|
|
- plane.name = 'unit' + i;
|
|
|
- plane.rotation.x = -Math.PI / 2;
|
|
|
- plane.scale.set(lenScale - 0.001, 0.375, 1.0);
|
|
|
- plane.position.set(0.282 - lenScale * (i - 0.5), 0.015, 0.142);
|
|
|
- this.planeGroup.add(plane);
|
|
|
- }
|
|
|
- this.group.add(this.planeGroup);
|
|
|
- };
|
|
|
|
|
|
setPlanes = (n) => {
|
|
|
// const sizeList = [0.2, 0.3, 0.1, 0.2, 0.2];
|
|
@@ -88,7 +68,7 @@ class GasAssessmen {
|
|
|
const sizeList = [
|
|
|
{
|
|
|
id: '111',
|
|
|
- ratio: 0.2,
|
|
|
+ ratio: 0.5,
|
|
|
color: colors.c1,
|
|
|
},
|
|
|
{
|
|
@@ -98,19 +78,19 @@ class GasAssessmen {
|
|
|
},
|
|
|
{
|
|
|
id: '333',
|
|
|
- ratio: 0.1,
|
|
|
- color: colors.c4,
|
|
|
- },
|
|
|
- {
|
|
|
- id: '444',
|
|
|
- ratio: 0.2,
|
|
|
- color: colors.c5,
|
|
|
- },
|
|
|
- {
|
|
|
- id: '555',
|
|
|
ratio: 0.2,
|
|
|
- color: colors.c3,
|
|
|
+ color: colors.c4,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // id: '444',
|
|
|
+ // ratio: 0.2,
|
|
|
+ // color: colors.c5,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // id: '555',
|
|
|
+ // ratio: 0.2,
|
|
|
+ // color: colors.c3,
|
|
|
+ // },
|
|
|
];
|
|
|
this.unitList = sizeList;
|
|
|
|
|
@@ -249,7 +229,7 @@ class GasAssessmen {
|
|
|
};
|
|
|
// 抽采单元内容显示
|
|
|
setCss3D = () => {
|
|
|
- const sizeList = [0.2, 0.3, 0.1, 0.2, 0.2];
|
|
|
+ const sizeList = [0.5, 0.3, 0.2];
|
|
|
// const sizeList = [0.4, 0.5, 0.1];
|
|
|
// width = 7.713 height =3.717
|
|
|
let leftW = 0;
|