|
@@ -179,27 +179,30 @@ export const activeModel = (status: {
|
|
|
if (model && status.active === oldStatus.active) {
|
|
|
if (status.showMode === "pano") {
|
|
|
if (model) {
|
|
|
- // model.changeSelect(false)
|
|
|
+ console.error('--->', model)
|
|
|
+ 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 {
|
|
|
if (oldStatus.showMode !== status.showMode) {
|
|
|
if (oldStatus.showMode === "pano") {
|
|
|
if (oldModel) {
|
|
|
+ console.error('---> a', 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)
|
|
|
+ console.error('---> b', oldModel)
|
|
|
+ model.changeSelect(false)
|
|
|
model.flyInPano();
|
|
|
}
|
|
|
} else {
|
|
@@ -221,13 +224,14 @@ export const activeModel = (status: {
|
|
|
|
|
|
export const associationModels = (sdk: SDK) => {
|
|
|
sdk.sceneBus.on("modeChange", (data) => {
|
|
|
- if (data.active) {
|
|
|
- activeModel({ active: getFuseModel(data.active)!, showMode: data.mode })
|
|
|
+ if (data.active || data.model) {
|
|
|
+ activeModel({ active: getFuseModel(data.active || data.model)!, showMode: data.mode })
|
|
|
}
|
|
|
custom.showMode = data.mode;
|
|
|
|
|
|
- if (data.active && data.mode === 'pano') {
|
|
|
- data.active.changeSelect(false)
|
|
|
+ console.error('modeChange', data, (data.active || data.model))
|
|
|
+ if ((data.active || data.model) && data.mode === 'pano') {
|
|
|
+ (data.active || data.model).changeSelect(false)
|
|
|
}
|
|
|
});
|
|
|
sdk.sceneBus.on("panoModelChange", (data) => {
|