|
@@ -80916,7 +80916,7 @@ void main()
|
|
|
let color = new Color(config$1.measure.color);
|
|
|
let textColor = new Color(config$1.measure.textColor);
|
|
|
var markerMats = {};
|
|
|
- var lineMats;
|
|
|
+ var lineMats ;
|
|
|
var planeMats;
|
|
|
|
|
|
const lineDepthInfo = {
|
|
@@ -80969,7 +80969,7 @@ void main()
|
|
|
|
|
|
this.name = this.measureType + this.constructor.counter; //'Measure_' + this.constructor.counter;
|
|
|
this.color = '#FF4399';
|
|
|
-
|
|
|
+ this.color = new Color(this.color);
|
|
|
|
|
|
this.markerLabels = [];
|
|
|
this.edgeLabels = [];
|
|
@@ -81570,7 +81570,12 @@ void main()
|
|
|
|
|
|
createEdgeLabel(name, hasHoverEvent){
|
|
|
const edgeLabel = new TextSprite$2(
|
|
|
- $.extend(hasHoverEvent ? mainLabelProp : subLabelProp,{sizeInfo: labelSizeInfo, name:name||'edgeLabel'})
|
|
|
+ $.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},
|
|
|
+
|
|
|
+ })
|
|
|
);
|
|
|
if(hasHoverEvent){
|
|
|
edgeLabel.addEventListener('mouseover',()=>{
|
|
@@ -81626,9 +81631,10 @@ void main()
|
|
|
|
|
|
|
|
|
getMarkerMaterial(type){
|
|
|
- if(!markerMats[type + this.color]){
|
|
|
-
|
|
|
- markerMats['default' + this.color] = new DepthBasicMaterial($.extend({},lineDepthInfo,{
|
|
|
+ let color = this.color.getHexString();
|
|
|
+ if(!markerMats[type + color]){
|
|
|
+
|
|
|
+ markerMats['default' + color] = new DepthBasicMaterial($.extend({},lineDepthInfo,{
|
|
|
transparent: !0,
|
|
|
opacity: 1,
|
|
|
map: texLoader$2.load(Potree.resourcePath+'/textures/pic_point_s32.png' ),
|
|
@@ -81637,7 +81643,7 @@ void main()
|
|
|
beReplacedRed: 0.184, //0.18431372
|
|
|
mapColorReplace:true,
|
|
|
})),
|
|
|
- markerMats['select' + this.color] = new DepthBasicMaterial($.extend({},lineDepthInfo,{
|
|
|
+ markerMats['select' + color] = new DepthBasicMaterial($.extend({},lineDepthInfo,{
|
|
|
transparent: !0,
|
|
|
opacity: 1,
|
|
|
map: texLoader$2.load(Potree.resourcePath+'/textures/pic_point32.png' ),
|
|
@@ -81647,7 +81653,7 @@ void main()
|
|
|
mapColorReplace:true
|
|
|
}));
|
|
|
}
|
|
|
- return markerMats[type + this.color]
|
|
|
+ return markerMats[type + color]
|
|
|
|
|
|
}
|
|
|
|
|
@@ -81655,39 +81661,51 @@ void main()
|
|
|
|
|
|
|
|
|
getLineMat(type) {
|
|
|
- if(!Measure$1.lineMats){
|
|
|
- Measure$1.lineMats = {
|
|
|
- edgeDefault: LineDraw.createFatLineMat({
|
|
|
- color: config$1.measure.default.color,
|
|
|
- lineWidth: config$1.measure.lineWidth,
|
|
|
- useDepth :true,
|
|
|
- dashWithDepth :true, // 只在被遮住的部分显示虚线,因为实线容易挡住label
|
|
|
- dashed :true,
|
|
|
- dashSize : 0.04,
|
|
|
- gapSize: 0.04,
|
|
|
- transparent: true,
|
|
|
- opacity: config$1.measure.default.opacity,
|
|
|
- depthTestWhenPick:true,
|
|
|
- }),
|
|
|
- edgeSelect: LineDraw.createFatLineMat({
|
|
|
- color: config$1.measure.highlight.color,//'#f0ff00',
|
|
|
- dashSize: 0.5,
|
|
|
- gapSize: 0.2,
|
|
|
- lineWidth: config$1.measure.lineWidth ,
|
|
|
- transparent: true,
|
|
|
- opacity: config$1.measure.highlight.opacity
|
|
|
- }),
|
|
|
- guide: LineDraw.createFatLineMat({
|
|
|
- color:config$1.measure.guide.color,
|
|
|
- dashSize: 0.1,
|
|
|
- gapSize: 0.02,
|
|
|
- dashed: true,
|
|
|
- lineWidth: config$1.measure.lineWidth
|
|
|
- })
|
|
|
-
|
|
|
- };
|
|
|
+
|
|
|
+ if(!lineMats) Measure$1.lineMats = lineMats = {
|
|
|
+ guide: LineDraw.createFatLineMat({
|
|
|
+ color:config$1.measure.guide.color,
|
|
|
+ dashSize: 0.1,
|
|
|
+ gapSize: 0.02,
|
|
|
+ dashed: true,
|
|
|
+ lineWidth: config$1.measure.lineWidth
|
|
|
+ })
|
|
|
+ };
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ let color = this.color.getHexString();
|
|
|
+ if(!lineMats['edgeDefault'+color]){
|
|
|
+ lineMats['edgeDefault'+color] = LineDraw.createFatLineMat({
|
|
|
+ color: this.color,
|
|
|
+ lineWidth: config$1.measure.lineWidth,
|
|
|
+ useDepth :true,
|
|
|
+ dashWithDepth :true, // 只在被遮住的部分显示虚线,因为实线容易挡住label
|
|
|
+ dashed :true,
|
|
|
+ dashSize : 0.04,
|
|
|
+ gapSize: 0.04,
|
|
|
+ transparent: true,
|
|
|
+ opacity: config$1.measure.default.opacity,
|
|
|
+ depthTestWhenPick:true,
|
|
|
+ });
|
|
|
+ lineMats['edgeSelect'+color] = LineDraw.createFatLineMat({
|
|
|
+ color: this.color,//'#f0ff00',
|
|
|
+ dashSize: 0.5,
|
|
|
+ gapSize: 0.2,
|
|
|
+ lineWidth: config$1.measure.lineWidth ,
|
|
|
+ transparent: true,
|
|
|
+ opacity: config$1.measure.highlight.opacity
|
|
|
+ });
|
|
|
}
|
|
|
- return Measure$1.lineMats[type]
|
|
|
+
|
|
|
+
|
|
|
+ if(type != 'guide'){
|
|
|
+ return Measure$1.lineMats['edgeSelect'+color]
|
|
|
+ }else return Measure$1.lineMats[type]
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -81959,17 +81977,31 @@ void main()
|
|
|
|
|
|
|
|
|
function setLabelHightState(label, state){
|
|
|
- if(state){
|
|
|
- label.backgroundColor = {r: highlightColor.r*255, g: highlightColor.g*255, b: highlightColor.b*255, a:config$1.measure.highlight.opacity},
|
|
|
+ /* if(state){
|
|
|
+ label.backgroundColor = {r: highlightColor.r*255, g: highlightColor.g*255, b: highlightColor.b*255, a:config.measure.highlight.opacity},
|
|
|
+ label.backgroundColor.a = config.measure.highlight.opacity
|
|
|
+ label.sprite.material.useDepth = false;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ label.backgroundColor = mainLabelProp.backgroundColor
|
|
|
+ label.backgroundColor.a = config.measure.default.opacity
|
|
|
+ label.sprite.material.useDepth = true
|
|
|
+
|
|
|
+ } */
|
|
|
+
|
|
|
+ if(state){
|
|
|
+ //label.backgroundColor = {r: this.color[0]*255, g: this.color[1]*255, b: this.color[2]*255, a:config.measure.highlight.opacity},
|
|
|
label.backgroundColor.a = config$1.measure.highlight.opacity;
|
|
|
label.sprite.material.useDepth = false;
|
|
|
|
|
|
}else {
|
|
|
- label.backgroundColor = mainLabelProp.backgroundColor;
|
|
|
+ //label.backgroundColor = {r: this.color[0]*255, g: this.color[1]*255, b: this.color[2]*255
|
|
|
label.backgroundColor.a = config$1.measure.default.opacity;
|
|
|
label.sprite.material.useDepth = true;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
label.updateTexture();
|
|
|
//label.sprite.material.needsUpdate = true
|
|
|
}
|
|
@@ -95820,7 +95852,7 @@ ENDSEC
|
|
|
this.originPosition = new Vector3().copy(o.pose.translation);
|
|
|
this.originFloorPosition = new Vector3().copy(o.puck);
|
|
|
|
|
|
- this.originID = parseInt(o.id);// uuid "file_id":"00022"对应是原本的4dkk的id --来自vision.txt
|
|
|
+ this.originID = parseInt(o.uuid);//id uuid "file_id":"00022"对应是原本的4dkk的id --来自vision.txt
|
|
|
|
|
|
this.pointcloud = viewer.scene.pointclouds[0];
|
|
|
this.pointcloud.panos.push(this);
|