AlexeyJr Posted February 16, 2016 Share Posted February 16, 2016 Hello. Please, tell me. What i need to do to open (my babylon scene created in 3Dmax and exported by plugin) via browser as index.html? Sorry for my English. Thank you. Quote Link to comment Share on other sites More sharing options...
AlexeyJr Posted February 16, 2016 Author Share Posted February 16, 2016 my script <!doctype html> <html> <head> <title>Babylon.js</title> <script type='text/javascript' src='http://www.babylonjs.com/oimo.js'></script> <script type='text/javascript' src='http://www.babylonjs.com/cannon.js'></script> <script type='text/javascript' src='http://www.babylonjs.com/babylon.js'></script> <style type='text/css'> html, body, div, canvas { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } </style> </head> <body> <canvas id='canvas'></canvas> <script type='text/javascript'> var canvas = document.getElementById('canvas'); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load('', 'BabylonTest1.babylon', engine, function (newScene) { newScene.activeCamera.attachControl(canvas); engine.runRenderLoop(function() { newScene.render(); }); window.addEventListener('resize', function () { engine.resize(); }); }); </script> </body> </html> When i press "Export&Run" button on 3dMax Exporter - All work? launching in Localhost and automaticly adding spec. random code in string: <BABYLON.SceneLoader.Load('', 'BabylonTest1.babylon?once=1180175707', engine, function (newScene)> I don't understand... Babylon is not free??? Quote Link to comment Share on other sites More sharing options...
Temechon Posted February 16, 2016 Share Posted February 16, 2016 Hello AlexeyJr, Yes, Babylon is free. The parameter 'once' is here to remove the cache being used by the browser: this way, the displayed version is always the last one. Your code is correct. Do you have any errors at export ? Are you using it with a webserver ? Quote Link to comment Share on other sites More sharing options...
AlexeyJr Posted February 16, 2016 Author Share Posted February 16, 2016 Thanks, Temecheon. I have not used localhost, but just tryin launch it right from the folder. Silly me.I did not know about that. it's ok now Good Luck! 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.