@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.92 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
import{_ as t}from"../chunks/tslib.es6.js";import e from"../core/JSONSupport.js";import{clone as o}from"../core/lang.js";import r from"../core/Logger.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import n 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 m}from"./background/utils.js";var g;const u=(t,e,o)=>({enabled:!o?.isPresentation});let d=class extends e{static{g=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 g(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([s({types:p,nonNullable:!0,json:{write:!0}})],d.prototype,"lighting",void 0),t([s(m)],d.prototype,"background",void 0),t([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:u}}})],d.prototype,"atmosphereEnabled",void 0),t([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:u}}})],d.prototype,"starsEnabled",void 0),t([s({types:l,nonNullable:!0,json:{write:!0},value:new n})],d.prototype,"weather",null),d=g=t([i("esri.webscene.Environment")],d);const b=d;export{b as default};