@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 634 B
JavaScript
import{resolveBufferUri as e}from"./gltf-json-asset-PaK3K5Qi.esm.min.js";import"./index-DFZFpUG-.esm.min.js";async function r(r,f){const t=r.buffers??[],n=await Promise.all(t.map(r=>r?.uri?fetch(e(r.uri,f)).then(e=>e.arrayBuffer()):Promise.resolve(new ArrayBuffer(0)))),s=[];let o=0;for(const e of n)s.push(o),o+=e.byteLength,o=o+3&-4;const i=new Uint8Array(o);for(let e=0;e<n.length;e++)i.set(new Uint8Array(n[e]),s[e]);for(const e of r.bufferViews??[])e.byteOffset=(e.byteOffset??0)+s[e.buffer??0],e.buffer=0;return new DataView(i.buffer)}export{r as loadMultiBuffer};
//# sourceMappingURL=gltf-multi-buffer-DswsJnGK.esm.min.js.map