UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.37 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import{identity as t,translate as o,rotate as e,scale as r}from"../../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as s}from"../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{toRadian as i}from"../../../../../core/libs/gl-matrix-2/math/common.js";import{VTLUniqueSymbol as m}from"./core.js";import{CollisionJob as l}from"./jobs.js";import{SymbolDeclutterer as n}from"./SymbolDeclutterer.js";import{SymbolRepository as a}from"./SymbolRepository.js";import{writeOpacityToBuffers as c}from"./util.js";import{Visibility as f}from"../style/StyleDefinition.js";function y(s,y){const j=s.transforms.tileUnitsToPixels,b=i(y),h=Math.cos(b),u=Math.sin(b),x=Math.ceil(512*(Math.abs(u)+Math.abs(h)));t(p),o(p,p,[x/2,x/2]),e(p,p,b),o(p,p,[-256,-256]),r(p,p,[1/8,1/8,1]),s.transforms.tileUnitsToPixels=p;const g=[],S=new a(4096,g,(()=>new m)),M=new n(g,S,((t,o,e)=>new l(t,o,e,s.styleRepository,s.key.level,y)),((t,o)=>{c(t,o,!1)}),(()=>0),(t=>{const o=s.styleRepository.getStyleLayerByUID(t).getLayoutProperty("visibility");return!o||o.getValue()!==f.NONE}));g.push(s),S.add(s),M.setScreenSize(x,x),M.continue(1/0),S.removeTile(s),s.transforms.tileUnitsToPixels=j}const p=s();export{y as declutterSingleTile};