Merfoo Posted January 22, 2014 Share Posted January 22, 2014 Does this function run when all the meshes imported have been loaded? Because I sometimes get instances where the scene.executeWhenReady function would be called even before a mesh callback function was called. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2014 Share Posted January 23, 2014 It should Do you use incremental loading? Quote Link to comment Share on other sites More sharing options...
Merfoo Posted January 23, 2014 Author Share Posted January 23, 2014 What is incremental loading? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 23, 2014 Share Posted January 23, 2014 What is incremental loading? https://github.com/BabylonJS/Babylon.js/wiki/Converting-a-.babylon-file-to-.incremental.babylon-file Quote Link to comment Share on other sites More sharing options...
damian+merfoo=♥ Posted January 23, 2014 Share Posted January 23, 2014 So all you have to do to use incremental loading is convert .babylon file using http://www.babylonjs.com/converter.html, put all the converted files in the same directory as scene.babylon file and in the code use the scene.incremental.babylon file instead? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2014 Share Posted January 23, 2014 Yes if you want to use incremental loading But you are not forced to do so. It should work with your code basically Quote Link to comment Share on other sites More sharing options...
Merfoo Posted January 23, 2014 Author Share Posted January 23, 2014 So I converted my scene.babylon file and put the converted files in the same directory and called the scene.incremental.babylon file instead but now I'm getting unreferenced errors, and the scene.executeWhenReady is still executing before the call back function of the import mesh function. I'm checking this by using alert boxes in the mesh callback function and the scene.executeWhenReady function Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 24, 2014 Share Posted January 24, 2014 Could you put your code on jsfiddle or share your project? will be easier to debug Quote Link to comment Share on other sites More sharing options...
Merfoo Posted January 24, 2014 Author Share Posted January 24, 2014 Yeah here is the link on Github, the branch temp is where the code will not work 100%, the branch develop/master is where I just used a boolean to check if the mesh had loaded to get around that. https://github.com/Merfoo/3D-Asteroids/tree/temp The game is still in development, so it kinda sucks but its getting there Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 24, 2014 Share Posted January 24, 2014 I meant: is there a site where I can test it directly ? Quote Link to comment Share on other sites More sharing options...
Merfoo Posted January 25, 2014 Author Share Posted January 25, 2014 Ah gotchaVersion that works sometimes: http://team955.com/3d-asteroids/develop/I put console messages so that you know what loaded first, and in case you ever wanna play the working version, it will behttp://team955.com/3d-asteroids/master/index.html Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 25, 2014 Share Posted January 25, 2014 I see you are using importMesh and this is not handled by the scene.ExecuteWhenReadyYou have to handle manually mesh imported by this way 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.