glTFast icon indicating copy to clipboard operation
glTFast copied to clipboard

Content based glTF-binary detection

Open atteneder opened this issue 3 years ago • 0 comments

Currently the type of glTF file (JSON based or .glb binary) is detected from either the URI (extracting extension) or the Content-Type HTTP header field.

A better solution would be to detect it based on the content, specifically the first few bytes. If those are 0x46546c67 ( glTF in ASCII), then it's a glTF-binary.

A possible solution is a custom DownloadHandler (for UnityWebRequests) or a File based solution in case files are loaded from disk.

Might be solved best in context of #22

atteneder avatar Jun 04 '21 09:06 atteneder