You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DracoMeshCompression doesn't handle Data URIs; in general there should probably be an abstraction for extensions that need to access binary data from a buffer before it's parsed into accessors:
Looking into this more, the Draco extension is probably doing the right thing — decoding Data URIs is handled in the I/O class, not the readers. Currently the read('path/to/file.gltf') methods will decode Data URIs, but readJSON does not. That'll be a small breaking change for WebIO unfortunately, since readJSON needs to become asynchronous to support this.
Perhaps it's worth thinking a little more about the sync/async differences between these methods. Currently NodeIO (1) uses sync for everything, and (2), can't load resources over the network. I think I'm OK with leaving (2) to the user but they shouldn't have to manually replace Data URIs. And (1) is not ideal for anything running on a web server.
The text was updated successfully, but these errors were encountered:
On further thought, not necessarily a breaking change since we can use BufferUtils.createBufferFromDataURI synchronously. The idea that NodeIO should become async is probably still worth doing at some point though...
DracoMeshCompression doesn't handle Data URIs; in general there should probably be an abstraction for extensions that need to access binary data from a buffer before it's parsed into accessors:Looking into this more, the Draco extension is probably doing the right thing — decoding Data URIs is handled in the I/O class, not the readers. Currently the
read('path/to/file.gltf')
methods will decode Data URIs, butreadJSON
does not. That'll be a small breaking change for WebIO unfortunately, sincereadJSON
needs to become asynchronous to support this.Perhaps it's worth thinking a little more about the sync/async differences between these methods. Currently NodeIO (1) uses sync for everything, and (2), can't load resources over the network. I think I'm OK with leaving (2) to the user but they shouldn't have to manually replace Data URIs. And (1) is not ideal for anything running on a web server.
The text was updated successfully, but these errors were encountered: