@jscad/obj-serializer 2.1.2 → 2.1.5

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
@@ -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.1.5](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.4...@jscad/obj-serializer@2.1.5) (2022-03-13)
7
+
8
+ **Note:** Version bump only for package @jscad/obj-serializer
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.1.4](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.3...@jscad/obj-serializer@2.1.4) (2022-03-06)
15
+
16
+ **Note:** Version bump only for package @jscad/obj-serializer
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.1.3](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.2...@jscad/obj-serializer@2.1.3) (2022-02-19)
23
+
24
+ **Note:** Version bump only for package @jscad/obj-serializer
25
+
26
+
27
+
28
+
29
+
6
30
  ## [2.1.2](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.1...@jscad/obj-serializer@2.1.2) (2021-12-26)
7
31
 
8
32
  **Note:** Version bump only for package @jscad/obj-serializer
package/index.js CHANGED
@@ -74,7 +74,7 @@ const serialize = (options, ...objects) => {
74
74
 
75
75
  // convert objects
76
76
  // TODO: group objects together
77
- let previousColor = "default"
77
+ let previousColor = 'default'
78
78
  objects3d.forEach((object, i) => {
79
79
  options.statusCallback && options.statusCallback({ progress: 100 * i / objects3d.length })
80
80
  body += '\n'
@@ -101,7 +101,7 @@ const serialize = (options, ...objects) => {
101
101
  const indices = polygon.vertices
102
102
  .map((v) => vertices.indexOf(convertVertex(v)) + 1)
103
103
  // set face color
104
- const color = getColorName(polygon) || objectColor || "default"
104
+ const color = getColorName(polygon) || objectColor || 'default'
105
105
  if (color !== previousColor) {
106
106
  body += `usemtl ${color}\n`
107
107
  previousColor = color
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jscad/obj-serializer",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
4
4
  "description": "OBJ Serializer for JSCAD",
5
5
  "repository": "https://github.com/jscad/OpenJSCAD.org",
6
6
  "main": "index.js",
@@ -26,12 +26,12 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@jscad/array-utils": "2.1.1",
30
- "@jscad/modeling": "2.7.1"
29
+ "@jscad/array-utils": "2.1.2",
30
+ "@jscad/modeling": "2.9.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "ava": "3.15.0",
34
34
  "nyc": "15.1.0"
35
35
  },
36
- "gitHead": "c8ac21281a7acf5a5575b940c18353c598ffa1a4"
36
+ "gitHead": "45fbcb7298fcacf3e45d67fdca32d0744ab7f2de"
37
37
  }
@@ -41,7 +41,7 @@ test('serialize non-triangulated 3D geometry to obj', (t) => {
41
41
  test('serialize color 3D geometry to obj', (t) => {
42
42
  const testCubes = [
43
43
  colors.colorize([1, 0.8, 0.8], primitives.cuboid({})),
44
- primitives.cuboid({center: [0, 3, 0]})
44
+ primitives.cuboid({ center: [0, 3, 0] })
45
45
  ]
46
46
  const observed4 = serializer.serialize({ triangulate: false }, testCubes)
47
47
  t.is(observed4.length, 1)