|
@@ -1,5 +1,5 @@
|
|
|
import { SDK, SceneModel, ModelAttrRange } from "../sdk";
|
|
|
-import { toRaw, watch, reactive, ref } from "vue";
|
|
|
+import { toRaw, watch, reactive, ref, watchEffect } from "vue";
|
|
|
import { custom, getResource } from "@/env";
|
|
|
import {
|
|
|
diffArrayChange,
|
|
@@ -179,13 +179,13 @@ export const activeModel = (status: {
|
|
|
if (model && status.active === oldStatus.active) {
|
|
|
if (status.showMode === "pano") {
|
|
|
if (model) {
|
|
|
- model.changeSelect(false)
|
|
|
+ // model.changeSelect(false)
|
|
|
model.flyInPano();
|
|
|
}
|
|
|
} else {
|
|
|
if (model) {
|
|
|
model.flyOutPano();
|
|
|
- custom.currentModel === status.active && model.changeSelect(true)
|
|
|
+ // custom.currentModel === status.active && model.changeSelect(true)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -193,13 +193,13 @@ export const activeModel = (status: {
|
|
|
if (oldStatus.showMode === "pano") {
|
|
|
if (oldModel) {
|
|
|
oldModel.flyOutPano();
|
|
|
- custom.currentModel === oldStatus.active && oldModel.changeSelect(true)
|
|
|
+ // custom.currentModel === oldStatus.active && oldModel.changeSelect(true)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (status.showMode === "pano") {
|
|
|
if (model) {
|
|
|
- model.changeSelect(false)
|
|
|
+ // model.changeSelect(false)
|
|
|
model.flyInPano();
|
|
|
}
|
|
|
} else {
|
|
@@ -301,3 +301,23 @@ export const associationModels = (sdk: SDK) => {
|
|
|
);
|
|
|
});
|
|
|
};
|
|
|
+
|
|
|
+
|
|
|
+export const getSupportPano = (model: FuseModel) => {
|
|
|
+const supportPano = ref(false);
|
|
|
+const show = getFuseModelShowVariable(model);
|
|
|
+watchEffect(() => {
|
|
|
+ if (!show.value) {
|
|
|
+ supportPano.value = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const sceneModel = getSceneModel(model);
|
|
|
+ const support = sceneModel?.supportPano();
|
|
|
+ supportPano.value = !!support;
|
|
|
+
|
|
|
+ sceneModel?.bus.on("loadDone", () => {
|
|
|
+ supportPano.value = sceneModel?.supportPano();
|
|
|
+ });
|
|
|
+});
|
|
|
+return supportPano
|
|
|
+}
|