Releases: arbaev/dxf-kit
dxf-vuer@2.2.0
Features
- Touch support:
touch-action: noneon.dxf-viewercontainer for correct mobile touch handling - GIS origin offset: uses
originOffsetfrom dxf-render instead ofgroup.positionshift for correct large-coordinate handling
Refactored
- Import
useControlsinstead of deprecateduseOrbitControls
Dependencies
- Requires
dxf-render≥ 1.2.0
Install
npm install dxf-vuer@2.2.0Full changelog: https://github.com/arbaev/dxf-kit/blob/main/packages/dxf-vuer/CHANGELOG.md
dxf-render@1.2.0
Features
- Variable-width polylines: POLYLINE/LWPOLYLINE per-vertex
startWidth/endWidthtapering with triangle-strip mesh geometry and miter joins - GIS origin translation:
$EXTMIN/$EXTMAXcenter subtracted from coordinates before Float32Array to prevent precision loss at large GIS coordinates (UTM, state plane);originOffsetreturned fromcreateThreeObjectsFromDXF() - Touch support: switched from
OrbitControlstoMapControlsfor native one-finger pan on mobile devices
Refactored
useOrbitControlsrenamed touseControls(old name kept as deprecated alias)
Examples
- New
examples/leaflet-dxf/— overlay DXF on OpenStreetMap with geo-referencing (parser-only, DXF → GeoJSON) - New
examples/dxf-to-pdf/— export DXF drawings to PDF via Three.js offscreen rendering + jsPDF - New "Line Types & Widths" showcase sample on demo landing page
- Examples section added to demo landing page with StackBlitz links
Install
npm install dxf-render@1.2.0Full changelog: https://github.com/arbaev/dxf-kit/blob/main/packages/dxf-render/CHANGELOG.md
dxf-vuer@2.1.0
Features
- Theme-adaptive layer colors: layer panel now correctly inverts ACI 250-251 gray colors in dark mode via
resolveThemeColor().
Bug Fixes
- sRGB color output: added
OutputPassto the post-processing pipeline for correct linear→sRGB color conversion. - Three.js addon imports: updated import paths from
three/examples/jsm/tothree/addons/for Three.js 0.182 compatibility.
Dependencies
- Requires
dxf-render≥ 1.1.0 (newresolveThemeColorexport).
dxf-render@1.1.0
Features
- Theme-adaptive ACI 250-251: dark gray colors (ACI 250, 251) now invert to light grays in dark mode, keeping them visible against dark backgrounds. New exports:
isThemeAdaptiveColor(),resolveThemeColor().
Bug Fixes
- Single-point polyline: polylines with a single vertex are now rendered as points instead of being silently skipped.
- Layer default visibility: layers now default to
visible: true,frozen: false,locked: falsewhen flags are not explicitly set in the DXF file. - Three.js addon imports: updated import paths from
three/examples/jsm/tothree/addons/for Three.js 0.182 compatibility.
v1.5.0
Legacy release. This is from the single-package era (dxf-vuer v1.x). The project has since been split into two packages: dxf-render and dxf-vuer v2.x. See latest releases.
Highlights
- TAA anti-aliasing — thin crisp lines during interaction, smooth text and edges after idle accumulation (32 frames, ~0.5s)
- Instant dark mode — theme switching without re-render via material-level color sentinel
- Overlay rendering — text and dimension arrows always render on top of drawing geometry
- Major refactoring — monolithic 2622-line file replaced by 15 modular entity collectors
Added
- TAA anti-aliasing via
EffectComposer+TAARenderPass: hardware MSAA disabled (thin lines), 32 jittered frames accumulated when idle for smooth text and edges - Instant dark mode switching —
MaterialCacheStore.switchTheme()updates theme-dependent materials in-place, no re-parsing needed - Overlay mesh buffer in
GeometryCollectorfor text glyphs and dimension/leader arrows, rendered last - Hatch style support (code 75): Normal (even-odd), Outer (level 0+1), Ignore (level 0 only)
- Leader arrow size from XDATA DSTYLE override
Fixed
- Hatch: CW arc edges angle inversion for proper boundary connectivity
- Hatch: nearly-full-circle arcs from incorrect ccw flag clamped to short arc
- Hatch: polygon centroid for even-odd nesting test instead of first vertex
- Dimension text angle:
whileloop for normalization fixes upside-down text >270° - Dimension arrows: DIMSTYLE
DIMTSZ=0now correctly overrides header$DIMBLK=ARCHTICK - Leader arrow angle computed from spline at
arrowSizedistance - MTEXT word wrap: width/height ratio threshold filters artifact micro-widths
Changed
- Architecture:
useDXFGeometry.ts(2622 lines) → 15 entity collector modules ingeometry/collectors/ - Color resolution uses
ACI7_COLORsentinel for deferred dark/light theme resolution - Three separate material Map caches →
MaterialCacheStorewithswitchTheme(),disposeAll() useThreeScenemanagesEffectComposerlifecycle for TAA- 841 tests across 36 files
Full Changelog: https://github.com/arbaev/dxf-vuer/blob/main/CHANGELOG.md
dxf-vuer@2.0.1
Changed
- Repository renamed from
dxf-vuertodxf-kit - Updated all repository links, homepage, and documentation
No code changes.
📦 npm
dxf-vuer@2.0.0
dxf-vuer 2.0.0 — Monorepo Split
Vue 3 wrapper extracted into a thin layer on top of dxf-render.
Breaking Changes
- New peer dependency:
dxf-render >= 1.0.0required - Parser entry moved:
dxf-vuer/parser→dxf-render/parser
Backward Compatibility
All existing imports from dxf-vuer continue to work — the package re-exports everything from dxf-render:
import { parseDxf, DXFViewer } from 'dxf-vuer' // still worksInstall
npm install dxf-vuer dxf-render threedxf-render@1.0.1
Changed
- Repository renamed from
dxf-vuertodxf-kit - Updated all repository links, homepage, and documentation
No code changes.
📦 npm
dxf-render@1.0.0
dxf-render 1.0.0 — Initial Release
Framework-agnostic DXF parser + Three.js renderer, extracted from dxf-vuer v1.5.0 into a standalone package.
Highlights
- Custom DXF parser — 25 entity handlers, zero external dependencies
- Three.js renderer — 21 rendered entity types with geometry merging, block template caching, time-sliced rendering
- Two entry points:
dxf-render(full API) anddxf-render/parser(parser only, zero deps) parseDxfAsync()— Web Worker parsing with automatic fallback- Vector text — opentype.js triangulated glyphs, Liberation Sans/Serif fonts
- Linetype & hatch — geometric pattern splitting, 25 built-in AutoCAD hatch patterns
- TAA anti-aliasing, instant dark mode, overlay rendering
- Full TypeScript declarations
Install
npm install dxf-render three # full renderer
npm install dxf-render # parser onlyv1.4.0
Legacy release. This is from the single-package era (dxf-vuer v1.x). The project has since been split into two packages: dxf-render and dxf-vuer v2.x. See latest releases.
What's New
New Entity Types (+5 rendered)
- MLINE — multiline entities with multiple parallel line elements
- XLINE — construction lines (infinite in both directions), clipped to drawing extents
- RAY — rays (infinite in one direction), clipped to drawing extents
- HELIX — parsed as SPLINE, rendered through the existing spline pipeline
- ATTDEF — attribute definitions now rendered as text (previously parse-only)
Total rendered: 21 types (was 16), plus ATTRIB within INSERT blocks.
New Features
- DIMSTYLE table — 40+ dimension variables fully parsed (DIMBLK, DIMSCALE, DIMTXT, etc.)
- Architectural units — dimension text in feet-inches notation (DIMLUNIT=4) with fractions
- Architectural ticks — oblique tick marks for dimension lines (DIMTSZ > 0)
- Text underline — MTEXT
\L...\lformatting rendered as line segments - Tab support — MTEXT tab characters rendered with 4×textHeight tab stops
- 3D polygon mesh — POLYLINE with
is3dPolygonMeshas wireframe grids - PDMODE 34 — cross-in-circle point symbols
- $MIRRTEXT — mirrored text in blocks with negative X scale
- INSUNITS —
$INSUNITSheader +getInsUnitsScale()utility - 3DSOLID parser — parsed (not rendered), data stored for future use
- BLOCK_RECORD table — handle-to-name mapping
Bug Fixes (30+)
- Dimension lines: rotated, angular, overshoot, text gap, radial/diametric placement
- Text: height from DIMSTYLE, leading spaces,
\Hformat, textSize parameter - Hatch: solid fill 86× faster on large files, spline edges, donut shapes
- MTEXT: O(n) word wrapping, tab indentation
- Polyline: bulge=1 arcs, closed LWPOLYLINE, polyface mesh
- Ellipse: arc sweep direction, OCS transform
- Linetype: pattern scaling, auto-LTSCALE
- Leader: path type, tick marks, arrow sizing
- 3D entities: parsing robustness
- DXF files without TABLES section
Changed
- Fonts: Noto Sans/Serif Light → Liberation Sans/Serif Regular (Arial/Times New Roman metrically compatible)
- Entity parsers: 22 → 25 handlers (mline, xline, 3dsolid)
- Tests: 648 → 789 cases across 34 files
Bundle Sizes
| Chunk | v1.3.0 | v1.4.0 |
|---|---|---|
| Main (includes font + opentype.js) | ~790 KB | ~1000 KB |
| Parser chunk | ~43 KB | ~49 KB |
| Serif font (lazy) | ~646 KB | ~525 KB |
Full changelog: CHANGELOG.md