@jscad/json-deserializer 2.0.31 → 3.0.1-alpha.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/CHANGELOG.md +12 -209
- package/LICENSE +1 -1
- package/README.md +3 -1
- package/dist/jscad-json-deserializer.es.js +13 -0
- package/dist/jscad-json-deserializer.min.js +14 -0
- package/package.json +22 -12
- package/rollup.config.js +27 -0
- package/{index.js → src/index.js} +10 -17
- package/tests/instantiate.test.js +16 -16
- package/tests/translate.test.js +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,359 +3,186 @@
|
|
|
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
|
-
## [
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @jscad/json-deserializer
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.29...@jscad/json-deserializer@2.0.30) (2024-11-10)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @jscad/json-deserializer
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## [2.0.29](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.28...@jscad/json-deserializer@2.0.29) (2024-10-06)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @jscad/json-deserializer
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## [2.0.28](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.27...@jscad/json-deserializer@2.0.28) (2024-06-02)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @jscad/json-deserializer
|
|
33
|
-
|
|
6
|
+
## [3.0.1-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.23...@jscad/json-deserializer@3.0.1-alpha.0) (2025-01-03)
|
|
34
7
|
|
|
8
|
+
### Bug Fixes
|
|
35
9
|
|
|
10
|
+
* **io:** fix io after V3 refactoring ([7a12bbd](https://github.com/jscad/OpenJSCAD.org/commit/7a12bbdb7b4b3df792a4c5b3c8b30a6a985a48f0))
|
|
36
11
|
|
|
12
|
+
### Features
|
|
37
13
|
|
|
38
|
-
|
|
14
|
+
* **modeling:** reworked exports to expose a flattened API ([8235238](https://github.com/jscad/OpenJSCAD.org/commit/8235238ad63d063f1e501478cae1208deb130a9c))
|
|
15
|
+
* **regl-renderer:** added rollup configuration to create ES6 bundle, adjusted imports and exports ([#1259](https://github.com/jscad/OpenJSCAD.org/issues/1259)) ([47a66bc](https://github.com/jscad/OpenJSCAD.org/commit/47a66bc07a137a748ce8571ea5d043ebaab9418d))
|
|
39
16
|
|
|
40
|
-
|
|
17
|
+
# [3.0.0-alpha.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.23...@jscad/json-deserializer@3.0.0-alpha.0) (2023-10-09)
|
|
41
18
|
|
|
19
|
+
### Bug Fixes
|
|
42
20
|
|
|
21
|
+
* **io:** fix io after V3 refactoring ([7a12bbd](https://github.com/jscad/OpenJSCAD.org/commit/7a12bbdb7b4b3df792a4c5b3c8b30a6a985a48f0))
|
|
43
22
|
|
|
23
|
+
### Features
|
|
44
24
|
|
|
25
|
+
* **modeling:** reworked exports to expose a flattened API ([8235238](https://github.com/jscad/OpenJSCAD.org/commit/8235238ad63d063f1e501478cae1208deb130a9c))
|
|
26
|
+
* **regl-renderer:** added rollup configuration to create ES6 bundle, adjusted imports and exports ([#1259](https://github.com/jscad/OpenJSCAD.org/issues/1259)) ([47a66bc](https://github.com/jscad/OpenJSCAD.org/commit/47a66bc07a137a748ce8571ea5d043ebaab9418d))
|
|
45
27
|
|
|
46
28
|
## [2.0.26](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.25...@jscad/json-deserializer@2.0.26) (2023-06-27)
|
|
47
29
|
|
|
48
30
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
49
31
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
32
|
## [2.0.25](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.24...@jscad/json-deserializer@2.0.25) (2023-04-30)
|
|
55
33
|
|
|
56
34
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
57
35
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
36
|
## [2.0.24](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.23...@jscad/json-deserializer@2.0.24) (2022-11-26)
|
|
63
37
|
|
|
64
38
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
65
39
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
40
|
## [2.0.23](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.22...@jscad/json-deserializer@2.0.23) (2022-08-21)
|
|
71
41
|
|
|
72
42
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
73
43
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
44
|
## [2.0.22](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.21...@jscad/json-deserializer@2.0.22) (2022-07-17)
|
|
79
45
|
|
|
80
46
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
81
47
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
48
|
## [2.0.21](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.20...@jscad/json-deserializer@2.0.21) (2022-06-12)
|
|
87
49
|
|
|
88
50
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
89
51
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
52
|
## [2.0.20](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.19...@jscad/json-deserializer@2.0.20) (2022-05-15)
|
|
95
53
|
|
|
96
54
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
97
55
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
56
|
## [2.0.19](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.18...@jscad/json-deserializer@2.0.19) (2022-04-24)
|
|
103
57
|
|
|
104
58
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
105
59
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
60
|
## [2.0.18](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.17...@jscad/json-deserializer@2.0.18) (2022-04-03)
|
|
111
61
|
|
|
112
62
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
113
63
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
64
|
## [2.0.17](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.16...@jscad/json-deserializer@2.0.17) (2022-04-03)
|
|
119
65
|
|
|
120
66
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
121
67
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
68
|
## [2.0.16](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.15...@jscad/json-deserializer@2.0.16) (2022-03-13)
|
|
127
69
|
|
|
128
70
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
129
71
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
72
|
## [2.0.15](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.14...@jscad/json-deserializer@2.0.15) (2022-03-06)
|
|
135
73
|
|
|
136
74
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
137
75
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
76
|
## [2.0.14](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.13...@jscad/json-deserializer@2.0.14) (2022-02-19)
|
|
143
77
|
|
|
144
78
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
145
79
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
80
|
## [2.0.13](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.12...@jscad/json-deserializer@2.0.13) (2021-12-26)
|
|
151
81
|
|
|
152
82
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
153
83
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
84
|
## [2.0.12](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.11...@jscad/json-deserializer@2.0.12) (2021-12-11)
|
|
159
85
|
|
|
160
86
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
161
87
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
88
|
## [2.0.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.10...@jscad/json-deserializer@2.0.11) (2021-11-07)
|
|
167
89
|
|
|
168
90
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
169
91
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
92
|
## [2.0.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.9...@jscad/json-deserializer@2.0.10) (2021-10-17)
|
|
175
93
|
|
|
176
94
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
177
95
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
96
|
## [2.0.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.8...@jscad/json-deserializer@2.0.9) (2021-10-04)
|
|
183
97
|
|
|
184
98
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
185
99
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
100
|
## [2.0.8](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.7...@jscad/json-deserializer@2.0.8) (2021-09-27)
|
|
191
101
|
|
|
192
102
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
193
103
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
104
|
## [2.0.7](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.6...@jscad/json-deserializer@2.0.7) (2021-09-09)
|
|
199
105
|
|
|
200
106
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
201
107
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
108
|
## [2.0.6](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.5...@jscad/json-deserializer@2.0.6) (2021-06-20)
|
|
207
109
|
|
|
208
110
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
209
111
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
112
|
## [2.0.5](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.4...@jscad/json-deserializer@2.0.5) (2021-06-11)
|
|
215
113
|
|
|
216
114
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
217
115
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
116
|
## [2.0.4](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.3...@jscad/json-deserializer@2.0.4) (2021-06-01)
|
|
223
117
|
|
|
224
118
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
225
119
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
120
|
## [2.0.3](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.2...@jscad/json-deserializer@2.0.3) (2021-04-20)
|
|
231
121
|
|
|
232
122
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
233
123
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
124
|
## [2.0.2](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.0...@jscad/json-deserializer@2.0.2) (2021-04-17)
|
|
239
125
|
|
|
240
|
-
|
|
241
126
|
### Bug Fixes
|
|
242
127
|
|
|
243
128
|
* **all:** V2 : several fixes for modeling ([#705](https://github.com/jscad/OpenJSCAD.org/issues/705)) ([62017a4](https://github.com/jscad/OpenJSCAD.org/commit/62017a41214169d6e000f1e0c11aaefdd68e1097))
|
|
244
129
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
130
|
## [2.0.1](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.0...@jscad/json-deserializer@2.0.1) (2021-04-15)
|
|
250
131
|
|
|
251
|
-
|
|
252
132
|
### Bug Fixes
|
|
253
133
|
|
|
254
134
|
* **all:** V2 : several fixes for modeling ([#705](https://github.com/jscad/OpenJSCAD.org/issues/705)) ([62017a4](https://github.com/jscad/OpenJSCAD.org/commit/62017a41214169d6e000f1e0c11aaefdd68e1097))
|
|
255
135
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
136
|
# [2.0.0](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.11...@jscad/json-deserializer@2.0.0) (2021-04-12)
|
|
261
137
|
|
|
262
138
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
263
139
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
140
|
# [2.0.0-alpha.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.10...@jscad/json-deserializer@2.0.0-alpha.11) (2021-03-07)
|
|
269
141
|
|
|
270
142
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
271
143
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
144
|
# [2.0.0-alpha.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.9...@jscad/json-deserializer@2.0.0-alpha.10) (2021-02-07)
|
|
277
145
|
|
|
278
146
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
279
147
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
148
|
# [2.0.0-alpha.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.8...@jscad/json-deserializer@2.0.0-alpha.9) (2021-01-02)
|
|
285
149
|
|
|
286
150
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
287
151
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
152
|
# [2.0.0-alpha.8](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.7...@jscad/json-deserializer@2.0.0-alpha.8) (2020-12-04)
|
|
293
153
|
|
|
294
154
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
295
155
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
156
|
# [2.0.0-alpha.7](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.6...@jscad/json-deserializer@2.0.0-alpha.7) (2020-11-07)
|
|
301
157
|
|
|
302
158
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
303
159
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
160
|
# [2.0.0-alpha.6](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.5...@jscad/json-deserializer@2.0.0-alpha.6) (2020-10-11)
|
|
309
161
|
|
|
310
|
-
|
|
311
162
|
### Bug Fixes
|
|
312
163
|
|
|
313
164
|
* **all:** V2 : several fixes for modeling ([#705](https://github.com/jscad/OpenJSCAD.org/issues/705)) ([62017a4](https://github.com/jscad/OpenJSCAD.org/commit/62017a41214169d6e000f1e0c11aaefdd68e1097))
|
|
314
165
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
166
|
# [2.0.0-alpha.5](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.4...@jscad/json-deserializer@2.0.0-alpha.5) (2020-09-29)
|
|
320
167
|
|
|
321
168
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
322
169
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
170
|
# [2.0.0-alpha.4](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.3...@jscad/json-deserializer@2.0.0-alpha.4) (2020-09-28)
|
|
328
171
|
|
|
329
172
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
330
173
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
174
|
# [2.0.0-alpha.3](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.2...@jscad/json-deserializer@2.0.0-alpha.3) (2020-09-19)
|
|
336
175
|
|
|
337
176
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
338
177
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
178
|
# [2.0.0-alpha.2](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.1...@jscad/json-deserializer@2.0.0-alpha.2) (2020-09-08)
|
|
344
179
|
|
|
345
180
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
346
181
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
182
|
# [2.0.0-alpha.1](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.0-alpha.0...@jscad/json-deserializer@2.0.0-alpha.1) (2020-08-19)
|
|
352
183
|
|
|
353
184
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
354
185
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
186
|
# 2.0.0-alpha.0 (2020-08-13)
|
|
360
187
|
|
|
361
188
|
### Features
|
|
@@ -363,60 +190,36 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
363
190
|
* **json-deserializer:** Upgrade/overhaul JSON Deserializer for V2
|
|
364
191
|
* **io:** change api to deserialize(options, source)
|
|
365
192
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
193
|
<a name="0.1.2"></a>
|
|
371
194
|
## [0.1.2](https://github.com/jscad/io/compare/@jscad/json-deserializer@0.1.1...@jscad/json-deserializer@0.1.2) (2018-09-02)
|
|
372
195
|
|
|
373
|
-
|
|
374
196
|
### Bug Fixes
|
|
375
197
|
|
|
376
198
|
* **svg deserializer:** fixed svg-deserializer to work with Inkscape files ([#72](https://github.com/jscad/io/issues/72)) ([f35ea5e](https://github.com/jscad/io/commit/f35ea5e))
|
|
377
199
|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
200
|
<a name="0.1.1"></a>
|
|
382
201
|
## [0.1.1](https://github.com/jscad/io/compare/@jscad/json-deserializer@0.1.0...@jscad/json-deserializer@0.1.1) (2017-12-14)
|
|
383
202
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
203
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
388
204
|
|
|
389
205
|
<a name="0.1.0"></a>
|
|
390
206
|
# [0.1.0](https://github.com/jscad/io/compare/@jscad/json-deserializer@0.0.4...@jscad/json-deserializer@0.1.0) (2017-11-29)
|
|
391
207
|
|
|
392
|
-
|
|
393
208
|
### Features
|
|
394
209
|
|
|
395
210
|
* add support for a status callback for de/serialization progress ([#49](https://github.com/jscad/io/issues/49)) ([f457cdb](https://github.com/jscad/io/commit/f457cdb))
|
|
396
211
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
212
|
<a name="0.0.4"></a>
|
|
401
213
|
## [0.0.4](https://github.com/jscad/io/compare/@jscad/json-deserializer@0.0.3...@jscad/json-deserializer@0.0.4) (2017-11-04)
|
|
402
214
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
215
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
407
216
|
|
|
408
217
|
<a name="0.0.3"></a>
|
|
409
218
|
## [0.0.3](https://github.com/jscad/io/compare/@jscad/json-deserializer@0.0.2...@jscad/json-deserializer@0.0.3) (2017-10-10)
|
|
410
219
|
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
220
|
**Note:** Version bump only for package @jscad/json-deserializer
|
|
415
221
|
|
|
416
222
|
<a name="0.0.2"></a>
|
|
417
223
|
## 0.0.2 (2017-10-10)
|
|
418
224
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
225
|
**Note:** Version bump only for package @jscad/json-deserializer
|
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
The MIT License (MIT)
|
|
3
3
|
|
|
4
|
-
Copyright (c) 2017-
|
|
4
|
+
Copyright (c) 2017-2025 JSCAD Organization
|
|
5
5
|
|
|
6
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
7
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/jscad/OpenJSCAD.org/blob/master/LICENSE)
|
|
10
10
|
|
|
11
11
|
[](https://openjscad.nodebb.com/)
|
|
12
|
-
[](https://github.com/ghiscoding/lerna-lite)
|
|
13
13
|
[](https://standardjs.com)
|
|
14
14
|
|
|
15
15
|
[](https://opencollective.com/openjscad)
|
|
@@ -63,5 +63,7 @@ Small Note: If editing this README, please conform to the [standard-readme](http
|
|
|
63
63
|
|
|
64
64
|
## License
|
|
65
65
|
|
|
66
|
+
Copyright (c) JSCAD Organization
|
|
67
|
+
|
|
66
68
|
[The MIT License (MIT)](../../LICENSE)
|
|
67
69
|
(unless specified otherwise)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Deserializer for JSCAD
|
|
3
|
+
* @module @jscad/json-deserializer
|
|
4
|
+
* @version 3.0.1-alpha.0
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* JSCAD Utility functions for arrays
|
|
9
|
+
* @module @jscad/array-utils
|
|
10
|
+
* @version 3.0.1-alpha.0
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
const flatten=arr=>arr.reduce(((acc,val)=>Array.isArray(val)?acc.concat(flatten(val)):acc.concat(val)),[]),deserialize=(options,input)=>{const defaults={filename:"json",output:"script",version:"3.0.1-alpha.0",addMetaData:!0};options=Object.assign({},defaults,options),input=((stringOrArrayBuffer,defaultBinaryEncoding="utf-8")=>"string"==typeof stringOrArrayBuffer?stringOrArrayBuffer:new TextDecoder(defaultBinaryEncoding).decode(new Uint8Array(stringOrArrayBuffer)))(input);let objects=JSON.parse(input);var array;return objects=flatten((array=objects,Array.isArray(array)?array:null==array?[]:[array])),"script"===options.output?translate(options,objects):objects},translate=(options,objects)=>{const{addMetaData:addMetaData,filename:filename,version:version}=options;let script=addMetaData?`//\n// Produced by JSCAD IO Library : JSON Deserializer (${version})\n// date: ${new Date}\n// source: ${filename}\n//\n`:"";return script+=`\nconst { geometries } = require('@jscad/modeling')\n\nconst main = () => {\n const objects = [${translateToList(objects)} ]\n return objects\n}\n\n${translateToObjects(objects)}\n\nmodule.exports = { main }\n`,script},translateToList=objects=>objects.reduce(((script,object,index)=>script+` json${index},`),""),translateToObjects=objects=>objects.reduce(((script,object,index)=>script+translateToObject(object,index)),""),translateToObject=(object,index)=>`const json${index} = ${JSON.stringify(object)}\n`,mimeType="application/json";export{deserialize,mimeType};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSON Deserializer for JSCAD
|
|
3
|
+
* @module @jscad/json-deserializer
|
|
4
|
+
* @version 3.0.1-alpha.0
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/
|
|
7
|
+
var global,factory;global=this,factory=function(exports){
|
|
8
|
+
/**
|
|
9
|
+
* JSCAD Utility functions for arrays
|
|
10
|
+
* @module @jscad/array-utils
|
|
11
|
+
* @version 3.0.1-alpha.0
|
|
12
|
+
* @license MIT
|
|
13
|
+
*/
|
|
14
|
+
const flatten=arr=>arr.reduce(((acc,val)=>Array.isArray(val)?acc.concat(flatten(val)):acc.concat(val)),[]),translate=(options,objects)=>{const{addMetaData:addMetaData,filename:filename,version:version}=options;let script=addMetaData?`//\n// Produced by JSCAD IO Library : JSON Deserializer (${version})\n// date: ${new Date}\n// source: ${filename}\n//\n`:"";return script+=`\nconst { geometries } = require('@jscad/modeling')\n\nconst main = () => {\n const objects = [${translateToList(objects)} ]\n return objects\n}\n\n${translateToObjects(objects)}\n\nmodule.exports = { main }\n`,script},translateToList=objects=>objects.reduce(((script,object,index)=>script+` json${index},`),""),translateToObjects=objects=>objects.reduce(((script,object,index)=>script+translateToObject(object,index)),""),translateToObject=(object,index)=>`const json${index} = ${JSON.stringify(object)}\n`;exports.deserialize=(options,input)=>{const defaults={filename:"json",output:"script",version:"3.0.1-alpha.0",addMetaData:!0};options=Object.assign({},defaults,options),input=((stringOrArrayBuffer,defaultBinaryEncoding="utf-8")=>"string"==typeof stringOrArrayBuffer?stringOrArrayBuffer:new TextDecoder(defaultBinaryEncoding).decode(new Uint8Array(stringOrArrayBuffer)))(input);let objects=JSON.parse(input);var array;return objects=flatten((array=objects,Array.isArray(array)?array:null==array?[]:[array])),"script"===options.output?translate(options,objects):objects},exports.mimeType="application/json",Object.defineProperty(exports,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).jscadJsonDeserializer={});
|
package/package.json
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jscad/json-deserializer",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1-alpha.0",
|
|
4
4
|
"description": "JSON Deserializer for JSCAD",
|
|
5
5
|
"homepage": "https://openjscad.xyz/",
|
|
6
6
|
"repository": "https://github.com/jscad/OpenJSCAD.org",
|
|
7
|
-
"
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "src/index.js",
|
|
9
|
+
"unpkg": "dist/jscad-json-deserializer.min.js",
|
|
10
|
+
"module": "dist/jscad-json-deserializer.es.js",
|
|
8
11
|
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
12
|
+
"build": "rollup --config",
|
|
13
|
+
"coverage": "c8 --all --reporter=html --reporter=text pnpm test",
|
|
14
|
+
"test": "ava 'tests/*.test.js' --verbose --timeout 2m",
|
|
15
|
+
"version": "pnpm run build && git add dist"
|
|
11
16
|
},
|
|
12
17
|
"contributors": [
|
|
13
18
|
{
|
|
14
19
|
"name": "z3dev",
|
|
15
|
-
"url": "
|
|
20
|
+
"url": "https://github.com/z3dev"
|
|
16
21
|
},
|
|
17
22
|
{
|
|
18
23
|
"name": "Mark 'kaosat-dev' Moissette",
|
|
19
|
-
"url": "
|
|
24
|
+
"url": "https://github.com/kaosat-dev"
|
|
20
25
|
}
|
|
21
26
|
],
|
|
22
27
|
"keywords": [
|
|
@@ -28,13 +33,18 @@
|
|
|
28
33
|
],
|
|
29
34
|
"license": "MIT",
|
|
30
35
|
"dependencies": {
|
|
31
|
-
"@jscad/array-utils": "
|
|
32
|
-
"@jscad/io-utils": "
|
|
36
|
+
"@jscad/array-utils": "3.0.1-alpha.0",
|
|
37
|
+
"@jscad/io-utils": "3.0.1-alpha.0"
|
|
33
38
|
},
|
|
34
39
|
"devDependencies": {
|
|
35
|
-
"@jscad/modeling": "
|
|
36
|
-
"
|
|
37
|
-
"
|
|
40
|
+
"@jscad/modeling": "3.0.1-alpha.0",
|
|
41
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
42
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
43
|
+
"ava": "^4.3.3",
|
|
44
|
+
"c8": "^8.0.0",
|
|
45
|
+
"rollup": "^2.79.1",
|
|
46
|
+
"rollup-plugin-banner": "^0.2.1",
|
|
47
|
+
"rollup-plugin-version-injector": "^1.3.3"
|
|
38
48
|
},
|
|
39
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "0660b5c1f1a5faf54d4cfae1cb85bb94182a8d32"
|
|
40
50
|
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import banner from 'rollup-plugin-banner'
|
|
2
|
+
import versionInjector from 'rollup-plugin-version-injector'
|
|
3
|
+
import { nodeResolve } from '@rollup/plugin-node-resolve'
|
|
4
|
+
import terser from '@rollup/plugin-terser'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
input: 'src/index.js',
|
|
8
|
+
|
|
9
|
+
output: [
|
|
10
|
+
{
|
|
11
|
+
file: 'dist/jscad-json-deserializer.min.js',
|
|
12
|
+
format: 'umd',
|
|
13
|
+
name: 'jscadJsonDeserializer'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
file: 'dist/jscad-json-deserializer.es.js',
|
|
17
|
+
format: 'es'
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
|
|
21
|
+
plugins: [
|
|
22
|
+
nodeResolve(),
|
|
23
|
+
banner('<%= pkg.description %>\n@module <%= pkg.name %>\n@version <%= pkg.version %>\n@license <%= pkg.license %>'),
|
|
24
|
+
versionInjector({ injectInComments: { fileRegexp: /\.(html)$/ }, logLevel: 'warn' }),
|
|
25
|
+
terser({ compress: { module: true }, mangle: false, format: { comments: 'some' } })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
## License
|
|
3
|
-
|
|
4
|
-
Copyright (c) JSCAD Organization https://github.com/jscad
|
|
5
|
-
|
|
6
|
-
All code released under MIT license
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
1
|
// //////////////////////////////////////////
|
|
10
2
|
//
|
|
11
3
|
// JSON (JavaScript Object Notation) is a lightweight data-interchange format
|
|
@@ -15,15 +7,16 @@ All code released under MIT license
|
|
|
15
7
|
|
|
16
8
|
/**
|
|
17
9
|
* Deserializer of JSON data to JSCAD geometries.
|
|
10
|
+
* @see https://www.json.org
|
|
18
11
|
* @module io/json-deserializer
|
|
19
12
|
* @example
|
|
20
13
|
* const { deserializer, extension } = require('@jscad/json-deserializer')
|
|
21
14
|
*/
|
|
22
15
|
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
import { flatten, toArray } from '@jscad/array-utils'
|
|
17
|
+
import { ensureString } from '@jscad/io-utils'
|
|
25
18
|
|
|
26
|
-
const version =
|
|
19
|
+
const version = '[VI]{version}[/VI]' // version is injected by rollup
|
|
27
20
|
|
|
28
21
|
/**
|
|
29
22
|
* Deserialize the given JSON notation (string) into either a script or an array of geometry.
|
|
@@ -46,7 +39,7 @@ const deserialize = (options, input) => {
|
|
|
46
39
|
options = Object.assign({}, defaults, options)
|
|
47
40
|
|
|
48
41
|
// convert the JSON notation into anonymous object(s)
|
|
49
|
-
input = ensureString(input)
|
|
42
|
+
input = ensureString(input);
|
|
50
43
|
let objects = JSON.parse(input)
|
|
51
44
|
|
|
52
45
|
// cleanup the objects
|
|
@@ -71,7 +64,7 @@ const translate = (options, objects) => {
|
|
|
71
64
|
: ''
|
|
72
65
|
|
|
73
66
|
script +=
|
|
74
|
-
|
|
67
|
+
`
|
|
75
68
|
const { geometries } = require('@jscad/modeling')
|
|
76
69
|
|
|
77
70
|
const main = () => {
|
|
@@ -95,9 +88,9 @@ const translateToObjects = (objects) => objects.reduce((script, object, index) =
|
|
|
95
88
|
// NOTE: this implies that the original JSON was correct :)
|
|
96
89
|
const translateToObject = (object, index) => `const json${index} = ${JSON.stringify(object)}\n`
|
|
97
90
|
|
|
98
|
-
const
|
|
91
|
+
const mimeType = 'application/json'
|
|
99
92
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
export {
|
|
94
|
+
mimeType,
|
|
95
|
+
deserialize
|
|
103
96
|
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
import test from 'ava'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { geom2, geom3, path2 } from '@jscad/modeling'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { deserialize } from '../src/index.js'
|
|
6
6
|
|
|
7
7
|
test('instantiate JSON notation to JSCAD geometries', (t) => {
|
|
8
|
-
let observed =
|
|
8
|
+
let observed = deserialize({ output: 'geometry', addMetaData: false }, json1)
|
|
9
9
|
t.is(observed.length, 1)
|
|
10
10
|
|
|
11
|
-
observed =
|
|
11
|
+
observed = deserialize({ filename: 'json2', output: 'geometry' }, json2)
|
|
12
12
|
t.is(observed.length, 1)
|
|
13
|
-
t.true(
|
|
13
|
+
t.true(geom3.isA(observed[0]))
|
|
14
14
|
|
|
15
|
-
observed =
|
|
15
|
+
observed = deserialize({ filename: 'json3', output: 'geometry' }, json3)
|
|
16
16
|
t.is(observed.length, 1)
|
|
17
|
-
t.true(
|
|
17
|
+
t.true(geom2.isA(observed[0]))
|
|
18
18
|
|
|
19
|
-
observed =
|
|
19
|
+
observed = deserialize({ filename: 'json4', output: 'geometry' }, json4)
|
|
20
20
|
t.is(observed.length, 1)
|
|
21
|
-
t.true(
|
|
21
|
+
t.true(path2.isA(observed[0]))
|
|
22
22
|
|
|
23
|
-
observed =
|
|
23
|
+
observed = deserialize({ filename: 'json5', output: 'geometry' }, json5)
|
|
24
24
|
t.is(observed.length, 2)
|
|
25
|
-
t.true(
|
|
26
|
-
t.true(
|
|
25
|
+
t.true(geom2.isA(observed[0]))
|
|
26
|
+
t.true(path2.isA(observed[1]))
|
|
27
27
|
|
|
28
|
-
observed =
|
|
28
|
+
observed = deserialize({ output: 'geometry', addMetaData: false }, json6)
|
|
29
29
|
t.is(observed.length, 1)
|
|
30
30
|
})
|
|
31
31
|
|
|
@@ -34,11 +34,11 @@ const json1 = '{}'
|
|
|
34
34
|
|
|
35
35
|
const json2 = '[{"polygons":[{"vertices":[[-15,-15,-15],[-15,-15,15],[-15,15,15],[-15,15,-15]],"plane":[-1,0,0,15]},{"vertices":[[15,-15,-15],[15,15,-15],[15,15,15],[15,-15,15]],"plane":[1,0,0,15]},{"vertices":[[-15,-15,-15],[15,-15,-15],[15,-15,15],[-15,-15,15]],"plane":[0,-1,0,15]},{"vertices":[[-15,15,-15],[-15,15,15],[15,15,15],[15,15,-15]],"plane":[0,1,0,15]},{"vertices":[[-15,-15,-15],[-15,15,-15],[15,15,-15],[15,-15,-15]],"plane":[0,0,-1,15]},{"vertices":[[-15,-15,15],[15,-15,15],[15,15,15],[-15,15,15]],"plane":[0,0,1,15]}],"isRetesselated":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}]'
|
|
36
36
|
|
|
37
|
-
const json3 = '[{"
|
|
37
|
+
const json3 = '[{"outlines":[[[4.6193976402282715,-2.678784132003784],[5,0],[4.6193976402282715,2.678784132003784],[3.535533905029297,4.949747562408447],[1.9134172201156616,6.467156887054443],[3.0616169991140216e-16,7],[-1.9134172201156616,6.467156887054443],[-3.535533905029297,4.949747562408447],[-4.6193976402282715,2.678784132003784],[-5,8.572527703398379e-16],[-4.6193976402282715,-2.678784132003784],[-3.535533905029297,-4.949747562408447],[-1.9134172201156616,-6.467156887054443],[-9.184850467946473e-16,-7],[1.9134172201156616,-6.467156887054443],[3.535533905029297,-4.949747562408447]]],"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1],"name":"this is a name"}]'
|
|
38
38
|
|
|
39
39
|
const json4 = '[{"points":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"isClosed":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1]}]'
|
|
40
40
|
|
|
41
|
-
const json5 = '[{"
|
|
41
|
+
const json5 = '[{"outlines":[[[4.6193976402282715,-2.678784132003784],[5,0],[4.6193976402282715,2.678784132003784],[3.535533905029297,4.949747562408447],[1.9134172201156616,6.467156887054443],[3.0616169991140216e-16,7],[-1.9134172201156616,6.467156887054443],[-3.535533905029297,4.949747562408447],[-4.6193976402282715,2.678784132003784],[-5,8.572527703398379e-16],[-3.535533905029297,-4.949747562408447],[-1.9134172201156616,-6.467156887054443],[-9.184850467946473e-16,-7],[1.9134172201156616,-6.467156887054443],[3.535533905029297,-4.949747562408447]]],"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1],"name":"this is a name"},{"points":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"isClosed":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1]}]'
|
|
42
42
|
|
|
43
43
|
// non-JSCAD object
|
|
44
44
|
const json6 = '[{"statistics":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"average":123.456}]'
|
package/tests/translate.test.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import test from 'ava'
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import { deserialize } from '../src/index.js'
|
|
4
4
|
|
|
5
5
|
const countOf = (search, string) => {
|
|
6
6
|
let count = 0
|
|
@@ -13,27 +13,27 @@ const countOf = (search, string) => {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
test('translate JSON notation to JSCAD script', (t) => {
|
|
16
|
-
let observed =
|
|
16
|
+
let observed = deserialize({ output: 'script', addMetaData: false }, json1)
|
|
17
17
|
t.is(countOf('main', observed), 2)
|
|
18
18
|
t.is(countOf('const json', observed), 1)
|
|
19
19
|
|
|
20
|
-
observed =
|
|
20
|
+
observed = deserialize({ filename: 'json2', output: 'script', addMetaData: true }, json2)
|
|
21
21
|
t.is(countOf('main', observed), 2)
|
|
22
22
|
t.is(countOf('const json', observed), 1)
|
|
23
23
|
|
|
24
|
-
observed =
|
|
24
|
+
observed = deserialize({ filename: 'json3', output: 'script', addMetaData: true }, json3)
|
|
25
25
|
t.is(countOf('main', observed), 2)
|
|
26
26
|
t.is(countOf('const json', observed), 1)
|
|
27
27
|
|
|
28
|
-
observed =
|
|
28
|
+
observed = deserialize({ filename: 'json4', output: 'script', addMetaData: true }, json4)
|
|
29
29
|
t.is(countOf('main', observed), 2)
|
|
30
30
|
t.is(countOf('const json', observed), 1)
|
|
31
31
|
|
|
32
|
-
observed =
|
|
32
|
+
observed = deserialize({ filename: 'json5', output: 'script', addMetaData: false }, json5)
|
|
33
33
|
t.is(countOf('main', observed), 2)
|
|
34
34
|
t.is(countOf('const json', observed), 2)
|
|
35
35
|
|
|
36
|
-
observed =
|
|
36
|
+
observed = deserialize({ filename: 'json6', output: 'script', addMetaData: false }, json6)
|
|
37
37
|
t.is(countOf('main', observed), 2)
|
|
38
38
|
t.is(countOf('const json', observed), 1)
|
|
39
39
|
})
|
|
@@ -43,11 +43,11 @@ const json1 = '{}'
|
|
|
43
43
|
|
|
44
44
|
const json2 = '[{"polygons":[{"vertices":[[-15,-15,-15],[-15,-15,15],[-15,15,15],[-15,15,-15]],"plane":[-1,0,0,15]},{"vertices":[[15,-15,-15],[15,15,-15],[15,15,15],[15,-15,15]],"plane":[1,0,0,15]},{"vertices":[[-15,-15,-15],[15,-15,-15],[15,-15,15],[-15,-15,15]],"plane":[0,-1,0,15]},{"vertices":[[-15,15,-15],[-15,15,15],[15,15,15],[15,15,-15]],"plane":[0,1,0,15]},{"vertices":[[-15,-15,-15],[-15,15,-15],[15,15,-15],[15,-15,-15]],"plane":[0,0,-1,15]},{"vertices":[[-15,-15,15],[15,-15,15],[15,15,15],[-15,15,15]],"plane":[0,0,1,15]}],"isRetesselated":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}]'
|
|
45
45
|
|
|
46
|
-
const json3 = '[{"
|
|
46
|
+
const json3 = '[{"outlines":[[[4.6193976402282715,-2.678784132003784],[5,0],[4.6193976402282715,2.678784132003784],[3.535533905029297,4.949747562408447],[1.9134172201156616,6.467156887054443],[3.0616169991140216e-16,7],[-1.9134172201156616,6.467156887054443],[-3.535533905029297,4.949747562408447],[-4.6193976402282715,2.678784132003784],[-5,8.572527703398379e-16],[-4.6193976402282715,-2.678784132003784],[-3.535533905029297,-4.949747562408447],[-1.9134172201156616,-6.467156887054443],[-9.184850467946473e-16,-7],[1.9134172201156616,-6.467156887054443],[3.535533905029297,-4.949747562408447]]],"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1],"name":"this is a name"}]'
|
|
47
47
|
|
|
48
48
|
const json4 = '[{"points":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"isClosed":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1]}]'
|
|
49
49
|
|
|
50
|
-
const json5 = '[{"
|
|
50
|
+
const json5 = '[{"outlines":[[[4.6193976402282715,-2.678784132003784],[5,0],[4.6193976402282715,2.678784132003784],[3.535533905029297,4.949747562408447],[1.9134172201156616,6.467156887054443],[3.0616169991140216e-16,7],[-1.9134172201156616,6.467156887054443],[-3.535533905029297,4.949747562408447],[-4.6193976402282715,2.678784132003784],[-5,8.572527703398379e-16],[-4.6193976402282715,-2.678784132003784],[-3.535533905029297,-4.949747562408447],[-1.9134172201156616,-6.467156887054443],[-9.184850467946473e-16,-7],[1.9134172201156616,-6.467156887054443],[3.535533905029297,-4.949747562408447]]],"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1],"name":"this is a name"},{"points":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"isClosed":false,"transforms":[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],"color":[1,0,0,1]}]'
|
|
51
51
|
|
|
52
52
|
// non-JSCAD object
|
|
53
53
|
const json6 = '[{"statistics":[[34.985713958740234,163.35238647460938],[49.39168167114258,179.00868225097656],[57.22199630737305,198.7909393310547],[57.43418502807617,220.06549072265625],[50,240]],"average":123.456}]'
|