@thi.ng/geom-sdf 0.2.39 → 0.2.40
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 +1 -1
- package/README.md +5 -5
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ const f = asSDF(group({}, [circle([-50, 0], 100), circle([50, 0], 100)]));
|
|
|
57
57
|
### SDF combinators
|
|
58
58
|
|
|
59
59
|
The following table illustrates various options how SDFs can be combined. When
|
|
60
|
-
using the [`asSDF()`](https://docs.thi.ng/umbrella/geom-sdf/
|
|
60
|
+
using the [`asSDF()`](https://docs.thi.ng/umbrella/geom-sdf/functions/asSDF.html)
|
|
61
61
|
geometry converter, these operators can be specified and configured (most are
|
|
62
62
|
parametric) via a shape `group()`'s
|
|
63
63
|
[attributes](https://docs.thi.ng/umbrella/geom-sdf/interfaces/SDFAttribs.html),
|
|
@@ -81,8 +81,8 @@ group({ __sdf: { combine: "diff", chamfer: 50 }}, [
|
|
|
81
81
|
### SDF discretization, sampling & domain modifiers
|
|
82
82
|
|
|
83
83
|
The package provides the
|
|
84
|
-
[`sample2d()`](https://docs.thi.ng/umbrella/geom-sdf/
|
|
85
|
-
[`asPolygons()`](https://docs.thi.ng/umbrella/geom-sdf/
|
|
84
|
+
[`sample2d()`](https://docs.thi.ng/umbrella/geom-sdf/functions/sample2d.html) and
|
|
85
|
+
[`asPolygons()`](https://docs.thi.ng/umbrella/geom-sdf/functions/asPolygons.html)
|
|
86
86
|
functions to discretize an SDF and cache results in a buffer (image) and then
|
|
87
87
|
extract contour polygons from it, i.e. convert the 2D back into geometry (see
|
|
88
88
|
example further below). The SDF will be sampled in a user defined bounding
|
|
@@ -90,7 +90,7 @@ rectangle (with customizable resolution) and the sampling positions can be
|
|
|
90
90
|
modulated via several provided domain modifiers to create various axial/spatial
|
|
91
91
|
repetions, symmetries etc. Modifiers are nestable/composable via standard
|
|
92
92
|
functional composition (e.g. using
|
|
93
|
-
[`compL()`](https://docs.thi.ng/umbrella/compose/
|
|
93
|
+
[`compL()`](https://docs.thi.ng/umbrella/compose/functions/compL.html)) and also
|
|
94
94
|
support custom modfifiers. The table below illustrates a few examples effects:
|
|
95
95
|
|
|
96
96
|
| Modifier | | | |
|
|
@@ -185,7 +185,7 @@ const sceneBounds = bounds(scene, 40);
|
|
|
185
185
|
|
|
186
186
|
// convert to an SDF distance function
|
|
187
187
|
// more information about supported shape types:
|
|
188
|
-
// https://docs.thi.ng/umbrella/geom-sdf/
|
|
188
|
+
// https://docs.thi.ng/umbrella/geom-sdf/functions/asSDF.html
|
|
189
189
|
const sdf = asSDF(scene);
|
|
190
190
|
|
|
191
191
|
// sample SDF in given bounding rect and resolution
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-sdf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
4
4
|
"description": "2D Signed Distance Field creation from @thi.ng/geom shapes, conversions, sampling, combinators",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@thi.ng/api": "^8.7.3",
|
|
38
38
|
"@thi.ng/checks": "^3.3.9",
|
|
39
|
-
"@thi.ng/defmulti": "^2.1.
|
|
39
|
+
"@thi.ng/defmulti": "^2.1.32",
|
|
40
40
|
"@thi.ng/errors": "^2.2.12",
|
|
41
|
-
"@thi.ng/geom": "^4.2.
|
|
42
|
-
"@thi.ng/geom-api": "^3.4.
|
|
43
|
-
"@thi.ng/geom-isoline": "^2.1.
|
|
44
|
-
"@thi.ng/geom-poly-utils": "^2.3.
|
|
45
|
-
"@thi.ng/geom-resample": "^2.2.
|
|
41
|
+
"@thi.ng/geom": "^4.2.10",
|
|
42
|
+
"@thi.ng/geom-api": "^3.4.8",
|
|
43
|
+
"@thi.ng/geom-isoline": "^2.1.47",
|
|
44
|
+
"@thi.ng/geom-poly-utils": "^2.3.34",
|
|
45
|
+
"@thi.ng/geom-resample": "^2.2.8",
|
|
46
46
|
"@thi.ng/math": "^5.4.4",
|
|
47
|
-
"@thi.ng/transducers": "^8.3.
|
|
48
|
-
"@thi.ng/vectors": "^7.6.
|
|
47
|
+
"@thi.ng/transducers": "^8.3.37",
|
|
48
|
+
"@thi.ng/vectors": "^7.6.7"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@microsoft/api-extractor": "^7.34.2",
|
|
52
|
-
"@thi.ng/testament": "^0.3.
|
|
52
|
+
"@thi.ng/testament": "^0.3.12",
|
|
53
53
|
"rimraf": "^4.1.2",
|
|
54
54
|
"tools": "^0.0.1",
|
|
55
55
|
"typedoc": "^0.23.24",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"status": "alpha",
|
|
128
128
|
"year": 2022
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "8ab2cbfe2f59b7ef672b6e1cf2a43368f8437ddf\n"
|
|
131
131
|
}
|