UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

3 lines (2 loc) 1.97 kB
/* 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 r}from"../core/lang.js";import{property as o,subclass as s}from"../core/accessorSupport/decorators.js";import a from"./Glow.js";import{reader as i}from"../core/accessorSupport/decorators/reader.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";var l;let p=class extends e{static{l=this}constructor(t){super(t),this.type="sun",this.date=null,this.directShadowsEnabled=!1,this.displayUTCOffset=null,this.glow=null}readDate(t,e){return null!=e.datetime&&new Date(e.datetime)||null}writeDate(t,e,r){e[r]=t.getTime()}readDirectShadowsEnabled(t,e){return!!e.directShadows}writedirectShadowsEnabled(t,e,r){t&&(e[r]=t)}writeDisplayUTCOffset(t,e){null!=t&&(e.displayUTCOffset=t)}clone(){return new l(this.cloneConstructProperties())}cloneConstructProperties(){const t={directShadowsEnabled:this.directShadowsEnabled,displayUTCOffset:null!=this.displayUTCOffset?this.displayUTCOffset:null,glow:r(this.glow)};return null!=this.date&&(t.date=new Date(this.date)),t}};t([o({readOnly:!0,type:["sun"],json:{write:!0}})],p.prototype,"type",void 0),t([o({type:Date,json:{type:Number,write:{target:"datetime"}}})],p.prototype,"date",void 0),t([i("date",["datetime"])],p.prototype,"readDate",null),t([d("date")],p.prototype,"writeDate",null),t([o({type:Boolean,json:{default:!1,write:{target:"directShadows"}}})],p.prototype,"directShadowsEnabled",void 0),t([i("directShadowsEnabled",["directShadows"])],p.prototype,"readDirectShadowsEnabled",null),t([d("directShadowsEnabled")],p.prototype,"writedirectShadowsEnabled",null),t([o({type:Number,json:{write:!0}})],p.prototype,"displayUTCOffset",void 0),t([d("displayUTCOffset")],p.prototype,"writeDisplayUTCOffset",null),t([o({type:a,json:{write:!0}})],p.prototype,"glow",void 0),p=l=t([s("esri.webscene.SunLighting")],p);const n=p;export{n as default};