@thi.ng/axidraw 1.1.58 → 1.1.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/axidraw.d.ts +9 -3
- package/axidraw.js +9 -3
- package/commands.d.ts +2 -0
- package/dip.d.ts +4 -2
- package/package.json +10 -10
- package/palettes.d.ts +1 -0
- package/polyline.d.ts +1 -1
- package/polyline.js +2 -6
- package/registration.d.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-02-
|
|
3
|
+
- **Last updated**: 2024-02-25T14:07:53Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [1.1.59](https://github.com/thi-ng/umbrella/tree/@thi.ng/axidraw@1.1.59) (2024-02-22)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update object destructuring in all pkgs & examples ([f36aeb0](https://github.com/thi-ng/umbrella/commit/f36aeb0))
|
|
17
|
+
|
|
12
18
|
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/axidraw@1.1.0) (2023-03-22)
|
|
13
19
|
|
|
14
20
|
#### 🚀 Features
|
package/axidraw.d.ts
CHANGED
|
@@ -49,13 +49,19 @@ export declare class AxiDraw implements IReset {
|
|
|
49
49
|
* Reference:
|
|
50
50
|
* - http://evil-mad.github.io/EggBot/ebb.html
|
|
51
51
|
*
|
|
52
|
+
* Also see {@link complete}.
|
|
53
|
+
*
|
|
52
54
|
* @example
|
|
53
55
|
* ```ts
|
|
56
|
+
* import { AxiDraw, polyline, START, STOP } from "@thi.ng/axidraw";
|
|
57
|
+
*
|
|
58
|
+
* const axi = new AxiDraw();
|
|
59
|
+
*
|
|
54
60
|
* // execute start sequence, draw a triangle, then exec stop sequence
|
|
55
61
|
* axi.draw([
|
|
56
|
-
*
|
|
57
|
-
* ...
|
|
58
|
-
*
|
|
62
|
+
* START,
|
|
63
|
+
* ...polyline([[50, 50], [100, 50], [75, 100], [50, 50]]),
|
|
64
|
+
* STOP
|
|
59
65
|
* ]);
|
|
60
66
|
* ```
|
|
61
67
|
*
|
package/axidraw.js
CHANGED
|
@@ -132,13 +132,19 @@ class AxiDraw {
|
|
|
132
132
|
* Reference:
|
|
133
133
|
* - http://evil-mad.github.io/EggBot/ebb.html
|
|
134
134
|
*
|
|
135
|
+
* Also see {@link complete}.
|
|
136
|
+
*
|
|
135
137
|
* @example
|
|
136
138
|
* ```ts
|
|
139
|
+
* import { AxiDraw, polyline, START, STOP } from "@thi.ng/axidraw";
|
|
140
|
+
*
|
|
141
|
+
* const axi = new AxiDraw();
|
|
142
|
+
*
|
|
137
143
|
* // execute start sequence, draw a triangle, then exec stop sequence
|
|
138
144
|
* axi.draw([
|
|
139
|
-
*
|
|
140
|
-
* ...
|
|
141
|
-
*
|
|
145
|
+
* START,
|
|
146
|
+
* ...polyline([[50, 50], [100, 50], [75, 100], [50, 50]]),
|
|
147
|
+
* STOP
|
|
142
148
|
* ]);
|
|
143
149
|
* ```
|
|
144
150
|
*
|
package/commands.d.ts
CHANGED
package/dip.d.ts
CHANGED
|
@@ -35,8 +35,10 @@ export interface DipOpts {
|
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
38
|
+
* import { dip, MOVE } from "@thi.ng/axidraw";
|
|
39
|
+
*
|
|
38
40
|
* // simple 2x up/down
|
|
39
|
-
* [...
|
|
41
|
+
* [...dip(2)]
|
|
40
42
|
* // [
|
|
41
43
|
* // [ "d", undefined ],
|
|
42
44
|
* // [ "u", undefined ],
|
|
@@ -45,7 +47,7 @@ export interface DipOpts {
|
|
|
45
47
|
* // ]
|
|
46
48
|
*
|
|
47
49
|
* // 3x dipping with custom up/down delays, each time at a random position
|
|
48
|
-
* [...
|
|
50
|
+
* [...dip(3, {
|
|
49
51
|
* down: 300,
|
|
50
52
|
* up: 400,
|
|
51
53
|
* commands: () => [ MOVE([Math.random()* 5, Math.random()* 5]) ]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/axidraw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.60",
|
|
4
4
|
"description": "Minimal AxiDraw plotter/drawing machine controller for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
+
"@thi.ng/api": "^8.9.26",
|
|
39
39
|
"@thi.ng/checks": "^3.5.0",
|
|
40
|
-
"@thi.ng/compose": "^2.1.
|
|
41
|
-
"@thi.ng/date": "^2.
|
|
40
|
+
"@thi.ng/compose": "^2.1.65",
|
|
41
|
+
"@thi.ng/date": "^2.7.1",
|
|
42
42
|
"@thi.ng/errors": "^2.4.18",
|
|
43
|
-
"@thi.ng/logger": "^3.0.
|
|
44
|
-
"@thi.ng/math": "^5.10.
|
|
45
|
-
"@thi.ng/transducers": "^8.9.
|
|
46
|
-
"@thi.ng/units": "^0.4.
|
|
47
|
-
"@thi.ng/vectors": "^7.10.
|
|
43
|
+
"@thi.ng/logger": "^3.0.3",
|
|
44
|
+
"@thi.ng/math": "^5.10.3",
|
|
45
|
+
"@thi.ng/transducers": "^8.9.7",
|
|
46
|
+
"@thi.ng/units": "^0.4.33",
|
|
47
|
+
"@thi.ng/vectors": "^7.10.12",
|
|
48
48
|
"serialport": "^12.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"status": "alpha",
|
|
116
116
|
"year": 2022
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
|
|
119
119
|
}
|
package/palettes.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export interface RadialPaletteOpts extends BasePaletteOpts {
|
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
73
|
+
* import { AxiDraw, linearPalette } from "@thi.ng/axidraw";
|
|
73
74
|
* import { points } from "@thi.ng/geom";
|
|
74
75
|
* import { asAxiDraw } from "@thi.ng/geom-axidraw";
|
|
75
76
|
* import { repeatedly } from "@thi.ng/transducers";
|
package/polyline.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ import type { DrawCommand, PolylineOpts } from "./api.js";
|
|
|
12
12
|
* @param pts
|
|
13
13
|
* @param opts
|
|
14
14
|
*/
|
|
15
|
-
export declare function polyline(pts: ReadonlyVec[], opts
|
|
15
|
+
export declare function polyline(pts: ReadonlyVec[], opts?: Partial<PolylineOpts>): IterableIterator<DrawCommand>;
|
|
16
16
|
//# sourceMappingURL=polyline.d.ts.map
|
package/polyline.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { DOWN, MOVE, PEN, UP } from "./commands.js";
|
|
2
|
-
function* polyline(pts, opts) {
|
|
2
|
+
function* polyline(pts, opts = {}) {
|
|
3
3
|
if (!pts.length)
|
|
4
4
|
return;
|
|
5
|
-
const { speed, delayDown, delayUp, down
|
|
6
|
-
speed: 1,
|
|
7
|
-
onlyGeo: false,
|
|
8
|
-
...opts
|
|
9
|
-
};
|
|
5
|
+
const { speed = 1, onlyGeo = false, delayDown, delayUp, down } = opts;
|
|
10
6
|
if (onlyGeo) {
|
|
11
7
|
for (let p of pts)
|
|
12
8
|
yield MOVE(p, speed);
|
package/registration.d.ts
CHANGED
|
@@ -6,7 +6,12 @@ import type { DrawCommand } from "./api.js";
|
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
|
-
*
|
|
9
|
+
* import { AxiDraw, registrationMark } from "@thi.ng/axidraw";
|
|
10
|
+
*
|
|
11
|
+
* const axi = new AxiDraw();
|
|
12
|
+
*
|
|
13
|
+
* // draw registration mark @ 20,20 with radius 10
|
|
14
|
+
* axi.draw(registrationMark([20, 20], 10))
|
|
10
15
|
* ```
|
|
11
16
|
*
|
|
12
17
|
* @param pos
|