Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

THREE.OBJLoader: Unexpected line: "<!DOCTYPE html>" #6

Open
mkantz84 opened this issue Mar 24, 2019 · 8 comments
Open

THREE.OBJLoader: Unexpected line: "<!DOCTYPE html>" #6

mkantz84 opened this issue Mar 24, 2019 · 8 comments

Comments

@mkantz84
Copy link

Hi,
I keep getting an error when i try to load an obj file: Uncaught Error: THREE.OBJLoader: Unexpected line: ""
image
what can be the issue here?

@mbuckley2000
Copy link

Same issue here

@fitwist
Copy link

fitwist commented Jul 10, 2019

Same issue

@LukeV111
Copy link

Did anyone manage to fix this?

@fitwist
Copy link

fitwist commented Feb 13, 2020

Maybe this gist will help you

@dankaki
Copy link

dankaki commented Jun 18, 2020

No solutions yet?

@tbfreitas
Copy link

tbfreitas commented Jul 14, 2020

I just did make a simple test and did move .obj to "avatars" folder, found in public folder, and it worked. I realized that some components use relative folder to describe the source path, how showed below:

Captura de Tela 2020-07-14 às 15 56 09

I'm using a react template named 'Core-ui-free-react-admin'. So, althought i keep researching how to fix through the right way, I just dropped .obj files in avatars for now.

@GSRdevelopment
Copy link

the src parameter only takes a url, so, it must be the physical direction of the file in the computer that tha project is hosted in or a web url from where the model can be downloaded. e.g: https://groups.csail.mit.edu/graphics/classes/6.837/F03/models/teapot.obj
if you are passing a string variable with the contents of the file IT'S NOT going to work and there is no workaround this parameter, or not that I know of. I also tried to parse it with three.js methods and it didn't work, so yeah, you could assume this parameter is of strict nature.

@Jedliu
Copy link

Jedliu commented Dec 17, 2020

I just did make a simple test and did move .obj to "avatars" folder, found in public folder, and it worked. I realized that some components use relative folder to describe the source path, how showed below:

Captura de Tela 2020-07-14 às 15 56 09

I'm using a react template named 'Core-ui-free-react-admin'. So, althought i keep researching how to fix through the right way, I just dropped .obj files in avatars for now.

Just put the model in the public folder solves my problem! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants