Mesh Repair — Modly Extension
Cleans up and optionally reduces polygon count on any 3D mesh (.glb) using glTF-Transform and meshoptimizer .
Extension ID: mesh-repair
Version: 1.0.0
Author: Lorchie
Runtime: Node.js (CPU only)
GLB input
└─ 1. Load GLB
└─ 2. Simplify (optional) ── reduces triangle count via meshoptimizer
└─ 3. GLB export
Parameter
Default
Description
simplify
false
Enable polygon reduction
target_faces
50 000
Target triangle count when simplification is enabled (1 000 – 500 000)
If the mesh is already below target_faces, simplification is skipped automatically.
Keep target_faces above 10 000 to preserve fine surface detail.
Use case
Result
Dense AI-generated mesh
Reduce face count for real-time or export
Mesh too heavy for downstream tools
Fast CPU decimation with quality preservation
Use case
Why
Non-manifold or broken geometry
meshoptimizer expects valid mesh topology
Organic meshes needing retopology
Use Instant Remesh instead
Dependencies are bundled directly into generator.js — no installation required.
modly-mesh-repair/
├── manifest.json # Modly manifest (node declaration, parameters)
├── generator.js # Bundled processor (all deps included, no install needed)
└── .gitignore
glTF-Transform — MIT
meshoptimizer — MIT