Chrislistens Posted August 13, 2017 Share Posted August 13, 2017 Hello everybody, Does anybody have a clear and simple method to show how these 2 files attached (.html and .babylon) can be displayed on my website through Filezilla ? I searched a lot but didn't find out... Thank you in advance if you can help !!! Cheers, Chris ------------------ <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Using babylon.js - How to load a scene</title> <script src="https://cdn.babylonjs.com/babylon.max.js"></script> <style> html, body { width: 100%; height: 100%; padding: 0; margin: 0; overflow: hidden; } #renderCanvas { width: 100%; height: 100%; } </style> </head> <body> <canvas id="renderCanvas"></canvas> <script> if (BABYLON.Engine.isSupported()) { var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load("", "scene2.babylon", engine, function (newScene) { // Wait for textures and shaders to be ready newScene.executeWhenReady(function () { // Attach camera to canvas inputs newScene.activeCamera.attachControl(canvas); // Once the scene is loaded, just register a render loop to render it engine.runRenderLoop(function() { newScene.render(); }); }); }, function (progress) { // To do: give progress feedback to user }); } </script> </body> </html> babylon.html scene2.babylon Quote Link to comment Share on other sites More sharing options...
adam Posted August 13, 2017 Share Posted August 13, 2017 Try changing the extension of the .babylon file to .json . Quote Link to comment Share on other sites More sharing options...
Chrislistens Posted August 13, 2017 Author Share Posted August 13, 2017 Thank you Adam, I've just tried but it doesn't work... Quote Link to comment Share on other sites More sharing options...
Chrislistens Posted August 13, 2017 Author Share Posted August 13, 2017 16 minutes ago, adam said: Try changing the extension of the .babylon file to .json . Members 0 7 posts Report post Posted 2 minutes ago Thank you Adam, I've just tried but it doesn't work... Quote Link to comment Share on other sites More sharing options...
Hersir Posted August 14, 2017 Share Posted August 14, 2017 You need mime types for babylon files 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.