question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When i load stl file, it shows importScene of undefined from undefined version

See original GitHub issue

Bugs

BABYLON.SceneLoader.Append('/assets/stl/', 'arm.stl', scene, function(scene) {

});
  • Expected result: expect to load stl
  • Current result: but it failed with exception as following: BJS - [02:26:40]: Unable to load from /assets/stl/arm.stl: importScene of undefined from undefined version: undefined, exporter version: undefinedimportScene has failed JSON parse image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
relu91commented, Sep 5, 2020

@deltakosh I fixed by modify the import: import ‘babylonjs-loaders’; Thanks

I tried with that import but I wasn’t still able to load the .obj. It seems that webpack is doing something fancy behind. I solved with this quick workaround:

import { Engine, Scene, ArcRotateCamera, HemisphericLight, Vector3, Mesh, MeshBuilder, SceneLoader } from 'babylonjs';
import {OBJFileLoader} from 'babylonjs-loaders';


SceneLoader.RegisterPlugin(new OBJFileLoader())

4reactions
flzyupcommented, Dec 5, 2018

@deltakosh I fixed by modify the import: import 'babylonjs-loaders'; Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

importMesh of undefined from undefined - Bugs
I'm getting this error: Unable to import meshes from ... version: undefined, exporter version: undefinedimportMesh has failed JSON parse.
Read more >
ImportMesh of undefined from undefined - Babylon.js Forum
I have this error when I try to show the model on the browser: “BJS ... version: undefined, exporter version: undefinedimportMesh has failed...
Read more >
Three.js STL loader with TypeScript - Uncaught TypeError
Seems like i found the missing part. As the module, and not the constructor, has to receive the THREE object, I only needed...
Read more >
What are the top STL file errors? Here's how to fix them | Hubs
Learn to identify the errors you may encounter when working with STL files and how to fix them so they don't delay your...
Read more >
import stl into moveit - ROS Answers: Open Source Q&A Forum
It works as described but when I try to import a stl file I exported from Solidworks, I receive an error saying: unable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found