Jump to content

assetsManager doesn't work


Aidoru
 Share

Recommended Posts

Hello,
I have a problem using assetsManager, if I use SceneLoader.ImportMesh everythings work:

BABYLON.SceneLoader.ImportMesh("", "public/Models/", "parte.stl", scene, function (newScene) { 
        // ...
    });

but using assetsManager nothig works

var assetsManager = new BABYLON.AssetsManager(scene);
    var meshTask = assetsManager.addMeshTask("model", "", "public/Models/", "parte.stl");

    meshTask.onSuccess = function (task) {
        console.log("successo");
        task.loadedMeshes[0].position = BABYLON.Vector3.Zero();

    }

    meshTask.onError = function (task, message, exception) {
        console.log("errore");
        console.log(message, exception);
    }

it doesn't enter in any function, not in .onSuccess and not in .onError.

Does someone know where is the problem?

Thank you

Link to comment
Share on other sites

Hello and welcome

You are not in the right sub forum (I already mentioned that on your other post)

 

For your question, did you call assetManager.load() ?

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