UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 1.1 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{getOrCreateMapValue as t}from"../../../../core/MapUtils.js";import{a as e}from"../../../../chunks/PointRenderer.glsl.js";class i extends e{constructor(t,e,i,n,h,s,r,o,l=null){super(i,h,e),this.id=t,this.obb=n,this.coordinates=s,this.rgb=r,this.attributes=o,this.pointIdFilterMap=l,this.highlightMap=new Map}addHighlight(e,i){const{highlightMap:n}=this,r=t(n,i.highlightName,(()=>new Array)),o=new s(e,i);r.push(o);const l=h(o);for(let t=r.length-1;t>0&&l<h(r[t-1]);--t)[r[t-1],r[t]]=[r[t],r[t-1]]}removeHighlight(t){const{highlightMap:e}=this,{highlightName:i}=t,n=e.get(i);if(!n)return;const h=n.filter((e=>e.id!==t));0===h.length?e.delete(i):e.set(i,h)}get cachedMemory(){return 5*this.coordinates.length+128}}function n(t){return t.hasOwnProperty("splatSize")}function h(t){return null!=t.componentIndex?t.componentIndex:-1}class s{constructor(t,e){this.componentIndex=t,this.id=e}}export{i as PointCloudRendererNode,n as isPointRendererNode};