如何从Google Drive导入glb到Babylonjs Playground

时间:2020-07-29 20:39:07

标签: babylonjs

我编写了这段代码,将公共glb文件导入到babylonjs的游乐场:

    var modelUrl = "https://drive.google.com/file/d/1fqvcjIcROIY64s33NMNv5Jwuo17LUXkt/view?usp=sharing";
    BABYLON.SceneLoader.ImportMeshAsync(
        "",
        modelUrl,
        undefined,
        scene)

我收到CORS错误:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://drive.google.com/file/d/1fqvcjIcROIY64s33NMNv5Jwuo17LUXkt/view?usp=sharing. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

我虽然能够从sharepoint导入blob。 是否可以从Google Drive导入?如果是,我应该如何进行?

0 个答案:

没有答案