Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Download URL does not always default to the same format #4

Closed
deprecatedcoder opened this issue Nov 8, 2017 · 6 comments
Closed

Download URL does not always default to the same format #4

deprecatedcoder opened this issue Nov 8, 2017 · 6 comments
Assignees
Labels

Comments

@deprecatedcoder
Copy link

deprecatedcoder commented Nov 8, 2017

Hey there @tomas-polach, thanks for the update to use the models from Poly. I discovered a problem with it while poking around though, so I thought I would let you know about it.

Using your codepen example, if I replace the gblock with this Pillow then it does not work.

I noticed that if I go to the download option on the page it returns a zipped OBJ file, but when going to the download URL you construct then it returns a glTF.

The model you used as an example yields an unzipped OBJ when getting it's download URL.

I tested this with a few others and the ones that are an OBJ load fine, while the ones that are a glTF do not.

I don't really know enough about the different formats to give any more thoughts on how to fix it, but figured the diagnosis might help. Thanks again for your work on this component. It really is super useful.

@deprecatedcoder
Copy link
Author

Looked at this a little more tonight and it seems to stem from models where the model name is not explicitly "model", like the previous Pillow example which uses "pillow". It seemed to me like this might be a problem with the gblock update method, but I'm not familiar enough for it to be immediately apparent.

This Space Shuttle, which uses "SpaceShuttle(1)", even fails to load completely and throws the "Model not found" error, but that is because it has parens and this regex doesn't handle it.

@tomas-polach
Copy link
Contributor

good catch! will fix.

thx for all the details. it helps with debugging

tomas-polach added a commit that referenced this issue Nov 17, 2017
@tomas-polach tomas-polach self-assigned this Nov 17, 2017
@tomas-polach
Copy link
Contributor

i fixed the regex issue but some poly models were still not loading: turns out they are GLTF v2.

created new issue: #5

@tomas-polach
Copy link
Contributor

tomas-polach commented Nov 17, 2017

@deprecatedcoder can you pls confirm if the updated code is working for you as expected? in combination with the resolved #5 space shuttle (GLTF v2) is loading alongside with GLTF v1 models for me :)

@deprecatedcoder
Copy link
Author

Just threw everything I could at it and it loads them all now. Fix looks good. Thanks!

@tomas-polach
Copy link
Contributor

thanks for testing! looking at the new issue now... :D

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

No branches or pull requests

2 participants