Skip to content

AnwarvanOmmeren/maker.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

409 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maker.js

Maker.js, a Microsoft Garage project, is a JavaScript library for creating line drawings for CNC and laser cutters. It runs in both Node.js and web browsers.

Demos - Documentation

Features

Drawing with JavaScript code

Draw using three primitive paths: Line, Circle, and Arc.

Paths can be grouped into Models to form more complex drawings.

Behind the scenes, drawings are a simple Javascript object which can be serialized / deserialized conventionally with JSON.

Other people's Models can be imported, modified, and re-exported.

Models can be scaled, measured, and converted to different unit systems.

Models can be rotated or mirrored.

Find intersection points or intersection angles of paths.

Easily add a curvature at the joint between any 2 paths, using a traditional fillet or a dogbone fillet.

Combine models with boolean operations to get unions, intersections, or punches.

Detect loops formed by paths connecting end to end.

Output formats

2D: DXF, SVG

3D: OpenJsCad script, STL (Must include OpenJsCad or openjscad-csg)

Built-in models

Getting Started

To use in a web browser

Download the browser-based version of Maker.js, then upload it to your website: http://microsoft.github.io/maker.js/target/js/browser.maker.js

Add a script tag in your HTML:

<script src="http://microsoft.github.io/maker.js/target/js/browser.maker.js" type="text/javascript"></script>

In your JavaScript, use the require function to get a reference:

var makerjs = require('makerjs');

To use in Node.js

To depend on Maker.js, run this from the command line:

npm install makerjs --save

In your JavaScript, use the require function to get a reference:

var makerjs = require('makerjs');

Contribute to this project!

The Microsoft Garage turns fresh ideas into real projects. Learn more at http://microsoft.com/garage.

About

Maker.js, a Microsoft Garage project, is a JavaScript library for creating and sharing programmable 2D vector drawings that can be exported to SVG or DXF file formats for CNC and laser cutter machines.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • JavaScript 74.2%
  • TypeScript 24.0%
  • HTML 1.6%
  • CSS 0.2%