derekxw Posted July 8, 2017 Share Posted July 8, 2017 Hi, I'm new to Babylon and try to load my mesh from a remote address. I put it in my aws s3 bucket and public it on aws cloudfront. So it is accessible via http request. Can I stringify .babylon file as json file and feed it to SceneLoader? And load it to my scene via ImportMesh("","", "data:mydatahere", scene, onsuccess, progressCallBack, onerror)? or is there a better way? Thanks, Derek Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 8, 2017 Share Posted July 8, 2017 Hey The first parameter of importMesh is the url of your resource. (see here with SceneLoader.Append which works the same: https://playground.babylonjs.com/#LK7PJP#3) It works obviously with .babylon files as well Quote Link to comment Share on other sites More sharing options...
derekxw Posted July 8, 2017 Author Share Posted July 8, 2017 Hi Deltakosh, Thanks a lot for your fast reply! The first parameter of importMesh should be object's name, but, hi, it works. babylon.SceneLoader.ImportMesh("", "http://some.cloudfront.net/", "myfile.babylon", scene, (mesh)=>{}) The model loaded correctly. but I get myfile.babylon.manifest?1499536899448 404(Not found). What's that means? Also, How to load texture files so that it can be detected by my .babylon file? Does AssetManager work the same? I can do addMeshTask("task", "myfile.babylon","http://some.cloudfront.net/", sceneFilename) Thank so much for your help! Derek Quote Link to comment Share on other sites More sharing options...
JohnK Posted July 8, 2017 Share Posted July 8, 2017 To prevent the error when looking for manifest file engine.enableOfflineSupport = false; GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.