@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 4.83 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 has from"../../../core/has.js";import{Milliseconds as e}from"../../../core/time.js";class a{static isValidProfile(e){return e in a.profiles}static getDefaultProfile(){return has("esri-iPhone")?"low":"medium"}static apply(e,i){const t=a.profiles[e];i.graphics3D.maxTotalNumberOfFeatures=t.graphics3D.maxTotalNumberOfFeatures,i.graphics3D.maxNumberOfDrawCalls=t.graphics3D.maxNumberOfDrawCalls,i.graphics3D.maxTotalNumberOfVertices=t.graphics3D.maxTotalNumberOfVertices,i.graphics3D.polygonLodFactor=t.graphics3D.polygonLodFactor,i.graphics3D.polylineLodFactor=t.graphics3D.polylineLodFactor,i.graphics3D.snapshotAvailable=t.graphics3D.snapshotAvailable,i.graphics3D.skipHighSymbolLods=t.graphics3D.skipHighSymbolLods;const o=i.sceneService.object,l=t.sceneService.object;o.lodFactor=l.lodFactor,i.sceneService.point.lodFactor=t.sceneService.point.lodFactor,i.sceneService.integratedMesh.lodFactor=t.sceneService.integratedMesh.lodFactor,i.sceneService.pointCloud.lodFactor=t.sceneService.pointCloud.lodFactor,i.tiledSurface.lodBias=t.tiledSurface.lodBias,i.tiledSurface.angledSplitBias=t.tiledSurface.angledSplitBias,i.tiledSurface.vtlContentZoom=t.tiledSurface.vtlContentZoom,i.tiledSurface.elevationLevelDelta=t.tiledSurface.elevationLevelDelta,i.tiledSurface.reduceTileLevelDifferences=t.tiledSurface.reduceTileLevelDifferences,i.heatmap.pixelRatio=t.heatmap.pixelRatio,i.heatmap.maxTotalNumberOfFeatures=t.heatmap.maxTotalNumberOfFeatures,i.fadeDuration=t.fadeDuration,i.antialiasingEnabled=t.antialiasingEnabled,i.physicallyBasedRenderingEnabled=t.physicalBasedRenderingEnabled,i.highQualityTransparency=t.highQualityTransparency,i.highResolutionAtmosphere=t.highResolutionAtmosphere,i.reflections=t.reflections,i.ambientOcclusion=t.ambientOcclusion,i.maxTexturePixels=t.maxTexturePixels,i.memoryLimit=t.memoryLimit,i.additionalCacheMemory=t.additionalCacheMemory,i.frameRate=t.frameRate,i.maximumPixelRatio=t.maximumPixelRatio}static{this.test={reset(){const e=t();for(const i of Object.keys(e))a.profiles[i]=e[i]}}}}const i={IPhone12Pro:120,GalaxyS20:200,FullHD:240,SurfacePro7:300,FullHDRetina:430};function t(){const a=!!has("esri-mobile"),t=!!has("ios"),o=e(400);return{low:{graphics3D:{maxTotalNumberOfFeatures:25e3,maxNumberOfDrawCalls:8e3,maxTotalNumberOfVertices:255e4,polygonLodFactor:.5,polylineLodFactor:1,snapshotAvailable:!1,skipHighSymbolLods:!0},heatmap:{pixelRatio:.125,maxTotalNumberOfFeatures:5e4},sceneService:{object:{lodFactor:.2},point:{lodFactor:1},integratedMesh:{lodFactor:.6},pointCloud:{lodFactor:.5}},tiledSurface:{lodBias:-1,angledSplitBias:.5,vtlContentZoom:.75,elevationLevelDelta:3,reduceTileLevelDifferences:!0},fadeDuration:e(0),antialiasingEnabled:!1,physicalBasedRenderingEnabled:!1,highQualityTransparency:!1,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?1048576:4194304,memoryLimit:200+i.IPhone12Pro,additionalCacheMemory:0,frameRate:0,maximumPixelRatio:1},medium:{graphics3D:{maxTotalNumberOfFeatures:1e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:625e4,polygonLodFactor:a?.8:1,polylineLodFactor:a?1.2:1.5,snapshotAvailable:!t,skipHighSymbolLods:!1},heatmap:{pixelRatio:.25,maxTotalNumberOfFeatures:13e4},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:3,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:o,antialiasingEnabled:!1,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!1,reflections:!1,ambientOcclusion:!1,maxTexturePixels:a?4194304:4096**2,memoryLimit:a?600+i.GalaxyS20:750+i.FullHD,additionalCacheMemory:a?-100:150,frameRate:0,maximumPixelRatio:1},high:{graphics3D:{maxTotalNumberOfFeatures:1e5,maxNumberOfDrawCalls:17e3,maxTotalNumberOfVertices:125e5,polygonLodFactor:a?1.2:2,polylineLodFactor:a?1.2:2,snapshotAvailable:!t,skipHighSymbolLods:!1},heatmap:{pixelRatio:.5,maxTotalNumberOfFeatures:23e4},sceneService:{object:{lodFactor:1},point:{lodFactor:1},integratedMesh:{lodFactor:1},pointCloud:{lodFactor:1}},tiledSurface:{lodBias:0,angledSplitBias:1,vtlContentZoom:1.5,elevationLevelDelta:2,reduceTileLevelDifferences:!has("disable-feature:reduce-map-tile-levels")},fadeDuration:o,antialiasingEnabled:!0,physicalBasedRenderingEnabled:!0,highQualityTransparency:!0,highResolutionAtmosphere:!0,reflections:!0,ambientOcclusion:!0,maxTexturePixels:a?4096**2:1/0,memoryLimit:a?900+i.SurfacePro7:1500+i.FullHDRetina,additionalCacheMemory:a?-150:0,frameRate:0,maximumPixelRatio:a?1:1/0}}}!function(e){e.profiles=t()}(a||(a={}));const o=a;export{o as default};