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

Add support for GLB #179

Merged
merged 4 commits into from
Dec 18, 2018

Conversation

eyexpo-thomas
Copy link
Contributor

GLB files are compressed GLTF files.
Website:
https://github.com/KhronosGroup/glTF
Detection information (magic number, header, content, body, etc):
https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF

If you're adding support for a new file type, please follow the below steps:

[x] Add a fixture file named fixture.<extension> to the fixture directory.
[x] Add the file extension to the types array in test.js.
[x] Add the file type detection logic to the index.js file.
[x] Add the file extension to the Supported file types section in the readme, in the format - [`<extension>`](URL) - Format name, for example, - [`png`](https://en.wikipedia.org/wiki/Portable_Network_Graphics) - Portable Network Graphics
[x] Add the file extension to the keywords array in the package.json file.
[x] Run $ npm test to ensure the tests pass.
[x] Open a pull request with a little like Add support for Format, for example, Add support for PNG.
[x] The pull request description should include a link to the official page of the file format or some other source. Also include a link to where you found the file type detection / magic bytes.

GLB files are compressed GLTF files.
Website:
https://github.com/KhronosGroup/glTF
Detection information (magic number, header, content, body, etc):
https://github.com/KhronosGroup/glTF/tree/master/extensions/1.0/Khronos/KHR_binary_glTF
package.json Outdated Show resolved Hide resolved
Co-Authored-By: thomaseyexpo <[email protected]>
@sindresorhus
Copy link
Owner

See KhronosGroup/glTF#943

@eyexpo-thomas
Copy link
Contributor Author

See KhronosGroup/glTF#943

I was going by the output of my WSL Ubuntu's file package, which I suppose is actually wrong.

eyexpo-thomas and others added 2 commits December 18, 2018 09:14
- 'application/octet-stream' is for zip files.
@sindresorhus sindresorhus merged commit 516084f into sindresorhus:master Dec 18, 2018
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

Successfully merging this pull request may close these issues.

3 participants