Aidoru Posted August 1, 2018 Share Posted August 1, 2018 Hello, is it possibile to load more meshes in the same task? For example, using this code: var modelTask = assetsManager.addMeshTask("model", "", "public/Models/", "model1.stl"); modelTask = assetsManager.addMeshTask("model", "", "public/Models/", "model2.stl"); modelTask.onSuccess = function (task) { var p = task.loadedMeshes.length; } the loadedMeshes only has lenght equal to 1...so there is only a mesh in that array. Thank you Quote Link to comment Share on other sites More sharing options...
SinhNQ Posted August 1, 2018 Share Posted August 1, 2018 Hi! Yes, you can handle all event of AssetsManager. Example: for(var i = 0; i < lengthMeshesNeedToLoad; i++){ assetsManaget.addMeshTask(taskName, meshesNames, rootUrl); } assetsManaget.onProgress = function (waitingTasksCount, tasksLength, task){ } assetsManaget.onTaskSuccess = function (task){ } assetsManaget.onTaskError= function (task){ } assetsManaget.onFinish = function (tasks){ } assetsManaget.load(); 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.