瓶中沙 2024-01-08 22:46:03 +08:00
parent 80642b31c3
commit 852e9c41ae
3 changed files with 1912 additions and 1862 deletions

File diff suppressed because one or more lines are too long

View File

@ -115,7 +115,45 @@ const data = reactive({
value: 100 value: 100
} }
], ],
children: [] children: [{
label: '糖化间-墙面5',
id: '0-0-1-0',
clickName: 'tanghua_wall5',
children: [],
info: {
name: '糖化间-墙面5',
area: '4 ㎡',
qthd: '4 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
},{
label: '糖化间-墙面6',
id: '0-0-1-1',
clickName: 'tanghua_wall6',
children: [],
info: {
name: '糖化间-墙面6',
area: '4 ㎡',
qthd: '4 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
}]
}, { }, {
label: '原料处理间', label: '原料处理间',
id: '0-0-2', id: '0-0-2',
@ -156,7 +194,45 @@ const data = reactive({
value: 150 value: 150
} }
], ],
children: [] children: [{
label: '原料处理间-墙面8',
id: '0-0-2-0',
clickName: 'yuanliao_wall8',
children: [],
info: {
name: '原料处理间-墙面8',
area: '8 ㎡',
qthd: '4 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
},{
label: '原料处理间-墙面9',
id: '0-0-2-1',
clickName: 'yuanliao_wall9',
children: [],
info: {
name: '原料处理间-墙面9',
area: '9 ㎡',
qthd: '9 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
}]
}, { }, {
label: '投料间', label: '投料间',
id: '0-0-3', id: '0-0-3',
@ -197,7 +273,45 @@ const data = reactive({
value: 40 value: 40
} }
], ],
children: [] children: [{
label: '投料间-墙面6',
id: '0-0-3-0',
clickName: 'touliao_wall6',
children: [],
info: {
name: '投料间-墙面6',
area: '6 ㎡',
qthd: '6 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
},{
label: '投料间-墙面7',
id: '0-0-3-1',
clickName: 'touliao_wall7',
children: [],
info: {
name: '投料间-墙面7',
area: '7 ㎡',
qthd: '7 cm',
cllx: '混凝土',
bwclx: '外墙保温',
smcl: '乳胶漆',
cznl: '22 kPa',
status: '启用',
date: '2013年11月11日',
lastDate: '2020年12月3日',
desc: '原料糖化车间负责原料糖化启用于2011年',
remark: '备注'
}
}]
}], }],
} }
], ],

View File

@ -98,21 +98,11 @@ const { isAddLabel, isRemoveBottom, isShowWall } = toRefs(data);
Bus.on('clickBuild', (isParent) => { Bus.on('clickBuild', (isParent) => {
// Todo // Todo
console.log('clickBuild', isParent); console.log('clickBuild', isParent);
if (!isParent) {// var clickName = bimStore().activateTree.clickName;
var clickName = bimStore().activateTree.clickName; var Floor = scene.getObjectByName(clickName);
var Floor = scene.getObjectByName(clickName); boxLight(Floor);
// x: 42.6454163 y: 5.36651754 z: -95.03277 return;
// x: 27.127655 y: 8.55 z: -6.132766
// x: 27.6954441 y: 10.7530384 z: -37.73485
//
// nearCamera(Floor);
boxLight(Floor);
return;
}
}) })
// //
Bus.on('clickDevice', (isParent) => { Bus.on('clickDevice', (isParent) => {
@ -588,10 +578,11 @@ const setBottom = () => {
// //
const xiaof = () => { const xiaof = () => {
xfobj.forEach((o) => { xfobj.forEach((o) => {
xfadd(o, Math.random() < 0.3); xfadd(o, Math.random() < 0.3, name);
}) })
} }
let xfobj = []; let xfobj = [];
let sprite = null;
// //
const xfadd = (obj, state) => { const xfadd = (obj, state) => {
const texLoader = new THREE.TextureLoader(); const texLoader = new THREE.TextureLoader();
@ -604,14 +595,33 @@ const xfadd = (obj, state) => {
const spriteMaterial = new THREE.SpriteMaterial({ const spriteMaterial = new THREE.SpriteMaterial({
map: texture, map: texture,
}); });
const sprite = new THREE.Sprite(spriteMaterial); sprite = new THREE.Sprite(spriteMaterial);
// //
sprite.scale.set(5, 5, 5); sprite.scale.set(5, 5, 5);
sprite.position.y = 10; // sprite.position.y = 10; //
obj.add(sprite); //tagobj obj.add(sprite); //tagobj
console.log(123, obj)
}
//
const removexf = () => {
model.traverse(e => {
if (e.isMesh && e.children.length > 0) {
e.remove(e.children[0])
} else {
e.traverse(o => {
if (o.isMesh && o.children.length > 0) {
o.remove(o.children[0])
}
})
}
})
scene.remove(sprite);
} }
// //
const changeMap = (img) => { const changeMap = (img) => {
//
// removexf();
isShowWall.value = true; isShowWall.value = true;
// //
model.traverse(e => { model.traverse(e => {
@ -646,6 +656,7 @@ const changeMap = (img) => {
// //
const check = () => { const check = () => {
if (currentIndex < romeObj.length) { if (currentIndex < romeObj.length) {
// .getWorldPosition()
var checkPosition = checkArr[checkindex].getWorldPosition(new THREE.Vector3()); var checkPosition = checkArr[checkindex].getWorldPosition(new THREE.Vector3());
gsap.to(camera.position, { gsap.to(camera.position, {
@ -815,16 +826,11 @@ const checkComplete = () => {
} }
} }
} }
.pass {
color: #0caf71;
}
.nopass {
color: #fc1818;
}
.arrow_outer { .arrow_outer {
width: 100px;
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
} }
</style> </style>