|
@@ -1005,7 +1005,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
})
|
|
})
|
|
let lastState = {}
|
|
let lastState = {}
|
|
model.addEventListener('transformChanged', (e) => {
|
|
model.addEventListener('transformChanged', (e) => {
|
|
- let msg = {byControl:!!e.byControl} //byControl代表是手动用控制轴修改
|
|
|
|
|
|
+ let msg = {byControl:!!e.byControl} //byControl代表是手动用控制轴修改 动画文件要改帧
|
|
if (!lastState.position || !model.position.equals(lastState.position)) {
|
|
if (!lastState.position || !model.position.equals(lastState.position)) {
|
|
lastState.position = msg.position = model.position.clone()
|
|
lastState.position = msg.position = model.position.clone()
|
|
//console.log('change pos', model.name, model.position.toArray())
|
|
//console.log('change pos', model.name, model.position.toArray())
|
|
@@ -1123,7 +1123,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
|
|
|
|
MergeEditor.moveBoundCenterTo(model, pos3d) //使模型中心的xy在鼠标所在位置
|
|
MergeEditor.moveBoundCenterTo(model, pos3d) //使模型中心的xy在鼠标所在位置
|
|
|
|
|
|
- model.dispatchEvent("position_changed")
|
|
|
|
|
|
+ model.dispatchEvent({type:"position_changed", byControl:true})
|
|
},
|
|
},
|
|
|
|
|
|
changeShow(show) {
|
|
changeShow(show) {
|
|
@@ -1177,7 +1177,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
}else{
|
|
}else{
|
|
model && model.position.copy(pos)
|
|
model && model.position.copy(pos)
|
|
}
|
|
}
|
|
- model.dispatchEvent({ type: 'position_changed' })
|
|
|
|
|
|
+ model.dispatchEvent({ type: 'position_changed'/* , byControl:true */})
|
|
},
|
|
},
|
|
changeRotation(rot) {//校准取消时执行
|
|
changeRotation(rot) {//校准取消时执行
|
|
//console.log('changeRotation', model.name, rot.x, rot.y, rot.z)
|
|
//console.log('changeRotation', model.name, rot.x, rot.y, rot.z)
|
|
@@ -1187,7 +1187,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
}else{ */
|
|
}else{ */
|
|
model && model.rotation.setFromVector3(rot)
|
|
model && model.rotation.setFromVector3(rot)
|
|
//}
|
|
//}
|
|
- model.dispatchEvent({ type: 'rotation_changed' , by2d:true})
|
|
|
|
|
|
+ model.dispatchEvent({ type: 'rotation_changed' , by2d:true/* , byControl:true */})
|
|
},
|
|
},
|
|
getModelPose(){
|
|
getModelPose(){
|
|
return {
|
|
return {
|