Jump to content

The Great Train (demo) Robbery


Recommended Posts


   I'm no developer... but a 3D Max pilot and maybe someday... a scene/world assembler.  To get right to the surely-off-topic point, can the Train demo be run offline in a stand-alone-ish way?  I'm real new, but it looks as if it uses a database.  I've pilfered the entire github pile, and I think I have all the code pieces for the train demo, and the script paths look right, but no train world (yet).


   I'm not a code stealer... but I am a code tweak'n'watch guy.  Could/would anyone be willing to shed some light on my endeavor?  Thx!


   By the way, BabylonJS is very cool, in my opinion.  Not that my opinion is worth anything, but I am DEFINITELY enjoying the demos and the delicious text-editor-based ascii code. This old school VRML nut (and LambdaCore moo idiot) is sure excited about all these new possibilities (I'm age 56 - shhhh).  20 years ago, when VRML faded away, we 3D-on-web fanatics knew it wasn't permanent... didn't we?  Its an exciting time, to say the least.  Thanks Deltakosh and all the others who are blazing beautiful trails.  Well done!


Thanks for the info/help, and any zip-up of demos and their urls.


Larry "Wingnut" Wendlandt

Web Idiot

Bessemer MI USA

Link to comment
Share on other sites



 Yes you can run the demos offline. We're even working on a sandbox that will be published this week where you'll be able to drag'n'drop your assets in the browser and it will load the scene with no code at all.


 In the meantime, you can read this article: http://blogs.msdn.com/b/davrous/archive/2013/11/19/using-webgl-to-create-games-for-the-windows-store.aspx and you'll find that you only need 10 lines of code to load any of our demo scenes (including the train one). If you want to enable a pure offline experience once the scene will be loaded, you can read this article: http://blogs.msdn.com/b/davrous/archive/2013/09/24/using-indexeddb-to-handle-your-3d-webgl-assets-sharing-feedbacks-amp-tips-of-babylon-js.aspx





Link to comment
Share on other sites

Hi David... thanks for the quick and informative reply... but I'm having some problems (what's new, huh?).  First, I want to tell you that I don't have a webserver here.  Does that matter?


Next, the code... 


(I couldn't get the CODE mode to work worth a hoot in this blog)


Lots of remmed attempts there.  :)  The active code produced...


(Sorry, but the errors wouldn't PREVIEW correctly either)


I use FF21 and to be frank, I've seen some silent fails (normal) of XMLHttpRequest objects (responseText and responseXML empty).  Pardon my sure ignorance on the subject, but it seems that I must keep things that I want XHR to load... UNDER the hierarchy of the base address of the main webpage (the 'principal'?).  And I think babylon.sceneLoader is using XHR... so I can't load things that are outside of its security limits.  I think that is why attempts to load the train.babylon file from www.babylonjs.com failed... and I'm quite sure I have the path to it correct.


All in all, half'n'half.  I just thought I'd touch base and see if I could screw-up the 'Mark Solved' and "Fairly simple, isn’t it?".  :)  It all probably is fairly simple, but then again, look what you're dealing-with.  A ME.  :)  (Yikes)  Any words would certainly be welcome, and feel free to ignore me, too, as I am just getting started and will do lots more fiddling around.  Thanks!  Wingy

Link to comment
Share on other sites

Hi again.  I see that the xhr issue was addressed by dreta and deltakosh here...




So, hmmm.  Sorry for the repeat ponderings.  I guess I'm still hoping that some/all demos be zipped into local-runnable stand-alone packages.


That loss of UniversalBrowserRead and the handcuffing of xhr... sure puts a damper on webGL sharing of worlds, scenes, mesh, textures, avatars, etc.  It seems a shame.

Link to comment
Share on other sites



 Well, as this is intended to be run into a browser, you need to host the assets & files into a web server to make it works. But stay tunned, we've just finished working on our sandbox that will help you to drag'n'drop your scenes' assets into the browser and load them. It will even works offline. I'll try to publish all that tomorrow.





Link to comment
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.
  • Create New...