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