|
|
@@ -744,7 +744,9 @@ export function realTimePanosStart(dom, number){//边拍边传,和点位编辑
|
|
|
Potree.settings.urls.templates.panoTile = 'laser-data/testdata/{sceneCode}/data/preview/{id}/'
|
|
|
const rotQua = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(1,0,0), -Math.PI / 2 )
|
|
|
//new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,0,1), -Math.PI )
|
|
|
-
|
|
|
+
|
|
|
+const rotQua2 = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0,0,1), -Math.PI )
|
|
|
+
|
|
|
viewer.scene.add360Images(viewer.images360);
|
|
|
const datasetId = 1
|
|
|
|
|
|
@@ -759,6 +761,8 @@ export function realTimePanosStart(dom, number){//边拍边传,和点位编辑
|
|
|
if(!panoCount){
|
|
|
return callback()
|
|
|
}
|
|
|
+
|
|
|
+ console.log('loadPanos',panoData)
|
|
|
panoData.forEach((d,index)=>{
|
|
|
let timeStamp = 0
|
|
|
let cloudPath = `laser-data/testdata/${number}/data/preview/${d.uuid}/webcloud/cloud.js`
|
|
|
@@ -806,16 +810,10 @@ export function realTimePanosStart(dom, number){//边拍边传,和点位编辑
|
|
|
let data = pano.panoData
|
|
|
let dataPosition = new THREE.Vector3().fromArray(data.pose3d.position)
|
|
|
let qua = data.pose3d.rotation
|
|
|
- qua = [qua[1], qua[2], qua[3], qua[0]]
|
|
|
-
|
|
|
- let dataQuaternion = new THREE.Quaternion().fromArray(qua)
|
|
|
-
|
|
|
- pano.pointcloud.orientationUser = math.convertQuaternion.YupToZup(dataQuaternion)//new THREE.Quaternion().multiplyQuaternions(dataQuaternion, rotQua) //math.convertQuaternion.YupToZup(dataQuaternion) //new THREE.Quaternion().multiplyQuaternions(dataQuaternion,rotQua2)
|
|
|
-
|
|
|
-
|
|
|
- console.log('dataQuaternion', new THREE.Euler().setFromQuaternion(pano.pointcloud.orientationUser))
|
|
|
-
|
|
|
- pano.pointcloud.translateUser.copy(math.convertVector.YupToZup(dataPosition))
|
|
|
+ qua = [qua[1], qua[2], qua[3], qua[0]]
|
|
|
+ let dataQuaternion = new THREE.Quaternion().fromArray(qua)
|
|
|
+ pano.pointcloud.orientationUser = new THREE.Quaternion().multiplyQuaternions(dataQuaternion,rotQua2)//新版
|
|
|
+ pano.pointcloud.translateUser.copy(dataPosition)
|
|
|
Alignment.setMatrix(pano.pointcloud);
|
|
|
})
|
|
|
viewer.images360.loadDone()
|