@jwc/jscad-utils 4.8.4 → 4.9.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jwc/jscad-utils",
3
- "version": "4.8.4",
3
+ "version": "4.9.0",
4
4
  "description": "Utilities for use in a jscad script.",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -13,9 +13,7 @@
13
13
  "test": "ava -v",
14
14
  "test:cov": "nyc --reporter=html --reporter=lcov --reporter=text ava",
15
15
  "build": "gulp all",
16
- "start": "gulp",
17
- "docs": "vuepress-jsdoc --source ./srcx --dist ./docs && npx vuepress build ./docs",
18
- "serve": "vuepress-jsdoc --source ./srcx --dist ./docs && vuepress dev ./docs"
16
+ "start": "gulp"
19
17
  },
20
18
  "keywords": [
21
19
  "jscad"
@@ -40,13 +38,10 @@
40
38
  "@babel/core": "7.20.7",
41
39
  "@babel/preset-env": "7.20.2",
42
40
  "@babel/register": "7.18.9",
43
- "@vuepress/plugin-active-header-links": "1.9.7",
44
- "@vuepress/plugin-google-analytics": "1.9.7",
45
41
  "ava": "3.15.0",
46
42
  "del": "6.1.1",
47
43
  "eslint": "7.32.0",
48
44
  "eslint-plugin-ava": "11.0.0",
49
- "fsevents": "2.3.2",
50
45
  "gulp": "4.0.2",
51
46
  "gulp-debug": "4.0.0",
52
47
  "gulp-eslint": "6.0.0",
@@ -63,7 +58,8 @@
63
58
  "rollup-plugin-babel": "4.4.0",
64
59
  "rollup-plugin-commonjs": "4.1.0",
65
60
  "rollup-plugin-node-resolve": "5.2.0",
66
- "vuepress-jsdoc": "3.7.1"
61
+ "vitepress": "1.6.4",
62
+ "vitepress-jsdoc": "1.0.4"
67
63
  },
68
64
  "ava": {
69
65
  "files": [
@@ -81,9 +77,5 @@
81
77
  "presets": [
82
78
  "@babel/preset-env"
83
79
  ]
84
- },
85
- "optionalDependencies": {},
86
- "peerDependencies": {
87
- "vuepress": "^1.0.3"
88
80
  }
89
81
  }
package/src/boxes.js CHANGED
@@ -54,7 +54,7 @@ export function topMiddleBottom(box, thickness) {
54
54
  * This will bisect an object using a rabett join. Returns a
55
55
  * `group` object with `positive` and `negative` parts.
56
56
  *
57
- * * ![parts example](../images/rabett.png)
57
+ * * ![parts example](./images/rabett.png)
58
58
  * @example
59
59
  *include('dist/jscad-utils.jscad');
60
60
  *
package/src/util.js CHANGED
@@ -540,9 +540,9 @@ export function calcSnap(moveobj, withobj, axes, orientation, delta = 0) {
540
540
 
541
541
  error(
542
542
  'calcSnap: invalid side: ' +
543
- orientation +
544
- ' should be ' +
545
- fix['' + orientation + delta]
543
+ orientation +
544
+ ' should be ' +
545
+ fix['' + orientation + delta]
546
546
  );
547
547
  }
548
548
 
@@ -560,8 +560,8 @@ export function calcSnap(moveobj, withobj, axes, orientation, delta = 0) {
560
560
 
561
561
  return delta
562
562
  ? axisApply(axes, function (i) {
563
- return t[i] + delta;
564
- })
563
+ return t[i] + delta;
564
+ })
565
565
  : t;
566
566
  }
567
567
 
@@ -716,7 +716,7 @@ export function getDelta(size, bounds, axis, offset, nonzero) {
716
716
  *
717
717
  * You can angle the cut plane and position the rotation point.
718
718
  *
719
- * ![bisect example](../images/bisect.png)
719
+ * ![bisect example](./images/bisect.png)
720
720
  * @param {CSG} object object to bisect
721
721
  * @param {string} axis axis to cut along
722
722
  * @param {number} [offset] offset to cut at
@@ -903,7 +903,7 @@ export function slice(
903
903
  * Creates a `JsCadUtilsGroup` object that has `body` and `wedge` objects. The `wedge` object
904
904
  * is created by radially cutting the object from the `start` to the `end` angle.
905
905
  *
906
- * ![wedge example](../images/wedge.png)
906
+ * ![wedge example](./images/wedge.png)
907
907
  *
908
908
  *
909
909
  * @example
@@ -1063,11 +1063,11 @@ export function slices2poly(slices, options, axis) {
1063
1063
  var rotate =
1064
1064
  twistangle === 0
1065
1065
  ? function rotateZero(v) {
1066
- return v;
1067
- }
1066
+ return v;
1067
+ }
1068
1068
  : function rotate(v, angle, percent) {
1069
- return v[rotateAxis](angle * percent);
1070
- };
1069
+ return v[rotateAxis](angle * percent);
1070
+ };
1071
1071
 
1072
1072
  // walls
1073
1073
  var connectorAxis = last.offset.minus(first.offset).abs();