Maker.js lets you create line drawings with geometry-style constructs in JavaScript. It exports to DXF, SVG, PDF, and related formats for CNC, laser, or general programmatic design.
Overview
Maker.js models drawings as paths, models, layers, and chains built from lines, arcs, and circles. Drawings serialize as plain JSON objects, can be required and modified in Node.js, and support scaling, measurement, rotation, mirroring, and boolean combinations.
Export covers 2D DXF, SVG, PDF, and Jscad CAG, plus 3D Jscad script, CSG, and STL outputs. Built-in shapes range from rectangles and polygons to text, stars, and slots. Imports include SVG path data, points, and fonts with opentype.js.
You can use it in Node.js via npm, in the browser with a downloaded or CDN build, or through the Maker.js Playground to edit and run code online. Optional dependencies support Bezier curves and font rendering.
Key features
- Paths, models, layers, and chains
- DXF, SVG, and PDF export
- Boolean union and intersection
- Built-in mechanical primitives
- JSON-serializable drawings
- Browser Playground editor
- Node.js and CDN usage
- STL and Jscad 3D export
Use cases
- CNC and laser cutter layouts
- Parametric 2D part design
- SVG and DXF generation in apps
- Educational geometry scripting