Overview of dxf-viewer features
masterThe dxf-viewer is a JavaScript-based 2D DXF viewer that uses WebGL (via three.js) for high-performance rendering of large real-world files.
Key architectural features include:
- Web-Worker Compatibility: File fetching, parsing, and preparation are decoupled, allowing you to off-load heavy processing to a web worker to keep the UI responsive.
- Geometry Batching: Minimizes draw calls by creating a minimal number of rendering batches during file processing.
- Instanced Rendering: Uses WebGL instancing for entities rendered multiple times with different transforms (e.g., DXF block instances) to optimize performance.
- Layer Support: Rendering batches respect DXF layers, allowing them to be easily hidden or shown.
- Font Support: Supports multiple fonts, including raw TTF files, which are lazy-loaded as needed based on character requirements.