|
@@ -1991,6 +1991,21 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
if(Potree.settings.isTest){
|
|
|
var colorHue = Math.random();
|
|
|
tile.material.color = (new THREE.Color()).setHSL(colorHue, 0.6, 0.7)
|
|
|
+
|
|
|
+
|
|
|
+ tile.scoreLabel = new TextSprite( {
|
|
|
+ backgroundColor: { r: 0, g: 0, b: 0, a: 0 },
|
|
|
+ textColor: { r: 0, g: 0, b: 0, a: 1 },
|
|
|
+ borderRadius: 15,
|
|
|
+ renderOrder: 50, fontsize : 13,
|
|
|
+ text: '' ,
|
|
|
+ dontFixOrient:true
|
|
|
+ })
|
|
|
+ tile.scoreLabel.sprite.material.side = 2;
|
|
|
+ tile.scoreLabel.rotation.x = Math.PI
|
|
|
+
|
|
|
+ tile.add(tile.scoreLabel)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
tile.visible = false
|
|
@@ -2097,14 +2112,14 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
let pos = e.getWorldPosition(new THREE.Vector3())
|
|
|
let dir = new THREE.Vector3().subVectors(pos, this.highMapCube.position).normalize()
|
|
|
|
|
|
- let hcos_ = dir.clone().setY(direction.y).normalize().dot(direction) //在direction的斜面上水平角度差
|
|
|
+ let hcos_ = dir.clone().setZ(direction.z).normalize().dot(direction) //在direction的斜面上水平角度差
|
|
|
let hRad = Math.acos(hcos_)
|
|
|
let vRad = -200
|
|
|
- if (hRad > hfov + 0.1) {
|
|
|
+ if (/* hRad > hfov + 0.08 */ hRad / hfov > 1.5 ) {
|
|
|
e.score = -100
|
|
|
} else {
|
|
|
- vRad = Math.abs(Math.acos(dir.y) - Math.acos(direction.y))
|
|
|
- if (vRad > vfov + 0.1) {
|
|
|
+ vRad = Math.abs(Math.acos(dir.z) - Math.acos(direction.z))
|
|
|
+ if (/* vRad > vfov + 0.08 */ vRad / vfov > 1.5 ) {
|
|
|
e.score = -100
|
|
|
} else {
|
|
|
e.score = -(hRad / hfov + vRad / vfov)
|
|
@@ -2117,7 +2132,7 @@ export class Images360 extends THREE.EventDispatcher{
|
|
|
}
|
|
|
})
|
|
|
this.highMapCube.visibleTiles = list.filter(e => e.score > -100)
|
|
|
- //list.forEach(e=>e.scoreLabel.setText(e.scores))
|
|
|
+ list.forEach(e=>e.scoreLabel.setText(e.scores))
|
|
|
}
|
|
|
|
|
|
let needRecover = this.highMapCube.visibleTiles.filter(e => !e.material.map)
|