@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
3 lines (2 loc) • 927 B
JavaScript
/* COPYRIGHT Esri - https://js.arcgis.com/5.0.8/LICENSE.txt */
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};