|
@@ -4,6 +4,7 @@ import TileUtils from './tile/TileUtils.js'
|
|
|
|
|
|
import math from '../../utils/math.js'
|
|
import math from '../../utils/math.js'
|
|
import {TextSprite} from '../../objects/TextSprite.js'
|
|
import {TextSprite} from '../../objects/TextSprite.js'
|
|
|
|
+import Sprite from '../../objects/Sprite.js'
|
|
import DepthBasicMaterial from "../../materials/DepthBasicMaterial.js";
|
|
import DepthBasicMaterial from "../../materials/DepthBasicMaterial.js";
|
|
|
|
|
|
let { PanoRendererEvents, PanoramaEvents, PanoSizeClass} = Potree.defines
|
|
let { PanoRendererEvents, PanoramaEvents, PanoSizeClass} = Potree.defines
|
|
@@ -81,7 +82,7 @@ class Panorama extends THREE.EventDispatcher{
|
|
if(e.reason == 'screenshot' || e.visible){
|
|
if(e.reason == 'screenshot' || e.visible){
|
|
this.label && (this.label.visible = e.visible)//截图时隐藏下
|
|
this.label && (this.label.visible = e.visible)//截图时隐藏下
|
|
}
|
|
}
|
|
- this.label2 && Potree.Utils.updateVisible(this.label2, 'panoVisi', e.visible)
|
|
|
|
|
|
+ //this.label2 && Potree.Utils.updateVisible(this.label2, 'panoVisi', e.visible)
|
|
})
|
|
})
|
|
/*
|
|
/*
|
|
漫游点可见性:旧
|
|
漫游点可见性:旧
|
|
@@ -288,17 +289,22 @@ class Panorama extends THREE.EventDispatcher{
|
|
//this.quaternion = quaternion
|
|
//this.quaternion = quaternion
|
|
}
|
|
}
|
|
|
|
|
|
- let marker = new THREE.Mesh(planeGeo, this.getMarkerMat() )
|
|
|
|
|
|
+ /* let marker = new THREE.Mesh(planeGeo, this.getMarkerMat() )
|
|
|
|
+
|
|
|
|
+ //marker.lookAt(marker.up)
|
|
|
|
+ marker.scale.set(2,2,2) */
|
|
|
|
+
|
|
|
|
+ let marker = new Sprite({mat:this.getMarkerMat(), dontFixOrient:true })
|
|
|
|
+ marker.scale.set(0.4,0.4,0.4)
|
|
marker.name = 'marker_'+this.id
|
|
marker.name = 'marker_'+this.id
|
|
marker.up.set(0,0,1)
|
|
marker.up.set(0,0,1)
|
|
- marker.lookAt(marker.up)
|
|
|
|
- marker.scale.set(2,2,2)
|
|
|
|
|
|
+
|
|
this.addEventListener('changeMarkerTex',(e)=>{
|
|
this.addEventListener('changeMarkerTex',(e)=>{
|
|
marker.material.map = markerTex[e.name]
|
|
marker.material.map = markerTex[e.name]
|
|
})
|
|
})
|
|
|
|
|
|
this.marker = marker
|
|
this.marker = marker
|
|
-
|
|
|
|
|
|
+ marker.pano = this;
|
|
this.images360.node.add(marker)
|
|
this.images360.node.add(marker)
|
|
Potree.settings.isTest && this.addLabel()
|
|
Potree.settings.isTest && this.addLabel()
|
|
//this.addLabel2()
|
|
//this.addLabel2()
|
|
@@ -341,15 +347,15 @@ class Panorama extends THREE.EventDispatcher{
|
|
this.label.update()
|
|
this.label.update()
|
|
}
|
|
}
|
|
|
|
|
|
- if(this.label2){
|
|
|
|
|
|
+ /* if(this.label2){
|
|
if(Potree.settings.editType == 'pano'){
|
|
if(Potree.settings.editType == 'pano'){
|
|
this.label2.position.copy(this.position)
|
|
this.label2.position.copy(this.position)
|
|
}else{
|
|
}else{
|
|
this.label2.position.copy(this.floorPosition)
|
|
this.label2.position.copy(this.floorPosition)
|
|
}
|
|
}
|
|
- this.label2.position.copy(this.marker.position)
|
|
|
|
|
|
+ this.label2.position.copy(this.marker.position)
|
|
this.label2.update()
|
|
this.label2.update()
|
|
- }
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -553,12 +559,18 @@ class Panorama extends THREE.EventDispatcher{
|
|
this.label2 = new TextSprite(Object.assign({},
|
|
this.label2 = new TextSprite(Object.assign({},
|
|
labelProp2, {text: /* this.originID */ parseInt(this.id)+1 }) //{text: `id:${this.id}, dataset:${this.pointcloud.name}, 4dkkId:${this.originID}`}
|
|
labelProp2, {text: /* this.originID */ parseInt(this.id)+1 }) //{text: `id:${this.id}, dataset:${this.pointcloud.name}, 4dkkId:${this.originID}`}
|
|
);
|
|
);
|
|
- this.images360.node.add(this.label2);
|
|
|
|
- this.floorPosition && this.label2.position.copy(this.floorPosition)
|
|
|
|
- let s = 0.4
|
|
|
|
- this.label2.scale.set(s,s,s)
|
|
|
|
|
|
+ //this.images360.node.add(this.label2);
|
|
|
|
+ this.marker.add(this.label2)
|
|
|
|
+
|
|
|
|
+ //this.floorPosition && this.label2.position.copy(this.floorPosition)
|
|
|
|
+ //let s = 0.25
|
|
|
|
+ //this.label2.scale.set(s,s,s)
|
|
Potree.Utils.updateVisible(this.label2, 'notDisplay', false)
|
|
Potree.Utils.updateVisible(this.label2, 'notDisplay', false)
|
|
- Potree.Utils.updateVisible(this.label2, 'panoVisi', this.visible)
|
|
|
|
|
|
+ //Potree.Utils.updateVisible(this.label2, 'panoVisi', this.visible)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ Potree.Utils.setObjectLayers(this.label2, 'bothMapAndScene')
|
|
}
|
|
}
|
|
|
|
|
|
removeTextLabel(){
|
|
removeTextLabel(){
|