UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 2.42 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{CloudsParameters as h}from"../../environment/CloudsParameters.js";import e from"../../webgl/RenderCamera.js";import{HUDRenderStyle as s}from"../core/shaderLibrary/hud/HUDRenderStyle.js";import{OITPass as r}from"./OITPass.js";import{RenderSlot as g}from"./RenderSlot.js";import{Update as n}from"./Update.js";import{SceneLighting as l}from"../lighting/SceneLighting.js";class a{constructor(i,t){this.width=i,this.height=t}}class o{constructor(i){this.shadowMap=i,this.slot=g.OPAQUE_MATERIAL,this.slicePlane=null,this.hasOccludees=!1,this.enableFillLights=!0,this.oitPass=r.NONE,this.alignPixelEnabled=!1,this.decorations=!0,this.overlayStretch=1,this.viewshedEnabled=!1,this._camera=new e,this._inverseViewport=t(),this._oldLighting=new l,this._newLighting=new l,this._fadedLighting=new l,this._lighting=this._newLighting,this.ssr=new c,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.highlights=new Array,this.highlightOrderMap=new Map,this.highlightMixOrigin=t(),this.highlightMixTexture=null,this.hudRenderStyle=s.Occluded,this.hudOccludedFragmentOpacity=1,this.clouds=new h,this.shadowHighlightsVisible=!1}get camera(){return this._camera}set camera(i){this._camera=i,this._inverseViewport[0]=1/i.fullViewport[2],this._inverseViewport[1]=1/i.fullViewport[3]}get inverseViewport(){return this._inverseViewport}get lighting(){return this._lighting}fadeLighting(){switch(this.clouds.fadeFactor){case 0:this._lighting=this._oldLighting;break;default:this._fadedLighting.lerpLighting(this._oldLighting,this._newLighting,this.clouds.fadeFactor),this._lighting=this._fadedLighting;break;case 1:this._lighting=this._newLighting,this._oldLighting.copyFrom(this._newLighting)}}updateLighting(i,t,h,e){this._oldLighting.copyFrom(this.lighting),this._newLighting.noonFactor=t,this._newLighting.globalFactor=h,this._newLighting.set(i),e===n.FadeWithWeather&&this.clouds.requestFade(),this.fadeLighting()}get highlight(){return null==this.highlightLevel?null:this.highlights[this.highlightLevel]}}class c{constructor(){this.fadeFactor=1,this.reprojectionMatrix=i()}}export{o as BindParameters,a as ViewportSize};