cesium/Specs/loaderProcess.js

13 lines
528 B
JavaScript
Raw Permalink Normal View History

2022-08-11 06:22:27 +08:00
function loaderProcess(loader, scene) {
2021-08-13 06:42:57 +08:00
// Normally scene is responsible for resetting the job scheduler every frame
// but since we're not calling scene.renderForSpecs we need to reset budgets
// explicitly. This is only required for loaders that use the job scheduler
// like GltfVertexBufferLoader, GltfIndexBufferLoader, and GltfTextureLoader
scene.jobScheduler.resetBudgets();
const ready = loader.process(scene.frameState);
2021-08-13 06:42:57 +08:00
scene.jobScheduler.resetBudgets();
return ready;
2021-08-13 06:42:57 +08:00
}
2022-08-11 06:22:27 +08:00
export default loaderProcess;