|
@@ -3083,22 +3083,22 @@ manage.initMapPanoPos1 = function( twoPano = [{id:7, px:{x:518,y:434}}/* {id:2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-manage.initMapPanoPos = function( twoPano = [{id:7, px:{x:518,y:434}}/* {id:2, px:{x:157,y:240}} */, {id:33, px:{x:518,y:921}}] ){
|
|
|
|
|
- //twoPano = [ {id:2, px:{x:157,y:240}}, {id:48, px:{x:584,y:471}}, {id:33, px:{x:518,y:921}}]
|
|
|
|
|
- twoPano = [ {id:2, px:{x:156,y:240}}, {id:48, px:{x:584,y:471}}, {id:33, px:{x:519,y:921}}] //用绘图软件在路线图中取坐标
|
|
|
|
|
|
|
+manage.initMapPanoPos = function( panosPX = [{id:7, px:{x:518,y:434}}/* {id:2, px:{x:157,y:240}} */, {id:33, px:{x:518,y:921}}] ){
|
|
|
|
|
+ //panosPX = [ {id:2, px:{x:157,y:240}}, {id:48, px:{x:584,y:471}}, {id:33, px:{x:518,y:921}}]
|
|
|
|
|
+ panosPX = [ {id:2, px:{x:156,y:240}}, {id:48, px:{x:584,y:471}}, {id:33, px:{x:519,y:921}}] //用绘图软件在路线图中取坐标
|
|
|
|
|
|
|
|
- let pano1 = player.model.panos.index[twoPano[0].id]
|
|
|
|
|
- let pano2 = player.model.panos.index[twoPano[1].id]
|
|
|
|
|
- let pano3 = player.model.panos.index[twoPano[2].id]
|
|
|
|
|
|
|
+ let pano1 = player.model.panos.index[panosPX[0].id]
|
|
|
|
|
+ let pano2 = player.model.panos.index[panosPX[1].id]
|
|
|
|
|
+ let pano3 = player.model.panos.index[panosPX[2].id]
|
|
|
if(!pano1 || !pano2 || !pano3){
|
|
if(!pano1 || !pano2 || !pano3){
|
|
|
- return console.error('找不到这两个漫游点', twoPano)
|
|
|
|
|
|
|
+ return console.error('找不到这两个漫游点', panosPX)
|
|
|
}
|
|
}
|
|
|
let pos1 = new THREE.Vector3().copy(pano1.position).setY(0)
|
|
let pos1 = new THREE.Vector3().copy(pano1.position).setY(0)
|
|
|
let pos2 = new THREE.Vector3().copy(pano2.position).setY(0)
|
|
let pos2 = new THREE.Vector3().copy(pano2.position).setY(0)
|
|
|
let pos3 = new THREE.Vector3().copy(pano3.position).setY(0)
|
|
let pos3 = new THREE.Vector3().copy(pano3.position).setY(0)
|
|
|
- let pos1PX = new THREE.Vector3(twoPano[0].px.x, 0, twoPano[0].px.y)
|
|
|
|
|
- let pos2PX = new THREE.Vector3(twoPano[1].px.x, 0, twoPano[1].px.y)
|
|
|
|
|
- let pos3PX = new THREE.Vector3(twoPano[2].px.x, 0, twoPano[2].px.y)
|
|
|
|
|
|
|
+ let pos1PX = new THREE.Vector3(panosPX[0].px.x, 0, panosPX[0].px.y)
|
|
|
|
|
+ let pos2PX = new THREE.Vector3(panosPX[1].px.x, 0, panosPX[1].px.y)
|
|
|
|
|
+ let pos3PX = new THREE.Vector3(panosPX[2].px.x, 0, panosPX[2].px.y)
|
|
|
let matrix = math.computeAffineTransformMatrix([pos1, pos2, pos3], [pos1PX, pos2PX, pos3PX] )
|
|
let matrix = math.computeAffineTransformMatrix([pos1, pos2, pos3], [pos1PX, pos2PX, pos3PX] )
|
|
|
//let matrix = math.threePointsTransform([pos1, pos2, pos3], [pos1PX, pos2PX, pos3PX] )
|
|
//let matrix = math.threePointsTransform([pos1, pos2, pos3], [pos1PX, pos2PX, pos3PX] )
|
|
|
|
|
|