/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{LodResources as e,LodComponentResources as n,LodComponentEngineGeometry as o,LodLevelResources as r}from"../../webgl-engine/lib/lodRendering/LodResources.js";function t(e,t){const s=e.stageResources.geometries.map(r=>new n(new o(r),e.stageResources.textures)),l=null==e.lodThreshold||0===e.lodThreshold&&t>0?u(s):e.lodThreshold;return new r(s,l,e.pivotOffset)}function s(n){return new e(n.map((e,n)=>t(e,n)))}function u(e){const n=e.reduce((e,n)=>e+n.numTriangles,0);return Math.sqrt(n*l/Math.PI)}const l=20;export{s as makeLodResources};
