@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.
15 lines (13 loc) • 414 B
JavaScript
const BASELESS_URI_ERROR = "loadGltf: baseless input can't resolve relative URI; use self-contained GLB or URL with base.";
function resolveBufferUri(uri, baseUrl) {
if (baseUrl) {
return new URL(uri, baseUrl + "x").href;
}
try {
return new URL(uri) + "";
} catch {
throw new Error(BASELESS_URI_ERROR);
}
}
export { resolveBufferUri as r };
//# sourceMappingURL=gltf-uri-DySuh1BU.esm.js.map