@kq_npm/client3d_webgl_vue 0.5.5-beta → 0.5.6-beta
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/index.js +66 -13
- package/package.json +1 -1
- package/scenceview/index.js +43 -6
- package/terrainoperation/index.js +23 -7
package/index.js
CHANGED
|
@@ -982,10 +982,14 @@ var webmapservice_namespaceObject = require("@kq_npm/client_common_vue/_utils/we
|
|
|
982
982
|
var webmapservice_default = /*#__PURE__*/__webpack_require__.n(webmapservice_namespaceObject);
|
|
983
983
|
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
984
984
|
var util_namespaceObject = require("@kq_npm/client_common_vue/_utils/util");
|
|
985
|
+
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_types/global-event"
|
|
986
|
+
var global_event_namespaceObject = require("@kq_npm/client_common_vue/_types/global-event");
|
|
987
|
+
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_namespaceObject);
|
|
985
988
|
;// CONCATENATED MODULE: ./src/webgl/scenceview/LayerManager.js
|
|
986
989
|
|
|
987
990
|
|
|
988
991
|
|
|
992
|
+
|
|
989
993
|
//图层管理类
|
|
990
994
|
|
|
991
995
|
class LayerManager {
|
|
@@ -1738,7 +1742,7 @@ class LayerManager {
|
|
|
1738
1742
|
*/
|
|
1739
1743
|
|
|
1740
1744
|
|
|
1741
|
-
setLayerVisibleStateByIds(ids, visible, eventTarget) {
|
|
1745
|
+
setLayerVisibleStateByIds(ids, visible, eventTarget = null) {
|
|
1742
1746
|
if (!(ids && ids.length > 0)) return;
|
|
1743
1747
|
let layer;
|
|
1744
1748
|
|
|
@@ -1784,6 +1788,10 @@ class LayerManager {
|
|
|
1784
1788
|
}
|
|
1785
1789
|
}
|
|
1786
1790
|
}
|
|
1791
|
+
|
|
1792
|
+
this._scenceView.fire("resetLayerDatas", {
|
|
1793
|
+
eventTarget
|
|
1794
|
+
});
|
|
1787
1795
|
} //通过guid获取ImageryLayer图层添加的index
|
|
1788
1796
|
|
|
1789
1797
|
|
|
@@ -2204,9 +2212,13 @@ class LayerManager {
|
|
|
2204
2212
|
|
|
2205
2213
|
this._layerTreeData.forEach(item => {
|
|
2206
2214
|
uncheckNode(item, guid);
|
|
2207
|
-
});
|
|
2215
|
+
}); //this._scenceView.fire("resetLayerDatas");
|
|
2208
2216
|
|
|
2209
|
-
|
|
2217
|
+
|
|
2218
|
+
global_event_default().fire("setTreeChecked", {
|
|
2219
|
+
keys: [guid],
|
|
2220
|
+
show: false
|
|
2221
|
+
});
|
|
2210
2222
|
}
|
|
2211
2223
|
}
|
|
2212
2224
|
|
|
@@ -2350,9 +2362,6 @@ function delTreeDataByGuid(data, guid) {
|
|
|
2350
2362
|
}
|
|
2351
2363
|
}
|
|
2352
2364
|
}
|
|
2353
|
-
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_types/global-event"
|
|
2354
|
-
var global_event_namespaceObject = require("@kq_npm/client_common_vue/_types/global-event");
|
|
2355
|
-
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_namespaceObject);
|
|
2356
2365
|
;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceViewViewModel.js
|
|
2357
2366
|
|
|
2358
2367
|
//ScenceView逻辑类
|
|
@@ -2615,6 +2624,34 @@ class ScenceViewViewModel extends (mitt_default()) {
|
|
|
2615
2624
|
imageryLayers.remove(layer);
|
|
2616
2625
|
}
|
|
2617
2626
|
});
|
|
2627
|
+
} //获取三维视角
|
|
2628
|
+
|
|
2629
|
+
|
|
2630
|
+
getViewPosition() {
|
|
2631
|
+
var camera = this._viewer.camera;
|
|
2632
|
+
var position = {
|
|
2633
|
+
x: camera.position.x,
|
|
2634
|
+
y: camera.position.y,
|
|
2635
|
+
z: camera.position.z
|
|
2636
|
+
};
|
|
2637
|
+
return {
|
|
2638
|
+
position: position,
|
|
2639
|
+
heading: camera.heading,
|
|
2640
|
+
pitch: camera.pitch,
|
|
2641
|
+
roll: camera.roll
|
|
2642
|
+
};
|
|
2643
|
+
} //设置三维视角
|
|
2644
|
+
|
|
2645
|
+
|
|
2646
|
+
setViewPosition(view) {
|
|
2647
|
+
this._viewer.camera.flyTo({
|
|
2648
|
+
destination: view.position,
|
|
2649
|
+
orientation: {
|
|
2650
|
+
heading: view.heading,
|
|
2651
|
+
pitch: view.pitch,
|
|
2652
|
+
roll: view.roll
|
|
2653
|
+
}
|
|
2654
|
+
});
|
|
2618
2655
|
}
|
|
2619
2656
|
|
|
2620
2657
|
}
|
|
@@ -9648,9 +9685,7 @@ class TerrainOperationViewModel {
|
|
|
9648
9685
|
if (that._terrainmodification) {
|
|
9649
9686
|
that.setTerrainModification();
|
|
9650
9687
|
} else {
|
|
9651
|
-
this.createTerrainModification(
|
|
9652
|
-
that.setTerrainModification();
|
|
9653
|
-
});
|
|
9688
|
+
this.createTerrainModification();
|
|
9654
9689
|
}
|
|
9655
9690
|
}
|
|
9656
9691
|
|
|
@@ -9680,10 +9715,28 @@ class TerrainOperationViewModel {
|
|
|
9680
9715
|
|
|
9681
9716
|
this._globaOptions.viewer.terrainProvider.readyPromise.then(function () {
|
|
9682
9717
|
setTimeout(() => {
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9718
|
+
let heights = [];
|
|
9719
|
+
let positions = [];
|
|
9720
|
+
|
|
9721
|
+
that._globaOptions.positions.forEach((item, index) => {
|
|
9722
|
+
console.log(index);
|
|
9723
|
+
let cag = window.Cesium.Cartographic.fromCartesian(item);
|
|
9724
|
+
positions.push(cag);
|
|
9725
|
+
heights.push(cag.height);
|
|
9726
|
+
}); // 地形平整
|
|
9727
|
+
|
|
9728
|
+
|
|
9729
|
+
if (!that._terrainmodification) {
|
|
9730
|
+
that._terrainmodification = new window.Cesium.Kq3dTerrainModification({
|
|
9731
|
+
viewer: that._globaOptions.viewer,
|
|
9732
|
+
positions: positions,
|
|
9733
|
+
heights: heights
|
|
9734
|
+
});
|
|
9735
|
+
} else {
|
|
9736
|
+
that._terrainmodification.heights = heights;
|
|
9737
|
+
that._terrainmodification.positions = positions;
|
|
9738
|
+
}
|
|
9739
|
+
|
|
9687
9740
|
that._terrainmodification._clippingPlanesEnabled = true;
|
|
9688
9741
|
if (callback) callback();
|
|
9689
9742
|
}, 500);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"0.5.
|
|
1
|
+
{"name":"@kq_npm/client3d_webgl_vue","description":"KQGIS Client3D for Vue.js","version":"0.5.6-beta","homepage":"","keywords":["KQGIS","webGL","Vue"],"browserslist":["> 1%","last 2 versions","not dead","not ie 11"],"author":"KQWEB GROUP","license":"Apache-2.0","dependencies":{"colorcolor":"^1.1.1","echarts":"^5.3.3","js-cookie":"^3.0.1","omit.js":"^2.0.2","save":"^2.5.0","tinycolor2":"^1.4.2","vue-i18n":"^9.2.0-beta.36","xlsx":"^0.18.5","@turf/turf":"^6.5.0","css-vars-ponyfill":"^2.4.8","xe-utils":"^3.5.4"}}
|
package/scenceview/index.js
CHANGED
|
@@ -529,10 +529,14 @@ var webmapservice_namespaceObject = require("@kq_npm/client_common_vue/_utils/we
|
|
|
529
529
|
var webmapservice_default = /*#__PURE__*/__webpack_require__.n(webmapservice_namespaceObject);
|
|
530
530
|
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_utils/util"
|
|
531
531
|
var util_namespaceObject = require("@kq_npm/client_common_vue/_utils/util");
|
|
532
|
+
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_types/global-event"
|
|
533
|
+
var global_event_namespaceObject = require("@kq_npm/client_common_vue/_types/global-event");
|
|
534
|
+
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_namespaceObject);
|
|
532
535
|
;// CONCATENATED MODULE: ./src/webgl/scenceview/LayerManager.js
|
|
533
536
|
|
|
534
537
|
|
|
535
538
|
|
|
539
|
+
|
|
536
540
|
//图层管理类
|
|
537
541
|
|
|
538
542
|
class LayerManager {
|
|
@@ -1285,7 +1289,7 @@ class LayerManager {
|
|
|
1285
1289
|
*/
|
|
1286
1290
|
|
|
1287
1291
|
|
|
1288
|
-
setLayerVisibleStateByIds(ids, visible, eventTarget) {
|
|
1292
|
+
setLayerVisibleStateByIds(ids, visible, eventTarget = null) {
|
|
1289
1293
|
if (!(ids && ids.length > 0)) return;
|
|
1290
1294
|
let layer;
|
|
1291
1295
|
|
|
@@ -1331,6 +1335,10 @@ class LayerManager {
|
|
|
1331
1335
|
}
|
|
1332
1336
|
}
|
|
1333
1337
|
}
|
|
1338
|
+
|
|
1339
|
+
this._scenceView.fire("resetLayerDatas", {
|
|
1340
|
+
eventTarget
|
|
1341
|
+
});
|
|
1334
1342
|
} //通过guid获取ImageryLayer图层添加的index
|
|
1335
1343
|
|
|
1336
1344
|
|
|
@@ -1751,9 +1759,13 @@ class LayerManager {
|
|
|
1751
1759
|
|
|
1752
1760
|
this._layerTreeData.forEach(item => {
|
|
1753
1761
|
uncheckNode(item, guid);
|
|
1754
|
-
});
|
|
1762
|
+
}); //this._scenceView.fire("resetLayerDatas");
|
|
1763
|
+
|
|
1755
1764
|
|
|
1756
|
-
|
|
1765
|
+
global_event_default().fire("setTreeChecked", {
|
|
1766
|
+
keys: [guid],
|
|
1767
|
+
show: false
|
|
1768
|
+
});
|
|
1757
1769
|
}
|
|
1758
1770
|
}
|
|
1759
1771
|
|
|
@@ -1897,9 +1909,6 @@ function delTreeDataByGuid(data, guid) {
|
|
|
1897
1909
|
}
|
|
1898
1910
|
}
|
|
1899
1911
|
}
|
|
1900
|
-
;// CONCATENATED MODULE: external "@kq_npm/client_common_vue/_types/global-event"
|
|
1901
|
-
var global_event_namespaceObject = require("@kq_npm/client_common_vue/_types/global-event");
|
|
1902
|
-
var global_event_default = /*#__PURE__*/__webpack_require__.n(global_event_namespaceObject);
|
|
1903
1912
|
;// CONCATENATED MODULE: ./src/webgl/scenceview/ScenceViewViewModel.js
|
|
1904
1913
|
|
|
1905
1914
|
//ScenceView逻辑类
|
|
@@ -2162,6 +2171,34 @@ class ScenceViewViewModel extends (mitt_default()) {
|
|
|
2162
2171
|
imageryLayers.remove(layer);
|
|
2163
2172
|
}
|
|
2164
2173
|
});
|
|
2174
|
+
} //获取三维视角
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
getViewPosition() {
|
|
2178
|
+
var camera = this._viewer.camera;
|
|
2179
|
+
var position = {
|
|
2180
|
+
x: camera.position.x,
|
|
2181
|
+
y: camera.position.y,
|
|
2182
|
+
z: camera.position.z
|
|
2183
|
+
};
|
|
2184
|
+
return {
|
|
2185
|
+
position: position,
|
|
2186
|
+
heading: camera.heading,
|
|
2187
|
+
pitch: camera.pitch,
|
|
2188
|
+
roll: camera.roll
|
|
2189
|
+
};
|
|
2190
|
+
} //设置三维视角
|
|
2191
|
+
|
|
2192
|
+
|
|
2193
|
+
setViewPosition(view) {
|
|
2194
|
+
this._viewer.camera.flyTo({
|
|
2195
|
+
destination: view.position,
|
|
2196
|
+
orientation: {
|
|
2197
|
+
heading: view.heading,
|
|
2198
|
+
pitch: view.pitch,
|
|
2199
|
+
roll: view.roll
|
|
2200
|
+
}
|
|
2201
|
+
});
|
|
2165
2202
|
}
|
|
2166
2203
|
|
|
2167
2204
|
}
|
|
@@ -128,9 +128,7 @@ class TerrainOperationViewModel {
|
|
|
128
128
|
if (that._terrainmodification) {
|
|
129
129
|
that.setTerrainModification();
|
|
130
130
|
} else {
|
|
131
|
-
this.createTerrainModification(
|
|
132
|
-
that.setTerrainModification();
|
|
133
|
-
});
|
|
131
|
+
this.createTerrainModification();
|
|
134
132
|
}
|
|
135
133
|
}
|
|
136
134
|
|
|
@@ -160,10 +158,28 @@ class TerrainOperationViewModel {
|
|
|
160
158
|
|
|
161
159
|
this._globaOptions.viewer.terrainProvider.readyPromise.then(function () {
|
|
162
160
|
setTimeout(() => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
let heights = [];
|
|
162
|
+
let positions = [];
|
|
163
|
+
|
|
164
|
+
that._globaOptions.positions.forEach((item, index) => {
|
|
165
|
+
console.log(index);
|
|
166
|
+
let cag = window.Cesium.Cartographic.fromCartesian(item);
|
|
167
|
+
positions.push(cag);
|
|
168
|
+
heights.push(cag.height);
|
|
169
|
+
}); // 地形平整
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
if (!that._terrainmodification) {
|
|
173
|
+
that._terrainmodification = new window.Cesium.Kq3dTerrainModification({
|
|
174
|
+
viewer: that._globaOptions.viewer,
|
|
175
|
+
positions: positions,
|
|
176
|
+
heights: heights
|
|
177
|
+
});
|
|
178
|
+
} else {
|
|
179
|
+
that._terrainmodification.heights = heights;
|
|
180
|
+
that._terrainmodification.positions = positions;
|
|
181
|
+
}
|
|
182
|
+
|
|
167
183
|
that._terrainmodification._clippingPlanesEnabled = true;
|
|
168
184
|
if (callback) callback();
|
|
169
185
|
}, 500);
|