A Python library for mesh optimization and encoding/decoding.
This repository contains two main components:
- Python Library: The Python
meshly
package for mesh optimization and encoding/decoding.
pip install meshly
- TypeScript Library: The TypeScript
meshly
package for decoding Python meshoptimizer zip generated from Python into THREE.js geometries.
npm install meshly
The Python library is located in the meshly
directory and provides:
- Mesh class as a Pydantic base class for representing and optimizing 3D meshes
- EncodedMesh class for storing encoded mesh data
- Functions for encoding and decoding meshes
- Utilities for compressing numpy arrays
The TypeScript library is located in the typescript
directory and provides:
- Functions to decode Python meshoptimizer zip files
- Conversion to THREE.js BufferGeometry
- Browser-compatible implementation
See the examples directory for usage examples of both libraries.