2 lines
2.2 KiB
JavaScript
2 lines
2.2 KiB
JavaScript
import{di as v,s as n,ar as y,_ as p,dj as c,be as b,dk as w,bT as l}from"./index-b5c8f851.js";let s=f();function f(){return new v(50)}function T(){s=f()}async function x(r,i){var o,t;if((o=r.resource)!=null&&o.href)return _(r.resource.href).then(e=>[e.width,e.height]);if((t=r.resource)!=null&&t.primitive)return i!=null?[i,i]:[256,256];throw new n("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function _(r){return y(r,{responseType:"image"}).then(i=>i.data)}async function B(r,i=null){var t;if(!r.isPrimitive){const e=r.resource.href;if(!e)throw new n("symbol:invalid-resource","The symbol does not have a valid resource");const a=s.get(e);if(a!==void 0)return a;const{fetch:h}=await p(()=>import("./objectResourceUtils-67cb56c4.js").then(d=>d.o),["assets/objectResourceUtils-67cb56c4.js","assets/devEnvironmentUtils-4eab2a99.js","assets/index-b5c8f851.js","assets/index-86716609.css","assets/mat4f64-1413b4a7.js","assets/BufferView-db785e2d.js","assets/vec32-567858f4.js","assets/DefaultMaterial_COLOR_GAMMA-830e6516.js","assets/enums-bdecffa2.js","assets/quat-59e6d063.js","assets/quatf64-3363c48e.js","assets/resourceUtils-908c2b28.js","assets/basicInterfaces-11f56cb3.js","assets/Indices-8bd7636c.js","assets/NestedMap-1b5db22e.js","assets/requestImageUtils-5dd6ae31.js","assets/triangle-f93283ef.js","assets/sphere-5667aa69.js","assets/ByteSizeUnit-d4757d40.js","assets/lineSegment-95273d56.js","assets/VertexAttribute-0e674613.js","assets/Texture-507d5ea8.js","assets/InterleavedLayout-f58607b0.js","assets/types-1305598a.js","assets/OrderIndependentTransparency-6ae10952.js","assets/orientedBoundingBox-8d81577e.js","assets/plane-66dd48d1.js","assets/doublePrecisionUtils-e3c3d0d8.js","assets/FramebufferObject-4be671ef.js","assets/RenderState-1d6218ee.js"]),m=await h(e,{disableTextures:!0}),u=c(m.referenceBoundingBox,l());return s.put(e,u),u}if(!((t=r.resource)!=null&&t.primitive))throw new n("symbol:invalid-resource","The symbol does not have a valid resource");const o=b(w(r.resource.primitive));if(i!=null)for(let e=0;e<o.length;e++)o[e]*=i;return c(o,l())}export{T as clearBoundingBoxCache,x as computeIconLayerResourceSize,B as computeObjectLayerResourceSize};
|