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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部