Skip to content
Dan Marshall edited this page May 30, 2015 · 23 revisions

#Key Concepts of Maker.js

Maker.js lets you design shapes with JavaScript code. These shapes have only outlines. Shapes are made from primitive outlines called Paths. There are 3 primitive Paths: line, circle, and arc. Paths are defined by Points and other properties. A group of paths may be contained in what is called a Model. A Model may then contain other Models.

There is no contiguity between paths. Even when contained within a model, Paths are essentially loose and disconnected. If you are familiar with vector drawing tools, this is somewhat of a departure from the typical "continuous" path concept.

As a designer, you may use other's Models in your design. Or you may publish your own designs as Models for others to use. Packaging and publishing are handled either by script tags in the browser or via require in Node.js, (depending on your environment) and are beyond the scope of this library.

POJO's: Plain old JavaScript objects are used to design your model. To make this work, these plain objects must conform to a schema. Other than this, the programmer may use whichever technique they prefer for object creation.

Since these designs are made of JavaScript objects, they can be parametric instead of being merely static drawings.

Clone this wiki locally