How to load glb/gltf files in sandbox via ajax or direct url

Hi, I tried, and it is really nice. However I want to load some glb/gltf from from ajax or direct url.
And I find the following code which is handle load local files.

    filesInput = new BABYLON.FilesInput(engine, null, sceneLoaded, null, null, null, startProcessingFiles, null, sceneError);
    filesInput.onProcessFileCallback = (function(file, name, extension) {
        if (filesInput._filesToLoad && filesInput._filesToLoad.length === 1 && extension) {
            if (extension.toLowerCase() === "dds" || extension.toLowerCase() === "env") {
                BABYLON.FilesInput.FilesToLoad[name] = file;
                skyboxPath = "file:" + file.correctName;
                return false;
        return true;

    htmlInput.addEventListener('change', function(event) {
        // Handling data transfer via drag'n'drop
        if (event && event.dataTransfer && event.dataTransfer.files) {
            filesToLoad = event.dataTransfer.files;
        // Handling files from input files
        if (event && && {
            filesToLoad =;
    }, false);

How can I achieve this, I have searched the docs, but could not find some useful docs.

Hello you can use this URL:


Hi, @Deltakosh, Thanks for your reply, your solution works perfect for me!