Jump to content

.Babylon 3ds export didnt load


Recommended Posts

Tried to load a babylon file. Nothing just darkness. No errors no anything. 



     window.addEventListener('DOMContentLoaded',function() {

     var canvas = document.getElementById('renderCanvas');
     var engine=new BABYLON.Engine(canvas,true);

     var scene;
     var createScene=function()
        var url="models/BStraddleCarrier/";  
        BABYLON.SceneLoader.Load(url,"Straddle_Carrier_001.babylon",engine, function (scene) {
            // Wait for textures and shaders to be ready
            scene.executeWhenReady(function() {
            var camera = new BABYLON.ArcRotateCamera("camera1",  0, 0, 0, new BABYLON.Vector3(0, 0, -0), scene);
            camera.setPosition(new BABYLON.Vector3(0, 0, -50));
             camera.attachControl(canvas, true);

             var light = new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), scene);
             light.groundColor = new BABYLON.Color3(0.5, 0.5, 0.5);
             light.intensity = 0.7;
                // Once the scene is loaded, just register a render loop to render it
                engine.runRenderLoop(function() {
        }, function (progress) {
            // To do: give progress feedback to user


       return scene;

  }; // create scene

  // call the createScene function
  var scene=createScene();
  // the canvas/window resize event handler
  window.addEventListener('resize', function(){
     }, false);


If you need the model I can upload it.  Did I do something wrong?



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