Jump to content

Babylon on meteor App


Khaled Sabri
 Share

Recommended Posts

Hello,

i build app using meteor and i need to use the babylon viewer, in my index.js i added this script:

 if (BABYLON.Engine.isSupported()) {
        var canvas = document.getElementById("renderCanvas");
        var engine = new BABYLON.Engine(canvas, true);
        BABYLON.SceneLoader.Load("", "scene.babylon", engine, function (newScene) {
            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
        },function(err) {
            console.log(err);
        });
    }

in index.html i added canvas element and the scene.babylon file exist in the same directory path,but unfortunately i got this error: (Uncaught TypeError: Cannot read property 'producer' of undefined).

 

anyone can help me with this issue and thanks for advance.

Link to comment
Share on other sites

  • 3 weeks later...

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