UNPKG

replay-viewer

Version:

Rocket League replay viewer React component and tooling

16 lines 697 B
import { DRACOLoader } from "three/examples/jsm/loaders/DRACOLoader"; import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; export var loadObject = function (path, loadingManager) { return new Promise(function (resolve, reject) { var gltfLoader = new GLTFLoader(loadingManager); var dracoLoader = new DRACOLoader(); dracoLoader.setDecoderPath("https://www.gstatic.com/draco/versioned/decoders/1.4.1/"); gltfLoader.setDRACOLoader(dracoLoader); gltfLoader.load(path, function (gltf) { resolve(gltf); }, undefined, function (error) { reject(error); }); }); }; //# sourceMappingURL=loadObject.js.map