@kq_npm/client3d_webgl_vue 4.3.3-beta → 4.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/adddata/index.js +4 -35
- package/adddata/style/adddata.css +1 -110
- package/aspectanalysis/style/aspectanalysis.css +1 -101
- package/baseterraingallery/index.js +2 -2
- package/baseterraingallery/style/baseterraingallery.css +1 -88
- package/boxclip/index.js +0 -10
- package/boxclip/style/boxclip.css +1 -97
- package/clientPrint/index.js +15 -5
- package/clientPrint/style/clientPrint.css +1 -461
- package/comparemap/index.js +145 -136
- package/comparemap/style/comparemap.css +1 -35
- package/compass/index.js +2 -2
- package/excavatefillanalysis/index.js +2 -2
- package/excavatefillanalysis/style/excavatefillanalysis.css +1 -140
- package/fixedzoomin/index.js +2 -2
- package/fixedzoomout/index.js +2 -2
- package/flight/index.js +3 -13
- package/flight/style/flight.css +1 -150
- package/floodanalysis/style/floodanalysis.css +1 -95
- package/geologicalbodyanalysis/index.js +0 -10
- package/geologicalbodyanalysis/style/geologicalbodyanalysis.css +1 -64
- package/gpuspatialquery/index.js +0 -10
- package/gpuspatialquery/style/gpuspatialquery.css +1 -88
- package/hawkeye/index.js +2 -2
- package/index.js +1969 -535
- package/isolineanalysis/style/isolineanalysis.css +1 -113
- package/light/index.js +169 -170
- package/light/style/light.css +1 -104
- package/limitheightanalysis/index.js +125 -126
- package/limitheightanalysis/style/limitheightanalysis.css +1 -88
- package/measure/index.js +141 -24
- package/measure/style/measure.css +1 -84
- package/modelFlat/index.js +0 -10
- package/modelFlat/style/modelFlat.css +1 -66
- package/modelexcavate/index.js +98 -60
- package/modelexcavate/style/modelexcavate.css +1 -66
- package/modelfilter/index.js +0 -10
- package/modelfilter/style/modelfilter.css +1 -66
- package/modelprofileanalysis/index.js +164 -165
- package/modelprofileanalysis/style/modelprofileanalysis.css +1 -94
- package/modelselect/index.js +0 -10
- package/modelselect/style/modelselect.css +1 -28
- package/package.json +1 -1
- package/particleeffect/index.js +0 -10
- package/particleeffect/style/particleeffect.css +1 -94
- package/planeclip/index.js +0 -10
- package/planeclip/style/planeclip.css +1 -94
- package/resetview/index.js +2 -2
- package/roller/index.js +170 -171
- package/roller/style/roller.css +1 -59
- package/scaneffect/index.js +0 -10
- package/scaneffect/style/scaneffect.css +1 -101
- package/sceneset/index.js +1 -10
- package/sceneset/style/sceneset.css +1 -86
- package/sceneview/index.js +2029 -567
- package/sceneview/style/sceneview.css +1 -127
- package/screenshot/index.js +158 -159
- package/screenshot/style/screenshot.css +1 -53
- package/shadowanalysis/style/shadowanalysis.css +1 -141
- package/sightlineanalysis/index.js +5 -7
- package/sightlineanalysis/style/divpoint.css +1 -22
- package/sightlineanalysis/style/sightlineanalysis.css +1 -85
- package/skylineanalysis/style/skylineanalysis.css +1 -100
- package/slopeanalysis/index.js +16 -11
- package/slopeanalysis/style/slopeanalysis.css +1 -101
- package/slopeaspectanalysis/index.js +1512 -0
- package/slopeaspectanalysis/style/index.js +3 -0
- package/slopeaspectanalysis/style/slopeaspectanalysis.css +1 -0
- package/statusbar/index.js +3 -12
- package/style.css +1 -3817
- package/terrainoperation/index.js +0 -10
- package/terrainoperation/style/terrainoperation.css +1 -66
- package/terrainprofileanalysis/index.js +0 -10
- package/terrainprofileanalysis/style/terrainprofileanalysis.css +1 -83
- package/underground/index.js +3 -3
- package/underground/style/underground.css +1 -19
- package/videofusion/index.js +5 -35
- package/videofusion/style/videofusion.css +1 -104
- package/videoproject/index.js +5 -35
- package/videoproject/style/videoproject.css +1 -104
- package/viewshedanalysis/style/viewshedanalysis.css +1 -88
- package/weathereffect/style/weathereffect.css +1 -95
- package/wireframesketch/index.js +0 -10
- package/wireframesketch/style/wireframesketch.css +1 -12
|
@@ -1,127 +1 @@
|
|
|
1
|
-
.kq-scene-view {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 100%;
|
|
4
|
-
margin: 0;
|
|
5
|
-
padding: 0;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
position: absolute;
|
|
8
|
-
top: 0;
|
|
9
|
-
left: 0;
|
|
10
|
-
}
|
|
11
|
-
.kq-scene-view .view-container {
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
margin: 0;
|
|
15
|
-
padding: 0;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
}
|
|
18
|
-
.kq-scene-view .view-container canvas {
|
|
19
|
-
outline: 0px;
|
|
20
|
-
}
|
|
21
|
-
.kq-scene-view .view-container .top-left {
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 16px;
|
|
24
|
-
left: 16px;
|
|
25
|
-
z-index: 9999;
|
|
26
|
-
}
|
|
27
|
-
.kq-scene-view .view-container .top-right {
|
|
28
|
-
position: absolute;
|
|
29
|
-
top: 16px;
|
|
30
|
-
right: 16px;
|
|
31
|
-
z-index: 9999;
|
|
32
|
-
}
|
|
33
|
-
.kq-scene-view .view-container .bottom-left {
|
|
34
|
-
position: absolute;
|
|
35
|
-
bottom: 16px;
|
|
36
|
-
left: 16px;
|
|
37
|
-
z-index: 9999;
|
|
38
|
-
}
|
|
39
|
-
.kq-scene-view .view-container .bottom-right {
|
|
40
|
-
position: absolute;
|
|
41
|
-
bottom: 16px;
|
|
42
|
-
right: 16px;
|
|
43
|
-
z-index: 9999;
|
|
44
|
-
}
|
|
45
|
-
.kq-scene-view .view-container .left {
|
|
46
|
-
position: absolute;
|
|
47
|
-
left: 16px;
|
|
48
|
-
top: 50%;
|
|
49
|
-
margin-top: -80px;
|
|
50
|
-
z-index: 9999;
|
|
51
|
-
}
|
|
52
|
-
.kq-scene-view .view-container .right {
|
|
53
|
-
position: absolute;
|
|
54
|
-
right: 16px;
|
|
55
|
-
top: 50%;
|
|
56
|
-
margin-top: -80px;
|
|
57
|
-
z-index: 9999;
|
|
58
|
-
}
|
|
59
|
-
.kq-scene-view .view-container .top {
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 16px;
|
|
62
|
-
left: 50%;
|
|
63
|
-
margin-left: -80px;
|
|
64
|
-
z-index: 9999;
|
|
65
|
-
}
|
|
66
|
-
.kq-scene-view .view-container .bottom {
|
|
67
|
-
position: absolute;
|
|
68
|
-
bottom: 16px;
|
|
69
|
-
left: 50%;
|
|
70
|
-
margin-left: -80px;
|
|
71
|
-
z-index: 9999;
|
|
72
|
-
}
|
|
73
|
-
.kq-scene-view .view-container .horizontal div {
|
|
74
|
-
float: left;
|
|
75
|
-
}
|
|
76
|
-
.kq-scene-view .view-container .horizontal .reset-view {
|
|
77
|
-
margin-left: 16px;
|
|
78
|
-
}
|
|
79
|
-
.kq-scene-view .view-container .horizontal .compass {
|
|
80
|
-
margin-left: 16px;
|
|
81
|
-
}
|
|
82
|
-
.kq-scene-view .view-container .vertical .reset-view {
|
|
83
|
-
margin-top: 8px;
|
|
84
|
-
}
|
|
85
|
-
.kq-scene-view .view-container .vertical .compass {
|
|
86
|
-
margin-top: 8px;
|
|
87
|
-
}
|
|
88
|
-
.kq-scene-view .view-container .zoomButton {
|
|
89
|
-
border-radius: unset;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.kq-label-popup .triangle {
|
|
93
|
-
display: block;
|
|
94
|
-
height: 12px;
|
|
95
|
-
width: 12px;
|
|
96
|
-
background-color: inherit;
|
|
97
|
-
border: inherit;
|
|
98
|
-
position: absolute;
|
|
99
|
-
bottom: -6px;
|
|
100
|
-
left: calc(50% - 6px);
|
|
101
|
-
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
|
102
|
-
-webkit-transform: rotate(-45deg);
|
|
103
|
-
-ms-transform: rotate(-45deg);
|
|
104
|
-
transform: rotate(-45deg);
|
|
105
|
-
}
|
|
106
|
-
.kq-label-popup .close {
|
|
107
|
-
position: absolute;
|
|
108
|
-
top: 0;
|
|
109
|
-
right: 0;
|
|
110
|
-
border: none;
|
|
111
|
-
text-align: center;
|
|
112
|
-
text-decoration: none;
|
|
113
|
-
background: transparent;
|
|
114
|
-
width: 40px;
|
|
115
|
-
height: 40px;
|
|
116
|
-
line-height: 34px;
|
|
117
|
-
color: white;
|
|
118
|
-
font-size: 24px;
|
|
119
|
-
padding: 0px;
|
|
120
|
-
font-weight: normal;
|
|
121
|
-
border-radius: 0 8px 0 0;
|
|
122
|
-
-webkit-transition: all 0.25s ease-in-out;
|
|
123
|
-
transition: all 0.25s ease-in-out;
|
|
124
|
-
}
|
|
125
|
-
.kq-label-popup .close:hover {
|
|
126
|
-
background: #f56c6c;
|
|
127
|
-
}
|
|
1
|
+
.kq-scene-view{position:absolute;top:0;left:0}.kq-scene-view,.kq-scene-view .view-container{width:100%;height:100%;margin:0;padding:0;overflow:hidden}.kq-scene-view .view-container canvas{outline:0}.kq-scene-view .view-container .top-left{position:absolute;top:16px;left:16px;z-index:9999}.kq-scene-view .view-container .top-right{position:absolute;top:16px;right:16px;z-index:9999}.kq-scene-view .view-container .bottom-left{position:absolute;bottom:16px;left:16px;z-index:9999}.kq-scene-view .view-container .bottom-right{position:absolute;bottom:16px;right:16px;z-index:9999}.kq-scene-view .view-container .left{position:absolute;left:16px;top:50%;margin-top:-80px;z-index:9999}.kq-scene-view .view-container .right{position:absolute;right:16px;top:50%;margin-top:-80px;z-index:9999}.kq-scene-view .view-container .top{position:absolute;top:16px;left:50%;margin-left:-80px;z-index:9999}.kq-scene-view .view-container .bottom{position:absolute;bottom:16px;left:50%;margin-left:-80px;z-index:9999}.kq-scene-view .view-container .horizontal div{float:left}.kq-scene-view .view-container .horizontal .compass,.kq-scene-view .view-container .horizontal .reset-view{margin-left:16px}.kq-scene-view .view-container .vertical .compass,.kq-scene-view .view-container .vertical .reset-view{margin-top:8px}.kq-scene-view .view-container .zoomButton{border-radius:unset}.kq-label-popup .triangle{display:block;height:12px;width:12px;background-color:inherit;border:inherit;position:absolute;bottom:-6px;left:calc(50% - 6px);-webkit-clip-path:polygon(0 0,100% 100%,0 100%);clip-path:polygon(0 0,100% 100%,0 100%);-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg);transform:rotate(-45deg)}.kq-label-popup .close{position:absolute;top:0;right:0;border:none;text-align:center;text-decoration:none;background:transparent;width:40px;height:40px;line-height:34px;color:#fff;font-size:24px;padding:0;font-weight:400;border-radius:0 8px 0 0;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out}.kq-label-popup .close:hover{background:#f56c6c}
|
package/screenshot/index.js
CHANGED
|
@@ -12,17 +12,166 @@ return /******/ (function() { // webpackBootstrap
|
|
|
12
12
|
/******/ "use strict";
|
|
13
13
|
/******/ var __webpack_modules__ = ({
|
|
14
14
|
|
|
15
|
-
/***/
|
|
16
|
-
/***/ (function(
|
|
15
|
+
/***/ 1248:
|
|
16
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19
|
+
/* harmony export */ "Z": function() { return /* binding */ ScreenshotViewModel; }
|
|
20
|
+
/* harmony export */ });
|
|
21
|
+
/* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
|
|
22
|
+
|
|
23
|
+
//截图逻辑类
|
|
24
|
+
class ScreenshotViewModel {
|
|
25
|
+
//三维viewer对象
|
|
26
|
+
//截图存储参数对象
|
|
27
|
+
//截图三维对象
|
|
28
|
+
constructor(viewer, options) {
|
|
29
|
+
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
|
|
30
|
+
|
|
31
|
+
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
|
|
32
|
+
|
|
33
|
+
(0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_cameraToImage", null);
|
|
34
|
+
|
|
35
|
+
this._options = {
|
|
36
|
+
width: options.imgWidth,
|
|
37
|
+
height: options.imgHeight,
|
|
38
|
+
imageType: options.imgFormat,
|
|
39
|
+
fixedRatio: options.lockAspectRatio,
|
|
40
|
+
//锁定宽高比
|
|
41
|
+
style: options.tilesetStyle,
|
|
42
|
+
//倾斜样式
|
|
43
|
+
tilesetName: options.tilesetName //倾斜名称
|
|
44
|
+
|
|
45
|
+
};
|
|
46
|
+
this._viewer = viewer;
|
|
47
|
+
this._viewer.enabledFXAA = true; //声明场景出图类
|
|
48
|
+
|
|
49
|
+
this._cameraToImage = new Cesium.Kq3dCanvasToImage(viewer._container, {
|
|
50
|
+
viewer: viewer,
|
|
51
|
+
canvas: viewer.scene.canvas
|
|
52
|
+
});
|
|
53
|
+
let that = this;
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
let tileset = this.findLayerByName(this._options.tilesetName);
|
|
56
|
+
|
|
57
|
+
if (tileset) {
|
|
58
|
+
if (tileset instanceof Array && tileset.length > 0) {
|
|
59
|
+
tileset[0].readyPromise.then(function (tileset) {
|
|
60
|
+
tileset.style = new Cesium.Cesium3DTileStyle(that._options.style);
|
|
61
|
+
});
|
|
62
|
+
} else if (tileset instanceof Object) {
|
|
63
|
+
tileset.readyPromise.then(function (tileset) {
|
|
64
|
+
tileset.style = new Cesium.Cesium3DTileStyle(that._options.style);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, 800);
|
|
69
|
+
} // 查找所有3dtiles模型对象
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
findLayers() {
|
|
73
|
+
let tilesets = [];
|
|
74
|
+
const primitives = this._viewer.scene.primitives._primitives;
|
|
75
|
+
|
|
76
|
+
for (let m = 0; m < primitives.length; m++) {
|
|
77
|
+
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
78
|
+
tilesets.push({
|
|
79
|
+
guid: primitives[m].guid,
|
|
80
|
+
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return tilesets;
|
|
86
|
+
} // 出图
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
sceneFigure() {
|
|
90
|
+
this.saveAsimages();
|
|
91
|
+
} // 返回base64
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
saveAsimages() {
|
|
95
|
+
//设置宽、高、图片类型
|
|
96
|
+
var options = {
|
|
97
|
+
width: this._options.width,
|
|
98
|
+
//图片宽度
|
|
99
|
+
height: this._options.height,
|
|
100
|
+
//图片高度
|
|
101
|
+
type: this._options.imageType //图片类型
|
|
102
|
+
|
|
103
|
+
}; //返回图片
|
|
104
|
+
|
|
105
|
+
var img = this._cameraToImage.saveAsimages(this._viewer.scene.canvas, options);
|
|
106
|
+
|
|
107
|
+
return img;
|
|
108
|
+
} // 返回base64
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
toDataURL() {
|
|
112
|
+
var base64 = this._cameraToImage.toDataURL({
|
|
113
|
+
width: this._options.width,
|
|
114
|
+
height: this._options.height,
|
|
115
|
+
type: Cesium.Kq3dImageFormatter.JPG
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return base64;
|
|
119
|
+
} //根据id获取tileset对象
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
findLayerByName(name) {
|
|
123
|
+
const primitives = this._viewer.scene.primitives._primitives;
|
|
124
|
+
const tileset = primitives.find(function (item) {
|
|
125
|
+
return item.name === name;
|
|
126
|
+
});
|
|
127
|
+
return tileset;
|
|
128
|
+
} //根据宽度计算高度
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
calcWidthByWindowRatio(width) {
|
|
132
|
+
var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
|
|
133
|
+
return parseInt(width * r);
|
|
134
|
+
} //根据高度计算宽度
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
calcHeightByWindowRatio(height) {
|
|
138
|
+
var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
|
|
139
|
+
return parseInt(height / r);
|
|
140
|
+
} // 锁定图片宽高比
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
setImgAspectRatio(val) {
|
|
144
|
+
this._options.fixedRatio = val;
|
|
145
|
+
} // 设置图片宽度
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
setImgWidth(val) {
|
|
149
|
+
this._options.width = val;
|
|
150
|
+
} // 设置图片高度
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
setImgHeight(val) {
|
|
154
|
+
this._options.height = val;
|
|
155
|
+
} // 设置图片类型
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
setImgType(val) {
|
|
159
|
+
this._options.imageType = val;
|
|
160
|
+
} // 注销
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
destroy() {
|
|
164
|
+
if (this._cameraToImage) this._cameraToImage = null;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
|
19
168
|
|
|
20
169
|
/***/ }),
|
|
21
170
|
|
|
22
|
-
/***/
|
|
171
|
+
/***/ 348:
|
|
23
172
|
/***/ (function(module) {
|
|
24
173
|
|
|
25
|
-
module.exports = require("
|
|
174
|
+
module.exports = require("@kq_npm/client_icons_vue");
|
|
26
175
|
|
|
27
176
|
/***/ }),
|
|
28
177
|
|
|
@@ -160,7 +309,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
160
309
|
|
|
161
310
|
// EXPORTS
|
|
162
311
|
__webpack_require__.d(__webpack_exports__, {
|
|
163
|
-
"ScreenshotViewModel": function() { return /* reexport */ ScreenshotViewModel; },
|
|
312
|
+
"ScreenshotViewModel": function() { return /* reexport */ ScreenshotViewModel/* default */.Z; },
|
|
164
313
|
"default": function() { return /* reexport */ Screenshot; }
|
|
165
314
|
});
|
|
166
315
|
|
|
@@ -170,158 +319,8 @@ var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(
|
|
|
170
319
|
var client_icons_vue_ = __webpack_require__(348);
|
|
171
320
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/gis-utils"
|
|
172
321
|
var gis_utils_ = __webpack_require__(7135);
|
|
173
|
-
// EXTERNAL MODULE: ./
|
|
174
|
-
var
|
|
175
|
-
// EXTERNAL MODULE: external "core-js/modules/es.array.push.js"
|
|
176
|
-
var es_array_push_js_ = __webpack_require__(2118);
|
|
177
|
-
;// CONCATENATED MODULE: ./src/webgl/screenshot/ScreenshotViewModel.js
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
//截图逻辑类
|
|
181
|
-
class ScreenshotViewModel {
|
|
182
|
-
//三维viewer对象
|
|
183
|
-
//截图存储参数对象
|
|
184
|
-
//截图三维对象
|
|
185
|
-
constructor(viewer, options) {
|
|
186
|
-
(0,defineProperty/* default */.Z)(this, "_viewer", null);
|
|
187
|
-
|
|
188
|
-
(0,defineProperty/* default */.Z)(this, "_options", null);
|
|
189
|
-
|
|
190
|
-
(0,defineProperty/* default */.Z)(this, "_cameraToImage", null);
|
|
191
|
-
|
|
192
|
-
this._options = {
|
|
193
|
-
width: options.imgWidth,
|
|
194
|
-
height: options.imgHeight,
|
|
195
|
-
imageType: options.imgFormat,
|
|
196
|
-
fixedRatio: options.lockAspectRatio,
|
|
197
|
-
//锁定宽高比
|
|
198
|
-
style: options.tilesetStyle,
|
|
199
|
-
//倾斜样式
|
|
200
|
-
tilesetName: options.tilesetName //倾斜名称
|
|
201
|
-
|
|
202
|
-
};
|
|
203
|
-
this._viewer = viewer;
|
|
204
|
-
this._viewer.enabledFXAA = true; //声明场景出图类
|
|
205
|
-
|
|
206
|
-
this._cameraToImage = new Cesium.Kq3dCanvasToImage(viewer._container, {
|
|
207
|
-
viewer: viewer,
|
|
208
|
-
canvas: viewer.scene.canvas
|
|
209
|
-
});
|
|
210
|
-
let that = this;
|
|
211
|
-
setTimeout(() => {
|
|
212
|
-
let tileset = this.findLayerByName(this._options.tilesetName);
|
|
213
|
-
|
|
214
|
-
if (tileset) {
|
|
215
|
-
if (tileset instanceof Array && tileset.length > 0) {
|
|
216
|
-
tileset[0].readyPromise.then(function (tileset) {
|
|
217
|
-
tileset.style = new Cesium.Cesium3DTileStyle(that._options.style);
|
|
218
|
-
});
|
|
219
|
-
} else if (tileset instanceof Object) {
|
|
220
|
-
tileset.readyPromise.then(function (tileset) {
|
|
221
|
-
tileset.style = new Cesium.Cesium3DTileStyle(that._options.style);
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
}, 800);
|
|
226
|
-
} // 查找所有3dtiles模型对象
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
findLayers() {
|
|
230
|
-
let tilesets = [];
|
|
231
|
-
const primitives = this._viewer.scene.primitives._primitives;
|
|
232
|
-
|
|
233
|
-
for (let m = 0; m < primitives.length; m++) {
|
|
234
|
-
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
235
|
-
tilesets.push({
|
|
236
|
-
guid: primitives[m].guid,
|
|
237
|
-
name: primitives[m].name ? primitives[m].name : primitives[m].guid
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
return tilesets;
|
|
243
|
-
} // 出图
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
sceneFigure() {
|
|
247
|
-
this.saveAsimages();
|
|
248
|
-
} // 返回base64
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
saveAsimages() {
|
|
252
|
-
//设置宽、高、图片类型
|
|
253
|
-
var options = {
|
|
254
|
-
width: this._options.width,
|
|
255
|
-
//图片宽度
|
|
256
|
-
height: this._options.height,
|
|
257
|
-
//图片高度
|
|
258
|
-
type: this._options.imageType //图片类型
|
|
259
|
-
|
|
260
|
-
}; //返回图片
|
|
261
|
-
|
|
262
|
-
var img = this._cameraToImage.saveAsimages(this._viewer.scene.canvas, options);
|
|
263
|
-
|
|
264
|
-
return img;
|
|
265
|
-
} // 返回base64
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
toDataURL() {
|
|
269
|
-
var base64 = this._cameraToImage.toDataURL({
|
|
270
|
-
width: this._options.width,
|
|
271
|
-
height: this._options.height,
|
|
272
|
-
type: Cesium.Kq3dImageFormatter.JPG
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
return base64;
|
|
276
|
-
} //根据id获取tileset对象
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
findLayerByName(name) {
|
|
280
|
-
const primitives = this._viewer.scene.primitives._primitives;
|
|
281
|
-
const tileset = primitives.find(function (item) {
|
|
282
|
-
return item.name === name;
|
|
283
|
-
});
|
|
284
|
-
return tileset;
|
|
285
|
-
} //根据宽度计算高度
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
calcWidthByWindowRatio(width) {
|
|
289
|
-
var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
|
|
290
|
-
return parseInt(width * r);
|
|
291
|
-
} //根据高度计算宽度
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
calcHeightByWindowRatio(height) {
|
|
295
|
-
var r = this._viewer.scene.canvas.width / this._viewer.scene.canvas.height;
|
|
296
|
-
return parseInt(height / r);
|
|
297
|
-
} // 锁定图片宽高比
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
setImgAspectRatio(val) {
|
|
301
|
-
this._options.fixedRatio = val;
|
|
302
|
-
} // 设置图片宽度
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
setImgWidth(val) {
|
|
306
|
-
this._options.width = val;
|
|
307
|
-
} // 设置图片高度
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
setImgHeight(val) {
|
|
311
|
-
this._options.height = val;
|
|
312
|
-
} // 设置图片类型
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
setImgType(val) {
|
|
316
|
-
this._options.imageType = val;
|
|
317
|
-
} // 注销
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
destroy() {
|
|
321
|
-
if (this._cameraToImage) this._cameraToImage = null;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
}
|
|
322
|
+
// EXTERNAL MODULE: ./src/webgl/screenshot/ScreenshotViewModel.js
|
|
323
|
+
var ScreenshotViewModel = __webpack_require__(1248);
|
|
325
324
|
// EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
326
325
|
var util_ = __webpack_require__(3458);
|
|
327
326
|
// EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
|
|
@@ -447,7 +446,7 @@ const __default__ = {
|
|
|
447
446
|
imgHeightMax.value = canvas.height;
|
|
448
447
|
formItem.imgWidth = canvas.width;
|
|
449
448
|
formItem.imgHeight = canvas.height;
|
|
450
|
-
viewModel = new ScreenshotViewModel(scenceView._viewer, formItem);
|
|
449
|
+
viewModel = new ScreenshotViewModel/* default */.Z(scenceView._viewer, formItem);
|
|
451
450
|
}
|
|
452
451
|
});
|
|
453
452
|
});
|
|
@@ -1,53 +1 @@
|
|
|
1
|
-
.kq3d-screenshot {
|
|
2
|
-
z-index: 999;
|
|
3
|
-
border-radius: var(--kq-border-radius-base);
|
|
4
|
-
padding: 16px;
|
|
5
|
-
pointer-events: auto;
|
|
6
|
-
cursor: default;
|
|
7
|
-
background-color: var(--kq-bg-color);
|
|
8
|
-
}
|
|
9
|
-
.kq3d-screenshot .kq3d-screenshot-box {
|
|
10
|
-
width: 200px;
|
|
11
|
-
}
|
|
12
|
-
.kq3d-screenshot .kq3d-screenshot-tip {
|
|
13
|
-
color: var(--kq-text-color-regular);
|
|
14
|
-
font-size: 13px;
|
|
15
|
-
}
|
|
16
|
-
.kq3d-screenshot .kq3d-screenshot-tip p {
|
|
17
|
-
margin: 5px 0;
|
|
18
|
-
}
|
|
19
|
-
.kq3d-screenshot .kq-form {
|
|
20
|
-
margin-top: -8px;
|
|
21
|
-
}
|
|
22
|
-
.kq3d-screenshot .kq-form-item {
|
|
23
|
-
margin-bottom: 8px;
|
|
24
|
-
}
|
|
25
|
-
.kq3d-screenshot .kq-form-item__label {
|
|
26
|
-
padding: 0;
|
|
27
|
-
}
|
|
28
|
-
.kq3d-screenshot .kq-form-item__content {
|
|
29
|
-
text-align: end;
|
|
30
|
-
display: block;
|
|
31
|
-
}
|
|
32
|
-
.kq3d-screenshot .kq-row {
|
|
33
|
-
display: block;
|
|
34
|
-
}
|
|
35
|
-
.kq3d-screenshot .kq-input-number.is-controls-right {
|
|
36
|
-
width: 80px;
|
|
37
|
-
}
|
|
38
|
-
.kq3d-screenshot .kq-input-number.is-controls-right .kq-input-number__increase,
|
|
39
|
-
.kq3d-screenshot .kq-input-number.is-controls-right .kq-input-number__decrease {
|
|
40
|
-
width: 20px;
|
|
41
|
-
}
|
|
42
|
-
.kq3d-screenshot .kq-input-number.is-controls-right .kq-input__wrapper {
|
|
43
|
-
padding-left: 0px;
|
|
44
|
-
padding-right: 20px;
|
|
45
|
-
}
|
|
46
|
-
.kq3d-screenshot .kq-col-8 .kq-input-number .kq-input__wrapper {
|
|
47
|
-
padding-left: 0px;
|
|
48
|
-
padding-right: 20px;
|
|
49
|
-
}
|
|
50
|
-
.kq3d-screenshot .kq3d-screenshot-footer {
|
|
51
|
-
padding-top: 8px;
|
|
52
|
-
text-align: right;
|
|
53
|
-
}
|
|
1
|
+
.kq3d-screenshot{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-screenshot .kq3d-screenshot-box{width:200px}.kq3d-screenshot .kq3d-screenshot-tip{color:var(--kq-text-color-regular);font-size:13px}.kq3d-screenshot .kq3d-screenshot-tip p{margin:5px 0}.kq3d-screenshot .kq-form{margin-top:-8px}.kq3d-screenshot .kq-form-item{margin-bottom:8px}.kq3d-screenshot .kq-form-item__label{padding:0}.kq3d-screenshot .kq-form-item__content{text-align:end;display:block}.kq3d-screenshot .kq-row{display:block}.kq3d-screenshot .kq-input-number.is-controls-right{width:80px}.kq3d-screenshot .kq-input-number.is-controls-right .kq-input-number__decrease,.kq3d-screenshot .kq-input-number.is-controls-right .kq-input-number__increase{width:20px}.kq3d-screenshot .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-screenshot .kq-input-number.is-controls-right .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-screenshot .kq3d-screenshot-footer{padding-top:8px;text-align:right}
|
|
@@ -1,141 +1 @@
|
|
|
1
|
-
.kq3d-shadow-analysis {
|
|
2
|
-
z-index: 999;
|
|
3
|
-
border-radius: var(--kq-border-radius-base);
|
|
4
|
-
padding: 16px;
|
|
5
|
-
pointer-events: auto;
|
|
6
|
-
cursor: default;
|
|
7
|
-
background-color: var(--kq-bg-color);
|
|
8
|
-
}
|
|
9
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-box {
|
|
10
|
-
width: 372px;
|
|
11
|
-
}
|
|
12
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime {
|
|
13
|
-
margin-bottom: 8px;
|
|
14
|
-
}
|
|
15
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq3d-shadow-analysis-span {
|
|
16
|
-
color: var(--kq-text-color-regular);
|
|
17
|
-
}
|
|
18
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider {
|
|
19
|
-
width: 86%;
|
|
20
|
-
display: inline-block;
|
|
21
|
-
padding: 10px 20px 20px;
|
|
22
|
-
background-color: var(--kq-fill-color-light);
|
|
23
|
-
}
|
|
24
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__button {
|
|
25
|
-
width: 12px;
|
|
26
|
-
height: 12px;
|
|
27
|
-
}
|
|
28
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__marks-text {
|
|
29
|
-
margin-top: 8px;
|
|
30
|
-
text-align: center;
|
|
31
|
-
}
|
|
32
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__marks-text span {
|
|
33
|
-
display: block;
|
|
34
|
-
}
|
|
35
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__stop {
|
|
36
|
-
display: none;
|
|
37
|
-
}
|
|
38
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .spanLine {
|
|
39
|
-
width: 1px;
|
|
40
|
-
height: 8px;
|
|
41
|
-
background-color: #ccc;
|
|
42
|
-
}
|
|
43
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq3d-shadow-analysis-timeline .kq-icon {
|
|
44
|
-
font-size: 28px;
|
|
45
|
-
height: 66px;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
}
|
|
48
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .colDate {
|
|
49
|
-
line-height: 32px;
|
|
50
|
-
font-size: var(--kq-font-size-base);
|
|
51
|
-
}
|
|
52
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .colTime {
|
|
53
|
-
line-height: 62px;
|
|
54
|
-
font-size: var(--kq-font-size-base);
|
|
55
|
-
}
|
|
56
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-tip {
|
|
57
|
-
color: var(--kq-text-color-regular);
|
|
58
|
-
font-size: var(--kq-font-size-base);
|
|
59
|
-
}
|
|
60
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-tip p {
|
|
61
|
-
margin-top: 8px;
|
|
62
|
-
margin-bottom: 16px;
|
|
63
|
-
}
|
|
64
|
-
.kq3d-shadow-analysis .kq-collapse {
|
|
65
|
-
border: unset;
|
|
66
|
-
}
|
|
67
|
-
.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__header {
|
|
68
|
-
border: unset;
|
|
69
|
-
height: 38px;
|
|
70
|
-
background-color: var(--kq-fill-color-light);
|
|
71
|
-
font-weight: bold;
|
|
72
|
-
padding: 0px 16px;
|
|
73
|
-
font-size: 16px;
|
|
74
|
-
}
|
|
75
|
-
.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__arrow {
|
|
76
|
-
margin: 0 0px 0 auto;
|
|
77
|
-
}
|
|
78
|
-
.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content {
|
|
79
|
-
padding-bottom: unset;
|
|
80
|
-
border: unset;
|
|
81
|
-
padding-top: 10px;
|
|
82
|
-
}
|
|
83
|
-
.kq3d-shadow-analysis .kq-collapse .kq-row {
|
|
84
|
-
display: block;
|
|
85
|
-
}
|
|
86
|
-
.kq3d-shadow-analysis .kq-form-item {
|
|
87
|
-
margin-bottom: 8px;
|
|
88
|
-
}
|
|
89
|
-
.kq3d-shadow-analysis .kq-form-item__content {
|
|
90
|
-
text-align: end;
|
|
91
|
-
display: block;
|
|
92
|
-
}
|
|
93
|
-
.kq3d-shadow-analysis .kq-date-editor.kq-input,
|
|
94
|
-
.kq3d-shadow-analysis .kq-date-editor.kq-input__wrapper {
|
|
95
|
-
width: 100%;
|
|
96
|
-
}
|
|
97
|
-
.kq3d-shadow-analysis .kq-slider {
|
|
98
|
-
width: 93%;
|
|
99
|
-
padding-left: 7px;
|
|
100
|
-
}
|
|
101
|
-
.kq3d-shadow-analysis .kq-slider .kq-slider__button {
|
|
102
|
-
width: 14px;
|
|
103
|
-
height: 14px;
|
|
104
|
-
}
|
|
105
|
-
.kq3d-shadow-analysis .kq-input-number.is-controls-right {
|
|
106
|
-
width: 65px;
|
|
107
|
-
}
|
|
108
|
-
.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input-number__increase,
|
|
109
|
-
.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input-number__decrease {
|
|
110
|
-
width: 20px;
|
|
111
|
-
}
|
|
112
|
-
.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input__wrapper {
|
|
113
|
-
padding-left: 0px;
|
|
114
|
-
padding-right: 20px;
|
|
115
|
-
}
|
|
116
|
-
.kq3d-shadow-analysis .kq-col-8 .kq-input-number .kq-input__wrapper {
|
|
117
|
-
padding-left: 0px;
|
|
118
|
-
padding-right: 20px;
|
|
119
|
-
}
|
|
120
|
-
.kq3d-shadow-analysis .kq-color-picker {
|
|
121
|
-
width: 100%;
|
|
122
|
-
}
|
|
123
|
-
.kq3d-shadow-analysis .kq-color-picker .kq-color-picker__mask {
|
|
124
|
-
width: 100%;
|
|
125
|
-
}
|
|
126
|
-
.kq3d-shadow-analysis .kq-color-picker .kq-color-picker__trigger {
|
|
127
|
-
width: 100%;
|
|
128
|
-
}
|
|
129
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-legend img {
|
|
130
|
-
width: 195px;
|
|
131
|
-
height: 24px;
|
|
132
|
-
margin: 0px 10px;
|
|
133
|
-
}
|
|
134
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-legend span {
|
|
135
|
-
line-height: 24px;
|
|
136
|
-
vertical-align: top;
|
|
137
|
-
}
|
|
138
|
-
.kq3d-shadow-analysis .kq3d-shadow-analysis-footer {
|
|
139
|
-
text-align: right;
|
|
140
|
-
padding: 16px 0px 0px;
|
|
141
|
-
}
|
|
1
|
+
.kq3d-shadow-analysis{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-shadow-analysis .kq3d-shadow-analysis-box{width:372px}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime{margin-bottom:8px}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq3d-shadow-analysis-span{color:var(--kq-text-color-regular)}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider{width:86%;display:inline-block;padding:10px 20px 20px;background-color:var(--kq-fill-color-light)}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__button{width:12px;height:12px}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__marks-text{margin-top:8px;text-align:center}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__marks-text span{display:block}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .kq-slider__stop{display:none}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq-slider .spanLine{width:1px;height:8px;background-color:#ccc}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .kq3d-shadow-analysis-timeline .kq-icon{font-size:28px;height:66px;cursor:pointer}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .colDate{line-height:32px;font-size:var(--kq-font-size-base)}.kq3d-shadow-analysis .kq3d-shadow-analysis-datetime .colTime{line-height:62px;font-size:var(--kq-font-size-base)}.kq3d-shadow-analysis .kq3d-shadow-analysis-tip{color:var(--kq-text-color-regular);font-size:var(--kq-font-size-base)}.kq3d-shadow-analysis .kq3d-shadow-analysis-tip p{margin-top:8px;margin-bottom:16px}.kq3d-shadow-analysis .kq-collapse{border:unset}.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__header{border:unset;height:38px;background-color:var(--kq-fill-color-light);font-weight:700;padding:0 16px;font-size:16px}.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__arrow{margin:0 0 0 auto}.kq3d-shadow-analysis .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content{padding-bottom:unset;border:unset;padding-top:10px}.kq3d-shadow-analysis .kq-collapse .kq-row{display:block}.kq3d-shadow-analysis .kq-form-item{margin-bottom:8px}.kq3d-shadow-analysis .kq-form-item__content{text-align:end;display:block}.kq3d-shadow-analysis .kq-date-editor.kq-input,.kq3d-shadow-analysis .kq-date-editor.kq-input__wrapper{width:100%}.kq3d-shadow-analysis .kq-slider{width:93%;padding-left:7px}.kq3d-shadow-analysis .kq-slider .kq-slider__button{width:14px;height:14px}.kq3d-shadow-analysis .kq-input-number.is-controls-right{width:65px}.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input-number__decrease,.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input-number__increase{width:20px}.kq3d-shadow-analysis .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-shadow-analysis .kq-input-number.is-controls-right .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-shadow-analysis .kq-color-picker,.kq3d-shadow-analysis .kq-color-picker .kq-color-picker__mask,.kq3d-shadow-analysis .kq-color-picker .kq-color-picker__trigger{width:100%}.kq3d-shadow-analysis .kq3d-shadow-analysis-legend img{width:195px;height:24px;margin:0 10px}.kq3d-shadow-analysis .kq3d-shadow-analysis-legend span{line-height:24px;vertical-align:top}.kq3d-shadow-analysis .kq3d-shadow-analysis-footer{text-align:right;padding:16px 0 0}
|