Replies: 1 comment 1 reply
-
Hi, Are you specifically talking about There's been a feature request before in #219 . On WebGL, I'd use the HTTP compression (gzip or brotli) and let the server/browser do the work. No need for a custom zip decompression. glTFast does not have built-in zip support. so on other platforms these are the options that come to mind:
Both options will only work for self-contained files without relative URIs. For other files you'd need a load method for JSON glTFs like that: public async Task<bool> LoadGltf(string json, Uri uri = null, ImportSettings importSettings = null); You'd still have to de-compress the zipped gltf yourself, but you can pass the resulting string to glTFast. Would that be helpful to you? Regards, P.S.: On another size-reduction note: Also consider mesh compression (meshopt or Draco) and Basis Universal compressed KTX textures. That might bring your file sizes down considerably as well. |
Beta Was this translation helpful? Give feedback.
-
Hi! How should I approach importing a zipped gltf file at runtime with this plugin? There are 2 methods available as far as I can tell, gltf.Load(“url .gltf file”) and gltf.LoadGltfBinary() but non of them seem to consider the .zip files, which means the whole file has to be unzipped first before calling one of the Load methods. There is also a IDownloadProvider interface option that can be provided to the importer object, but that interface seems to be focusing on downloading and not what happens after it, which would be the case with unzipping (e.g. download the zip -> unzip the file -> load the model). Do you have any suggestions on how and where should the unzipping logic be incorporated into the loading process, considering that the target platforms are WebGL, Android and IOS.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions