Jump to content

Problems with babylonjs


mout99
 Share

Recommended Posts

Hello, I have a scene and it's disappearing, I do not know what it can be, I need help, sorry for my english I used google translate, 
See attached images, 
I also attached the 3d file, you can use it in the sandbox to see how it looks http://sandbox.babylonjs.com/

 
           if (BABYLON.Engine.isSupported()) {
             var canvas = document.getElementById("renderCanvas");
             var engine = new BABYLON.Engine(canvas, true);
             var newScene;

             BABYLON.SceneLoader.Load("", "js/teste.obj", engine, function (newScene) {
                 newScene.executeWhenReady(function () {
                    var camera = new BABYLON.ArcRotateCamera("ArcRotateCamera", 0, 0, 0, BABYLON.Vector3.Zero(), newScene);
                    camera.setPosition(new BABYLON.Vector3(7000,7000,7000));
                    camera.attachControl(canvas, true);
                    camera.lowerRadiusLimit = 10;
                    camera.pinchPrecision = 30;
                    newScene.activeCamera = camera;
                    newScene.activeCamera.attachControl(canvas, true);
                    newScene.clearColor = new BABYLON.Color3(0.5, 0.8, 0.5);


                     engine.runRenderLoop(function() {
                        newScene.render();
                     });

                 });
             },function (progress) {
             });

           }
           window.addEventListener("resize", function () {
            engine.resize();
        });

 


 

bug1.png

bug2.png

bug3.png

teste.obj

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.

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

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...