Meshopt
Meshopt Compression is GPU-friendly mesh optimization that makes meshes smaller and faster to render.
It can dramatically decrease the 3D model size when there're huge amount of geometry data in the 3D model.
i.e. you can apply Draco compression if your glTF model's .bin
size is big enough to be considered.
Meshopt is not enabled by default in View3D. You can enable it by using the meshoptPath option.
gltfpack is a great tool to apply EXT_meshopt_compression
extension. (Use -c
or -cc
flag)
Original
30.1MB (7.4MB gzipped)
- JSON
- JavaScript
- React
- Angular
- Vue@2
- Vue@3
- Svelte
{
src: "/egjs-view3d/model/lucy.glb",
poster: "/egjs-view3d/poster/lucy.png"
}
Meshopt Compressed
3.5MB (2.7MB gzipped, -91.03%)
- JSON
- JavaScript
- React
- Angular
- Vue@2
- Vue@3
- Svelte
{
src: "/egjs-view3d/model/meshopt/lucy.glb",
poster: "/egjs-view3d/poster/lucy.png"
}