|
@@ -1070,10 +1070,12 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
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())
|
|
|
|
+ msg.posChanged = true
|
|
}
|
|
}
|
|
if (!lastState.rotation || !model.rotation.equals(lastState.rotation)) {
|
|
if (!lastState.rotation || !model.rotation.equals(lastState.rotation)) {
|
|
lastState.rotation = model.rotation.clone()
|
|
lastState.rotation = model.rotation.clone()
|
|
msg.rotation = model.rotation.toObject()
|
|
msg.rotation = model.rotation.toObject()
|
|
|
|
+ msg.rotChanged = true
|
|
if(model.atPath && e.byControl){
|
|
if(model.atPath && e.byControl){
|
|
msg.quaAtPath = AnimationEditor.getModelQuaAtPath(model)
|
|
msg.quaAtPath = AnimationEditor.getModelQuaAtPath(model)
|
|
msg.quaAtPath && (msg.quaAtPath = msg.quaAtPath.toObject())
|
|
msg.quaAtPath && (msg.quaAtPath = msg.quaAtPath.toObject())
|
|
@@ -1081,6 +1083,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
}
|
|
}
|
|
if (lastState.scale == void 0 || model.scale.x * 100 != lastState.scale) {
|
|
if (lastState.scale == void 0 || model.scale.x * 100 != lastState.scale) {
|
|
lastState.scale = msg.scale = model.scale.x * 100
|
|
lastState.scale = msg.scale = model.scale.x * 100
|
|
|
|
+ msg.scaleChanged = true
|
|
}
|
|
}
|
|
|
|
|
|
msg = Potree.Common.CloneObject(msg)
|
|
msg = Potree.Common.CloneObject(msg)
|
|
@@ -2271,7 +2274,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
|
|
if(!tag.parent)return new THREE.Vector3
|
|
if(!tag.parent)return new THREE.Vector3
|
|
tag.titleLabel.sprite.update()
|
|
tag.titleLabel.sprite.update()
|
|
let pos = tag.onMesh ? tag.position : tag.titleLabel.parent.position.clone().applyMatrix4(tag.matrixWorld).applyMatrix4(tag.root.matrixWorld.clone().invert())
|
|
let pos = tag.onMesh ? tag.position : tag.titleLabel.parent.position.clone().applyMatrix4(tag.matrixWorld).applyMatrix4(tag.root.matrixWorld.clone().invert())
|
|
- //console.log(props.title, 'getImageCenter', pos.toArray(), tag.lineLength)
|
|
|
|
|
|
+ console.log(props.title, 'getImageCenter', pos.toArray(), tag.lineLength)
|
|
return pos
|
|
return pos
|
|
|
|
|
|
},
|
|
},
|