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

Remove zipping compression from XKT format #1580

Open
xeolabs opened this issue Jul 11, 2024 · 2 comments
Open

Remove zipping compression from XKT format #1580

xeolabs opened this issue Jul 11, 2024 · 2 comments
Labels
feature-suggestion Suggestion for how to extend xeokit

Comments

@xeolabs
Copy link
Member

xeolabs commented Jul 11, 2024

Create a new XKT format, v11.

In this format, remove zip compression.

  • removing the zipping that's done in xeokit-convert - see here
  • make xeokit-convert mark each new XKT it creates as version 11
  • Create a new ParserV11.js parsing strategy for XKTLoaderPlugin, identical to ParserV10.js, but with unzipping removed.
  • be sure to register the new parser strategy with the plugin - see here

This will create larger XKT files, but they will load faster into the Viewer, since it won't have to unzip their data. It will also consume less memory in the browser while loading.

Caveat

Let's start by removing Zipping for everything except for the ID strings.

It may make sense to keep zipping in place for the ID strings in the XKT format though.

Or, we may want to pack the strings into an arraybuffer, unzipped, or something like that.

Also we may want to just to use numbers for the IDs of the meshes and geometries, and only use strings for the model object IDs. The IDs meshes and geometries are only local to the model, so it's kind of wasteful to make those strings.

@xeolabs xeolabs added the feature-suggestion Suggestion for how to extend xeokit label Jul 11, 2024
@Amoki
Copy link
Contributor

Amoki commented Jul 29, 2024

gzip widely used in the web will compensate for the unzipped part of the xkt anyway :)

@xeolabs
Copy link
Member Author

xeolabs commented Jul 29, 2024

I really got stuck on this one, so would welcome a PR if anyone has the time!

I just couldn't get the buffers for each array packing and unpacking right in the XKT ArrayBuffer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-suggestion Suggestion for how to extend xeokit
Projects
None yet
Development

No branches or pull requests

2 participants