@babylonjs/loaders
Version:
The Babylon.js file loaders library is an extension you can use to load different 3D file types into a Babylon scene.
33 lines • 1.24 kB
JavaScript
import * as Extensions from "../glTF/2.0/Extensions";
import * as Interfaces from "../glTF/2.0/glTFLoaderInterfaces";
import * as GLTF2 from "../glTF/2.0";
/**
* This is the entry point for the UMD module.
* The entry point for a future ESM package should be index.ts
*/
var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined') ? window : undefined);
if (typeof globalObject !== "undefined") {
globalObject.BABYLON = globalObject.BABYLON || {};
var BABYLON = globalObject.BABYLON;
BABYLON.GLTF2 = BABYLON.GLTF2 || {};
BABYLON.GLTF2.Loader = BABYLON.GLTF2.Loader || {};
BABYLON.GLTF2.Loader.Extensions = BABYLON.GLTF2.Loader.Extensions || {};
var keys = [];
for (var key in Extensions) {
BABYLON.GLTF2.Loader.Extensions[key] = Extensions[key];
keys.push(key);
}
for (var key in Interfaces) {
BABYLON.GLTF2.Loader[key] = Interfaces[key];
keys.push(key);
}
for (var key in GLTF2) {
// Prevent Reassignment.
if (keys.indexOf(key) > -1) {
continue;
}
BABYLON.GLTF2[key] = GLTF2[key];
}
}
export { GLTF2 };
//# sourceMappingURL=legacy-glTF2.js.map