Compare commits

..

No commits in common. "25024e4f4736980c22b57fd496b307afb6926be7" and "b18976f619603af76661998d6fe04bdc14de9f0a" have entirely different histories.

3 changed files with 12 additions and 18480 deletions

BIN
dist.zip

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -39,16 +39,6 @@
<span class="red"></span>大于3年
</p>
</div>
<!-- <div class="stop_tooltips" v-show="isShowstart" @click="stop">
<p>
停止
</p>
</div>
<div class="con_tooltips" v-show="isShowstart" @click="continu">
<p>
继续
</p>
</div> -->
</div>
</template>
<script setup>
@ -83,7 +73,7 @@ onMounted(() => {
});
// document.addEventListener("mousemove", onMouseMove);
});
let scene, renderer, camera, controls, clickedObject, model, animal1, animal2;
let scene, renderer, camera, controls, clickedObject, model;
//
let objArr = [];
@ -101,10 +91,9 @@ let labelRenderer = new CSS2DRenderer(); //新建CSS2DRenderer
const data = reactive({
isAddLabel: true,
isRemoveBottom: true,
isShowWall: false, //
isShowstart: false
isShowWall: false //
});
const { isAddLabel, isRemoveBottom, isShowWall, isShowstart } = toRefs(data);
const { isAddLabel, isRemoveBottom, isShowWall } = toRefs(data);
//
Bus.on('clickBuild', (isParent) => {
// Todo
@ -159,7 +148,6 @@ const init = () => {
document.getElementById('gltf').appendChild(renderer.domElement);
controls = new OrbitControls(camera, renderer.domElement);
controls.minDistance = 15;
const pmremGenerator = new THREE.PMREMGenerator(renderer);
scene.environment = pmremGenerator.fromScene(new RoomEnvironment()).texture;
var vector = new THREE.Vector3();
@ -442,7 +430,6 @@ const toHomeView = () => {
cleanColor();
//
isShowWall.value = false;
isShowstart.value = false;
//
removexf();
}
@ -465,7 +452,6 @@ const nearCamera = (floor) => {
const setLabel = () => {
if (isAddLabel.value) {
let obj = scene.getObjectByName('T11');
console.log(123, obj)
addLabel(obj, 'title');
} else {
removeLabel();
@ -624,7 +610,6 @@ const removexf = () => {
const changeMap = (img) => {
removeLabel();
isShowWall.value = true;
isShowstart.value = false;
//
model.traverse(e => {
if (['touliao_wall1', 'touliao_wall2', 'touliao_wall3', 'touliao_wall4', 'touliao_wall5', 'touliao_wall6', 'touliao_wall7', 'touliao_wall8'].indexOf(e.name) != -1) {
@ -657,8 +642,6 @@ const changeMap = (img) => {
}
//
const check = () => {
isShowstart.value = true;
isShowWall.value = false;
removeLabel();
let yn = 8, duration = 0;
if (checkindex < checkArr.length ) {
@ -676,19 +659,18 @@ const check = () => {
duration = 10
}
// 2
animal1 = gsap.to(controls.target, {
gsap.to(controls.target, {
x: nextObj.x,
y: nextObj.y,
y: nextObj.y + 2,
z: nextObj.z,
duration: duration,
ease: "power1.inOut",
onComplete: () => {
controls.enabled = false;
// 3
animal2 = gsap.to(camera.position, {
x: nextObj.x + 2,
y: nextObj.y + 6,
z: nextObj.z + 4,
gsap.to(camera.position, {
x: nextObj.x-0.5,
y: nextObj.y + yn,
z: nextObj.z,
duration: 10,
ease: 'power1.inOut',
onComplete: () => {
@ -716,14 +698,7 @@ const checkComplete = () => {
emit('checkComplete', checkArr);
return;
}
const stop = () => {
animal1.pause();
animal2.pause();
}
const continu = () => {
animal1.resume();
animal2.resume();
}
</script>
<style lang='scss'>
#gltf {
@ -879,24 +854,6 @@ const continu = () => {
}
}
}
.stop_tooltips, .con_tooltips {
position: absolute;
bottom: 50px;
right: 500px;
z-index: 999;
display: flex;
color: #fff;
width: 50px;
height: 50px;
border-radius: 50%;
justify-content: space-around;
align-items: center;
background: #3cbfdf;
cursor: pointer;
}
.con_tooltips {
right: 560px;
}
@keyframes textAnimation {
0% {
transform: scale(1);
@ -916,7 +873,8 @@ const continu = () => {
color: #141313;
padding: 15px;
text-align: center;
line-height: 80px;
line-height: 100px;
border-radius: 5px;
border-radius: 50%;
.text{
display: inline-block;