@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.77 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{__decorate as t}from"tslib";import{JSONSupport as e}from"../core/JSONSupport.js";import{clone as o}from"../core/lang.js";import r from"../core/Logger.js";import{property as i,subclass as n}from"../core/accessorSupport/decorators.js";import s from"../views/3d/environment/SunnyWeather.js";import{weatherTypes as l,validateWeatherType as a}from"../views/3d/environment/weather.js";import{lightingTypes as p}from"./lightingTypes.js";import h from"./SunLighting.js";import c from"./VirtualLighting.js";import{backgroundProperty as g}from"./background/utils.js";var m;const u=(t,e,o)=>({enabled:!o?.isPresentation});let d=class extends e{static{m=this}constructor(t){super(t),this.lighting=new h,this.background=null,this.atmosphereEnabled=!0,this.starsEnabled=!0}set weather(t){a(t?.type,r.getLogger(this))&&this._set("weather",t)}clone(){return new m(this.cloneConstructProperties())}cloneConstructProperties(){return{lighting:this.lighting&&"virtual"===this.lighting.type?c.prototype.clone.call(this.lighting):h.prototype.clone.call(this.lighting),background:o(this.background),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,weather:this.weather.clone()}}};t([i({types:{defaultKeyValue:"sun",...p},nonNullable:!0,json:{write:!0}})],d.prototype,"lighting",void 0),t([i(g)],d.prototype,"background",void 0),t([i({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:u}}})],d.prototype,"atmosphereEnabled",void 0),t([i({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:u}}})],d.prototype,"starsEnabled",void 0),t([i({types:l,nonNullable:!0,json:{write:!0},value:new s})],d.prototype,"weather",null),d=m=t([n("esri.webscene.Environment")],d);const b=d;export{b as default};