@thi.ng/axidraw 1.1.159 → 1.1.161
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/README.md +2 -2
- package/axidraw.js +1 -1
- package/package.json +12 -12
- package/polyline.js +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 211 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -197,7 +197,7 @@ For Node.js REPL:
|
|
|
197
197
|
const axi = await import("@thi.ng/axidraw");
|
|
198
198
|
```
|
|
199
199
|
|
|
200
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 3.
|
|
200
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 3.26 KB
|
|
201
201
|
|
|
202
202
|
## Dependencies
|
|
203
203
|
|
package/axidraw.js
CHANGED
|
@@ -96,7 +96,7 @@ class AxiDraw {
|
|
|
96
96
|
*/
|
|
97
97
|
async connect(path = "/dev/tty.usbmodem") {
|
|
98
98
|
const isStr = isString(path);
|
|
99
|
-
for (
|
|
99
|
+
for (const port of await this.opts.serial.list(path.toString())) {
|
|
100
100
|
if (isStr && port.path.startsWith(path) || !isStr && path.test(port.path)) {
|
|
101
101
|
this.opts.logger.info(`using device: ${port.path}...`);
|
|
102
102
|
this.serial = this.opts.serial.ctor(port.path, 38400);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/axidraw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.161",
|
|
4
4
|
"description": "Minimal AxiDraw plotter/drawing machine controller for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.12.
|
|
43
|
-
"@thi.ng/checks": "^3.
|
|
44
|
-
"@thi.ng/compose": "^3.0.
|
|
45
|
-
"@thi.ng/date": "^2.7.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/logger": "^3.2.
|
|
48
|
-
"@thi.ng/math": "^5.
|
|
49
|
-
"@thi.ng/transducers": "^9.6.
|
|
50
|
-
"@thi.ng/units": "^1.0.
|
|
51
|
-
"@thi.ng/vectors": "^8.6.
|
|
42
|
+
"@thi.ng/api": "^8.12.10",
|
|
43
|
+
"@thi.ng/checks": "^3.8.0",
|
|
44
|
+
"@thi.ng/compose": "^3.0.47",
|
|
45
|
+
"@thi.ng/date": "^2.7.73",
|
|
46
|
+
"@thi.ng/errors": "^2.5.50",
|
|
47
|
+
"@thi.ng/logger": "^3.2.9",
|
|
48
|
+
"@thi.ng/math": "^5.14.0",
|
|
49
|
+
"@thi.ng/transducers": "^9.6.19",
|
|
50
|
+
"@thi.ng/units": "^1.0.34",
|
|
51
|
+
"@thi.ng/vectors": "^8.6.15",
|
|
52
52
|
"serialport": "^13.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"year": 2022,
|
|
119
119
|
"screenshot": "axidraw/axiscape-1280.jpg"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
|
|
122
122
|
}
|
package/polyline.js
CHANGED
|
@@ -3,7 +3,7 @@ function* polyline(pts, opts = {}) {
|
|
|
3
3
|
if (!pts.length) return;
|
|
4
4
|
const { speed = 1, onlyGeo = false, delayDown, delayUp, down } = opts;
|
|
5
5
|
if (onlyGeo) {
|
|
6
|
-
for (
|
|
6
|
+
for (const p of pts) yield MOVE(p, speed);
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
yield MOVE(pts[0]);
|