修改光照进度条拖动bug
This commit is contained in:
@ -52,6 +52,14 @@ export default class Sunshine {
|
||||
that.viewer.clock.currentTime = Cesium.JulianDate.fromDate(now);
|
||||
that.viewer.clock.multiplier = that.options.speed;
|
||||
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)
|
||||
}
|
||||
@ -218,6 +226,12 @@ export default class Sunshine {
|
||||
this.entity = null
|
||||
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) {
|
||||
this._DialogObject.close()
|
||||
this._DialogObject = null
|
||||
|
Reference in New Issue
Block a user