Compare commits
3 Commits
8afd3138f4
...
7a00e78145
Author | SHA1 | Date | |
---|---|---|---|
7a00e78145 | |||
76f4b707a6 | |||
01d82c16c9 |
@ -13,6 +13,7 @@ class DrawPolygon extends Draw {
|
|||||||
* */
|
* */
|
||||||
constructor(sdk, options = {}) {
|
constructor(sdk, options = {}) {
|
||||||
super(sdk, options)
|
super(sdk, options)
|
||||||
|
this.color = options.color || 'rgba(255,0,0,0.5)'
|
||||||
this.polygonHasCreated = false
|
this.polygonHasCreated = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -34,8 +35,8 @@ class DrawPolygon extends Draw {
|
|||||||
positions: new Cesium.CallbackProperty((e) => {
|
positions: new Cesium.CallbackProperty((e) => {
|
||||||
return that.positions.concat(that.positions[0])
|
return that.positions.concat(that.positions[0])
|
||||||
}),
|
}),
|
||||||
width: 2,
|
width: 3,
|
||||||
material: Cesium.Color.fromCssColorString('#c1c505').withAlpha(0.5),
|
material: Cesium.Color.fromCssColorString(that.color).withAlpha(1),
|
||||||
clampToGround: true,
|
clampToGround: true,
|
||||||
zIndex: 99999999
|
zIndex: 99999999
|
||||||
},
|
},
|
||||||
|
@ -52,6 +52,14 @@ export default class Sunshine {
|
|||||||
that.viewer.clock.currentTime = Cesium.JulianDate.fromDate(now);
|
that.viewer.clock.currentTime = Cesium.JulianDate.fromDate(now);
|
||||||
that.viewer.clock.multiplier = that.options.speed;
|
that.viewer.clock.multiplier = that.options.speed;
|
||||||
that.viewer.shadowMap.softShadows = that.options.softShadow;
|
that.viewer.shadowMap.softShadows = that.options.softShadow;
|
||||||
|
that.viewer.shadowMap.cascadesEnabled = true
|
||||||
|
that.viewer.shadowMap.size = 2048;
|
||||||
|
that.viewer.shadowMap.numberOfCascades = 4; // 增加级联层数(默认3层)
|
||||||
|
that.viewer.shadowMap.maximumDistance = 5000; // 扩大阴影渲染距离
|
||||||
|
const lightCamera = that.viewer.shadowMap._lightCamera;
|
||||||
|
lightCamera.frustum.near = 0.1; // 缩小近平面距离
|
||||||
|
lightCamera.frustum.far = 10000; // 扩大远平面距离
|
||||||
|
that.viewer.shadowMap.normalOffset = true; // 避免深度冲突导致的阴影闪烁
|
||||||
|
|
||||||
that.edit(true)
|
that.edit(true)
|
||||||
}
|
}
|
||||||
@ -218,6 +226,12 @@ export default class Sunshine {
|
|||||||
this.entity = null
|
this.entity = null
|
||||||
this.timeLine.clear()
|
this.timeLine.clear()
|
||||||
|
|
||||||
|
this.viewer.shadowMap.cascadesEnabled = false
|
||||||
|
this.viewer.shadowMap.size = 1024;
|
||||||
|
this.viewer.shadowMap.numberOfCascades = 3; // 增加级联层数(默认3层)
|
||||||
|
const lightCamera = this.viewer.shadowMap._lightCamera;
|
||||||
|
this.viewer.shadowMap.normalOffset = false; // 避免深度冲突导致的阴影闪烁
|
||||||
|
|
||||||
if (this._DialogObject && !this._DialogObject.isDestroy) {
|
if (this._DialogObject && !this._DialogObject.isDestroy) {
|
||||||
this._DialogObject.close()
|
this._DialogObject.close()
|
||||||
this._DialogObject = null
|
this._DialogObject = null
|
||||||
|
@ -33,7 +33,9 @@ export default class TimeLine {
|
|||||||
that.startTime = Date.now() - ((that.manualPosition || 0) * 86400 * 1000 / that.speed);
|
that.startTime = Date.now() - ((that.manualPosition || 0) * 86400 * 1000 / that.speed);
|
||||||
|
|
||||||
that.timeline.addEventListener('mousedown', (e) => {
|
that.timeline.addEventListener('mousedown', (e) => {
|
||||||
that.isDragging = true;
|
if (e.srcElement.className === 'handle') {
|
||||||
|
that.isDragging = true;
|
||||||
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -362,6 +362,7 @@ class CircleDiffuse extends Base {
|
|||||||
return this.options.circle
|
return this.options.circle
|
||||||
}
|
}
|
||||||
set circle(v) {
|
set circle(v) {
|
||||||
|
console.log(v)
|
||||||
this.options.circle = v || [{ radius: 10 }]
|
this.options.circle = v || [{ radius: 10 }]
|
||||||
for (let i = 0; i < this.options.circle.length; i++) {
|
for (let i = 0; i < this.options.circle.length; i++) {
|
||||||
if(this.options.circle[i].radius>999999) {
|
if(this.options.circle[i].radius>999999) {
|
||||||
@ -1405,7 +1406,7 @@ class CircleDiffuse extends Base {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
this._radius = radius
|
this._radius = radius
|
||||||
inputElm.value = value
|
// inputElm.value = value
|
||||||
CircleDiffuse.create(this)
|
CircleDiffuse.create(this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ class CurvelineObject extends Base {
|
|||||||
options['extend-width'] || options['extend-width'] === 0
|
options['extend-width'] || options['extend-width'] === 0
|
||||||
? options['extend-width']
|
? options['extend-width']
|
||||||
: 10
|
: 10
|
||||||
this.options['extend-color'] = options['extend-color'] || 'rgba(255,222,0,0.3)'
|
this.options['extend-color'] = options['extend-color'] || 'rgba(255,255,80,0.3)'
|
||||||
this.options.show =
|
this.options.show =
|
||||||
options.show || options.show === false ? options.show : true
|
options.show || options.show === false ? options.show : true
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
|
@ -33,7 +33,7 @@ class PolylineObject extends Base {
|
|||||||
* @param options.smooth=false {boolean} 线段圆滑
|
* @param options.smooth=false {boolean} 线段圆滑
|
||||||
* @param options.extend=false {boolean} 线缓冲
|
* @param options.extend=false {boolean} 线缓冲
|
||||||
* @param options['extend-width']=10 {number} 线缓冲宽度
|
* @param options['extend-width']=10 {number} 线缓冲宽度
|
||||||
* @param options['extend-color']=rgba(255,222,0,0.5) {number} 线缓冲颜色
|
* @param options['extend-color']=rgba(255,255,80,0.3) {number} 线缓冲颜色
|
||||||
* @param options.show=true {boolean} 显隐
|
* @param options.show=true {boolean} 显隐
|
||||||
* @param {Array.<object>} options.positions 坐标数组 [{lng,lat},...]
|
* @param {Array.<object>} options.positions 坐标数组 [{lng,lat},...]
|
||||||
* @param options.label {object} 标注
|
* @param options.label {object} 标注
|
||||||
@ -70,7 +70,7 @@ class PolylineObject extends Base {
|
|||||||
options['extend-width'] || options['extend-width'] === 0
|
options['extend-width'] || options['extend-width'] === 0
|
||||||
? options['extend-width']
|
? options['extend-width']
|
||||||
: 10
|
: 10
|
||||||
this.options['extend-color'] = options['extend-color'] || 'rgba(255,222,0,0.3)'
|
this.options['extend-color'] = options['extend-color'] || 'rgba(255,255,80,0.3)'
|
||||||
this.options.show =
|
this.options.show =
|
||||||
options.show || options.show === false ? options.show : true
|
options.show || options.show === false ? options.show : true
|
||||||
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2
|
||||||
|
@ -2123,6 +2123,9 @@
|
|||||||
.YJ-custom-base-dialog.particle-effects>.content .row>.col {
|
.YJ-custom-base-dialog.particle-effects>.content .row>.col {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
.YJ-custom-base-dialog.particle-effects>.content .ew-color-picker .row>.col {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.YJ-custom-base-dialog.particle-effects>.content [type="range"] {
|
.YJ-custom-base-dialog.particle-effects>.content [type="range"] {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
Reference in New Issue
Block a user