Преглед изворни кода

fix: Merge branch 'dev' of http://192.168.0.115:3000/4dkankan/4dkankan_bim into dev

# Conflicts:
#	public/static/lib/potree/potree.js
#	public/static/lib/potree/potree.js.map
xzw пре 2 година
родитељ
комит
6633e6fc05
76 измењених фајлова са 373 додато и 76328 уклоњено
  1. 2 1
      .env
  2. 0 3
      .env.staging
  3. 8 0
      .env.test
  4. 2 1
      package.json
  5. BIN
      public/fonts/iconfont.5b17a60b.woff
  6. BIN
      public/fonts/iconfont.6e1be100.ttf
  7. BIN
      public/fonts/iconfont.b5ca73bb.woff2
  8. BIN
      public/img/coord.1f543010.gif
  9. BIN
      public/img/coord.f745fb29.gif
  10. BIN
      public/img/coord.f7adba3b.gif
  11. BIN
      public/img/data.726ce999.gif
  12. BIN
      public/img/data.982c79fa.gif
  13. BIN
      public/img/data.d1a1fd72.gif
  14. BIN
      public/img/download.36c03b8a.gif
  15. BIN
      public/img/download.7685a3dd.gif
  16. BIN
      public/img/download.a8aa1545.gif
  17. BIN
      public/img/flooer.5e52064b.png
  18. BIN
      public/img/floorpan.3f3ddeeb.gif
  19. BIN
      public/img/floorpan.91dc2a8e.gif
  20. BIN
      public/img/floorpan.f8157150.gif
  21. BIN
      public/img/hotspot.908e6fb5.gif
  22. BIN
      public/img/hotspot.966c5e02.gif
  23. BIN
      public/img/hotspot.ad026f17.gif
  24. BIN
      public/img/loading.bcdaea61.bcdaea61.jpg
  25. BIN
      public/img/measure.742a7e62.gif
  26. 16 0
      public/img/pic_kankan.5660fe60.svg
  27. BIN
      public/img/pic_laser@2x.b55efd87.png
  28. BIN
      public/img/query.8bc76bbb.gif
  29. BIN
      public/img/query.8d408bde.gif
  30. BIN
      public/img/query.c2acd83a.gif
  31. 1 0
      public/js/0.js
  32. 1 1
      public/js/10.js
  33. 1 1
      public/js/11.js
  34. 1 1
      public/js/12.js
  35. 1 1
      public/js/13.js
  36. 1 1
      public/js/14.js
  37. 1 1
      public/js/15.js
  38. 1 1
      public/js/16.js
  39. 1 1
      public/js/17.js
  40. 3 3
      public/js/18.js
  41. 1 1
      public/js/3.js
  42. 1 1
      public/js/4.js
  43. 1 1
      public/js/5.js
  44. 1 1
      public/js/6.js
  45. 1 1
      public/js/7.js
  46. 1 1
      public/js/8.js
  47. 1 1
      public/js/9.js
  48. 19 19
      public/js/chunk-vendors.js
  49. 9 1
      public/js/smart.js
  50. 4 1
      public/smart-laser.html
  51. 1 1
      public/smart-sviewer.html
  52. 1 1
      public/smart-viewer.html
  53. BIN
      public/static/lib/potree/resources/models/glb/87b3a367bc3e4273832cb4fa398782e5.glb
  54. BIN
      public/static/lib/potree/resources/models/glb/87ecd10fb0374ea6b3e0bf24c6459e3c.glb
  55. BIN
      public/static/lib/potree/resources/models/glb/ModernJPHouseSofa44105209.glb
  56. BIN
      public/static/lib/potree/resources/models/glb/ModernJPHouseSofa44216499.glb
  57. BIN
      public/static/lib/potree/resources/models/glb/coffeemat.glb
  58. BIN
      public/static/lib/potree/resources/textures/marker.png
  59. BIN
      public/static/lib/potree/resources/textures/rtk-f-n.png
  60. BIN
      public/static/lib/potree/resources/textures/rtk-f-s.png
  61. BIN
      public/static/lib/potree/resources/textures/rtk-y-n.png
  62. BIN
      public/static/lib/potree/resources/textures/rtk-y-s.png
  63. 1 319
      public/static/lib/potree/workers/2.0/DecoderWorker.js
  64. 1 2501
      public/static/lib/potree/workers/2.0/DecoderWorker_brotli.js
  65. 1 460
      public/static/lib/potree/workers/BinaryDecoderWorker.js
  66. 0 213
      public/static/lib/potree/workers/EptBinaryDecoderWorker.js
  67. 0 200
      public/static/lib/potree/workers/EptLaszipDecoderWorker.js
  68. 0 22376
      public/static/lib/potree/workers/EptZstandardDecoderWorker.js
  69. 0 344
      public/static/lib/potree/workers/LASDecoderWorker.js
  70. 0 49756
      public/static/lib/potree/workers/LASLAZWorker.js
  71. 0 0
      public/这里相当于localhost根目录.txt
  72. 1 1
      src/assets/scss/components/_message.scss
  73. 1 1
      src/components/calendar/mobile.vue
  74. 10 2
      src/components/header/index.vue
  75. 129 59
      src/pages/SViewer.vue
  76. 148 50
      src/pages/Viewer.vue

+ 2 - 1
.env

@@ -3,4 +3,5 @@ VUE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
 # sdk文件地址
 VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/
 # 静态资源目录
-VUE_APP_STATIC_DIR=static
+VUE_APP_STATIC_DIR=static
+VUE_APP_TEST=0

+ 0 - 3
.env.staging

@@ -1,3 +0,0 @@
-NODE_ENV=production
-# 静态资源地址
-VUE_APP_CDN_URL=https://4dkk.4dage.com/v4-test/www/

+ 8 - 0
.env.test

@@ -0,0 +1,8 @@
+NODE_ENV=production
+# 静态资源地址
+VUE_APP_CDN_URL=https://4dkk.4dage.com/v4/www/
+# sdk文件地址
+VUE_APP_SDK_DIR=https://4dkk.4dage.com/v4-test/www/sdk/
+# 静态资源目录
+VUE_APP_STATIC_DIR=static
+VUE_APP_TEST=1

+ 2 - 1
package.json

@@ -4,7 +4,8 @@
   "version": "1.0.0",
   "scripts": {
     "serve": "vue-cli-service serve",
-    "build": "vue-cli-service build"
+    "build": "vue-cli-service build",
+    "build:test": "vue-cli-service build --mode test"
   },
   "dependencies": {
     "axios": "^0.21.1",

BIN
public/fonts/iconfont.5b17a60b.woff


BIN
public/fonts/iconfont.6e1be100.ttf


BIN
public/fonts/iconfont.b5ca73bb.woff2


BIN
public/img/coord.1f543010.gif


BIN
public/img/coord.f745fb29.gif


BIN
public/img/coord.f7adba3b.gif


BIN
public/img/data.726ce999.gif


BIN
public/img/data.982c79fa.gif


BIN
public/img/data.d1a1fd72.gif


BIN
public/img/download.36c03b8a.gif


BIN
public/img/download.7685a3dd.gif


BIN
public/img/download.a8aa1545.gif


BIN
public/img/flooer.5e52064b.png


BIN
public/img/floorpan.3f3ddeeb.gif


BIN
public/img/floorpan.91dc2a8e.gif


BIN
public/img/floorpan.f8157150.gif


BIN
public/img/hotspot.908e6fb5.gif


BIN
public/img/hotspot.966c5e02.gif


BIN
public/img/hotspot.ad026f17.gif


BIN
public/img/loading.bcdaea61.bcdaea61.jpg


BIN
public/img/measure.742a7e62.gif


Разлика између датотеке није приказан због своје велике величине
+ 16 - 0
public/img/pic_kankan.5660fe60.svg


BIN
public/img/pic_laser@2x.b55efd87.png


BIN
public/img/query.8bc76bbb.gif


BIN
public/img/query.8d408bde.gif


BIN
public/img/query.c2acd83a.gif


Разлика између датотеке није приказан због своје велике величине
+ 1 - 0
public/js/0.js


+ 1 - 1
public/js/10.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{399:function(n,p,o){n.exports=o.p+"img/data_revise_n.fbcdb99b.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[10],{329:function(n,p,o){n.exports=o.p+"img/data_revise_n.fbcdb99b.svg"}}]);

+ 1 - 1
public/js/11.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{400:function(n,p,w){n.exports=w.p+"img/dianwei.a4f6219e.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{330:function(n,p,w){n.exports=w.p+"img/dianwei.a4f6219e.svg"}}]);

+ 1 - 1
public/js/12.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{401:function(p,n,o){p.exports=o.p+"img/m-r.471aa7f5.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[12],{331:function(p,n,o){p.exports=o.p+"img/m-r.471aa7f5.svg"}}]);

+ 1 - 1
public/js/13.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{402:function(p,n,o){p.exports=o.p+"img/point-s.69e5b4b6.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[13],{332:function(p,n,o){p.exports=o.p+"img/point-s.69e5b4b6.svg"}}]);

+ 1 - 1
public/js/14.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[14],{403:function(p,s,n){p.exports=n.p+"img/state_gps.cc832e05.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[14],{333:function(p,s,n){p.exports=n.p+"img/state_gps.cc832e05.svg"}}]);

+ 1 - 1
public/js/15.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{404:function(o,p,w){o.exports=w.p+"img/weitiao.f217d1d9.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[15],{334:function(o,p,w){o.exports=w.p+"img/weitiao.f217d1d9.svg"}}]);

+ 1 - 1
public/js/16.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{405:function(o,n,p){o.exports=p.p+"img/zoom_n.33ea3c1f.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{335:function(o,n,p){o.exports=p.p+"img/zoom_n.33ea3c1f.svg"}}]);

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/17.js


Разлика између датотеке није приказан због своје велике величине
+ 3 - 3
public/js/18.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/3.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/4.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/5.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/6.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
public/js/7.js


+ 1 - 1
public/js/8.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{397:function(n,o,p){n.exports=p.p+"img/a-connect-dis.27190505.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[8],{327:function(n,o,p){n.exports=p.p+"img/a-connect-dis.27190505.svg"}}]);

+ 1 - 1
public/js/9.js

@@ -1 +1 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{398:function(n,o,p){n.exports=p.p+"img/a-connect.6b6a01e1.svg"}}]);
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[9],{328:function(n,o,p){n.exports=p.p+"img/a-connect.6b6a01e1.svg"}}]);

Разлика између датотеке није приказан због своје велике величине
+ 19 - 19
public/js/chunk-vendors.js


Разлика између датотеке није приказан због своје велике величине
+ 9 - 1
public/js/smart.js


Разлика између датотеке није приказан због своје велике величине
+ 4 - 1
public/smart-laser.html


+ 1 - 1
public/smart-sviewer.html

@@ -6,7 +6,7 @@
         <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
         <link rel="icon" type="image/svg+xml" href="//4dkk.4dage.com/FDKKIMG/icon/kankan_icon.ico" />
         <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/ext/iconfont/iconfont.css" />
-        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_qnz6eozqyvk.css" />
+        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_j4ly3fuf3y.css" />
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/mobile-detect.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/base64.min.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/lib/three.js/build/three.min.js"></script>

+ 1 - 1
public/smart-viewer.html

@@ -6,7 +6,7 @@
         <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
         <link rel="icon" type="image/svg+xml" href="//4dkk.4dage.com/FDKKIMG/icon/kankan_icon.ico" />
         <link rel="stylesheet" href="<%= VUE_APP_STATIC_DIR %>/ext/iconfont/iconfont.css" />
-        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_qnz6eozqyvk.css" />
+        <link rel="stylesheet" href="//at.alicdn.com/t/c/font_3693743_j4ly3fuf3y.css" />
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/mobile-detect.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/ext/base64.min.js"></script>
         <script src="<%= VUE_APP_STATIC_DIR %>/lib/three.js/build/three.min.js"></script>

BIN
public/static/lib/potree/resources/models/glb/87b3a367bc3e4273832cb4fa398782e5.glb


BIN
public/static/lib/potree/resources/models/glb/87ecd10fb0374ea6b3e0bf24c6459e3c.glb


BIN
public/static/lib/potree/resources/models/glb/ModernJPHouseSofa44105209.glb


BIN
public/static/lib/potree/resources/models/glb/ModernJPHouseSofa44216499.glb


BIN
public/static/lib/potree/resources/models/glb/coffeemat.glb


BIN
public/static/lib/potree/resources/textures/marker.png


BIN
public/static/lib/potree/resources/textures/rtk-f-n.png


BIN
public/static/lib/potree/resources/textures/rtk-f-s.png


BIN
public/static/lib/potree/resources/textures/rtk-y-n.png


BIN
public/static/lib/potree/resources/textures/rtk-y-s.png


Разлика између датотеке није приказан због своје велике величине
+ 1 - 319
public/static/lib/potree/workers/2.0/DecoderWorker.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 2501
public/static/lib/potree/workers/2.0/DecoderWorker_brotli.js


Разлика између датотеке није приказан због своје велике величине
+ 1 - 460
public/static/lib/potree/workers/BinaryDecoderWorker.js


+ 0 - 213
public/static/lib/potree/workers/EptBinaryDecoderWorker.js

@@ -1,213 +0,0 @@
-function parseEpt(event) {
-	let buffer = event.data.buffer;
-	let view = new DataView(buffer);
-	let schema = event.data.schema;
-	let scale = event.data.scale;
-	let offset = event.data.offset;
-	let mins = event.data.mins;
-
-	let dimensions = schema.reduce((p, c) => {
-		p[c.name] = c;
-		return p;
-	}, { });
-
-	let dimOffset = (name) => {
-		let offset = 0;
-		for (var i = 0; i < schema.length; ++i) {
-			if (schema[i].name == name) return offset;
-			offset += schema[i].size;
-		}
-		return undefined;
-	};
-
-	let getExtractor = (name) => {
-		let offset = dimOffset(name);
-		let type = dimensions[name].type;
-		let size = dimensions[name].size;
-
-		if (type == 'signed') switch (size) {
-			case 1: return (p) => view.getInt8(p + offset);
-			case 2: return (p) => view.getInt16(p + offset, true);
-			case 4: return (p) => view.getInt32(p + offset, true);
-			case 8: return (p) => view.getInt64(p + offset, true);
-		}
-		if (type == 'unsigned') switch (size) {
-			case 1: return (p) => view.getUint8(p + offset);
-			case 2: return (p) => view.getUint16(p + offset, true);
-			case 4: return (p) => view.getUint32(p + offset, true);
-			case 8: return (p) => view.getUint64(p + offset, true);
-		}
-		if (type == 'float') switch (size) {
-			case 4: return (p) => view.getFloat32(p + offset, true);
-			case 8: return (p) => view.getFloat64(p + offset, true);
-		}
-
-		let str = JSON.stringify(dimensions[name]);
-		throw new Error(`Invalid dimension specification for ${name}: ${str}`);
-	};
-
-	let pointSize = schema.reduce((p, c) => p + c.size, 0);
-	let numPoints = buffer.byteLength / pointSize;
-
-	let xyzBuffer, rgbBuffer, intensityBuffer, classificationBuffer,
-		returnNumberBuffer, numberOfReturnsBuffer, pointSourceIdBuffer;
-	let xyz, rgb, intensity, classification, returnNumber, numberOfReturns,
-		pointSourceId;
-	let xyzExtractor, rgbExtractor, intensityExtractor, classificationExtractor,
-		returnNumberExtractor, numberOfReturnsExtractor, pointSourceIdExtractor;
-	let twoByteColor = false;
-
-	if (dimensions['X'] && dimensions['Y'] && dimensions['Z']) {
-		xyzBuffer = new ArrayBuffer(numPoints * 4 * 3);
-		xyz = new Float32Array(xyzBuffer);
-		xyzExtractor = [
-			getExtractor('X'),
-			getExtractor('Y'),
-			getExtractor('Z')
-		];
-	}
-
-	if (dimensions['Red'] && dimensions['Green'] && dimensions['Blue']) {
-		rgbBuffer = new ArrayBuffer(numPoints * 4);
-		rgb = new Uint8Array(rgbBuffer);
-		rgbExtractor = [
-			getExtractor('Red'),
-			getExtractor('Green'),
-			getExtractor('Blue')
-		];
-
-		let r, g, b, pos;
-		for (let i = 0; i < numPoints && !twoByteColor; ++i) {
-			pos = i * pointSize;
-			r = rgbExtractor[0](pos);
-			g = rgbExtractor[1](pos);
-			b = rgbExtractor[2](pos);
-			if (r > 255 || g > 255 || b > 255) twoByteColor = true;
-		}
-	}
-
-	if (dimensions['Intensity']) {
-		intensityBuffer = new ArrayBuffer(numPoints * 4);
-		intensity = new Float32Array(intensityBuffer);
-		intensityExtractor = getExtractor('Intensity');
-	}
-
-	if (dimensions['Classification']) {
-		classificationBuffer = new ArrayBuffer(numPoints);
-		classification = new Uint8Array(classificationBuffer);
-		classificationExtractor = getExtractor('Classification');
-	}
-
-	if (dimensions['ReturnNumber']) {
-		returnNumberBuffer = new ArrayBuffer(numPoints);
-		returnNumber = new Uint8Array(returnNumberBuffer);
-		returnNumberExtractor = getExtractor('ReturnNumber');
-	}
-
-	if (dimensions['NumberOfReturns']) {
-		numberOfReturnsBuffer = new ArrayBuffer(numPoints);
-		numberOfReturns = new Uint8Array(numberOfReturnsBuffer);
-		numberOfReturnsExtractor = getExtractor('NumberOfReturns');
-	}
-
-	if (dimensions['PointSourceId']) {
-		pointSourceIdBuffer = new ArrayBuffer(numPoints * 2);
-		pointSourceId = new Uint16Array(pointSourceIdBuffer);
-		pointSourceIdExtractor = getExtractor('PointSourceId');
-	}
-
-	let mean = [0, 0, 0];
-	let bounds = {
-		min: [Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE],
-		max: [-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE],
-	};
-
-	let x, y, z, r, g, b;
-	for (let i = 0; i < numPoints; ++i) {
-		let pos = i * pointSize;
-		if (xyz) {
-			x = xyzExtractor[0](pos) * scale.x + offset.x - mins[0];
-			y = xyzExtractor[1](pos) * scale.y + offset.y - mins[1];
-			z = xyzExtractor[2](pos) * scale.z + offset.z - mins[2];
-
-			mean[0] += x / numPoints;
-			mean[1] += y / numPoints;
-			mean[2] += z / numPoints;
-
-			bounds.min[0] = Math.min(bounds.min[0], x);
-			bounds.min[1] = Math.min(bounds.min[1], y);
-			bounds.min[2] = Math.min(bounds.min[2], z);
-
-			bounds.max[0] = Math.max(bounds.max[0], x);
-			bounds.max[1] = Math.max(bounds.max[1], y);
-			bounds.max[2] = Math.max(bounds.max[2], z);
-
-			xyz[3 * i + 0] = x;
-			xyz[3 * i + 1] = y;
-			xyz[3 * i + 2] = z;
-		}
-
-		if (rgb) {
-			r = rgbExtractor[0](pos);
-			g = rgbExtractor[1](pos);
-			b = rgbExtractor[2](pos);
-
-			if (twoByteColor) {
-				r /= 256;
-				g /= 256;
-				b /= 256;
-			}
-
-			rgb[4 * i + 0] = r;
-			rgb[4 * i + 1] = g;
-			rgb[4 * i + 2] = b;
-		}
-
-		if (intensity) intensity[i] = intensityExtractor(pos);
-		if (classification) classification[i] = classificationExtractor(pos);
-		if (returnNumber) returnNumber[i] = returnNumberExtractor(pos);
-		if (numberOfReturns) numberOfReturns[i] = numberOfReturnsExtractor(pos);
-		if (pointSourceId) pointSourceId[i] = pointSourceIdExtractor(pos);
-	}
-
-	let indicesBuffer = new ArrayBuffer(numPoints * 4);
-	let indices = new Uint32Array(indicesBuffer);
-	for (let i = 0; i < numPoints; ++i) {
-		indices[i] = i;
-	}
-
-	let message = {
-		numPoints: numPoints,
-		tightBoundingBox: bounds,
-		mean: mean,
-
-		position: xyzBuffer,
-		color: rgbBuffer,
-		intensity: intensityBuffer,
-		classification: classificationBuffer,
-		returnNumber: returnNumberBuffer,
-		numberOfReturns: numberOfReturnsBuffer,
-		pointSourceId: pointSourceIdBuffer,
-		indices: indicesBuffer
-	};
-
-	let transferables = [
-		message.position,
-		message.color,
-		message.intensity,
-		message.classification,
-		message.returnNumber,
-		message.numberOfReturns,
-		message.pointSourceId,
-		message.indices
-	].filter((v) => v);
-
-	postMessage(message, transferables);
-}
-
-
-// importScripts('/libs/ept/ParseBuffer.js');
-onmessage = function(event) {
-	parseEpt(event);
-}
-

+ 0 - 200
public/static/lib/potree/workers/EptLaszipDecoderWorker.js

@@ -1,200 +0,0 @@
-function readUsingDataView(event) {
-	performance.mark("laslaz-start");
-
-	let buffer = event.data.buffer;
-	let numPoints = event.data.numPoints;
-	let pointSize = event.data.pointSize;
-	let pointFormat = event.data.pointFormatID;
-
-	// gps time byte offsets from LAS specification
-	let gpsOffsets = [null, 20, null, 20, 20, 20, 22, 22, 22, 22, 22] 
-	let gpsOffset = gpsOffsets[pointFormat];
-
-	let scale = event.data.scale;
-	let offset = event.data.offset;
-
-	let sourceUint8 = new Uint8Array(buffer);
-	let sourceView = new DataView(buffer);
-
-	let tightBoundingBox = {
-		min: [
-			Number.POSITIVE_INFINITY,
-			Number.POSITIVE_INFINITY,
-			Number.POSITIVE_INFINITY
-		],
-		max: [
-			Number.NEGATIVE_INFINITY,
-			Number.NEGATIVE_INFINITY,
-			Number.NEGATIVE_INFINITY
-		]
-	};
-
-	let mean = [0, 0, 0];
-
-	let pBuff = new ArrayBuffer(numPoints * 3 * 4);
-	let cBuff = new ArrayBuffer(numPoints * 4);
-	let iBuff = new ArrayBuffer(numPoints * 4);
-	let clBuff = new ArrayBuffer(numPoints);
-	let rnBuff = new ArrayBuffer(numPoints);
-	let nrBuff = new ArrayBuffer(numPoints);
-	let psBuff = new ArrayBuffer(numPoints * 2);
-	let gpsBuff64 = new ArrayBuffer(numPoints * 8);
-	let gpsBuff32 = new ArrayBuffer(numPoints * 4);
-
-	let positions = new Float32Array(pBuff);
-	let colors = new Uint8Array(cBuff);
-	let intensities = new Float32Array(iBuff);
-	let classifications = new Uint8Array(clBuff);
-	let returnNumbers = new Uint8Array(rnBuff);
-	let numberOfReturns = new Uint8Array(nrBuff);
-	let pointSourceIDs = new Uint16Array(psBuff);
-	let gpsTime64 = new Float64Array(gpsBuff64)
-	let gpsTime32 = new Float32Array(gpsBuff32)
-
-	// Point format 3 contains an 8-byte GpsTime before RGB values, so make
-	// sure we have the correct color offset.
-	let hasColor = pointFormat == 2 || pointFormat == 3;
-	let co = pointFormat == 2 ? 20 : 28;
-
-	// TODO This should be cached per-resource since this is an expensive check.
-	let twoByteColor = false;
-	if (hasColor) {
-		let r, g, b, pos;
-		for (let i = 0; i < numPoints && !twoByteColor; ++i) {
-			pos = i * pointSize;
-			r = sourceView.getUint16(pos + co, true)
-			g = sourceView.getUint16(pos + co + 2, true)
-			b = sourceView.getUint16(pos + co + 4, true)
-			if (r > 255 || g > 255 || b > 255) twoByteColor = true;
-		}
-	}
-
-	for (let i = 0; i < numPoints; i++) {
-		// POSITION
-		let ux = sourceView.getInt32(i * pointSize + 0, true);
-		let uy = sourceView.getInt32(i * pointSize + 4, true);
-		let uz = sourceView.getInt32(i * pointSize + 8, true);
-
-		x = ux * scale[0] + offset[0] - event.data.mins[0];
-		y = uy * scale[1] + offset[1] - event.data.mins[1];
-		z = uz * scale[2] + offset[2] - event.data.mins[2];
-
-		positions[3 * i + 0] = x;
-		positions[3 * i + 1] = y;
-		positions[3 * i + 2] = z;
-
-		mean[0] += x / numPoints;
-		mean[1] += y / numPoints;
-		mean[2] += z / numPoints;
-
-		tightBoundingBox.min[0] = Math.min(tightBoundingBox.min[0], x);
-		tightBoundingBox.min[1] = Math.min(tightBoundingBox.min[1], y);
-		tightBoundingBox.min[2] = Math.min(tightBoundingBox.min[2], z);
-
-		tightBoundingBox.max[0] = Math.max(tightBoundingBox.max[0], x);
-		tightBoundingBox.max[1] = Math.max(tightBoundingBox.max[1], y);
-		tightBoundingBox.max[2] = Math.max(tightBoundingBox.max[2], z);
-
-		// INTENSITY
-		let intensity = sourceView.getUint16(i * pointSize + 12, true);
-		intensities[i] = intensity;
-
-		// RETURN NUMBER, stored in the first 3 bits - 00000111
-		// number of returns stored in next 3 bits	 - 00111000
-		let returnNumberAndNumberOfReturns = sourceView.getUint8(i * pointSize + 14, true);
-		let returnNumber = returnNumberAndNumberOfReturns & 0b0111;
-		let numberOfReturn = (returnNumberAndNumberOfReturns & 0b00111000) >> 3;
-		returnNumbers[i] = returnNumber;
-		numberOfReturns[i] = numberOfReturn;
-
-		// CLASSIFICATION
-		let classification = sourceView.getUint8(i * pointSize + 15, true);
-		classifications[i] = classification;
-
-		// POINT SOURCE ID
-		let pointSourceID = sourceView.getUint16(i * pointSize + 18, true);
-		pointSourceIDs[i] = pointSourceID;
-
-		// COLOR, if available
-		if (hasColor) {
-			let r = sourceView.getUint16(i * pointSize + co, true)
-			let g = sourceView.getUint16(i * pointSize + co + 2, true)
-			let b = sourceView.getUint16(i * pointSize + co + 4, true)
-
-			if (twoByteColor) {
-				r /= 256;
-				g /= 256;
-				b /= 256;
-			}
-
-			colors[4 * i + 0] = r;
-			colors[4 * i + 1] = g;
-			colors[4 * i + 2] = b;
-			colors[4 * i + 3] = 255;
-		}
-	}
-
-	let min = Infinity
-	let max = -Infinity
-
-	for (let i = 0; i < numPoints; i++) {
-		min = Math.min(min, gpsTime64[i])
-		max = Math.max(max, gpsTime64[i])
-	}
-
-	for (let i = 0; i < numPoints; i++) {
-		gpsTime32[i] = gpsTime64[i] = min
-	}
-
-	let indices = new ArrayBuffer(numPoints * 4);
-	let iIndices = new Uint32Array(indices);
-	for (let i = 0; i < numPoints; i++) {
-		iIndices[i] = i;
-	}
-
-	performance.mark("laslaz-end");
-
-	//{ // print timings
-	//	  performance.measure("laslaz", "laslaz-start", "laslaz-end");
-	//	  let measure = performance.getEntriesByType("measure")[0];
-	//	  let dpp = 1000 * measure.duration / numPoints;
-	//	  let debugMessage = `${measure.duration.toFixed(3)} ms, ${numPoints} points, ${dpp.toFixed(3)} µs / point`;
-	//	  console.log(debugMessage);
-	//}
-	performance.clearMarks();
-	performance.clearMeasures();
-
-	let message = {
-		mean: mean,
-		position: pBuff,
-		color: cBuff,
-		intensity: iBuff,
-		classification: clBuff,
-		returnNumber: rnBuff,
-		numberOfReturns: nrBuff,
-		pointSourceID: psBuff,
-		tightBoundingBox: tightBoundingBox,
-		indices: indices,
-		gpsTime: gpsBuff32,
-		gpsMeta: { offset: min, range: max-min }
-	};
-
-	let transferables = [
-		message.position,
-		message.color,
-		message.intensity,
-		message.classification,
-		message.returnNumber,
-		message.numberOfReturns,
-		message.pointSourceID,
-		message.indices,
-		message.gpsTime
-	];
-
-	postMessage(message, transferables);
-};
-
-
-
-onmessage = readUsingDataView;
-

Разлика између датотеке није приказан због своје велике величине
+ 0 - 22376
public/static/lib/potree/workers/EptZstandardDecoderWorker.js


+ 0 - 344
public/static/lib/potree/workers/LASDecoderWorker.js

@@ -1,344 +0,0 @@
-
-function readUsingTempArrays(event) {
-
-	performance.mark("laslaz-start");
-
-	let buffer = event.data.buffer;
-	let numPoints = event.data.numPoints;
-	let sourcePointSize = event.data.pointSize;
-	let pointFormatID = event.data.pointFormatID;
-	let scale = event.data.scale;
-	let offset = event.data.offset;
-
-	let temp = new ArrayBuffer(4);
-	let tempUint8 = new Uint8Array(temp);
-	let tempUint16 = new Uint16Array(temp);
-	let tempInt32 = new Int32Array(temp);
-	let sourceUint8 = new Uint8Array(buffer);
-
-	let tightBoundingBox = {
-		min: [ Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY ],
-		max: [ Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY ]
-	};
-
-	let mean = [0, 0, 0];
-
-	let pBuff = new ArrayBuffer(numPoints * 3 * 4);
-	let cBuff = new ArrayBuffer(numPoints * 4);
-	let iBuff = new ArrayBuffer(numPoints * 4);
-	let clBuff = new ArrayBuffer(numPoints);
-	let rnBuff = new ArrayBuffer(numPoints);
-	let nrBuff = new ArrayBuffer(numPoints);
-	let psBuff = new ArrayBuffer(numPoints * 2);
-
-	let positions = new Float32Array(pBuff);
-	let colors = new Uint8Array(cBuff);
-	let intensities = new Float32Array(iBuff);
-	let classifications = new Uint8Array(clBuff);
-	let returnNumbers = new Uint8Array(rnBuff);
-	let numberOfReturns = new Uint8Array(nrBuff);
-	let pointSourceIDs = new Uint16Array(psBuff);
-
-	for (let i = 0; i < numPoints; i++) {
-		// POSITION
-		tempUint8[0] = sourceUint8[i * sourcePointSize + 0];
-		tempUint8[1] = sourceUint8[i * sourcePointSize + 1];
-		tempUint8[2] = sourceUint8[i * sourcePointSize + 2];
-		tempUint8[3] = sourceUint8[i * sourcePointSize + 3];
-		let x = tempInt32[0];
-
-		tempUint8[0] = sourceUint8[i * sourcePointSize + 4];
-		tempUint8[1] = sourceUint8[i * sourcePointSize + 5];
-		tempUint8[2] = sourceUint8[i * sourcePointSize + 6];
-		tempUint8[3] = sourceUint8[i * sourcePointSize + 7];
-		let y = tempInt32[0];
-
-		tempUint8[0] = sourceUint8[i * sourcePointSize + 8];
-		tempUint8[1] = sourceUint8[i * sourcePointSize + 9];
-		tempUint8[2] = sourceUint8[i * sourcePointSize + 10];
-		tempUint8[3] = sourceUint8[i * sourcePointSize + 11];
-		let z = tempInt32[0];
-
-		x = x * scale[0] + offset[0] - event.data.mins[0];
-		y = y * scale[1] + offset[1] - event.data.mins[1];
-		z = z * scale[2] + offset[2] - event.data.mins[2];
-
-		positions[3 * i + 0] = x;
-		positions[3 * i + 1] = y;
-		positions[3 * i + 2] = z;
-
-		mean[0] += x / numPoints;
-		mean[1] += y / numPoints;
-		mean[2] += z / numPoints;
-
-		tightBoundingBox.min[0] = Math.min(tightBoundingBox.min[0], x);
-		tightBoundingBox.min[1] = Math.min(tightBoundingBox.min[1], y);
-		tightBoundingBox.min[2] = Math.min(tightBoundingBox.min[2], z);
-
-		tightBoundingBox.max[0] = Math.max(tightBoundingBox.max[0], x);
-		tightBoundingBox.max[1] = Math.max(tightBoundingBox.max[1], y);
-		tightBoundingBox.max[2] = Math.max(tightBoundingBox.max[2], z);
-
-		// INTENSITY
-		tempUint8[0] = sourceUint8[i * sourcePointSize + 12];
-		tempUint8[1] = sourceUint8[i * sourcePointSize + 13];
-		let intensity = tempUint16[0];
-		intensities[i] = intensity;
-
-		// RETURN NUMBER, stored in the first 3 bits - 00000111
-		let returnNumber = sourceUint8[i * sourcePointSize + 14] & 0b111;
-		returnNumbers[i] = returnNumber;
-
-		// NUMBER OF RETURNS, stored in 00111000
-		numberOfReturns[i] = (sourceUint8[i * pointSize + 14] & 0b111000) >> 3;
-
-		debugger;
-
-		// CLASSIFICATION
-		let classification = sourceUint8[i * sourcePointSize + 15];
-		classifications[i] = classification;
-
-		// POINT SOURCE ID
-		tempUint8[0] = sourceUint8[i * sourcePointSize + 18];
-		tempUint8[1] = sourceUint8[i * sourcePointSize + 19];
-		let pointSourceID = tempUint16[0];
-		pointSourceIDs[i] = pointSourceID;
-
-		// COLOR, if available
-		if (pointFormatID === 2) {
-			tempUint8[0] = sourceUint8[i * sourcePointSize + 20];
-			tempUint8[1] = sourceUint8[i * sourcePointSize + 21];
-			let r = tempUint16[0];
-
-			tempUint8[0] = sourceUint8[i * sourcePointSize + 22];
-			tempUint8[1] = sourceUint8[i * sourcePointSize + 23];
-			let g = tempUint16[0];
-
-			tempUint8[0] = sourceUint8[i * sourcePointSize + 24];
-			tempUint8[1] = sourceUint8[i * sourcePointSize + 25];
-			let b = tempUint16[0];
-
-			r = r / 256;
-			g = g / 256;
-			b = b / 256;
-			colors[4 * i + 0] = r;
-			colors[4 * i + 1] = g;
-			colors[4 * i + 2] = b;
-
-		}
-	}
-
-	let indices = new ArrayBuffer(numPoints * 4);
-	let iIndices = new Uint32Array(indices);
-	for (let i = 0; i < numPoints; i++) {
-		iIndices[i] = i;
-	}
-
-	performance.mark("laslaz-end");
-	performance.measure("laslaz", "laslaz-start", "laslaz-end");
-
-	let measure = performance.getEntriesByType("measure")[0];
-	let dpp = 1000 * measure.duration / numPoints;
-	let debugMessage = `${measure.duration.toFixed(3)} ms, ${numPoints} points, ${dpp.toFixed(3)} micros / point`;
-	console.log(debugMessage);
-
-	performance.clearMarks();
-	performance.clearMeasures();
-
-	let message = {
-		mean: mean,
-		position: pBuff,
-		color: cBuff,
-		intensity: iBuff,
-		classification: clBuff,
-		returnNumber: rnBuff,
-		numberOfReturns: nrBuff,
-		pointSourceID: psBuff,
-		tightBoundingBox: tightBoundingBox,
-		indices: indices
-	};
-
-	let transferables = [
-		message.position,
-		message.color,
-		message.intensity,
-		message.classification,
-		message.returnNumber,
-		message.numberOfReturns,
-		message.pointSourceID,
-		message.indices];
-
-	debugger;
-
-	postMessage(message, transferables);
-};
-
-
-function readUsingDataView(event) {
-
-	performance.mark("laslaz-start");
-
-	let buffer = event.data.buffer;
-	let numPoints = event.data.numPoints;
-	let sourcePointSize = event.data.pointSize;
-	let pointFormatID = event.data.pointFormatID;
-	let scale = event.data.scale;
-	let offset = event.data.offset;
-
-	let sourceView = new DataView(buffer);
-
-	let tightBoundingBox = {
-		min: [Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE],
-		max: [-Number.MAX_VALUE, -Number.MAX_VALUE, -Number.MAX_VALUE]
-	};
-
-	let mean = [0, 0, 0];
-
-	let pBuff = new ArrayBuffer(numPoints * 3 * 4);
-	let cBuff = new ArrayBuffer(numPoints * 4);
-	let iBuff = new ArrayBuffer(numPoints * 4);
-	let clBuff = new ArrayBuffer(numPoints);
-	let rnBuff = new ArrayBuffer(numPoints);
-	let nrBuff = new ArrayBuffer(numPoints);
-	let psBuff = new ArrayBuffer(numPoints * 2);
-
-	let positions = new Float32Array(pBuff);
-	let colors = new Uint8Array(cBuff);
-	let intensities = new Float32Array(iBuff);
-	let classifications = new Uint8Array(clBuff);
-	let returnNumbers = new Uint8Array(rnBuff);
-	let numberOfReturns = new Uint8Array(nrBuff);
-	let pointSourceIDs = new Uint16Array(psBuff);
-	
-	const rangeIntensity = [Infinity, -Infinity];
-	const rangeClassification = [Infinity, -Infinity];
-	const rangeReturnNumber = [Infinity, -Infinity];
-	const rangeNumberOfReturns = [Infinity, -Infinity];
-	const rangeSourceID = [Infinity, -Infinity];
-
-	for (let i = 0; i < numPoints; i++) {
-		// POSITION
-		let ux = sourceView.getInt32(i * sourcePointSize + 0, true);
-		let uy = sourceView.getInt32(i * sourcePointSize + 4, true);
-		let uz = sourceView.getInt32(i * sourcePointSize + 8, true);
-
-		x = ux * scale[0] + offset[0] - event.data.mins[0];
-		y = uy * scale[1] + offset[1] - event.data.mins[1];
-		z = uz * scale[2] + offset[2] - event.data.mins[2];
-
-		positions[3 * i + 0] = x;
-		positions[3 * i + 1] = y;
-		positions[3 * i + 2] = z;
-
-		mean[0] += x / numPoints;
-		mean[1] += y / numPoints;
-		mean[2] += z / numPoints;
-
-		tightBoundingBox.min[0] = Math.min(tightBoundingBox.min[0], x);
-		tightBoundingBox.min[1] = Math.min(tightBoundingBox.min[1], y);
-		tightBoundingBox.min[2] = Math.min(tightBoundingBox.min[2], z);
-
-		tightBoundingBox.max[0] = Math.max(tightBoundingBox.max[0], x);
-		tightBoundingBox.max[1] = Math.max(tightBoundingBox.max[1], y);
-		tightBoundingBox.max[2] = Math.max(tightBoundingBox.max[2], z);
-
-		// INTENSITY
-		let intensity = sourceView.getUint16(i * sourcePointSize + 12, true);
-		intensities[i] = intensity;
-		rangeIntensity[0] = Math.min(rangeIntensity[0], intensity);
-		rangeIntensity[1] = Math.max(rangeIntensity[1], intensity);
-
-		// RETURN NUMBER, stored in the first 3 bits - 00000111
-		// number of returns stored in next 3 bits   - 00111000
-		let returnNumberAndNumberOfReturns = sourceView.getUint8(i * sourcePointSize + 14, true);
-		let returnNumber = returnNumberAndNumberOfReturns & 0b0111;
-		let numberOfReturn = (returnNumberAndNumberOfReturns & 0b00111000) >> 3;
-		returnNumbers[i] = returnNumber;
-		numberOfReturns[i] = numberOfReturn;
-		rangeReturnNumber[0] = Math.min(rangeReturnNumber[0], returnNumber);
-		rangeReturnNumber[1] = Math.max(rangeReturnNumber[1], returnNumber);
-		rangeNumberOfReturns[0] = Math.min(rangeNumberOfReturns[0], numberOfReturn);
-		rangeNumberOfReturns[1] = Math.max(rangeNumberOfReturns[1], numberOfReturn);
-
-		// CLASSIFICATION
-		let classification = sourceView.getUint8(i * sourcePointSize + 15, true);
-		classifications[i] = classification;
-		rangeClassification[0] = Math.min(rangeClassification[0], classification);
-		rangeClassification[1] = Math.max(rangeClassification[1], classification);
-
-		// POINT SOURCE ID
-		let pointSourceID = sourceView.getUint16(i * sourcePointSize + 18, true);
-		pointSourceIDs[i] = pointSourceID;
-		rangeSourceID[0] = Math.min(rangeSourceID[0], pointSourceID);
-		rangeSourceID[1] = Math.max(rangeSourceID[1], pointSourceID);
-
-		// COLOR, if available
-		if (pointFormatID === 2) {
-			let r = sourceView.getUint16(i * sourcePointSize + 20, true) / 256;
-			let g = sourceView.getUint16(i * sourcePointSize + 22, true) / 256;
-			let b = sourceView.getUint16(i * sourcePointSize + 24, true) / 256;
-
-			colors[4 * i + 0] = r;
-			colors[4 * i + 1] = g;
-			colors[4 * i + 2] = b;
-			colors[4 * i + 3] = 255;
-		}
-	}
-
-	let indices = new ArrayBuffer(numPoints * 4);
-	let iIndices = new Uint32Array(indices);
-	for (let i = 0; i < numPoints; i++) {
-		iIndices[i] = i;
-	}
-
-	performance.mark("laslaz-end");
-
-	//{ // print timings
-	//	performance.measure("laslaz", "laslaz-start", "laslaz-end");
-	//	let measure = performance.getEntriesByType("measure")[0];
-	//	let dpp = 1000 * measure.duration / numPoints;
-	//	let debugMessage = `${measure.duration.toFixed(3)} ms, ${numPoints} points, ${dpp.toFixed(3)} µs / point`;
-	//	console.log(debugMessage);
-	//}
-	performance.clearMarks();
-	performance.clearMeasures();
-
-	const ranges = {
-		"intensity": rangeIntensity,
-		"classification": rangeClassification,
-		"return number": rangeReturnNumber,
-		"number of returns": rangeNumberOfReturns,
-		"source id": rangeSourceID,
-	};
-
-	let message = {
-		mean: mean,
-		position: pBuff,
-		color: cBuff,
-		intensity: iBuff,
-		classification: clBuff,
-		returnNumber: rnBuff,
-		numberOfReturns: nrBuff,
-		pointSourceID: psBuff,
-		tightBoundingBox: tightBoundingBox,
-		indices: indices,
-		ranges: ranges,
-	};
-
-	let transferables = [
-		message.position,
-		message.color,
-		message.intensity,
-		message.classification,
-		message.returnNumber,
-		message.numberOfReturns,
-		message.pointSourceID,
-		message.indices];
-
-	postMessage(message, transferables);
-};
-
-
-
-onmessage = readUsingDataView;
-//onmessage = readUsingTempArrays;

Разлика између датотеке није приказан због своје велике величине
+ 0 - 49756
public/static/lib/potree/workers/LASLAZWorker.js


+ 0 - 0
public/这里相当于localhost根目录.txt


+ 1 - 1
src/assets/scss/components/_message.scss

@@ -1,7 +1,7 @@
 .ui-message {
   position: absolute;
   left: 50%;
-  top: 70px;
+  top: 110px;
   height: 40px;
   padding: 0 20px;
   background: rgba(20,20,20,0.7);

+ 1 - 1
src/components/calendar/mobile.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="calendar" v-show="!showCalendar">
         <span class="prev" @click="emits('prev')"><i class="iconfont icon-arrows_left"></i></span>
-        <span class="cale" @click="onPickDate()">{{ date }}<i class="iconfont icon-date"></i></span>
+        <span class="cale" @click="onPickDate()">{{ date }}<i style="display: none;" class="iconfont icon-date"></i></span>
         <span class="next" @click="emits('next')"><i class="iconfont icon-arrows_right"></i></span>
     </div>
     <div class="calendar-list" v-if="showCalendar" @click="showCalendar = false">

+ 10 - 2
src/components/header/index.vue

@@ -82,17 +82,25 @@ const getCurPosInfo = () => {
 }
 
 const onSetP1 = () => {
+    let p1 = getCurPosInfo()
+    if(points.value.p2 && points.value.p2.id == p1.id){
+        return  showTips.value = '匹配失败,请选择不同点位进行同步'
+    }
     if (points.value.p1) {
         showTips.value = '关联位置已更新'
     }
-    points.value.p1 = getCurPosInfo()
+    points.value.p1 = p1
     emits('update', 'p1', points.value.p1)
 }
 const onSetP2 = () => {
+    let p2 = getCurPosInfo()
+    if(points.value.p1 && points.value.p1.id == p2.id){
+        return  showTips.value = '匹配失败,请选择不同点位进行同步'
+    }
     if (points.value.p2) {
         showTips.value = '关联位置已更新'
     }
-    points.value.p2 = getCurPosInfo()
+    points.value.p2 = p2
     emits('update', 'p2', points.value.p2)
 }
 

+ 129 - 59
src/pages/SViewer.vue

@@ -9,7 +9,7 @@
                 <span v-show="showBimTips">BIM</span>
             </div>
         </div>
-        <div class="tools"  v-if="source" v-show="!bimChecked">
+        <div class="tools" v-if="source" v-show="!bimChecked">
             <div class="item-date">
                 <Calendar :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @prev="onPrevDate" @next="onNextDate" />
             </div>
@@ -17,6 +17,17 @@
                 <div class="iconfont icon-show_roaming" :class="{ active: mode == 0 }" @click="onModeChange(0)"></div>
                 <div class="iconfont icon-show_plane" :class="{ active: mode == 1 }" @click="onModeChange(1)"></div>
             </div>
+            <div class="item-density" v-if="source.type == 2 && mode == 1" @click="showDensity = true">
+                <span>{{ densityType.text }}</span>
+                <div @click.stop="(showDensity = false)" v-if="showDensity">
+                    <ul>
+                        <li class="title">密度选择</li>
+                        <li v-for="density in densityTypes" @click="onDensityChange(density)">
+                            {{ density.text }}<i class="iconfont" :class="{ 'icon-check': density.type == densityType.type }"></i>
+                        </li>
+                    </ul>
+                </div>
+            </div>
         </div>
     </main>
     <Toast v-if="showTips" type="warn" :content="showTips" :close="() => (showTips = null)" />
@@ -28,7 +39,7 @@ import { http } from '@/utils/request'
 import Toast from '@/components/dialog/Toast'
 import browser from '@/utils/browser'
 import Calendar from '@/components/calendar/mobile.vue'
-import sync, {laserChangeMode, loadSourceScene, loadTargetScene , setPanoWithBim} from '@/utils/sync'
+import sync, { laserChangeMode, loadSourceScene, loadTargetScene, setPanoWithBim } from '@/utils/sync'
 const isDev = process.env.VUE_APP_TEST == 1
 // 点位信息
 let lastFakeApp = null
@@ -38,6 +49,7 @@ let panoData
 const showBim = ref(browser.urlHasValue('bim'))
 const showBimTips = ref(false)
 const showTips = ref(null)
+const showDensity = ref(false)
 const bimChecked = ref(null)
 const sourceFrame = ref(null)
 const mode = ref(0)
@@ -45,6 +57,13 @@ const source = ref(null)
 const target = ref(null)
 const project = ref(null)
 
+const densityTypes = ref([
+    { type: 'high', text: '高' },
+    { type: 'middle', text: '中' },
+    { type: 'low', text: '低' },
+])
+
+const densityType = ref(densityTypes.value[0])
 
 const scenes = computed(() => {
     if (!project.value) {
@@ -59,75 +78,63 @@ const scenes = computed(() => {
     })
 })
 const sourceURL = computed(() => {
-      
-    if(lastFakeApp && sourceFrame.value.contentWindow.fakeApp/* && sourceFrame.value && ( sourceFrame.value.contentWindow.app || sourceFrame.value.contentWindow.viewer)*/){//fakeApp代表已经初始化完毕
-         
-        sync.views.fakeAppUpdateInfo(sourceFrame.value.contentWindow)  
+    if (lastFakeApp && sourceFrame.value.contentWindow.fakeApp /* && sourceFrame.value && ( sourceFrame.value.contentWindow.app || sourceFrame.value.contentWindow.viewer)*/) {
+        //fakeApp代表已经初始化完毕
+
+        sync.views.fakeAppUpdateInfo(sourceFrame.value.contentWindow)
     }
-    if(bimChecked.value){
+    if (bimChecked.value) {
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
     }
-    if(!source.value){
+    if (!source.value) {
         return
     }
-    if(source.value.type < 2) {
+    if (source.value.type < 2) {
         return `smart-kankan.html?m=${source.value.num}`
     } else {
-        return `smart-laser.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     }
 })
 
-const onLoadSource = () => { 
-    let win = sourceFrame.value.contentWindow 
-        window.app = win
-        
-    let loaded = ()=>{
+const onLoadSource = () => {
+    let win = sourceFrame.value.contentWindow
+    window.app = win
+
+    let loaded = () => {
         if (lastFakeApp) {
-            if(bimChecked.value || lastFakeApp.sceneType == 'bim'){//->bim   也可能是bim和bim转,当快速点击按钮,其他类型的没加载好就跳回bim 
-                sync.views.bindFakeWithBim(lastFakeApp, win, panoData) 
-            }else{
-                sync.views.bindWithSameFakeType(lastFakeApp,win) 
+            if (bimChecked.value || lastFakeApp.sceneType == 'bim') {
+                //->bim   也可能是bim和bim转,当快速点击按钮,其他类型的没加载好就跳回bim
+                sync.views.bindFakeWithBim(lastFakeApp, win, panoData)
+            } else {
+                sync.views.bindWithSameFakeType(lastFakeApp, win)
             }
-            
-              
         }
-        if(project.value.sceneList.length) {
-            lastFakeApp = sync.views.createFakeApp(sourceFrame.value.contentWindow);  
+        if (project.value.sceneList.length) {
+            lastFakeApp = sync.views.createFakeApp(sourceFrame.value.contentWindow)
         }
-    } 
+    }
 
- 
-     
-    if(bimChecked.value){//bim
+    if (bimChecked.value) {
+        //bim
         win.sceneType = 'bim'
-        win.loaded.then(sdk => { 
-            loaded() 
-        }) 
-    }else if (source.value.type < 2) { 
+        win.loaded.then(sdk => {
+            loaded()
+        })
+    } else if (source.value.type < 2) {
         win.sceneType = 'kankan'
-        let sdk = win.app 
+        let sdk = win.app
         sdk.Scene.on('loaded', () => {
-            loaded() 
-        })  
-    }else{ 
-        win.sceneType = 'laser' 
-        win.loaded.then(sdk => { 
+            loaded()
+        })
+    } else {
+        win.sceneType = 'laser'
+        win.loaded.then(sdk => {
             sync.views.laserInit(win, mode.value)
-            loaded();
-            
-            
-         }) 
+            loaded()
+        })
     }
-     
-     
 }
 
-
-
-
-
-
-
 const sourceDate = computed(() => {
     if (source.value) {
         return source.value.createTime.toDate()
@@ -157,8 +164,6 @@ const sourceDays = computed(() => {
     return outDays
 })
 
-
-
 const onModeChange = targetMode => {
     if (sourceFrame.value && sourceFrame.value.contentWindow.loaded) {
         sourceFrame.value.contentWindow.loaded.then(sdk => sdk.scene.changeMode(targetMode))
@@ -167,6 +172,18 @@ const onModeChange = targetMode => {
     }
 }
 
+const onDensityChange = density => {
+    if (sourceFrame.value && sourceFrame.value.contentWindow.loaded) {
+        sourceFrame.value &&
+            sourceFrame.value.contentWindow.loaded.then(sdk => {
+                let data = sdk.scene.changePointDensity(density.type)
+                sdk.scene.changeDensityPercent(data.percent)
+            })
+        densityType.value = density
+    }
+    showDensity.value = false
+}
+
 const onSelected = data => {
     if (!data.payload) {
         return
@@ -237,19 +254,18 @@ onMounted(() => {
                     if (num) {
                         source.value = project.value.sceneList.find(c => c.num == num)
                     } else {
-                        source.value = project.value.sceneList[project.value.sceneList.length-1]
+                        source.value = project.value.sceneList[project.value.sceneList.length - 1]
                     }
                     if (!source.value) {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                        return (showTips.value = '当前场景已被删除,无法进行查看')
                     }
                 } else {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                    return (showTips.value = '当前场景已被删除,无法进行查看')
                 }
-                if(response.data.panos){
+                if (response.data.panos) {
                     response.data.panos = JSON.parse(response.data.panos)
-                    panoData = response.data.panos  //convert with bim
+                    panoData = response.data.panos //convert with bim
                 }
-                
             } else {
                 showTips.value = response.message
             }
@@ -291,8 +307,6 @@ main {
             display: flex;
             justify-content: center;
             align-items: center;
-            margin-left: 10px;
-            margin-right: 10px;
             font-size: 16px;
             padding: 0 16px;
             div {
@@ -306,6 +320,62 @@ main {
                 color: #0076f6;
             }
         }
+
+        .item-density {
+            position: relative;
+            cursor: pointer;
+            height: 50px;
+            width: 50px;
+            background: rgba(27, 27, 28, 0.8);
+            box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+            border-radius: 50%;
+            border: 1px solid #000000;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-left: 10px;
+            margin-right: 10px;
+            font-size: 16px;
+            padding: 0 16px;
+            > div {
+                position: fixed;
+                left: 0;
+                right: 0;
+                bottom: 0;
+                height: 100vh;
+                z-index: 1000;
+                background: rgba(0, 0, 0, 0.5);
+                display: flex;
+                align-items: flex-end;
+                justify-content: center;
+            }
+            ul {
+                width: 100%;
+                padding-bottom: 20px;
+                border-radius: 12px;
+                background: rgba(27, 27, 28, 0.8);
+                box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+                border: 1px solid #000000;
+                list-style: none;
+                .title {
+                    justify-content: center;
+                    font-weight: 500;
+                    padding: 20px 0;
+                    border-bottom: solid 1px rgba(255, 255, 255, 0.1);
+                }
+                li {
+                    display: flex;
+                    align-items: center;
+                    justify-content: space-between;
+                    padding: 25px 20px;
+                    font-size: 18px;
+                    i {
+                        color: #0076f6;
+                        font-size: 20px;
+                    }
+                }
+            }
+        }
     }
 
     .model {

+ 148 - 50
src/pages/Viewer.vue

@@ -6,12 +6,29 @@
                 <iframe ref="sourceFrame" v-if="sourceURL" :src="sourceURL" frameborder="0" @load="onLoadSource"></iframe>
                 <div class="tools" v-if="source" v-show="!showAdjust && !fscChecked && (dbsChecked || (!target && !bimChecked))">
                     <div class="item-date">
-                        <calendar name="source" :count="scenes.length" :controls="controls" :value="sourceDate" :highlighted="sourceDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
+                        <calendar
+                            name="source"
+                            :count="scenes.length"
+                            :controls="controls"
+                            :value="sourceDate"
+                            :highlighted="sourceDays"
+                            @selected="onSelected"
+                            @pick="onPickDate"
+                            @prev="onPrevDate"
+                            @next="onNextDate"
+                        ></calendar>
                     </div>
                     <div class="item-mode" v-if="source.type == 2">
                         <div class="iconfont icon-show_roaming" :class="{ active: mode == 0 }" @click="onModeChange(0)"></div>
                         <div class="iconfont icon-show_plane" :class="{ active: mode == 1 }" @click="onModeChange(1)"></div>
                     </div>
+                    <div class="item-density" v-if="(source.type == 2 && mode == 1)" :class="{active:showDensity}" @click="showDensity=!showDensity">
+                        <span>{{densityType.text}}</span>
+                        <i class="iconfont icon-arrows_down"></i>
+                        <ul>
+                            <li v-for="density in densityTypes" @click="onDensityChange(density)">{{density.text}}</li>
+                        </ul>
+                    </div>
                 </div>
                 <div class="points" v-if="showAdjust">
                     <div :class="{ active: points.p1 }" @click="onP1Click('left')">
@@ -28,12 +45,22 @@
                 <iframe ref="targetFrame" :src="targetURL" frameborder="0" @load="onLoadTarget"></iframe>
                 <div class="tools" v-show="!fscChecked && !bimChecked">
                     <div class="item-date target">
-                        <calendar name="target" :count="scenes.length" :controls="controls" :value="targetDate" :highlighted="targetDays" @selected="onSelected" @pick="onPickDate" @prev="onPrevDate" @next="onNextDate"></calendar>
+                        <calendar
+                            name="target"
+                            :count="scenes.length"
+                            :controls="controls"
+                            :value="targetDate"
+                            :highlighted="targetDays"
+                            @selected="onSelected"
+                            @pick="onPickDate"
+                            @prev="onPrevDate"
+                            @next="onNextDate"
+                        ></calendar>
                     </div>
                 </div>
                 <div class="points" v-if="showAdjust">
                     <div :class="{ active: points.p1 }" @click="onP1Click('right')">
-                        <i class="iconfont"  :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
+                        <i class="iconfont" :class="[points.p1 ? 'icon-positioning01' : 'icon-positioning02']"></i>
                         <span>P1</span>
                     </div>
                     <div :class="{ active: points.p2 }" @click="onP2Click('right')">
@@ -43,13 +70,13 @@
                 </div>
             </div>
             <div class="model" v-show="!showAdjust">
-                <div class="bim" :class="{ active: bimChecked, disable: bimDisable }" v-show="!fscChecked  && !showBim">
+                <div class="bim" :class="{ active: bimChecked, disable: bimDisable }" v-show="!fscChecked && !showBim">
                     <div @click="onBimChecked">
                         <i class="iconfont icon-BIM"></i>
                         <span>BIM</span>
                     </div>
                 </div>
-                <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }"  v-show="!fscChecked && !showBim">
+                <div class="dbs" :class="{ active: dbsChecked, disable: dbsDisable }" v-show="!fscChecked && !showBim">
                     <div @click="onDbsChecked">
                         <i class="iconfont icon-split_screen"></i>
                         <span>分屏</span>
@@ -72,7 +99,7 @@ import browser from '@/utils/browser'
 import Toast from '@/components/dialog/Toast'
 import AppHeader from '@/components/header'
 import Calendar from '@/components/calendar'
-import sync, { laserChangeMode, beforeChangeURL, loadSourceScene, loadTargetScene, setPanoWithBim, flyToP1P2} from '@/utils/sync'
+import sync, { laserChangeMode, beforeChangeURL, loadSourceScene, loadTargetScene, setPanoWithBim, flyToP1P2 } from '@/utils/sync'
 const isDev = process.env.VUE_APP_TEST == 1
 // 是否BIM模式
 const showBim = ref(browser.urlHasValue('bim'))
@@ -95,8 +122,18 @@ const target = ref(null)
 const project = ref(null)
 const points = ref({ p1: null, p2: null })
 
+const densityTypes = ref([
+    {type:'high',text:'高'},
+    {type:'middle',text:'中'},
+    {type:'low',text:'低'}
+])
+
+const densityType = ref(densityTypes.value[0])
+
 const showTips = ref(null)
 
+const showDensity = ref(false)
+
 const scenes = computed(() => {
     if (!project.value) {
         return []
@@ -109,30 +146,29 @@ const scenes = computed(() => {
         }
     })
 })
-const controls = computed(()=>{
-    if(bimChecked.value){
-        return scenes.value.length>1
+const controls = computed(() => {
+    if (bimChecked.value) {
+        return scenes.value.length > 1
     }
-    return dbsChecked.value? scenes.value.length>2: scenes.value.length>1
+    return dbsChecked.value ? scenes.value.length > 2 : scenes.value.length > 1
 })
 const sourceURL = computed(() => {
-
-    beforeChangeURL('source' ) 
+    beforeChangeURL('source')
 
     if (bimChecked.value && !dbsChecked.value) {
         return `smart-bim.html?m=${project.value.bimData.bimOssFilePath}`
     }
-       
-    if(!source.value){
+
+    if (!source.value) {
         return
     }
 
     if (source.value.type < 2) {
         // 看看、看见场景
-        return `smart-kankan.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-kankan.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     } else {
         // 深时场景
-        return `smart-laser.html?m=${source.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${source.value.num}${isDev ? '&dev' : ''}`
     }
 })
 const targetURL = computed(() => {
@@ -142,10 +178,10 @@ const targetURL = computed(() => {
 
     if (source.value.type < 2) {
         // 看看、看见场景
-        return `smart-kankan.html?m=${target.value.num}${isDev?'&dev':''}`
+        return `smart-kankan.html?m=${target.value.num}${isDev ? '&dev' : ''}`
     } else {
         // 深时场景
-        return `smart-laser.html?m=${target.value.num}${isDev?'&dev':''}`
+        return `smart-laser.html?m=${target.value.num}${isDev ? '&dev' : ''}`
     }
 })
 const sourceDate = computed(() => {
@@ -193,17 +229,19 @@ const targetDays = computed(() => {
     }
 })
 
-const bimDisable = computed(()=>{
-    if(!project.value || !project.value.bimData){
+const bimDisable = computed(() => {
+    if (!project.value || !project.value.bimData) {
         return true
     }
 })
 
-const dbsDisable = computed(()=>{
-    if(scenes.value.length == 0){ // 没有场景的情况
+const dbsDisable = computed(() => {
+    if (scenes.value.length == 0) {
+        // 没有场景的情况
         return 1
     }
-    if(!bimChecked.value && scenes.value.length == 1){ // 只有1个场景的情况
+    if (!bimChecked.value && scenes.value.length == 1) {
+        // 只有1个场景的情况
         return 2
     }
 })
@@ -232,6 +270,17 @@ const onModeChange = targetMode => {
         sync.views.laserChangeMode(mode.value)
     }
 }
+
+const onDensityChange = (density)=>{
+    if (sync.sourceInst) {
+        sync.sourceInst.loaded.then(sdk => {
+            let data = sdk.scene.changePointDensity(density.type)
+            sdk.scene.changeDensityPercent(data.percent)
+        })
+        densityType.value = density
+    }
+}
+
 const onPickDate = name => {
     datepickName.value = name
 }
@@ -258,7 +307,7 @@ const onSelected = data => {
                 }
             }
         }
-    } else{
+    } else {
         showTips.value = '选择日期未上传场景'
     }
 
@@ -333,10 +382,12 @@ const onNextDate = name => {
     scene.value = scenes.value[index]
 }
 
+
+
 // bim点击
 const onBimChecked = () => {
     if (bimDisable.value) {
-        return showTips.value = '未发现BIM文件'
+        return (showTips.value = '未发现BIM文件')
     }
     if (bimChecked.value) {
         bimChecked.value = false
@@ -364,14 +415,14 @@ const onBimChecked = () => {
 
 // 分屏点击
 const onDbsChecked = () => {
-    if(dbsDisable.value && !dbsChecked.value){
-        return showTips.value = '未发现对比场景'        
+    if (dbsDisable.value && !dbsChecked.value) {
+        return (showTips.value = '未发现对比场景')
     }
     dbsChecked.value = !dbsChecked.value
     if (dbsChecked.value) {
         if (bimChecked.value) {
             // BIM分屏
-            source.value = scenes.value[scenes.value.length-1]
+            source.value = scenes.value[scenes.value.length - 1]
             target.value = project.value.bimData
         } else {
             // 四维看看、激光场景分屏
@@ -418,29 +469,28 @@ const onFscChecked = () => {
     }
 }
 
-const onPointsUpdate = (type,data) => {
+const onPointsUpdate = (type, data) => {
     points.value[type] = data
 }
 
-const onP1Click = (type) =>{
-    if(!points.value.p1){
+const onP1Click = type => {
+    if (!points.value.p1) {
         showTips.value = '您还未选择关联位置'
         return
     }
     console.log(points.value.p1)
     // todo 定位
-     
+
     flyToP1P2(points.value.p1)
-    
 }
 
-const onP2Click = (type) =>{
-    if(!points.value.p2){
+const onP2Click = type => {
+    if (!points.value.p2) {
         showTips.value = '您还未选择关联位置'
         return
     }
     // todo 定位
-    
+
     flyToP1P2(points.value.p2)
 }
 
@@ -458,31 +508,28 @@ onMounted(() => {
                             points.value.p1 = response.data.panos.p1
                             points.value.p2 = response.data.panos.p2
                             setPanoWithBim(response.data.panos)
-                        
                         } catch (error) {
                             console.error(error)
                         }
- 
                     }
                     project.value = response.data
                     if (showBim.value) {
                         onBimChecked()
-                    }
-                    else if (project.value.sceneList.length) {
+                    } else if (project.value.sceneList.length) {
                         if (num) {
                             source.value = project.value.sceneList.find(c => c.num == num)
                         } else {
-                            source.value = project.value.sceneList[project.value.sceneList.length-1]
+                            source.value = project.value.sceneList[project.value.sceneList.length - 1]
                         }
                         if (!source.value) {
-                           return  showTips.value = '当前场景已被删除,无法进行查看'
+                            return (showTips.value = '当前场景已被删除,无法进行查看')
                         }
                         if (showAdjust.value || showSplit.value) {
                             onBimChecked()
                             nextTick(() => onDbsChecked())
                         }
                     } else {
-                        return  showTips.value = '当前场景已被删除,无法进行查看'
+                        return (showTips.value = '当前场景已被删除,无法进行查看')
                     }
                 }
             } else {
@@ -492,7 +539,6 @@ onMounted(() => {
                 } else {
                     showTips.value = response.message
                 }
-                
             }
         })
         .catch(() => {
@@ -570,7 +616,7 @@ main {
             transform: translateX(-50%);
 
             div {
-                cursor:pointer;
+                cursor: pointer;
                 margin-left: 20px;
                 width: 70px;
                 height: 88px;
@@ -676,6 +722,58 @@ main {
                 color: #0076f6;
             }
         }
+        .item-density {
+            position: relative;
+            cursor: pointer;
+            height: 50px;
+            width: 68px;
+            background: rgba(27, 27, 28, 0.8);
+            box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+            border-radius: 47px 47px 47px 47px;
+            border: 1px solid #000000;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            margin-left: 10px;
+            margin-right: 10px;
+            font-size: 16px;
+            padding: 0 16px;
+            &.active{
+                ul{
+                    display: block;
+                }
+                i{
+                    transform: scale(0.8) rotate(180deg)
+                }
+            }
+            span {
+                margin-right: 4px;
+            }
+            i {
+                transform: scale(0.8);
+                font-size: 14px;
+            }
+            ul {
+                display: none;
+                position: absolute;
+                left: 0;
+                bottom: calc(100% + 10px);
+                width: 68px;
+                padding: 10px 0;
+                border-radius: 12px;
+                text-align: center;
+                background: rgba(27, 27, 28, 0.8);
+                box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+                border: 1px solid #000000;
+                list-style: none;
+                li{
+                    padding: 5px 0;
+                    &:hover{
+                        color: #0076f6;
+                    }
+                }
+            }
+        }
     }
 }
 </style>
@@ -717,16 +815,16 @@ main {
 .vuejs3-datepicker__calendar header .next:not(.disabled):hover {
     background: rgba(0, 0, 0, 0.3);
 }
-.vuejs3-datepicker__calendar .cell{
-    font-size:16px !important;
-    border-radius:4px;
+.vuejs3-datepicker__calendar .cell {
+    font-size: 16px !important;
+    border-radius: 4px;
 }
 .highlighted {
-    color:#076EDE !important;
+    color: #076ede !important;
     background: transparent !important;
 }
 .selected {
-    color:#fff !important;
+    color: #fff !important;
     background: #0076f6 !important;
 }
 </style>