xeokit / xeokit-sdk

Open source JavaScript SDK for viewing high-detail, full-precision 3D BIM and AEC models in the Web browser.
https://xeokit.io
Other
714 stars 286 forks source link

Remove zipping compression from XKT format #1580

Closed xeolabs closed 1 week ago

xeolabs commented 2 months ago

Create a new XKT format, v11.

In this format, remove zip compression.

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.

Amoki commented 1 month ago

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

xeolabs commented 1 month ago

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.

xeolabs commented 1 week ago

Completed - see https://github.com/xeokit/xeokit-sdk/pull/1635