Applies Meshopt compression using EXT_meshopt_compression. This type of compression can reduce the size of point, line, and triangle geometry, morph targets, and animation data.
This function is a thin wrapper around reorder, quantize, and EXTMeshoptCompression, and exposes relatively few configuration options. To access more options (like quantization bits) direct use of the underlying functions is recommended.
Example:
import { MeshoptEncoder } from 'meshoptimizer';
import { reorder } from '@gltf-transform/functions';
await MeshoptEncoder.ready;
await document.transform(
reorder({encoder: MeshoptEncoder, level: 'medium'})
);
Made by Don McCurdy • Documented with greendoc • © 2023 MIT License
meshopt