Jump to content

Load more meshes in the same assetsmanager task


Recommended Posts

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

Link to comment
Share on other sites


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){



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