|
@@ -30,7 +30,7 @@ export const modelRange: ModelAttrRange = {
|
|
scaleRange: { min: 0, max: 200, step: 0.1 },
|
|
scaleRange: { min: 0, max: 200, step: 0.1 },
|
|
};
|
|
};
|
|
|
|
|
|
-const sceneModelMap = reactive(new Map<FuseModel, SceneModel>());
|
|
|
|
|
|
+export const sceneModelMap = reactive(new Map<FuseModel, SceneModel>());
|
|
export const getSceneModel = (model?: FuseModel | null) =>
|
|
export const getSceneModel = (model?: FuseModel | null) =>
|
|
model && sceneModelMap.get(toRaw(model));
|
|
model && sceneModelMap.get(toRaw(model));
|
|
|
|
|
|
@@ -76,7 +76,6 @@ const setModels = (sdk: SDK, models: FuseModels, oldModels: FuseModels) => {
|
|
let changeId: NodeJS.Timeout;
|
|
let changeId: NodeJS.Timeout;
|
|
sceneModel.bus.on("transformChanged", (transform) => {
|
|
sceneModel.bus.on("transformChanged", (transform) => {
|
|
clearTimeout(changeId);
|
|
clearTimeout(changeId);
|
|
-
|
|
|
|
changeId = setTimeout(() => {
|
|
changeId = setTimeout(() => {
|
|
transform = { ...transform };
|
|
transform = { ...transform };
|
|
if (transform.rotation) {
|
|
if (transform.rotation) {
|
|
@@ -181,6 +180,10 @@ export const associationModels = (sdk: SDK) => {
|
|
const model = status.active && getSceneModel(status.active)!;
|
|
const model = status.active && getSceneModel(status.active)!;
|
|
const oldModel = oldStatus.active && getSceneModel(oldStatus.active)!;
|
|
const oldModel = oldStatus.active && getSceneModel(oldStatus.active)!;
|
|
|
|
|
|
|
|
+ if (status.showMode !== 'pano' && model) {
|
|
|
|
+ model && model.changeSelect(true);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (model && status.active === oldStatus.active) {
|
|
if (model && status.active === oldStatus.active) {
|
|
if (status.showMode === "pano") {
|
|
if (status.showMode === "pano") {
|
|
model && model.flyInPano();
|
|
model && model.flyInPano();
|
|
@@ -188,7 +191,6 @@ export const associationModels = (sdk: SDK) => {
|
|
model && model.flyOutPano();
|
|
model && model.flyOutPano();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- oldModel && oldModel.changeSelect(false);
|
|
|
|
if (oldStatus.showMode !== status.showMode) {
|
|
if (oldStatus.showMode !== status.showMode) {
|
|
if (oldStatus.showMode === "pano") {
|
|
if (oldStatus.showMode === "pano") {
|
|
oldModel && oldModel.flyOutPano();
|
|
oldModel && oldModel.flyOutPano();
|
|
@@ -196,7 +198,8 @@ export const associationModels = (sdk: SDK) => {
|
|
}
|
|
}
|
|
if (status.showMode === "pano") {
|
|
if (status.showMode === "pano") {
|
|
model && model.flyInPano();
|
|
model && model.flyInPano();
|
|
- model && model.changeSelect(true);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ console.log('select')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|