Jump to content

Babylonjs (v2.4.0-alpha)


Recommended Posts


Hey guys,

Just a heads up that some of my older content stopped working with the newer release (I reverted the links back from the standard Babylon link to CDN version specific links to fix the issue). 
Not sure what changes are coming in the next version, and I am happy to share the code when I get home so you can have a look and see if you can find whats causing the issue.

Actually I have I'll just post now :P

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

        var createScene = function () {

            var scene = new BABYLON.Scene(engine);

            var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(25, -15, 25), scene);
            var light1 = new BABYLON.PointLight("Omni1", new BABYLON.Vector3(-25, 25, 5), scene);
            var light2 = new BABYLON.PointLight("Omni2", new BABYLON.Vector3(0, 55, 10), scene);

            var camera = new BABYLON.ArcRotateCamera("Camera", Math.PI/2*3, 0, 100, new BABYLON.Vector3(0, 0, 0), scene);

            BABYLON.SceneLoader.ImportMesh("", "babylon/", "desiren.babylon", scene, function (newMeshes) {

                    camera.target = newMeshes[0];

                    scene.clearColor = new BABYLON.Color4(0,0,0,0);

                    scene.textMat = new BABYLON.StandardMaterial("boxed", scene);
                    scene.textMat.diffuseColor = new BABYLON.Color3(0.1, 0.1, 0.1);
                    scene.textMat.specularColor = new BABYLON.Color3(0.4, 0.4, 0.4);

                    scene.getMeshByName("test").material = scene.textMat;

                    scene.getMeshByName("test").position = new BABYLON.Vector3(0, 10, 0);
                    scene.getMeshByName("test").rotationQuaternion = null;

                    scene.registerBeforeRender(function () {


            return scene;
        var scene = createScene();

        engine.runRenderLoop(function () {

In the meantime I'd recommend looking at some older content too and seeing if the later babylon works with that. The code wasn't very complex so it will probably occur for other too who aren't linking to specific versions of babylon.



Link to comment
Share on other sites

Awesome! looks like it has been fixed :)

I had noticed as well that the camera angle had changed a bit with the newer version ie the model was appearing half off the canvas with the new version and would be centered in canvas with older versions, but that also has been fixed now :)

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