Add ability to export files and buffer views#73
Open
robertlong wants to merge 3 commits intoprefrontalcortex:devfrom
Open
Add ability to export files and buffer views#73robertlong wants to merge 3 commits intoprefrontalcortex:devfrom
robertlong wants to merge 3 commits intoprefrontalcortex:devfrom
Conversation
|
Thanks! It feels a bit weird that now I need to handle things different depending on if I want to export a glTF or a glb (exposing these internals, basically). Just an idea, what do you think about:
|
Author
|
Here's where I'm using it right now: https://github.com/matrix-org/thirdroom-unity-exporter/blob/main/Packages/thirdroom-unity-exporter/Runtime/Scripts/KHR_audio/KHR_AudioExtension.cs#L123 I think that approach would work well 👍 I'll switch over to it and update this PR when I do. |
Author
|
A couple months later, but I finally made the change @hybridherbst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR supersedes #60.
I'm developing an exporter plugin for Third Room that has support for the
KHR_audioextension. This includes exporting mp3 files. Files are either exported to disk and referenced viaurior exported as a buffer view. This PR adds two new methods for exporting arbitrary files and buffer views as well as exposing theshouldUseInternalBufferflag for determining which method to use.When exporting as a .glb or if you just want to export arbitrary buffer views, you can now use the
exporter.ExportBufferView(byte[] bytes)function.When exporting as a .gltf and you want to export an external file you can now use the
exporter.ExportFile(string path)function which returns the file uri.Here's an example of this in use: