payboy Posted October 27, 2017 Share Posted October 27, 2017 Hi, everyboby This is my test demo. when i refresh the Browser (read local cache),the animation will don't synchronize.(Special on microsoft edge and most mobile browser ) How to solve it? Please excuse my English again Thanks very much test.babylon Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 27, 2017 Share Posted October 27, 2017 Hello, I think the main reason is that you do not start all animations simultaneously. I suggest using the onFinish callback of the AssetsManager to start all animations Quote Link to comment Share on other sites More sharing options...
payboy Posted October 28, 2017 Author Share Posted October 28, 2017 @Deltakosh:Thank you for your reply! These codes are my modified version var Anims = []; var assetsManager = new BABYLON.AssetsManager(Scene); var meshTask = assetsManager.addMeshTask("testtask","","Babylon/","test.babylon"); meshTask.onSuccess = function(task){ for (var i=0; i<task.loadedMeshes.length; i++){ Anims.push(task.loadedMeshes[i]); }; }; assetsManager.onFinish = function(task) { for (var i=0; i<Anims.length; i++){ Scene.beginAnimation(Anims[i], 0, 20, true, 1); }; engine.runRenderLoop(function() { Scene.render(); }); }; assetsManager.load(); But the results has not changed. The animations are not synchronous as before. Thanks again. Quote Link to comment Share on other sites More sharing options...
payboy Posted October 28, 2017 Author Share Posted October 28, 2017 Now my Solution is that: BABYLON.SceneLoader.ImportMesh("", "Babylon/", "anim01.babylon", Scene, function (newMeshes) { for (var i=0; i<newMeshes.length; i++){ Scene.beginAnimation(newMeshes[i], 0, 20, true, 1); }; }); BABYLON.SceneLoader.ImportMesh("", "Babylon/", "anim02.babylon", Scene, function (newMeshes) { for (var i=0; i<newMeshes.length; i++){ Scene.beginAnimation(newMeshes[i], 0, 20, true, 1); }; }); it done Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 30, 2017 Share Posted October 30, 2017 Congrats! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.