-
Notifications
You must be signed in to change notification settings - Fork 30
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
Preserve MIME type for unknown extensions during import #18
Comments
@rawnsley do you have a sample file I could use to test this out? If not I can hack something up quickly enough. |
Thanks for looking into this @najadojo. This GLB file is a complete Hubs scene file with a mix of extensions as described in the original issue. You can see the scene itself live here: https://hubs.mozilla.com/scenes/HQLCKaM/gltf-test-scene |
@rawnsley and @emackey I've merged a change and published the npm package that addresses this. Here is a section of the sample gltf after conversion: {
"images": [
{
"name": "skybox",
"uri": "hubs-scene-sample-dw0.1.0_img0.png"
},
{
"name": "envmap-category",
"mimeType": "image/vnd.radiance",
"uri": "hubs-scene-sample-dw0.1.0_img1.bin"
},
{
"name": "lightmap",
"mimeType": "image/vnd.radiance",
"uri": "hubs-scene-sample-dw0.1.0_img2.bin"
},
{
"name": "WoodFloor040_4K_Color",
"uri": "hubs-scene-sample-dw0.1.0_img3.ktx2"
}
],
"buffers": [
{
"uri": "hubs-scene-sample-dw0.1.0_data.bin",
"byteLength": 33384
}
]
} |
Wow that was fast, thanks! |
🤯 |
Hi @najadojo, hope you're doing well! Here's a suggestion from @rawnsley and Mozilla Hubs.
During GLB to GLTF conversion, it might be good to preserve the
mimeType
field, at least for types that are unknown to theguessFileExtension
function. This would enable RGBE environment maps that Hubs has an extension for. Even if these files got a.bin
extension, they would have a MIME type applied.via AnalyticalGraphicsInc/gltf-vscode#243
The text was updated successfully, but these errors were encountered: