maker.js

?⚙ Library for creating 2D vector drawings for CNC and laser cutter machines.

Github星跟踪图

Maker.js

Your compass and straightedge, in JavaScript.

Create line drawings using familiar constructs from geometry and drafting. Initially designated for CNC and laser cutters, Maker.js can also help you programmatically draw shapes for any purpose. It runs in both Node.js and web browsers.

2D Export formats:
DXF,
SVG,
PDF,
Jscad CAG object

3D Export formats:
Jscad Script,
Jscad CSG object,
STL

Demos - Documentation

Sample animation

Core concepts

  • paths - The primitive elements of a drawing are lines, arcs, and circles.
  • models - Groups of paths to compose a shape.
  • layers - Organization of models, such as by color or tool type.
  • chains - A series of lines and arcs that connect end-to-end continuously.

Learn more in the tutorial or API documentation.

Features

Built-in models

Import formats

Getting Started

Try it now

Visit the Maker.js Playground a sample app to edit and run JavaScript from your browser.

Each of the demos will also open in the playground so that you can explore and modify their code.

To use in a web browser

Download the browser-based version of Maker.js, then upload it to your website:
https://maker.js.org/target/js/browser.maker.js

Add a script tag in your HTML:

<script src="https://maker.js.org/target/js/browser.maker.js" type="text/javascript"></script>

Note: You may also need additional libraries

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

var makerjs = require('makerjs');

To use via CDN

Add a script tag to your HTML:

<script src="https://cdn.jsdelivr.net/npm/makerjs@0/target/js/browser.maker.js"></script>

To work with Bezier Curves, you will also need a copy of Bezier.js by Pomax

<script src="https://cdn.jsdelivr.net/npm/bezier-js@2/bezier.js"></script>

To work with fonts, you will need both Bezier.js(above) and a copy of Opentype.js by Frederik De Bleser

<script src="https://cdn.jsdelivr.net/npm/opentype.js@0/dist/opentype.js"></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');

Contributing

There are many ways to contribute to Maker.js:

Some of these may require a contributor agreement.

Credits

Maker.js depends on:


Maker.js is a Microsoft Garage project. The Microsoft Garage turns fresh ideas into real projects. Learn more at http://microsoft.com/garage.

概览

名称与所有者microsoft/maker.js
主编程语言TypeScript
编程语言HTML (语言数: 5)
平台
许可证Apache License 2.0
发布数9
最新版本名称0.9.17 (发布于 )
第一版名称0.1.3 (发布于 )
创建于2015-05-08 19:39:23
推送于2024-03-29 00:23:41
最后一次提交2024-03-28 17:23:37
星数1.7k
关注者数103
派生数260
提交数1.6k
已启用问题?
问题数209
打开的问题数57
拉请求数355
打开的拉请求数3
关闭的拉请求数6
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?
去到顶部