; (function (Cesium) { checkSkyScenery(Cesium); /** * @description: 日照阴影效果模拟 * @param {*} _viewer * @param {*} _speed:变化速率 * @return {*} */ function LightingShadow(_viewer, _speed) { // 赋值 this.viewer = _viewer; this._speed = _speed; this.open(); } Object.defineProperties(LightingShadow.prototype, { speed: { get: function () { return this._speed }, set: function (e) { this._speed = e this.viewer.clock.multiplier = e } }, }) LightingShadow.prototype.open = function () { // 保留 this.enableLighting = this.viewer.scene.globe.enableLighting this.shadows = this.viewer.shadows this.multiplier = this.viewer.clock.multiplier this.viewer.scene.globe.enableLighting = true; this.viewer.shadows = true; this.viewer.clock.multiplier = Cesium.defaultValue(this.speed, 5000); } LightingShadow.prototype.close = function () { this.viewer.scene.globe.enableLighting = this.enableLighting this.viewer.shadows = this.shadows this.viewer.clock.multiplier = this.multiplier } Cesium.LightingShadow = LightingShadow }(SkyScenery));