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