@kq_npm/client3d_webgl_vue 4.5.56 → 4.5.57
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 +189 -21
- package/airspacegridoccupancyquery/index.js +108 -7
- package/airspaceprofileanalysis/index.js +99 -7
- package/aspectanalysis/index.js +25 -7
- package/baseterraingallery/index.js +16 -4
- package/boxclip/index.js +58 -16
- package/buildpointmodel/index.js +3441 -544
- package/buildpointmodel/style/buildpointmodel.css +1 -1
- package/buildpolygonmodel/index.js +205 -81
- package/buildpolylinemodel/index.js +346 -70
- package/clientPrint/index.js +10524 -3041
- package/comparemap/index.js +132 -60
- package/compass/index.js +16 -6
- package/excavatefillanalysis/index.js +51 -7
- package/fixedzoomin/index.js +24 -7
- package/fixedzoomout/index.js +25 -7
- package/flight/index.js +113 -26
- package/floodanalysis/index.js +79 -14
- package/geologicalbodyanalysis/index.js +41 -5
- package/gpuspatialquery/index.js +59 -11
- package/gridoccupancyquery/index.js +78 -12
- package/hawkeye/index.js +20 -2
- package/headertemp/index.js +7 -2
- package/heatmap3d/index.js +282 -158
- package/index.js +10524 -3041
- package/isolineanalysis/index.js +113 -38
- package/light/index.js +80 -22
- package/limitheightanalysis/index.js +30 -10
- package/lowaltitudefeature/index.js +292 -119
- package/measure/index.js +60 -19
- package/modelFlat/index.js +48 -8
- package/modeledit/index.js +38 -4
- package/modelexcavate/index.js +48 -7
- package/modelfilter/index.js +51 -8
- package/modelmaterialedit/index.js +127 -25
- package/modelprofileanalysis/index.js +50 -14
- package/modelselect/index.js +33 -3
- package/modelstyleedit/index.js +39 -3
- package/modeltransform/index.js +79 -14
- package/package.json +1 -1
- package/particleeffect/index.js +83 -17
- package/planeclip/index.js +66 -17
- package/pointcloudrender/index.js +134 -15
- package/radarscananalysis/index.js +35 -3
- package/resetview/index.js +14 -6
- package/roller/index.js +55 -18
- package/scaneffect/index.js +98 -29
- package/sceneadvancedtoimage/index.js +32 -6
- package/sceneapp/index.js +10524 -3041
- package/sceneset/index.js +141 -71
- package/scenetohdimage/index.js +23 -3
- package/sceneview/index.js +10524 -3041
- package/screenshot/index.js +44 -11
- package/shadowanalysis/index.js +79 -19
- package/sightlineanalysis/index.js +66 -15
- package/skylineanalysis/index.js +20 -4
- package/slopeanalysis/index.js +75 -16
- package/slopeaspectanalysis/index.js +128 -26
- package/statusbar/index.js +80 -67
- package/style.css +1 -1
- package/terrainoperation/index.js +39 -7
- package/terrainprofileanalysis/index.js +43 -5
- package/toolbarapp/index.js +10524 -3041
- package/toolboxapp/index.js +10524 -3041
- package/typhoontrac/index.js +134 -16
- package/underground/index.js +8 -2
- package/videofusion/index.js +86 -30
- package/videoproject/index.js +77 -23
- package/viewshedanalysis/index.js +58 -13
- package/weathereffect/index.js +73 -18
- package/webgl.es.js +263 -264
- package/windyslicing/index.js +233 -45
- package/wireframesketch/index.js +25 -8
package/particleeffect/index.js
CHANGED
|
@@ -717,6 +717,8 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
717
717
|
locale
|
|
718
718
|
} = (0, _useGlobalConfig.useLocale)();
|
|
719
719
|
const props = __props;
|
|
720
|
+
|
|
721
|
+
//粒子特效表单参数
|
|
720
722
|
let formItem = (0, _vue.reactive)({
|
|
721
723
|
collapseValue: props?.settingParams?.collapseValue === '' ? '' : props?.settingParams?.collapseValue ?? "setting",
|
|
722
724
|
// 默认展开属性设置
|
|
@@ -734,14 +736,15 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
734
736
|
endScale: props?.settingParams?.endScale ?? 1.0,
|
|
735
737
|
gravity: props?.settingParams?.gravity ?? 0.0
|
|
736
738
|
});
|
|
737
|
-
let viewModel = null;
|
|
739
|
+
let viewModel = null; // 粒子特效视图模型实例
|
|
738
740
|
|
|
739
741
|
// 组件容器Ref
|
|
740
742
|
let boxRef = (0, _vue.ref)(null);
|
|
741
743
|
|
|
742
744
|
// 生成组件默认header
|
|
743
745
|
let headerTemp = (0, _vue.ref)();
|
|
744
|
-
let headerTempRef = (0, _vue.ref)();
|
|
746
|
+
let headerTempRef = (0, _vue.ref)(); // headerTemp组件Ref
|
|
747
|
+
|
|
745
748
|
(0, _vue.onMounted)(() => {
|
|
746
749
|
(0, _util.updatePosition)(boxRef.value, props);
|
|
747
750
|
(0, _vue.watch)(() => props.position, (newVal, oldVal) => {
|
|
@@ -769,11 +772,17 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
769
772
|
headerTemp.value = (0, _util.createHeaderTemp)(boxRef.value, (0, _vue.toRefs)(props), headerTempRef, "webgl.particleEffect");
|
|
770
773
|
}
|
|
771
774
|
};
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* @description 切换粒子特效模式并重置默认参数
|
|
778
|
+
* @param {String} mode 模式名称(flame/smoke)
|
|
779
|
+
*/
|
|
772
780
|
function changeMode(mode) {
|
|
773
781
|
if (formItem.mode !== mode) {
|
|
774
782
|
// viewModel && viewModel.clear();
|
|
775
783
|
formItem.mode = mode;
|
|
776
784
|
if (mode === "flame" && formItem.isResetParams) {
|
|
785
|
+
// 火焰模式默认参数
|
|
777
786
|
formItem.particleNum = 40;
|
|
778
787
|
formItem.particleSize = 2.5;
|
|
779
788
|
formItem.minLifeCycle = 0.5;
|
|
@@ -784,6 +793,7 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
784
793
|
formItem.endScale = 1.0;
|
|
785
794
|
formItem.gravity = 0.0;
|
|
786
795
|
} else if (mode === "smoke" && formItem.isResetParams) {
|
|
796
|
+
// 烟雾模式默认参数
|
|
787
797
|
formItem.particleNum = 50;
|
|
788
798
|
formItem.particleSize = 2;
|
|
789
799
|
formItem.minLifeCycle = 3.5;
|
|
@@ -796,6 +806,11 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
796
806
|
}
|
|
797
807
|
}
|
|
798
808
|
}
|
|
809
|
+
|
|
810
|
+
/**
|
|
811
|
+
* @description 表单参数变化处理
|
|
812
|
+
* @param {String} key 变化的字段名(particleNum/particleSize/minLifeCycle/maxLifeCycle/minSpeed/maxSpeed/startScale/endScale/gravity)
|
|
813
|
+
*/
|
|
799
814
|
function paramsChanged(key) {
|
|
800
815
|
switch (key) {
|
|
801
816
|
case "particleNum":
|
|
@@ -829,9 +844,13 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
829
844
|
break;
|
|
830
845
|
}
|
|
831
846
|
}
|
|
847
|
+
|
|
848
|
+
// 添加粒子特效
|
|
832
849
|
function add() {
|
|
833
850
|
viewModel && viewModel.addParticleEffect(formItem);
|
|
834
851
|
}
|
|
852
|
+
|
|
853
|
+
// 清除粒子特效
|
|
835
854
|
function clear() {
|
|
836
855
|
viewModel && viewModel.clear();
|
|
837
856
|
}
|
|
@@ -1426,11 +1445,15 @@ var _constImage = __webpack_require__(4822);
|
|
|
1426
1445
|
* All rights reserved.
|
|
1427
1446
|
*/
|
|
1428
1447
|
|
|
1429
|
-
let _gravityScratch = null;
|
|
1430
|
-
let _gravity = 1.0;
|
|
1448
|
+
let _gravityScratch = null; // 重力计算用的临时笛卡尔坐标缓存
|
|
1449
|
+
let _gravity = 1.0; // 当前重力系数
|
|
1431
1450
|
//粒子特效逻辑类
|
|
1432
1451
|
class ParticleEffectViewModel {
|
|
1433
1452
|
//烟雾图片url地址
|
|
1453
|
+
/**
|
|
1454
|
+
* @description 构造函数:初始化粒子特效视图模型
|
|
1455
|
+
* @param {Object} scenceView 场景视图对象
|
|
1456
|
+
*/
|
|
1434
1457
|
constructor(scenceView) {
|
|
1435
1458
|
this._scene = null;
|
|
1436
1459
|
//三维球场景视图对象
|
|
@@ -1449,22 +1472,33 @@ class ParticleEffectViewModel {
|
|
|
1449
1472
|
this._drawManager = scenceView._drawManager;
|
|
1450
1473
|
_gravityScratch = new Cesium.Cartesian3();
|
|
1451
1474
|
}
|
|
1475
|
+
|
|
1476
|
+
/**
|
|
1477
|
+
* @description 应用重力到粒子,更新粒子速度
|
|
1478
|
+
* @param {Object} particle 粒子对象
|
|
1479
|
+
* @param {Number} dt 时间增量
|
|
1480
|
+
*/
|
|
1452
1481
|
applyGravity(particle, dt) {
|
|
1453
1482
|
_gravityScratch = Cesium.Cartesian3.normalize(particle.position, _gravityScratch);
|
|
1454
1483
|
Cesium.Cartesian3.multiplyByScalar(_gravityScratch, _gravity * dt, _gravityScratch);
|
|
1455
1484
|
particle.velocity = Cesium.Cartesian3.add(particle.velocity, _gravityScratch, particle.velocity);
|
|
1456
1485
|
}
|
|
1457
1486
|
|
|
1458
|
-
|
|
1487
|
+
/**
|
|
1488
|
+
* @description 添加粒子特效(启动绘制marker,绘制完成后创建粒子系统)
|
|
1489
|
+
* @param {Object} options 粒子特效参数对象
|
|
1490
|
+
*/
|
|
1459
1491
|
addParticleEffect(options) {
|
|
1460
1492
|
var that = this;
|
|
1461
1493
|
let mode = options.mode;
|
|
1494
|
+
// 仅支持火焰和烟雾两种模式
|
|
1462
1495
|
if (mode !== "flame" && mode !== "smoke") {
|
|
1463
1496
|
console.log("This mode is not supported.");
|
|
1464
1497
|
return;
|
|
1465
1498
|
}
|
|
1466
1499
|
if (options.gravity) this.setGravity(options.gravity);
|
|
1467
1500
|
this._options = options;
|
|
1501
|
+
// 启动marker绘制,绘制完成后回调创建粒子系统
|
|
1468
1502
|
this._drawManager?.startDraw("marker", {
|
|
1469
1503
|
image: null
|
|
1470
1504
|
}, (feature, {
|
|
@@ -1474,8 +1508,10 @@ class ParticleEffectViewModel {
|
|
|
1474
1508
|
if (shape && shape.type === "marker") {
|
|
1475
1509
|
let position = shape.position;
|
|
1476
1510
|
if (position) {
|
|
1511
|
+
// 将绘制位置转为变换矩阵作为粒子系统原点
|
|
1477
1512
|
let matrix = new Cesium.Matrix4.fromTranslation(position);
|
|
1478
1513
|
if (that._options.mode === "flame") {
|
|
1514
|
+
// 火焰模式:创建火焰粒子系统
|
|
1479
1515
|
let fireParticle = new Cesium.ParticleSystem({
|
|
1480
1516
|
emissionRate: that._options.particleNum,
|
|
1481
1517
|
imageSize: new Cesium.Cartesian2(that._options.particleSize, 2 * that._options.particleSize),
|
|
@@ -1497,6 +1533,7 @@ class ParticleEffectViewModel {
|
|
|
1497
1533
|
that._scene.primitives.add(fireParticle);
|
|
1498
1534
|
that._particleSystemList.push(fireParticle);
|
|
1499
1535
|
} else if (that._options.mode === "smoke") {
|
|
1536
|
+
// 烟雾模式:创建烟雾粒子系统
|
|
1500
1537
|
let smokeParticle = new Cesium.ParticleSystem({
|
|
1501
1538
|
emissionRate: that._options.particleNum,
|
|
1502
1539
|
imageSize: new Cesium.Cartesian2(that._options.particleSize, that._options.particleSize),
|
|
@@ -1553,62 +1590,91 @@ class ParticleEffectViewModel {
|
|
|
1553
1590
|
this.clear();
|
|
1554
1591
|
}
|
|
1555
1592
|
|
|
1556
|
-
|
|
1593
|
+
/**
|
|
1594
|
+
* @description 设置粒子数量
|
|
1595
|
+
* @param {Number} number 粒子数量
|
|
1596
|
+
*/
|
|
1557
1597
|
setParticleNumber(number) {
|
|
1558
1598
|
this._particleSystemList.forEach(particle => {
|
|
1559
1599
|
particle.emissionRate = number;
|
|
1560
1600
|
});
|
|
1561
1601
|
}
|
|
1562
|
-
|
|
1602
|
+
/**
|
|
1603
|
+
* @description 设置粒子大小(火焰模式下高度为宽度的2倍)
|
|
1604
|
+
* @param {Number} size 粒子大小
|
|
1605
|
+
*/
|
|
1563
1606
|
setParticleSize(size) {
|
|
1564
1607
|
let mode = this._options.mode;
|
|
1565
1608
|
this._particleSystemList.forEach(particle => {
|
|
1566
1609
|
if (mode === "flame") {
|
|
1610
|
+
// 火焰模式:高度为宽度的2倍
|
|
1567
1611
|
particle.minimumImageSize = new Cesium.Cartesian2(size, 2 * size);
|
|
1568
1612
|
particle.maximumImageSize = new Cesium.Cartesian2(size, 2 * size);
|
|
1569
1613
|
} else {
|
|
1614
|
+
// 烟雾模式:宽高一致
|
|
1570
1615
|
particle.minimumImageSize = new Cesium.Cartesian2(size, size);
|
|
1571
1616
|
particle.maximumImageSize = new Cesium.Cartesian2(size, size);
|
|
1572
1617
|
}
|
|
1573
1618
|
});
|
|
1574
1619
|
}
|
|
1575
|
-
|
|
1620
|
+
/**
|
|
1621
|
+
* @description 设置最小生命周期
|
|
1622
|
+
* @param {Number} minLifeCycle 最小生命周期
|
|
1623
|
+
*/
|
|
1576
1624
|
setMinLifeCycle(minLifeCycle) {
|
|
1577
1625
|
this._particleSystemList.forEach(particle => {
|
|
1578
1626
|
particle.minimumParticleLife = minLifeCycle;
|
|
1579
1627
|
});
|
|
1580
1628
|
}
|
|
1581
|
-
|
|
1629
|
+
/**
|
|
1630
|
+
* @description 设置最大生命周期
|
|
1631
|
+
* @param {Number} maxLifeCycle 最大生命周期
|
|
1632
|
+
*/
|
|
1582
1633
|
setmaxLifeCycle(maxLifeCycle) {
|
|
1583
1634
|
this._particleSystemList.forEach(particle => {
|
|
1584
1635
|
particle.maximumParticleLife = maxLifeCycle;
|
|
1585
1636
|
});
|
|
1586
1637
|
}
|
|
1587
|
-
|
|
1638
|
+
/**
|
|
1639
|
+
* @description 设置最小速度
|
|
1640
|
+
* @param {Number} minSpeed 最小速度
|
|
1641
|
+
*/
|
|
1588
1642
|
setMinSpeed(minSpeed) {
|
|
1589
1643
|
this._particleSystemList.forEach(particle => {
|
|
1590
1644
|
particle.minimumSpeed = minSpeed;
|
|
1591
1645
|
});
|
|
1592
1646
|
}
|
|
1593
|
-
|
|
1647
|
+
/**
|
|
1648
|
+
* @description 设置最大速度
|
|
1649
|
+
* @param {Number} maxSpeed 最大速度
|
|
1650
|
+
*/
|
|
1594
1651
|
setMaxSpeed(maxSpeed) {
|
|
1595
1652
|
this._particleSystemList.forEach(particle => {
|
|
1596
1653
|
particle.maximumSpeed = maxSpeed;
|
|
1597
1654
|
});
|
|
1598
1655
|
}
|
|
1599
|
-
|
|
1656
|
+
/**
|
|
1657
|
+
* @description 设置初始比例
|
|
1658
|
+
* @param {Number} startScale 初始比例
|
|
1659
|
+
*/
|
|
1600
1660
|
setStartScale(startScale) {
|
|
1601
1661
|
this._particleSystemList.forEach(particle => {
|
|
1602
1662
|
particle.startScale = startScale;
|
|
1603
1663
|
});
|
|
1604
1664
|
}
|
|
1605
|
-
|
|
1665
|
+
/**
|
|
1666
|
+
* @description 设置结束比例
|
|
1667
|
+
* @param {Number} endScale 结束比例
|
|
1668
|
+
*/
|
|
1606
1669
|
setEndScale(endScale) {
|
|
1607
1670
|
this._particleSystemList.forEach(particle => {
|
|
1608
1671
|
particle.endScale = endScale;
|
|
1609
1672
|
});
|
|
1610
1673
|
}
|
|
1611
|
-
|
|
1674
|
+
/**
|
|
1675
|
+
* @description 设置重力
|
|
1676
|
+
* @param {Number} gravity 重力系数
|
|
1677
|
+
*/
|
|
1612
1678
|
setGravity(gravity) {
|
|
1613
1679
|
_gravity = gravity;
|
|
1614
1680
|
}
|
|
@@ -2469,11 +2535,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2469
2535
|
value: true
|
|
2470
2536
|
}));
|
|
2471
2537
|
exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
|
|
2472
|
-
|
|
2538
|
+
const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
|
|
2473
2539
|
__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
|
|
2474
|
-
|
|
2540
|
+
const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
|
|
2475
2541
|
__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
|
|
2476
|
-
|
|
2542
|
+
const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
|
|
2477
2543
|
__webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
|
|
2478
2544
|
|
|
2479
2545
|
/***/ })
|
package/planeclip/index.js
CHANGED
|
@@ -111,10 +111,12 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
111
111
|
lang,
|
|
112
112
|
locale
|
|
113
113
|
} = (0, _useGlobalConfig.useLocale)();
|
|
114
|
-
let tiles = (0, _vue.ref)([]);
|
|
114
|
+
let tiles = (0, _vue.ref)([]); // 所有3dtiles模型对象列表
|
|
115
115
|
|
|
116
116
|
// 获取组件传参
|
|
117
117
|
const props = __props;
|
|
118
|
+
|
|
119
|
+
//平面裁剪表单参数
|
|
118
120
|
let formItem = (0, _vue.reactive)({
|
|
119
121
|
collapseValue: props?.settingParams?.collapseValue === '' ? '' : props?.settingParams?.collapseValue ?? "setting",
|
|
120
122
|
// 默认展开属性设置
|
|
@@ -125,14 +127,15 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
125
127
|
boxEnable: props?.settingParams?.boxEnable ?? false,
|
|
126
128
|
clipDistance: props?.settingParams?.clipDistance ?? 0
|
|
127
129
|
});
|
|
128
|
-
let viewModel = null;
|
|
130
|
+
let viewModel = null; // 平面裁剪视图模型实例
|
|
129
131
|
|
|
130
132
|
// 组件容器Ref
|
|
131
133
|
let boxRef = (0, _vue.ref)(null);
|
|
132
134
|
|
|
133
135
|
// 生成组件默认header
|
|
134
136
|
let headerTemp = (0, _vue.ref)();
|
|
135
|
-
let headerTempRef = (0, _vue.ref)();
|
|
137
|
+
let headerTempRef = (0, _vue.ref)(); // headerTemp组件Ref
|
|
138
|
+
|
|
136
139
|
(0, _vue.onMounted)(() => {
|
|
137
140
|
(0, _util.updatePosition)(boxRef.value, props);
|
|
138
141
|
(0, _vue.watch)(() => props.position, (newVal, oldVal) => {
|
|
@@ -163,10 +166,16 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
163
166
|
callbackParams();
|
|
164
167
|
}, 1000);
|
|
165
168
|
});
|
|
169
|
+
/**
|
|
170
|
+
* @description 视图模型回调参数处理(刷新图层列表并默认选中第一个)
|
|
171
|
+
* @param {String} key 回调类型
|
|
172
|
+
* @param {*} val 回调数据
|
|
173
|
+
*/
|
|
166
174
|
function callbackParams(key, val) {
|
|
167
175
|
if (viewModel) {
|
|
168
176
|
tiles.value = viewModel.findLayers(); // 获取所有tileset对象
|
|
169
177
|
formItem.tileset = "";
|
|
178
|
+
// 默认选中第一个图层
|
|
170
179
|
if (tiles.value.length > 0) {
|
|
171
180
|
formItem.tileset = tiles.value[0].guid;
|
|
172
181
|
}
|
|
@@ -183,7 +192,10 @@ var _default = exports.A = /*@__PURE__*/Object.assign(__default__, {
|
|
|
183
192
|
}
|
|
184
193
|
};
|
|
185
194
|
|
|
186
|
-
|
|
195
|
+
/**
|
|
196
|
+
* @description 参数改变处理
|
|
197
|
+
* @param {String} key 变化的字段名(tileset/clipDirection/reverseClip/enableClip/boxEnable/distance)
|
|
198
|
+
*/
|
|
187
199
|
function paramsChanged(key) {
|
|
188
200
|
switch (key) {
|
|
189
201
|
case "tileset":
|
|
@@ -472,6 +484,13 @@ var _useGlobalConfig = __webpack_require__(22686);
|
|
|
472
484
|
//平面裁剪逻辑类
|
|
473
485
|
|
|
474
486
|
class PlaneClipViewModel {
|
|
487
|
+
// 视图模型回调函数
|
|
488
|
+
/**
|
|
489
|
+
* @description 构造函数:初始化平面裁剪视图模型
|
|
490
|
+
* @param {Object} scenceView 场景视图对象
|
|
491
|
+
* @param {Object} options 平面裁剪参数对象
|
|
492
|
+
* @param {Function} callbackParams 视图模型回调函数
|
|
493
|
+
*/
|
|
475
494
|
constructor(scenceView, options, callbackParams) {
|
|
476
495
|
this._viewer = null;
|
|
477
496
|
//三维viewer对象
|
|
@@ -484,7 +503,6 @@ class PlaneClipViewModel {
|
|
|
484
503
|
z: 0,
|
|
485
504
|
angle: 0,
|
|
486
505
|
boxColor: Cesium.Color.fromCssColorString("#316882").withAlpha(0.4),
|
|
487
|
-
clipEdgeWidth: 4.0,
|
|
488
506
|
clipEdgeColorLables: "#63cf25",
|
|
489
507
|
clipEdgeColor: Cesium.Color.fromCssColorString("#63cf25"),
|
|
490
508
|
clipEdgeWidth: 3,
|
|
@@ -506,6 +524,7 @@ class PlaneClipViewModel {
|
|
|
506
524
|
this._drawManager = null;
|
|
507
525
|
//绘制管理对象
|
|
508
526
|
this._language = {};
|
|
527
|
+
// 当前语言包
|
|
509
528
|
this.callbackParams = null;
|
|
510
529
|
const {
|
|
511
530
|
locale
|
|
@@ -522,6 +541,10 @@ class PlaneClipViewModel {
|
|
|
522
541
|
// 添加图层数据源变化监听
|
|
523
542
|
_gisUtils.mapViewUtils.bindViewEvents("resetLayerDatas", this._resetListData, scenceView._viewerId);
|
|
524
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* @description 图层数据源变化时重置列表数据
|
|
546
|
+
* @param {Object} e 事件对象
|
|
547
|
+
*/
|
|
525
548
|
_resetListData(e) {
|
|
526
549
|
// 如果图层变化事件是自己触发的 则不继续执行 避免死循环
|
|
527
550
|
if (e.eventTarget && e.eventTarget === this) {
|
|
@@ -531,10 +554,11 @@ class PlaneClipViewModel {
|
|
|
531
554
|
}
|
|
532
555
|
// 查找所有3dtiles模型对象
|
|
533
556
|
findLayers() {
|
|
534
|
-
|
|
557
|
+
const tilesets = [];
|
|
535
558
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
536
559
|
for (let m = 0; m < primitives.length; m++) {
|
|
537
560
|
if (primitives[m] instanceof Cesium.Cesium3DTileset) {
|
|
561
|
+
// 跳过隐藏的模型
|
|
538
562
|
if (!primitives[m].show) continue;
|
|
539
563
|
tilesets.push({
|
|
540
564
|
guid: primitives[m].guid,
|
|
@@ -545,7 +569,11 @@ class PlaneClipViewModel {
|
|
|
545
569
|
return tilesets;
|
|
546
570
|
}
|
|
547
571
|
|
|
548
|
-
|
|
572
|
+
/**
|
|
573
|
+
* @description 根据id获取tileset对象
|
|
574
|
+
* @param {String} id 图层guid
|
|
575
|
+
* @returns {Object} tileset对象
|
|
576
|
+
*/
|
|
549
577
|
findLayerById(id) {
|
|
550
578
|
const primitives = this._options.viewer.scene.primitives._primitives;
|
|
551
579
|
const tileset = primitives.find(function (item) {
|
|
@@ -556,7 +584,7 @@ class PlaneClipViewModel {
|
|
|
556
584
|
|
|
557
585
|
// 开始分析
|
|
558
586
|
start() {
|
|
559
|
-
|
|
587
|
+
const that = this;
|
|
560
588
|
// 判断是否添加了模型
|
|
561
589
|
var flag = false;
|
|
562
590
|
var models = this._options.viewer.scene.primitives._primitives;
|
|
@@ -566,6 +594,7 @@ class PlaneClipViewModel {
|
|
|
566
594
|
}
|
|
567
595
|
}
|
|
568
596
|
if (flag) {
|
|
597
|
+
// 存在可见模型:启动marker绘制,绘制完成后创建裁剪对象
|
|
569
598
|
if (!this._drawManager) return;
|
|
570
599
|
this._drawManager.startDraw("marker", {
|
|
571
600
|
image: null
|
|
@@ -581,6 +610,7 @@ class PlaneClipViewModel {
|
|
|
581
610
|
that._drawManager && that._drawManager.clearDrawGroup("PlaneClipDraw");
|
|
582
611
|
}, "PlaneClipDraw");
|
|
583
612
|
} else {
|
|
613
|
+
// 无可见模型:弹出提示
|
|
584
614
|
(0, _message.default)({
|
|
585
615
|
message: this._language.value.webgl["addModelAnalysisTips"],
|
|
586
616
|
type: "warning"
|
|
@@ -603,18 +633,27 @@ class PlaneClipViewModel {
|
|
|
603
633
|
_gisUtils.mapViewUtils.offViewEvents("resetLayerDatas", this._resetListData, this._viewer._container.id);
|
|
604
634
|
}
|
|
605
635
|
|
|
606
|
-
|
|
636
|
+
/**
|
|
637
|
+
* @description 设置裁剪对象
|
|
638
|
+
* @param {String} layerId 图层guid
|
|
639
|
+
*/
|
|
607
640
|
setLayer(layerId) {
|
|
608
641
|
this.clear();
|
|
609
642
|
this._options.tileset = this.findLayerById(layerId);
|
|
610
643
|
}
|
|
611
644
|
|
|
612
|
-
|
|
645
|
+
/**
|
|
646
|
+
* @description 设置裁剪方向,2:x,3:y,z:4
|
|
647
|
+
* @param {Number} val 裁剪方向值(2:x,3:y,4:z)
|
|
648
|
+
*/
|
|
613
649
|
setClipDirection(val) {
|
|
614
650
|
this._options.clipType = val;
|
|
615
651
|
if (this._planeclipAnalysis) this._planeclipAnalysis.clipType = val;
|
|
616
652
|
}
|
|
617
|
-
|
|
653
|
+
/**
|
|
654
|
+
* @description 设置裁剪方式,为false时,则为正向裁剪,否则为逆向裁剪
|
|
655
|
+
* @param {Boolean} val 是否逆向裁剪
|
|
656
|
+
*/
|
|
618
657
|
setClipType(val) {
|
|
619
658
|
this._options.reverseClip = val;
|
|
620
659
|
if (this._planeclipAnalysis) {
|
|
@@ -622,7 +661,10 @@ class PlaneClipViewModel {
|
|
|
622
661
|
this._planeclipAnalysis.distance = this._options.distance;
|
|
623
662
|
}
|
|
624
663
|
}
|
|
625
|
-
|
|
664
|
+
/**
|
|
665
|
+
* @description 是否裁剪
|
|
666
|
+
* @param {Boolean} val 是否启用裁剪
|
|
667
|
+
*/
|
|
626
668
|
setEnable(val) {
|
|
627
669
|
this._options.enable = val;
|
|
628
670
|
if (this._planeclipAnalysis) {
|
|
@@ -630,13 +672,20 @@ class PlaneClipViewModel {
|
|
|
630
672
|
this._planeclipAnalysis.boxEnable = this._options.boxEnable;
|
|
631
673
|
}
|
|
632
674
|
}
|
|
633
|
-
|
|
675
|
+
/**
|
|
676
|
+
* @description 显/隐辅助对象
|
|
677
|
+
* @param {Boolean} val 是否显示辅助盒子
|
|
678
|
+
*/
|
|
634
679
|
setShowBox(val) {
|
|
635
680
|
this._options.boxEnable = val;
|
|
636
681
|
if (this._planeclipAnalysis) this._planeclipAnalysis.boxEnable = val;
|
|
637
682
|
}
|
|
638
|
-
|
|
683
|
+
/**
|
|
684
|
+
* @description 设置裁剪距离
|
|
685
|
+
* @param {Number} val 裁剪距离值
|
|
686
|
+
*/
|
|
639
687
|
setDistance(val) {
|
|
688
|
+
// z方向裁剪时距离取反
|
|
640
689
|
if (this._options.clipType == 4) {
|
|
641
690
|
this._options.distance = -Number(val);
|
|
642
691
|
} else {
|
|
@@ -2465,11 +2514,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2465
2514
|
value: true
|
|
2466
2515
|
}));
|
|
2467
2516
|
exports.kq_npm_client_leaflet_vue = exports.kq_npm_client_common_vue = exports.kq_npm_client3d_webgl_vue = void 0;
|
|
2468
|
-
|
|
2517
|
+
const kq_npm_client_common_vue = exports.kq_npm_client_common_vue = window.kq_npm_client_common_vue = window.kq_npm_client_common_vue || {};
|
|
2469
2518
|
__webpack_require__.g.kq_npm_client_common_vue = kq_npm_client_common_vue;
|
|
2470
|
-
|
|
2519
|
+
const kq_npm_client_leaflet_vue = exports.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue = window.kq_npm_client_leaflet_vue || {};
|
|
2471
2520
|
__webpack_require__.g.kq_npm_client_leaflet_vue = kq_npm_client_leaflet_vue;
|
|
2472
|
-
|
|
2521
|
+
const kq_npm_client3d_webgl_vue = exports.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue = window.kq_npm_client3d_webgl_vue || {};
|
|
2473
2522
|
__webpack_require__.g.kq_npm_client3d_webgl_vue = kq_npm_client3d_webgl_vue;
|
|
2474
2523
|
|
|
2475
2524
|
/***/ })
|