Jump to content

Playing an exported animation


Riesgho
 Share

Recommended Posts

Hello all,

I'm trying to execute (at the awake of the scene) an already exported animation with Babylon, but it just "jumps" to the end frame without animation.

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

    BABYLON.SceneLoader.Load("", "roulette.babylon", engine, function (newScene) {
      // Wait for textures and shaders to be ready
      newScene.executeWhenReady(function () {  

        // Once the scene is loaded, just register a render loop to render it
        engine.runRenderLoop(function() {
          newScene.render();
		  //for(var i= 0;i<newScene.meshes.length;i++)
			//console.log(newScene.meshes[i].name);
var newAnimation = newScene.beginAnimation(newScene.meshes[3], 540, 50000, true);
        });

      });
    }, function (progress) {
        // To do: give progress feedback to user
    });
  }

Find attached an extract of the mesh.

modelExtract.txt

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