@thi.ng/hiccup-canvas 2.5.16 → 2.5.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-02-22T23:15:26Z
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
+ ### [2.5.17](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-canvas@2.5.17) (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
  ### [2.5.14](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-canvas@2.5.14) (2024-02-19)
13
19
 
14
20
  #### 🩹 Bug fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-canvas",
3
- "version": "2.5.16",
3
+ "version": "2.5.18",
4
4
  "description": "Hiccup shape tree renderer for vanilla Canvas 2D contexts",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,10 +37,10 @@
37
37
  "dependencies": {
38
38
  "@thi.ng/api": "^8.9.25",
39
39
  "@thi.ng/checks": "^3.5.0",
40
- "@thi.ng/color": "^5.6.22",
40
+ "@thi.ng/color": "^5.6.24",
41
41
  "@thi.ng/math": "^5.10.2",
42
- "@thi.ng/pixel": "^6.1.10",
43
- "@thi.ng/vectors": "^7.10.10"
42
+ "@thi.ng/pixel": "^6.1.11",
43
+ "@thi.ng/vectors": "^7.10.11"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@microsoft/api-extractor": "^7.40.1",
@@ -130,5 +130,5 @@
130
130
  ],
131
131
  "year": 2018
132
132
  },
133
- "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
133
+ "gitHead": "b97641d1d722f79a70ea68243fa95e845dca7a43\n"
134
134
  }
package/packed-points.js CHANGED
@@ -9,13 +9,7 @@ const packedPoints = (ctx, attribs, opts, pts) => {
9
9
  }
10
10
  };
11
11
  const __drawPoints = (ctx, opts, pts, cmd, cmdR) => {
12
- const { start, cstride, estride, size } = {
13
- start: 0,
14
- cstride: 1,
15
- estride: 2,
16
- size: 1,
17
- ...opts
18
- };
12
+ const { start = 0, cstride = 1, estride = 2, size = 1 } = opts;
19
13
  let num = opts && opts.num != null ? opts.num : (pts.length - start) / estride | 0;
20
14
  if (opts.shape === "circle") {
21
15
  for (let i = start; num-- > 0; i += estride) {
package/polygon.js CHANGED
@@ -23,12 +23,7 @@ const __drawPoly = (ctx, pts) => {
23
23
  }
24
24
  };
25
25
  const __drawPackedPoly = (ctx, opts, pts) => {
26
- const { start, cstride, estride } = {
27
- start: 0,
28
- cstride: 1,
29
- estride: 2,
30
- ...opts
31
- };
26
+ const { start = 0, cstride = 1, estride = 2 } = opts;
32
27
  let num = opts && opts.num != null ? opts.num : (pts.length - start) / estride | 0;
33
28
  ctx.beginPath();
34
29
  ctx.moveTo(pts[start], pts[start + cstride]);