|
@@ -53,7 +53,15 @@ const associationModels = (sdk: SDK) => {
|
|
|
sceneModel.bus.on('transformChanged', transform => {
|
|
|
setTimeout(() => {
|
|
|
selfUpdate = true
|
|
|
- Object.assign(item, transform)
|
|
|
+ const data = transform;
|
|
|
+ if (transform.rotation) {
|
|
|
+ data.rotation = {
|
|
|
+ x: transform.rotation.x,
|
|
|
+ y: transform.rotation.y,
|
|
|
+ z: transform.rotation.z
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Object.assign(item, data)
|
|
|
nextTick(() => selfUpdate = false)
|
|
|
})
|
|
|
})
|
|
@@ -77,10 +85,8 @@ const associationModels = (sdk: SDK) => {
|
|
|
hideLoad()
|
|
|
})
|
|
|
sceneModel.bus.on('loadProgress', progress => item.progress = progress)
|
|
|
- console.log("添加", item)
|
|
|
}
|
|
|
for (const item of deleted) {
|
|
|
- console.log("取消", item)
|
|
|
getSceneModel(item)?.destroy()
|
|
|
}
|
|
|
})
|
|
@@ -93,6 +99,7 @@ const associationModels = (sdk: SDK) => {
|
|
|
if (loaded) {
|
|
|
const modelShow = getModelShowVariable(item)
|
|
|
watchEffect(() => {
|
|
|
+ selfUpdate || console.log('change bottom')
|
|
|
item.bottom
|
|
|
selfUpdate || getSceneModel(item)?.changeBottom(item.bottom)
|
|
|
}, {flush: 'sync'})
|