瓶中沙 2024-01-09 19:09:26 +08:00
parent 08b2ed19e6
commit aa332f38c6
1 changed files with 6 additions and 5 deletions

View File

@ -598,14 +598,14 @@ const yjf = () => {
} }
let xfobj = []; let xfobj = [];
let yjobj = []; let yjobj = [];
let sprite = null;
// //
const xfadd = (obj, state) => { const xfadd = (obj, state) => {
const texLoader = new THREE.TextureLoader(); const texLoader = new THREE.TextureLoader();
let texture = null; let texture = null;
if(state == 'yj') { if(state == 'yj') {
texture = texLoader.load("/yj.png"); texture = texLoader.load("/yj.png");
} } else if (state) {
else if (state) {
texture = texLoader.load("/ygr.png"); texture = texLoader.load("/ygr.png");
} else { } else {
texture = texLoader.load("/yg.png"); texture = texLoader.load("/yg.png");
@ -613,7 +613,7 @@ 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 = 12; // sprite.position.y = 12; //
@ -639,7 +639,7 @@ const removexf = () => {
// //
const changeMap = (img) => { const changeMap = (img) => {
// //
// removexf(); removexf();
isShowWall.value = true; isShowWall.value = true;
// //
model.traverse(e => { model.traverse(e => {
@ -701,6 +701,7 @@ const check = () => {
let nextObj; let nextObj;
if (checkindex == checkArr.length - 1) { if (checkindex == checkArr.length - 1) {
nextObj = checkArr[0].getWorldPosition(new THREE.Vector3()) nextObj = checkArr[0].getWorldPosition(new THREE.Vector3())
return;
} else if (checkindex < checkArr.length) { } else if (checkindex < checkArr.length) {
nextObj = checkArr[checkindex + 1].getWorldPosition(new THREE.Vector3()) nextObj = checkArr[checkindex + 1].getWorldPosition(new THREE.Vector3())
} }
@ -723,7 +724,7 @@ const check = () => {
// //
const checkComplete = () => { const checkComplete = () => {
toHomeView(); toHomeView();
// checkindex = 0; checkindex = 0;
bimStore().setCheckArr(romeObj); bimStore().setCheckArr(romeObj);
emit('checkComplete', romeObj); emit('checkComplete', romeObj);
return; return;