Use the viewer for simple 3D rotation product in web (error)

Recommended Posts


Hello to all :)

Im noob with Babylon and i have a problem when i try to test one object exported from Blender.

I will use the viewer for simply 3D rotation in online shop for see the product. The official test from viewer (boombox.glb) works fine in my computer without problem.

When I try to test my 3D objects exported from Blender in Babylon Editor or in SandBox i dont have a problem, I can see the object correctly, but when I try to execute in local or in website, no run, no work the viewer, freeze the screen in the square pre loader :(

Im reading and try a lot of configs but i dont solve it.

The code im using is the example of the test viewer, and I change the "boombox.glb" for my object exported from Blender in stl, glb or .babylon extension, but not work in any:

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

In the debug appear this error: babylon.viewer.js:19 BJS - [16:59:48]: No URL provided
t._ErrorEnabled @ babylon.viewer.js:19

Thank you for your help,


Share this post

Link to post
Share on other sites

im not expert  in standalone html js usage with babylonjs

but.... it says clearly that u didnt specify the correct url in the js file u want html to load...

so show us the viewer.js file instead on line 19 u find the error😇

i checked fast to just check i found this

<script src=""></script>


Share this post

Link to post
Share on other sites

no everything works for me in localhost.

Your problem is that u give us 2 files that doesnt even belong in the code

u need to change the model url to ur file.

and it should work

ur files doesnt work i tested it try a glb file the example works though

i tried babylon file with a skull it works perfecet ur file is either not accible or corrupt

Share this post

Link to post
Share on other sites

try have the file locally on the server and make model object point to the correct path...

the line code 19 is on babulon server and not accesible i guess.

I think ur case u need to have a valid file.


Share this post

Link to post
Share on other sites

I updated the path and now appears this error: "Error loading the model".

In the debugger appears now: Access to XMLHttpRequest at '' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Share this post

Link to post
Share on other sites

yea follow deltakosh i dont think u know very much if u have cors problem its not really related to babylonjs.....

i think u need easiest way is to upload file somewhere else.

i doubt u can easy fix problem on ur own

cor problem is fixed by sending headers in ur request or by allowing loxalhost42000 in server file

Share this post

Link to post
Share on other sites

Deltakosh! thaaaank youuuuuuuuuu was the SSL! now under SSL in other domain in my server works fine, thank you very much :)

I have problem with textures in the export, the model 3D is perfect but without textures, is a problem of the exporter?


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.