@jscad/svg-serializer 2.3.0 → 2.3.3
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 +24 -0
- package/index.js +5 -5
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.3.3](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.2...@jscad/svg-serializer@2.3.3) (2022-03-13)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @jscad/svg-serializer
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [2.3.2](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.1...@jscad/svg-serializer@2.3.2) (2022-03-06)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @jscad/svg-serializer
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [2.3.1](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.0...@jscad/svg-serializer@2.3.1) (2022-02-19)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @jscad/svg-serializer
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [2.3.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.2.10...@jscad/svg-serializer@2.3.0) (2022-01-23)
|
|
7
31
|
|
|
8
32
|
|
package/index.js
CHANGED
|
@@ -86,9 +86,9 @@ const serialize = (options, ...objects) => {
|
|
|
86
86
|
width: width + options.unit,
|
|
87
87
|
height: height + options.unit,
|
|
88
88
|
viewBox: ('0 0 ' + width + ' ' + height),
|
|
89
|
-
fill:
|
|
90
|
-
'fill-rule':
|
|
91
|
-
'stroke-width':
|
|
89
|
+
fill: 'none',
|
|
90
|
+
'fill-rule': 'evenodd',
|
|
91
|
+
'stroke-width': '0.1px',
|
|
92
92
|
version: '1.1',
|
|
93
93
|
baseProfile: 'tiny',
|
|
94
94
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
@@ -156,7 +156,7 @@ const convertGeom2 = (object, offsets, options) => {
|
|
|
156
156
|
const outlines = geometries.geom2.toOutlines(object)
|
|
157
157
|
const paths = outlines.map((outline) => geometries.path2.fromPoints({ closed: true }, outline))
|
|
158
158
|
|
|
159
|
-
options.color =
|
|
159
|
+
options.color = 'black' // SVG initial color
|
|
160
160
|
if (object.color) options.color = convertColor(object.color)
|
|
161
161
|
options.id = null
|
|
162
162
|
if (object.id) options.id = object.id
|
|
@@ -176,7 +176,7 @@ const convertToContinousPath = (paths, offsets, options) => {
|
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
const convertPaths = (paths, offsets, options) => paths.reduce((res, path, i) => {
|
|
179
|
-
d = { d: convertPath(path, offsets, options) }
|
|
179
|
+
const d = { d: convertPath(path, offsets, options) }
|
|
180
180
|
if (path.color) d.stroke = convertColor(path.color)
|
|
181
181
|
if (path.id) d.id = path.id
|
|
182
182
|
if (path.class) d.class = path.class
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jscad/svg-serializer",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "SVG Serializer for JSCAD",
|
|
5
5
|
"repository": "https://github.com/jscad/OpenJSCAD.org",
|
|
6
6
|
"main": "index.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
],
|
|
32
32
|
"license": "MIT",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jscad/modeling": "2.
|
|
34
|
+
"@jscad/modeling": "2.9.0",
|
|
35
35
|
"onml": "1.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"ava": "3.15.0",
|
|
39
39
|
"nyc": "15.1.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "45fbcb7298fcacf3e45d67fdca32d0744ab7f2de"
|
|
42
42
|
}
|