yatao-wf

Load glb model into scene directly from content string.

Recommended Posts

I'm pretty new for babylon framework and I'm trying to load glb model without a public url for security reason. So I tried to load it directly from content string, but it didn't work for some reason and I have no idea why unfortunately.

I've shared my playground here:

https://playground.babylonjs.com/#7F6S08

I tried  both `raw_content`  and `base64_model_content`  and none if it worked.

 

Would appreciate anyone can help here.

2ftx4ft.glb

Share this post


Link to post
Share on other sites

This is a case that the code doesn't handle. I've filed an issue: https://github.com/BabylonJS/Babylon.js/issues/5579

In the meantime, you can do this a bit indirectly by using a blob with an object url.

https://playground.babylonjs.com/#7F6S08#2

Note that your base64 encoded string was incorrect compared to the file you attached. I had to re-encoded the data.

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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.