@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 1.02 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
*/
function t(t,a,M,h){return[[[M-t/Math.SQRT2,h-t/Math.SQRT2],[M+t/Math.SQRT2,h-t/Math.SQRT2],[M+a/Math.SQRT2,h-a/Math.SQRT2],[M-a/Math.SQRT2,h-a/Math.SQRT2]],[[M+t/Math.SQRT2,h-t/Math.SQRT2],[M+t/Math.SQRT2,h+t/Math.SQRT2],[M+a/Math.SQRT2,h+a/Math.SQRT2],[M+a/Math.SQRT2,h-a/Math.SQRT2]],[[M+t/Math.SQRT2,h+t/Math.SQRT2],[M-t/Math.SQRT2,h+t/Math.SQRT2],[M-a/Math.SQRT2,h+a/Math.SQRT2],[M+a/Math.SQRT2,h+a/Math.SQRT2]],[[M-t/Math.SQRT2,h+t/Math.SQRT2],[M-t/Math.SQRT2,h-t/Math.SQRT2],[M-a/Math.SQRT2,h-a/Math.SQRT2],[M-a/Math.SQRT2,h+a/Math.SQRT2]]]}function a(t,a,M){const[h,Q,R,S]=t;return`M ${h.join(" ")} A ${a} ${a} 0 0 1 ${Q.join(" ")} L ${R.join(" ")} A ${M} ${M} 0 0 0 ${S.join(" ")} Z`}function M(M,h,Q){const[R,S,T,n]=[...M,0];return[...t(R,S,h,Q).map((t=>a(t,R,S))),...t(S,T,h,Q).map((t=>a(t,S,T))),...t(T,n,h,Q).map((t=>a(t,T,n)))]}export{M as getAllArcPath};