|
@@ -63575,7 +63575,7 @@ vec4 getMapColor(vec4 color){
|
|
|
const vec3 mapAnotherColor = vec3(1.0,1.0,1.0);
|
|
|
//uniform vec4 replaceColor;//新的颜色
|
|
|
|
|
|
-
|
|
|
+
|
|
|
if(mapColor.r < beReplacedRed){//要被取代的颜色
|
|
|
mapColor = vec4(replaceColor, mapColor.a);
|
|
|
}/*else if(mapColor.r>mapTextColotR){
|
|
@@ -75241,7 +75241,7 @@ void main()
|
|
|
transparent: o.transparent == void 0 ? true : o.transparent,
|
|
|
side: o.side || 0 /* THREE.DoubleSide */,
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
|
|
|
|
|
|
this.events = {
|
|
@@ -75249,7 +75249,8 @@ void main()
|
|
|
if(!this.useDepth || !e.viewport.camera.isPerspectiveCamera || !e.viewport)return
|
|
|
let viewport = e.viewport;
|
|
|
let viewportOffset = viewport.offset || new Vector2();
|
|
|
- this.uniforms.resolution.value.copy(viewport.resolution);
|
|
|
+
|
|
|
+ this.uniforms.resolution.value.copy(viewport.resolution);
|
|
|
this.uniforms.viewportOffset.value.copy(viewportOffset);
|
|
|
},
|
|
|
render:(e)=>{//before render 如果有大于两个viewport的话,不同viewport用不同的depthTex
|
|
@@ -75505,7 +75506,7 @@ void main()
|
|
|
|
|
|
|
|
|
let r1 = Potree.Utils.getPos2d(center, camera, viewer.renderArea, e.viewport);
|
|
|
- if(!r1.trueSide)return Potree.Utils.updateVisible(this, 'notTrueSide', false); //console.error('!r1.trueSide') //中心点如果在背面直接不渲染了
|
|
|
+ if(!r1.trueSide)return //Potree.Utils.updateVisible(this, 'notTrueSide', false); 但这句会使realVisible为false从而无法更新//console.error('!r1.trueSide') //中心点如果在背面直接不渲染了
|
|
|
|
|
|
let r2, point2;
|
|
|
|
|
@@ -75536,9 +75537,9 @@ void main()
|
|
|
//console.log(p2StateHistory,len)
|
|
|
|
|
|
if(!r2.trueSide){
|
|
|
- return Potree.Utils.updateVisible(this, 'notTrueSide', false), console.log(' !r2.trueSide', )
|
|
|
+ return //Potree.Utils.updateVisible(this, 'notTrueSide', false), console.log(' !r2.trueSide', )
|
|
|
}
|
|
|
- Potree.Utils.updateVisible(this, 'notTrueSide', true);
|
|
|
+ //Potree.Utils.updateVisible(this, 'notTrueSide', true)
|
|
|
|
|
|
let p1 = r1.pos, p2 = r2.pos;
|
|
|
let vec = new Vector2().subVectors(p1,p2);
|
|
@@ -80269,7 +80270,7 @@ void main()
|
|
|
this.points = [...this.points.slice(0,index), o.point, ...this.points.slice(index,this.points.length)];
|
|
|
//this.points.push(o.point);
|
|
|
|
|
|
- if(o.marker){
|
|
|
+ if(o.marker){
|
|
|
this.add(o.marker);
|
|
|
this.markers = [...this.markers.slice(0,index), o.marker, ...this.markers.slice(index,this.markers.length)];
|
|
|
this.updateMarker(o.marker, o.point);
|
|
@@ -80968,7 +80969,7 @@ void main()
|
|
|
|
|
|
|
|
|
this.name = this.measureType + this.constructor.counter; //'Measure_' + this.constructor.counter;
|
|
|
- this.color = '#FF4399';
|
|
|
+ //this.color = '#FF4399'
|
|
|
this.color = new Color(this.color);
|
|
|
|
|
|
this.markerLabels = [];
|
|
@@ -81569,12 +81570,14 @@ void main()
|
|
|
|
|
|
|
|
|
createEdgeLabel(name, hasHoverEvent){
|
|
|
+
|
|
|
+ mainLabelProp.backgroundColor = {r: this.color.r*255, g: this.color.g*255, b: this.color.b*255, a:config$1.measure.default.opacity};
|
|
|
+
|
|
|
+
|
|
|
const edgeLabel = new TextSprite$2(
|
|
|
$.extend(hasHoverEvent ? mainLabelProp : subLabelProp,{
|
|
|
- sizeInfo: labelSizeInfo, name:name||'edgeLabel',
|
|
|
-
|
|
|
- backgroundColor: {r: this.color.r*255, g: this.color.g*255, b: this.color.b*255, a:config$1.measure.default.opacity},
|
|
|
-
|
|
|
+ sizeInfo: labelSizeInfo, name:name||'edgeLabel',
|
|
|
+
|
|
|
})
|
|
|
);
|
|
|
if(hasHoverEvent){
|
|
@@ -81701,7 +81704,7 @@ void main()
|
|
|
|
|
|
|
|
|
if(type != 'guide'){
|
|
|
- return Measure$1.lineMats['edgeSelect'+color]
|
|
|
+ return Measure$1.lineMats[type+color]
|
|
|
}else return Measure$1.lineMats[type]
|
|
|
|
|
|
|
|
@@ -106251,7 +106254,7 @@ ENDSEC
|
|
|
|
|
|
//鼠标静止一段时间它就会消失
|
|
|
updateVisible(){
|
|
|
- //Date.now() - this.mouseLastMoveTime > 1500 && !this.hidden && this.hide()
|
|
|
+ Date.now() - this.mouseLastMoveTime > 1500 && !this.hidden && this.hide();
|
|
|
}
|
|
|
|
|
|
|