12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.24/esri/copyright.txt for details.
- */
- import{_ as e}from"../chunks/tslib.es6.js";import{JSONSupport as t}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/accessorSupport/ensureType.js";import{subclass as n}from"../core/accessorSupport/decorators/subclass.js";import i 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 c from"./SunLighting.js";import h from"./VirtualLighting.js";import{backgroundProperty as m}from"./background/utils.js";var g;const u=r.getLogger("esri.webscene.Environment"),d=(e,t,o)=>({enabled:!o||!o.isPresentation});let b=g=class extends t{constructor(e){super(e),this.lighting=new c,this.background=null,this.atmosphereEnabled=!0,this.starsEnabled=!0}set weather(e){a(e?.type,u)&&this._set("weather",e)}clone(){return new g(this.cloneConstructProperties())}cloneConstructProperties(){return{lighting:this.lighting&&"virtual"===this.lighting.type?h.prototype.clone.call(this.lighting):c.prototype.clone.call(this.lighting),background:o(this.background),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,weather:this.weather.clone()}}};e([s({types:p,nonNullable:!0,json:{write:!0}})],b.prototype,"lighting",void 0),e([s(m)],b.prototype,"background",void 0),e([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:d}}})],b.prototype,"atmosphereEnabled",void 0),e([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:d}}})],b.prototype,"starsEnabled",void 0),e([s({types:l,nonNullable:!0,json:{write:!0},value:new i})],b.prototype,"weather",null),b=g=e([n("esri.webscene.Environment")],b);const y=b;export{y as default};
|