|
@@ -82246,7 +82246,7 @@ void main()
|
|
|
setEdgeLabelPos(label,p1,p2){ //调整label的位置,使倾斜后看起来在线的中心,而不要挡住端点
|
|
|
let center = new Vector3().addVectors(p1,p2).multiplyScalar(0.5);
|
|
|
|
|
|
- if(this.lineDir){
|
|
|
+ if(this.lineDir && this.lineDir.length() > 0){
|
|
|
if(viewer.mainViewport.camera.type == 'OrthographicCamera'){
|
|
|
label.setPos(center);
|
|
|
}else {
|
|
@@ -82272,7 +82272,7 @@ void main()
|
|
|
let camDirPlane = new Plane().setFromNormalAndCoplanarPoint(dir, eyePos);
|
|
|
nearPoint = ray.ray.intersectPlane(camDirPlane, new Vector3());
|
|
|
|
|
|
- if(!nearPoint)console.error('no?',cos, this.lineDir, p1, p2);
|
|
|
+ //if(!nearPoint)console.error('no?',cos, this.lineDir, p1, p2)
|
|
|
}
|
|
|
|
|
|
|