UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 1.02 kB
import"../../core/has.js";import{f as e}from"../../chunks/vec3f64.js";import{fromValues as r}from"../../geometry/support/aaBoundingBox.js";function t(r,{isPrimitive:t,width:n,depth:o,height:s}){const c=t?10:1;if(null==n&&null==s&&null==o)return[c*r[0],c*r[1],c*r[2]];const u=e(n,o,s);let i;for(let e=0;e<3;e++){const t=u[e];if(null!=t){i=t/r[e];break}}for(let e=0;e<3;e++)null==u[e]&&(u[e]=r[e]*i);return u}const n=r(-.5,-.5,-.5,.5,.5,.5),o=r(-.5,-.5,0,.5,.5,1),s=r(-.5,-.5,0,.5,.5,.5);function c(e){switch(e){case"sphere":case"cube":case"diamond":return n;case"cylinder":case"cone":case"inverted-cone":return o;case"tetrahedron":return s;default:return}}const u=["butt","square","round"],i=[...u,"none"],a=["miter","bevel","round"];export{s as OBJECT_SYMBOL_LAYER_BOUNDING_BOX_TETRAHEDRON,n as OBJECT_SYMBOL_LAYER_BOUNDING_BOX_UNIT_CUBE,o as OBJECT_SYMBOL_LAYER_BOUNDING_BOX_UNIT_CYLINDER,u as lineCaps,a as lineJoins,c as objectSymbolLayerPrimitiveBoundingBox,t as objectSymbolLayerSizeWithResourceSize,i as pathCaps};