|
@@ -288,7 +288,7 @@ export default class Scene extends Mitt {
|
|
|
|
|
|
console.log("slides", slides);
|
|
|
|
|
|
- if (slides >= 1) {
|
|
|
+ if (slides >= 1 && total > 3) {
|
|
|
for (var i = 0; i <= slides; i++) {
|
|
|
(function (index, that) {
|
|
|
setTimeout(function () {
|
|
@@ -298,18 +298,18 @@ export default class Scene extends Mitt {
|
|
|
console.log(`Width: ${offset}`);
|
|
|
if (index === slides) {
|
|
|
console.log("last");
|
|
|
- that.emit("submitScreenshot", isSaveJpg);
|
|
|
+ that.emit("submitScreenshot", true);
|
|
|
}
|
|
|
}, index * 500);
|
|
|
})(i, this); // 传递当前迭代的索引i给setTimeout的回调函数
|
|
|
}
|
|
|
} else {
|
|
|
- // 只有一个或0个
|
|
|
- if (total >= 1 && total <= 3) {
|
|
|
+ // 只有一个
|
|
|
+ if (total >= 1) {
|
|
|
console.log("total", total);
|
|
|
this.player.floorplanControls.reset();
|
|
|
this.screenshot(-0.3, 227);
|
|
|
- this.emit("submitScreenshot");
|
|
|
+ this.emit("submitScreenshot", true);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -341,8 +341,6 @@ export default class Scene extends Mitt {
|
|
|
// console.log("height", height);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
onBindEvent = () => {
|
|
|
window.addEventListener("resize", this.onResize, false);
|
|
|
};
|