meshopt

  • 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 { meshopt } from '@gltf-transform/functions';
    
    await MeshoptEncoder.ready;
    
    await document.transform(
      meshopt({encoder: MeshoptEncoder, level: 'medium'})
    );
    
Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.