diff --git a/README.md b/README.md index fa2a8aa..1df86d6 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,18 @@ ```js const bellows = require('bellows') ``` + +* [bellows](#module_bellows) + * [bellows([options])](#exp_module_bellows--bellows) ⏏ + * [~IN](#module_bellows--bellows..IN) + ### bellows([options]) ⏏ +Generate bellows pattern for cutting and folding. + **Kind**: Exported function -**Typicalname:bellows**: Generate bellows pattern for cutting and folding. +**Typicalname:bellows**: | Param | Type | Description | | --- | --- | --- | @@ -36,3 +43,22 @@ const bellows = require('bellows') const b = bellows({ parts : 2 }) console.log(b) ``` + + +#### bellows~IN +Try it out [in the browser](https://sixteenmillimeter.github.io/bellows/). + +### Install (node.js) + +First, install dependencies required by +[node-canvas](https://github.com/Automattic/node-canvas) by following +the [install instructions](https://github.com/Automattic/node-canvas#installation) +for your OS. + +``` +git clone https://github.com/sixteenmillimeter/bellows.git +cd bellows +npm install +``` + +**Kind**: inner constant of [bellows](#exp_module_bellows--bellows) diff --git a/src/bellows.js b/src/bellows.js index 8a9cc01..ccad989 100644 --- a/src/bellows.js +++ b/src/bellows.js @@ -6,6 +6,23 @@ * const bellows = require('bellows') */ +/** + * Try it out [in the browser](https://sixteenmillimeter.github.io/bellows/). + * + * ### Install (node.js) + * + * First, install dependencies required by + * [node-canvas](https://github.com/Automattic/node-canvas) by following + * the [install instructions](https://github.com/Automattic/node-canvas#installation) + * for your OS. + * + * ``` + * git clone https://github.com/sixteenmillimeter/bellows.git + * cd bellows + * npm install + * ``` + */ + const IN = 25.4 const BLACK = '0,0,0,1.0' const RED = '255,0,0,1.0' @@ -56,10 +73,11 @@ function taper (back, front, length, pos) { } /** + * Generate bellows pattern for cutting and folding. + * * @alias module:bellows * @typicalname:bellows * - * Generate bellows pattern for cutting and folding. * * @param {Object} [options] Bellows configuration options * @param {Integer} [options.dpi] DPI of the image @@ -538,21 +556,4 @@ function bellows (options = {}) { if (!browser) { module.exports = bellows -} - - /** - * Try it out [in the browser](https://sixteenmillimeter.github.io/bellows/). - * - * ### Install (node.js) - * - * First, install dependencies required by - * [node-canvas](https://github.com/Automattic/node-canvas) by following - * the [install instructions](https://github.com/Automattic/node-canvas#installation) - * for your OS. - * - *``` - * git clone https://github.com/sixteenmillimeter/bellows.git - * cd bellows - * npm install - *``` - */ \ No newline at end of file +} \ No newline at end of file