@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 1.35 kB
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
import{radToByte as s}from"./GeometryUtils.js";import t from"./MemoryBuffer.js";import{i1616to32 as r,i8888to32 as u,i88to16 as o}from"../webgl/number.js";class h extends t{constructor(s){super(s)}add(s,t,o,h,a,n,d,e,p,c,M,i){const l=this.array;let m=r(s,t);l.push(m);const x=31;m=u(Math.round(x*o),Math.round(x*h),Math.round(x*a),Math.round(x*n)),l.push(m),m=u(Math.round(x*d),Math.round(x*e),Math.round(x*p),Math.round(x*c)),l.push(m),m=r(M,0),l.push(m),i&&l.push(...i)}}class a extends t{constructor(s){super(s)}add(s,t,u){const o=this.array;o.push(r(s,t)),u&&o.push(...u)}}class n extends t{constructor(s){super(s)}add(s,t,o,h,a,n,d){const e=this.array,p=this.index;let c=r(s,t);e.push(c);const M=15;return c=u(Math.round(M*o),Math.round(M*h),a,n),e.push(c),d&&e.push(...d),p}}class d extends t{constructor(s){super(s)}add(t,u,h,a,n,d,e,p,c,M,i,l){const m=this.array;let x=r(t,u);m.push(x),x=r(Math.round(8*h),Math.round(8*a)),m.push(x),x=r(o(n/4,d/4),o(p,c)),m.push(x),x=r(o(0,s(e)),o(10*M,Math.min(10*i,255))),m.push(x),l&&m.push(...l)}}class e extends t{constructor(s){super(s)}add(s,t,u,o,h){const a=this.array,n=r(2*s+u,2*t+o);a.push(n),h&&a.push(...h)}}export{e as CircleVertexBuffer,a as FillVertexBuffer,h as LineVertexBuffer,n as OutlineVertexBuffer,d as SymbolVertexBuffer};