12345 |
- /*
- All material copyright ESRI, All Rights Reserved, unless otherwise specified.
- See https://js.arcgis.com/4.25/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="esri.webscene.Environment",d=r.getLogger(u),b=(e,t,o)=>({enabled:!o||!o.isPresentation});let y=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,d)&&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}})],y.prototype,"lighting",void 0),e([s(m)],y.prototype,"background",void 0),e([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:b}}})],y.prototype,"atmosphereEnabled",void 0),e([s({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:b}}})],y.prototype,"starsEnabled",void 0),e([s({types:l,nonNullable:!0,json:{write:!0},value:new i})],y.prototype,"weather",null),y=g=e([n(u)],y);const j=y;export{j as default};
|