资产压缩

Asset Compression -fastest校订中

In Verge3D, scene files may be compressed using the highly effective LZMA2 compression algorithm, thus allowing to significantly reduce the size of the files. At the same time, LZMA2 offers fast decompression on the browser side. Typical compression rates observed for Verge3D scenes are: 20x for the .gltf files and 6x for the .bin files.

导出压缩文件（Exporting Compressed Files）

Verge3D supports loading of scene files compressed in the .xz file format, which incorporates the LZMA2 compression algorithm. To enable creating .xz files automatically upon export, you can simply turn on the corresponding option in the export settings.

正在加载.xz文件（Loading .xz Files）

The compressed .xz files (for example, my_awesome_app.gltf.xz and my_awesome_app.bin.xz) should appear near the original ones. What is left is to enable loading them in your app. To do this, go to Puzzles and switch to the init tab:

Reload your app so that the console starts displaying files from the beginning. Find the scene files in the list - if everything is ok, they should end with .xz.

重新加载您的应用程序，以便控制台从头开始显示文件。在列表中查找场景文件 - 如果一切正常，则应以.xz结尾。

The browser console can usually be opened with the F12 key (Chrome, Firefox on Windows, Linux). On Mac use the View > Developer > JavaScript Console menu (Option-Cmd-J) in Chrome, or the Develop > Show Error Console menu (Option-Cmd-C) in Safari.

档案库（Archivers）

Alternatively, you can create .xz files using archive utilities as 7-Zip, XZ Utils or others.

或者，您可以使用存档实用程序（如7-Zip，XZ Utils或其他）创建.xz文件 。

Verge3D implementation of an .xz decompressor puts some restrictions on compressed files due to optimization purposes, so not every .xz file can be loaded. .tar.xz files are also not supported. Considering this, it's recommended to use settings described below.