How to embed model from Google Drive or OneDrive or Sharepoint in Web-Page



  <title>Babylon.js Viewer - Display a 3D model</title>
  <script src=""></script> 
    <babylon model="" templates.main.params.fill-screen="true"></babylon>

I tried to replace:
<babylon model="" templates.main.params.fill-screen="true"></babylon>

<babylon model="" templates.main.params.fill-screen="true"></babylon>

Can I change the link type to make it work? Can I SharePoint or OneDrive to get it to work?

Sharing files on OneDrive/SharePoint and then embed into web-page would be the ultimate dream.

Do you have any suggestions?

Thanks and greetings from Norway

1 Like

I think it should work with OneDrive but you need to get the url in a specific way, see section “Downloading OneDrive files in JavaScript apps” in this doc: CORS support - OneDrive API - OneDrive dev center | Microsoft Docs

Thanks for the reply Evgeni_Popov.

I did not mange to get it to work, could it be another way to do it? Is there a noter sky solution i could use? Dropbox?

How does anyone else share/host their 3D-models?

You can see here details about Dropbox and other external sources:

I have used GitHub and Dropbox.

1 Like

This works perfectly! Thanks m8!

Do you know if babylon supports sectioning av buildings? Or “game” mode in viewer? So I can fly like a game inside the house?

I will do more reasearch - thanks again!

You can easily use sharepoint, either the OneDrive SDK or MSAL. You need to either get the file url from onedrive/sharepoint and read that in as a createObjectURL and append into the scene.

btw onedrive sdk picker is the easiest