declension / elm-obj-loader

An elm library for importing wavefront .obj files into your WebGL application.

Home Page:http://package.elm-lang.org/packages/declension/elm-obj-loader/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example OBJs don't load on windows.

Muzz opened this issue · comments

The obj's included throw a weird error.

" with normal map:
(Err "Parse error around line:\n\n1| # Blender v2.78 (sub 0) OBJ File: 'elmLogo.blend'\r\n ^\nI expected one of the following:\n\n * expected input matching Regexp /^v[ \t]+/\n * expected input matching Regexp /^vt[ \t]+/\n * expected input matching Regexp /^vn[ \t]+/\n * expected input matching Regexp /^f[ \t]+/\n * expected input matching Regexp /^o[ \t]+/\n * expected input matching Regexp /^g[ \t]+/\n * expected 'g'\n * expected input matching Regexp /^s[ \t]+/\n * expected input matching Regexp /^usemtl[ \t]+/\n * expected input matching Regexp /^mtllib[ \t]+/",Ok (Texture 15 512 512),Ok (Texture 16 512 512))"

Using an obj i made with blender works fine however. A working obj has been attatched.

It's probably just that I forgot about windows line endings in my regex, I should have used this instead of just \n

I'm currently quite busy, but I'll fix it when I find the time.



A working obj has been attatched.

Looks like you forgot to attach that file ;)

I think I fixed it.

Can you please try the current master branch with the model that didn't work and report back?
Then I'll publish this patch

@Muzz: hey not sure if you got a notification when I just replied, so now I'll ping you.
Can you please confirm if I fixed it? I can't test it myself...

I actually just grabbed the latest version was about to test. I'll report back.

Thanks!

It works! thanks for fixing!

-Muzz

Great!
Thanks for testing and reporting!

I'll publish this soon, probably tonight.

changes are now published