Good afternoon, all!
So I’m trying to load an .stl model in a local project and ran across an error.
The Playground I’m using does not have the problem and loads fine.
Using
var assetsManager = new BABYLON.AssetsManager(scene);
meshTask = assetsManager.addMeshTask(“mtask”, “”, modelpath, modelname + “.stl”);
assetsManager.load();
meshTask.onError = function (e) { console.log(e); }
I get the following _errorObject message:
Unable to import meshes from UH-60.stl: importMesh of undefined from undefined version: undefined, exporter version: undefinedimportMesh has failed JSON parse
and the exception stack has:
SyntaxError: Invalid character at importMesh
(http://localhost:99999/babylon.js:23677:21)
at Anonymous function
(http://localhost:99999/babylon.js:23336:25)
at m (http://localhost:99999/babylon.js:23246:41)
at p (http://localhost:99999/babylon.js:2914:172)
I made sure to add the mime extension to the web config file in the system.webServer tag as I previously had to do with .OBJ files to get them to work.
Any extra things I might be missing?
Thanks!