@thi.ng/axidraw 1.1.121 → 1.1.123
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.js +5 -5
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-04-
|
|
3
|
+
- **Last updated**: 2025-04-16T11:11:14Z
|
|
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.
|
|
@@ -11,6 +11,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
### [1.1.123](https://github.com/thi-ng/umbrella/tree/@thi.ng/axidraw@1.1.123) (2025-04-16)
|
|
15
|
+
|
|
16
|
+
#### ♻️ Refactoring
|
|
17
|
+
|
|
18
|
+
- minor internal optimizations (vector ops) ([adfebba](https://github.com/thi-ng/umbrella/commit/adfebba))
|
|
19
|
+
|
|
14
20
|
### [1.1.59](https://github.com/thi-ng/umbrella/tree/@thi.ng/axidraw@1.1.59) (2024-02-22)
|
|
15
21
|
|
|
16
22
|
#### ♻️ Refactoring
|
package/axidraw.js
CHANGED
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
} from "@thi.ng/vectors/api";
|
|
15
15
|
import { clamp2 } from "@thi.ng/vectors/clamp";
|
|
16
16
|
import { maddN2 } from "@thi.ng/vectors/maddn";
|
|
17
|
-
import {
|
|
17
|
+
import { mag2 } from "@thi.ng/vectors/mag";
|
|
18
18
|
import { mulN2 } from "@thi.ng/vectors/muln";
|
|
19
19
|
import { set2 } from "@thi.ng/vectors/set";
|
|
20
|
-
import {
|
|
20
|
+
import { setN2 } from "@thi.ng/vectors/setn";
|
|
21
21
|
import { sub2 } from "@thi.ng/vectors/sub";
|
|
22
22
|
import {
|
|
23
23
|
AxiDrawState
|
|
@@ -77,8 +77,8 @@ class AxiDraw {
|
|
|
77
77
|
this.save();
|
|
78
78
|
}
|
|
79
79
|
reset() {
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
setN2(this.pos, 0);
|
|
81
|
+
setN2(this.targetPos, 0);
|
|
82
82
|
this.send("R\r");
|
|
83
83
|
return this;
|
|
84
84
|
}
|
|
@@ -387,7 +387,7 @@ class AxiDraw {
|
|
|
387
387
|
const maxAxis = Math.max(...abs2([], delta));
|
|
388
388
|
const duration = 1e3 * maxAxis / ((isPenDown ? opts.speedDown : opts.speedUp) * tempo);
|
|
389
389
|
this.send(`XM,${duration | 0},${delta[0] | 0},${delta[1] | 0}\r`);
|
|
390
|
-
return [duration,
|
|
390
|
+
return [duration, mag2(delta) / scale];
|
|
391
391
|
}
|
|
392
392
|
/**
|
|
393
393
|
* Sends pen up/down config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/axidraw",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.123",
|
|
4
4
|
"description": "Minimal AxiDraw plotter/drawing machine controller for Node.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@thi.ng/api": "^8.11.
|
|
43
|
-
"@thi.ng/checks": "^3.7.
|
|
44
|
-
"@thi.ng/compose": "^3.0.
|
|
45
|
-
"@thi.ng/date": "^2.7.
|
|
46
|
-
"@thi.ng/errors": "^2.5.
|
|
47
|
-
"@thi.ng/logger": "^3.1.
|
|
48
|
-
"@thi.ng/math": "^5.11.
|
|
49
|
-
"@thi.ng/transducers": "^9.2.
|
|
50
|
-
"@thi.ng/units": "^1.0.
|
|
51
|
-
"@thi.ng/vectors": "^
|
|
42
|
+
"@thi.ng/api": "^8.11.26",
|
|
43
|
+
"@thi.ng/checks": "^3.7.6",
|
|
44
|
+
"@thi.ng/compose": "^3.0.29",
|
|
45
|
+
"@thi.ng/date": "^2.7.51",
|
|
46
|
+
"@thi.ng/errors": "^2.5.32",
|
|
47
|
+
"@thi.ng/logger": "^3.1.7",
|
|
48
|
+
"@thi.ng/math": "^5.11.26",
|
|
49
|
+
"@thi.ng/transducers": "^9.2.26",
|
|
50
|
+
"@thi.ng/units": "^1.0.14",
|
|
51
|
+
"@thi.ng/vectors": "^8.0.0",
|
|
52
52
|
"serialport": "^13.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"esbuild": "^0.25.2",
|
|
56
|
-
"typedoc": "^0.28.
|
|
57
|
-
"typescript": "^5.8.
|
|
56
|
+
"typedoc": "^0.28.2",
|
|
57
|
+
"typescript": "^5.8.3"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"2d",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"year": 2022,
|
|
119
119
|
"screenshot": "axidraw/axiscape-1280.jpg"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "c464b6948f92cba90c2ea75b59203dad894fb450\n"
|
|
122
122
|
}
|