@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.47 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{radToByte as t}from"./GeometryUtils.js";import s from"./MemoryBuffer.js";class o extends s{constructor(t){super(t)}add(t,o,r,u,h,a,n,d,e,p,i,c){const M=this.array;let l=s.i1616to32(t,o);M.push(l);const m=31;l=s.i8888to32(Math.round(m*r),Math.round(m*u),Math.round(m*h),Math.round(m*a)),M.push(l),l=s.i8888to32(Math.round(m*n),Math.round(m*d),Math.round(m*e),Math.round(m*p)),M.push(l),l=s.i1616to32(i,0),M.push(l),c&&M.push(...c)}}class r extends s{constructor(t){super(t)}add(t,o,r){const u=this.array;u.push(s.i1616to32(t,o)),r&&u.push(...r)}}class u extends s{constructor(t){super(t)}add(t,o,r,u,h,a,n){const d=this.array,e=this.index;let p=s.i1616to32(t,o);d.push(p);const i=15;return p=s.i8888to32(Math.round(i*r),Math.round(i*u),h,a),d.push(p),n&&d.push(...n),e}}class h extends s{constructor(t){super(t)}add(o,r,u,h,a,n,d,e,p,i,c,M){const l=this.array;let m=s.i1616to32(o,r);l.push(m),m=s.i1616to32(Math.round(8*u),Math.round(8*h)),l.push(m),m=s.i8888to32(a/4,n/4,e,p),l.push(m),m=s.i8888to32(0,t(d),10*i,Math.min(10*c,255)),l.push(m),M&&l.push(...M)}}class a extends s{constructor(t){super(t)}add(t,o,r,u,h){const a=this.array,n=s.i1616to32(2*t+r,2*o+u);a.push(n),h&&a.push(...h)}}export{a as CircleVertexBuffer,r as FillVertexBuffer,o as LineVertexBuffer,u as OutlineVertexBuffer,h as SymbolVertexBuffer};