/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{Pos3 as t}from"../../lib/DefaultVertexBufferLayouts.js";import{VertexArrayObject as o}from"../../lib/VertexArrayObject.js";import{VertexBuffer as e}from"../../../../webgl/VertexBuffer.js";function s(s,r){const i=new Array,n=r.indicesBottom;for(let t=0;t<n.length;t++)i.push(r.positions[3*(n[t]-1)]),i.push(r.positions[3*(n[t]-1)+1]),i.push(r.positions[3*(n[t]-1)+2]);const p=r.indicesExtruded;for(let t=0;t<p.length;t++)i.push(r.positions[3*p[t]]),i.push(r.positions[3*p[t]+1]),i.push(r.positions[3*p[t]+2]);return{vao:new o(s,new e(s,t,new Float32Array(i))),vertexCount:n.length+p.length}}export{s as volumeToVao};
