@needle-tools/gltf-build-pipeline 2.2.1-alpha.4 → 2.2.1-alpha.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +400 -395
  2. package/README.md +35 -35
  3. package/dist/cache/cache.d.ts +54 -54
  4. package/dist/cache/cache.js +257 -257
  5. package/dist/cache/index.d.ts +1 -1
  6. package/dist/cache/index.js +1 -1
  7. package/dist/cli/index.d.ts +2 -2
  8. package/dist/cli/index.js +147 -154
  9. package/dist/config/index.d.ts +53 -53
  10. package/dist/config/index.js +152 -152
  11. package/dist/constants.d.ts +5 -5
  12. package/dist/constants.js +5 -5
  13. package/dist/extensions/NEEDLE_compression_texture/NEEDLE_compression_texture.d.ts +24 -24
  14. package/dist/extensions/NEEDLE_compression_texture/NEEDLE_compression_texture.js +54 -54
  15. package/dist/extensions/NEEDLE_compression_texture/index.d.ts +1 -1
  16. package/dist/extensions/NEEDLE_compression_texture/index.js +1 -1
  17. package/dist/extensions/NEEDLE_mesh_compression/NEEDLE_mesh_compression.d.ts +26 -26
  18. package/dist/extensions/NEEDLE_mesh_compression/NEEDLE_mesh_compression.js +85 -85
  19. package/dist/extensions/NEEDLE_mesh_compression/index.d.ts +1 -1
  20. package/dist/extensions/NEEDLE_mesh_compression/index.js +1 -1
  21. package/dist/extensions/NEEDLE_opaque/NEEDLE_opaque.d.ts +27 -27
  22. package/dist/extensions/NEEDLE_opaque/NEEDLE_opaque.js +897 -897
  23. package/dist/extensions/NEEDLE_opaque/index.d.ts +3 -3
  24. package/dist/extensions/NEEDLE_opaque/index.js +28 -28
  25. package/dist/extensions/NEEDLE_progressive/NEEDLE_progressive.d.ts +48 -48
  26. package/dist/extensions/NEEDLE_progressive/NEEDLE_progressive.js +69 -69
  27. package/dist/extensions/NEEDLE_progressive/index.d.ts +1 -1
  28. package/dist/extensions/NEEDLE_progressive/index.js +1 -1
  29. package/dist/extensions/NEEDLE_progressive_mesh_settings/index.d.ts +23 -23
  30. package/dist/extensions/NEEDLE_progressive_mesh_settings/index.js +41 -41
  31. package/dist/extensions/NEEDLE_progressive_texture_settings/index.d.ts +25 -25
  32. package/dist/extensions/NEEDLE_progressive_texture_settings/index.js +67 -67
  33. package/dist/extensions/index.d.ts +7 -7
  34. package/dist/extensions/index.js +17 -17
  35. package/dist/extensions/utils.d.ts +6 -6
  36. package/dist/extensions/utils.js +72 -72
  37. package/dist/functions/weld.3.d.ts +76 -76
  38. package/dist/functions/weld.3.js +414 -414
  39. package/dist/index.d.ts +8 -8
  40. package/dist/index.js +8 -8
  41. package/dist/scripts/index.d.ts +2 -2
  42. package/dist/scripts/index.js +2 -2
  43. package/dist/scripts/pack-gltf.d.ts +15 -16
  44. package/dist/scripts/pack-gltf.js +118 -120
  45. package/dist/scripts/stats.d.ts +2 -2
  46. package/dist/scripts/stats.js +19 -18
  47. package/dist/transforms/index.d.ts +9 -9
  48. package/dist/transforms/index.js +9 -9
  49. package/dist/transforms/needle_animation_transform.d.ts +2 -2
  50. package/dist/transforms/needle_animation_transform.js +5 -5
  51. package/dist/transforms/needle_asset.d.ts +3 -3
  52. package/dist/transforms/needle_asset.js +35 -35
  53. package/dist/transforms/needle_common.d.ts +16 -16
  54. package/dist/transforms/needle_common.js +1 -1
  55. package/dist/transforms/needle_mesh_transform.d.ts +10 -10
  56. package/dist/transforms/needle_mesh_transform.js +140 -140
  57. package/dist/transforms/needle_progressive.d.ts +42 -42
  58. package/dist/transforms/needle_progressive.js +933 -933
  59. package/dist/transforms/needle_texture_transform.d.ts +13 -13
  60. package/dist/transforms/needle_texture_transform.js +205 -202
  61. package/dist/transforms/needle_toktx.d.ts +25 -25
  62. package/dist/transforms/needle_toktx.js +230 -230
  63. package/dist/transforms/needle_webp.d.ts +13 -13
  64. package/dist/transforms/needle_webp.js +37 -37
  65. package/dist/transforms/toktx.d.ts +52 -52
  66. package/dist/transforms/toktx.js +221 -221
  67. package/dist/transforms/toktx_types.d.ts +78 -78
  68. package/dist/transforms/toktx_types.js +62 -62
  69. package/dist/transforms/util.d.ts +21 -21
  70. package/dist/transforms/util.js +90 -90
  71. package/dist/utils/compression_utils.d.ts +2 -2
  72. package/dist/utils/compression_utils.js +6 -6
  73. package/dist/utils/fileutils.d.ts +6 -6
  74. package/dist/utils/fileutils.js +141 -141
  75. package/dist/utils/guid.d.ts +1 -1
  76. package/dist/utils/guid.js +5 -5
  77. package/dist/utils/index.d.ts +10 -10
  78. package/dist/utils/index.js +10 -10
  79. package/dist/utils/merge.d.ts +12 -12
  80. package/dist/utils/merge.js +31 -31
  81. package/dist/utils/mesh.d.ts +13 -13
  82. package/dist/utils/mesh.js +107 -107
  83. package/dist/utils/nodeio.d.ts +5 -5
  84. package/dist/utils/nodeio.js +14 -14
  85. package/dist/utils/stats.d.ts +70 -54
  86. package/dist/utils/stats.js +258 -191
  87. package/dist/utils/texture.d.ts +2 -2
  88. package/dist/utils/texture.js +8 -8
  89. package/dist/utils/validate.d.ts +5 -5
  90. package/dist/utils/validate.js +16 -16
  91. package/dist/utils/version.d.ts +1 -1
  92. package/dist/utils/version.js +5 -5
  93. package/package.json +77 -77
  94. package/scripts/clear-caches.mjs +3 -3
  95. package/scripts/defaults.mjs +11 -11
  96. package/scripts/fileutils.mjs +5 -5
  97. package/scripts/index.mjs +41 -41
  98. package/scripts/limit-caches.mjs +3 -3
  99. package/scripts/make-progressive.mjs +16 -16
  100. package/scripts/pack-gltf.mjs +106 -107
  101. package/tsconfig.json +19 -19
  102. package/.temp/Go2.bin +0 -0
  103. package/.temp/textures/0_1.exr +0 -0
  104. package/.temp/textures/1_1.jpg +0 -0
package/CHANGELOG.md CHANGED
@@ -1,396 +1,401 @@
1
- # Changelog
2
- All notable changes to this package will be documented in this file.
3
-
4
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
-
7
- ## [2.2.1-alpha.4] - 2023-06-17
8
- - add: `--verbose` option to transform command
9
- - add: `stats` command to create stats.needle.json
10
- - add: automatically detect mimetype mismatch and attempt to fix it
11
-
12
- ## [2.2.1-alpha] - 2023-06-15
13
- - fix: issue with progressive mesh cache key calculation when running multiple transform processes with different configurations
14
-
15
- ## [2.2.0-alpha.11] - 2023-06-14
16
- - fix: issue where progressive transform with un-indexed meshes would fail
17
-
18
- ## [2.2.0-alpha.10] - 2023-06-13
19
- - fix: progressive transform of converted GLB files where meshes don't have indicies
20
- - fix: skip progressive texture generation for textures for textures that already match the lowest LOD size
21
- - fix: if compression is set to None the LOD textures should respect that setting and also not be compressed
22
- - fix: fallback mesh density calculation for meshes that aren't indexed
23
- - fix: NEEDLE_mesh_compression extension falsely overriding primitive extensions
24
-
25
- ## [2.2.0-alpha.5] - 2023-06-06
26
- - add: CLI `--progressive` option to `transform` command (default is true)
27
- - add: CLI `--compress` option to `transform` command (default is true)
28
- - add: config `meshes: { lods: boolean }` option
29
- - remove: CLI "compress" command
30
- - change: enable texture LODs by default
31
- - fix: `--config` path can now point to a directory or a `needle.config.json` file as well
32
- - fix: mesh LOD regression caused by change in gltf-transform `weld` behaviour
33
- - fix: KTX SOFTWARE >= 4.3.0 is installed
34
-
35
- ## [2.1.0-alpha.6] - 2023-06-04
36
- - fix: errors when invoking npm scripts caused by the cli program
37
- - fix: remove cache directory error
38
- - fix: remove dedup for textures since this currently causes issues with gltf-progressive loading
39
-
40
- ## [2.1.0-alpha] - 2023-06-03
41
- - add: compression config support for high-level usecases that can be passed via commandline arguments or via config. Available options are currently `default`, `world` and `product`.
42
- - add: texture LODs can now be generated by passing in the path to a compression config. `--config <path/to/config.json>`
43
- - change: VRMs now use draco mesh compression by default
44
-
45
- ### Config Examples
46
- - `default` - use default compression. When not explictly configured textures will be compressed with ETC1S
47
- - `product` - when not explictly configured textures will use UASTC for `metallicRoughnessTexture` and `normalTexture`
48
- - `world` - generate texture LODs when enabled (and not explictly disabled by `textures: { lods: false }`)
49
- ```json
50
- {
51
- "usecase": "default" // optional
52
- "textures" : {
53
- "lods": true
54
- }
55
- }
56
- ```
57
- The config can also be part of a `needle.config.json`:
58
- ```json
59
- {
60
- ... regular needle.config
61
- "gltf": {
62
- "usecase": "default" // optional
63
- "textures": {
64
- "lods": true
65
- }
66
- }
67
- }
68
- ```
69
-
70
- ## [2.0.0-alpha] - 2023-06-01
71
- - update gltf-transform dependency to 4.x
72
- - change: ensure ETC1S and UASTC textures are power of 2
73
-
74
- - CLI: commands can be run with `needle-gltf <command>`
75
- - CLI: add `--cache` to allow disabling cache with `--cache False` (default true)
76
- - CLI: add `--stats` to produce `.needle.stats.json` (default false)
77
- - CLI: change `--output` to be the optional second argument
78
-
79
- ## [1.6.0-alpha.7] - 2023-05-30
80
- - fix: npx cli command return wrong error due to `packGLTF` not returning a booelan
81
- - fix: mjs script import paths
82
-
83
- ## [1.6.0-alpha.5] - 2023-05-28
84
- - fix: determine build pipeline version
85
- - change: throw error and exit process if packing or transform fails
86
-
87
- ## [1.6.0-alpha.2] - 2023-05-27
88
- - add: `gltf-build-pipeline` commandline support with `transform` and `compress` (pack-gltf) options.
89
-
90
- ## [1.5.0-alpha.12] - 2023-05-20
91
- - add: pack-gltf now also runs `resample` for animations
92
- - fix: nullreference error in accessing opaque debug options
93
-
94
- ## [1.5.0-alpha.10] - 2023-05-17
95
- - add: `generateLods` option to progressive texture settings
96
-
97
- ## [1.5.0-alpha.9] - 2023-05-16
98
- - add: start of VRM 1.0 support. Not implemented is the `VRMC_materials_mtoon` extension
99
-
100
- ## [1.5.0-alpha.8] - 2023-05-16
101
- - fix: issue where updating ktx compressed texture extension also flattened the path
102
-
103
- ## [1.5.0-alpha.7] - 2023-05-16
104
- - fix: external resources that are KTX2 compressed are now saved with a `.ktx2` extension
105
- - change: toktx now uses compression "auto" mode to select uastc or etc1s
106
- - change: toktx now checks the slots and increases quality for `metallicRoughnessTexture` and `normalTexture` but keeps using ETC1S for smaller file size
107
-
108
- ## [1.5.0-alpha.6] - 2023-05-15
109
- - fix: If not further specified then automatically use UASTC for textures that are in either `normalTexture` or `metallicRoughnessTexture` slots
110
-
111
- ## [1.5.0-alpha.5] - 2023-05-04
112
- - fix: NEEDLE_opaque should handle if VRM texture index is negative
113
- - change: exit with code 1 if any file packing fails
114
-
115
- ## [1.5.0-alpha.4] - 2023-05-03
116
- - fix: issue in NEEDLE_opaque resolving of VRM textures, also resolve `meta.texture`
117
- - fix: VRMs now compress meshes with mesh-opt if nothing is specified
118
- - change: include version in cache directory
119
-
120
- ## [1.5.0-alpha.3] - 2023-05-03
121
- - add: VRM progressive textures support
122
- - fix: VRM format should be saved as GLB. See https://github.com/donmccurdy/glTF-Transform/issues/1390
123
- - fix: VRM texture index handling
124
-
125
- ## [1.5.0-alpha] - 2023-05-01
126
- - add: NEEDLE_opaque `node: <index>` retargeting
127
- - add: passthrough VRM extension
128
-
129
- ## [1.4.11] - 2023-04-29
130
- - add: NEEDLE_progressive mesh now run sparse transform
131
- - change: cli params for debug and caching are now `--debug` and `--no-caching`
132
-
133
- ## [1.4.10] - 2023-04-23
134
- - add: NEEDLE_progressive can now load and process already draco compressed meshes
135
-
136
- ## [1.4.9] - 2023-04-23
137
- - add: NEEDLE_progressive now have `hash` field for LODs which is generated using the content of the LOD and it's settings that produced it.
138
- - fix: NEEDLE_progressive catches error when copying mesh with extensions where the copy operation fails
139
-
140
- ## [1.4.8] - 2023-04-22
141
- - fix: update sharp package to `^0.32.6`
142
- - change: NEEDLE_progressive meshes max LOD error increased
143
-
144
- ## [1.4.7] - 2023-04-16
145
- - add: `asset.extras.needle` now contains information about used build pipeline
146
-
147
- ## [1.4.6] - 2023-04-10
148
- - fix: NEEDLE_progressive meshes do not revert primitive data for skinned meshes anymore. See NE-4596
149
-
150
- ## [1.4.5] - 2023-04-05
151
- - fix: generating mesh and texture LOD for glbs without `NEEDLE_` extension
152
- - fix: guid generation for progressive meshes when no `NEEDLE_` extension is present
153
-
154
- ## [1.4.4] - 2023-04-03
155
- - change: clamp simplification error for LOD meshes to 5%
156
-
157
- ## [1.4.3] - 2023-04-02
158
- - release
159
- - fix: generate cache key for meshes
160
-
161
- ## [1.4.1-beta.15] - 2023-04-02
162
- - fix: issue where discarding all LODs might result in broken mesh due to simplify having modified the original mesh
163
- - fix: don't produce LODs if GLB/glTF was produced with old generator
164
-
165
- ## [1.4.1-beta.13] - 2023-03-26
166
- - change: passthrough `NEEDLE_editor` & `NEEDLE_gltf_dependencies` extensions
167
-
168
- ## [1.4.1-beta.12] - 2023-03-23
169
- - add: NEEDLE_progressive LODs can now contain more info per texture or mesh. Meshes contain vertex- and index counts
170
- - change: the cache can now store and retrieve meta information
171
-
172
- ## [1.4.1-beta.11] - 2023-03-20
173
- - add: NEEDLE_progressive LOD meshes morph targets data
174
- - fix: NEEDLE_progressive should check if simplifcation did result in improved meshes (> 32 verts removed && > 5 % improvement) and otherwise discard LODs (and the whole extension if no improvement was made)
175
- - change: Unity NEEDLE_progressive logs
176
-
177
- ## [1.4.1-beta.10] - 2023-03-19
178
- - change: NEEDLE_progressive calculates density per mesh level
179
- - change: NEEDLE_progressive `uri` field is removed and added `lod` array of objects
180
-
181
- ## [1.4.1-beta.8] - 2023-03-18
182
- - change: if an asset doesnt have a guid we use a uuid package now
183
- - change: ignore mesh LODs with vertex count < 4
184
- - change: allow generating mesh LODs without extension (if the mesh has > 32 vertices)
185
- - change: omit generated LODs if the change is too small (e.g. the vertex count didnt change enough)
186
-
187
- ## [1.4.1-beta.6] - 2023-03-15
188
- - add: caching support for mesh LODs
189
-
190
- ## [1.4.1-beta.5] - 2023-03-15
191
- - add: auto LODs now calculate mesh density
192
- - change: generate 6 LOD level
193
- - change: use ratio 0.5 of the previous LOD level
194
- - change: bump gltf-transform to 3.10.1 to fix simplifier
195
- - change: add sparse transform to progressive transform
196
-
197
- ## [1.4.1-beta.3] - 2023-03-14
198
- - fix: wait for mesh simplifier to be ready
199
-
200
- ## [1.4.1-beta.2] - 2023-03-13
201
- - change: update gltf-transform to `^3.10.0`
202
- - change: progressive mesh transform does now set ratio for LODs (see [simplifier issue 661 on github](https://github.com/zeux/meshoptimizer/issues/661))
203
- - fix: issue where progressive meshes were not generated if a mesh was multiple times in the glTF
204
- - change: simplify to use ratio, fix issue where not all meshes were processed
205
- - change: auto LOD max error set to 0.1
206
-
207
- ## [1.4.0-beta] - 2023-03-12
208
- - add: progressive mesh transform to automatically generate mesh LOD levels (currently we only generate one low poly version)
209
-
210
- ## [1.3.1] - 2023-10-20
211
- - fix: meshopt with khr_animation_2 extension was not correctly processed: animated node and target were not passed to gltf-transform which caused a wrong processing of meshopt. We now pass this information to the gltf-transform AnimationChannel object
212
- - change: bump gltf-transform to 3.7.3
213
-
214
- ## [1.2.4] - 2023-09-30
215
- - fix: bug in progressive texture transform where extension wasnt added correctly (NE-3627)
216
-
217
- ## [1.2.3] - 2023-09-29
218
- - fix: bug in progressive texture transform where texture wasnt found
219
-
220
- ## [1.2.2] - 2023-08-14
221
- - remove: legacy squoosh dependency
222
-
223
- ## [1.2.1] - 2023-07-25
224
- - change: set reference to materials used by json pointers
225
-
226
- ## [1.2.0] - 2023-07-21
227
- - add: resolving of material json pointers
228
-
229
- ## [1.1.6] - 2023-07-10
230
- - change: bump gltf-transform dependency to latest 3.4.6
231
-
232
- ## [1.1.5] - 2023-06-26
233
- - change: bump gltf-transform dependency to latest 3.4.3
234
-
235
- ## [1.1.4] - 2023-06-09
236
- - fix: progressive texture transform didnt pass mesh compression setting through
237
-
238
- ## [1.1.3] - 2023-05-24
239
- - minor change adding info about reduced size after processing gltf files
240
-
241
- ## [1.1.2] - 2023-05-24
242
- - fix: wasm out of memory error caused by starting to many compression processes at once
243
-
244
- ## [1.1.1] - 2023-05-18
245
- - fix: fix progressive texture processing for empty slots array, assume texture slot "baseColorTexture" (for custom shader support)
246
-
247
- ## [1.1.0] - 2023-05-06
248
- - add: support for per glb mesh compression selection (none, draco or meshopt)
249
-
250
- ## [1.0.6] - 2023-05-06
251
- - fix: dont add textures to cache when toktx is not installed
252
-
253
- ## [1.0.5] - 2023-05-06
254
- - fix: catch exception in cases where toktx is not installed (e.g. in CI environment) and log warning instead
255
-
256
- ## [1.0.4] - 2023-04-24
257
- - fix: error caused by missing simplifier
258
-
259
- ## [1.0.3] - 2023-04-24
260
- - fix: webp quality setting not being rounded resulting in compression to fail
261
-
262
- ## [1.0.2] - 2023-04-19
263
- - change: progressive should not log error out when running for already compressed gltf
264
- - change: ignore EXT_texture_exr extension re-assignment
265
-
266
- ## [1.0.1] - 2023-04-17
267
- - fix: register meshopt decoder
268
- - fix: catch exception in document read
269
- - change: log gpu memory estimation for textures
270
-
271
- ## [1.0.0] - 2023-04-04
272
- - change: file utils use needle.config.json to find files if no directory was specified
273
- - change: add generator info
274
- - change: try catch toktx exception
275
- - change: improve relative path handling
276
- - change: use env variable set by npm to resolve relative paths
277
- - add: option to disallow toktx using `no-toktx` commandline parameter
278
- - update to gltf-transform 3.1.4
279
-
280
- ## [0.11.2-pre] - 2023-01-30
281
- - fix: clean up logic for finding toktx to only use one approach
282
-
283
- ## [0.11.1-pre] - 2023-01-27
284
- - fix: getting correct gltf transform texture for texture definition
285
- - fix: opaque extension now also uses getTexture util method
286
-
287
- ## [0.11.0-pre] - 2023-01-25
288
- - add: script `transform` does run progressive and gltf-pack
289
- - change: script `transform:progressive` can now process all files in passed in directory
290
-
291
- ## [0.10.10-pre] - 2023-01-25
292
- - add: `NEEDLE_TOKTX` environment variable
293
- - fix: env variable handling
294
-
295
- ## [0.10.9-pre] - 2023-01-20
296
- - fix: set mime-type to KTX2 when using cached texture data that was processed with default toktx settings
297
-
298
- ## [0.10.8-pre] - 2023-01-18
299
- - fix: pack-gltf should run toktx with default settings when no compression extension was found in texture
300
-
301
- ## [0.10.7-pre] - 2023-01-18
302
- - fix: pack-gltf when invoked with single glb path
303
-
304
- ## [0.10.6-pre.1] - 2023-01-13
305
- - fix: support for glbs using old texture pointer format ``textures/`` (new format is ``/textures/``)
306
-
307
- ## [0.10.5-pre] - 2023-01-12
308
- - fix: pack-gltf running in sequence again to avoid wasm memory error with many glbs
309
-
310
- ## [0.10.4-pre] - 2023-01-11
311
- - change: simplify mesh logs `lockBorder` setting
312
- - change: pack-gltf now searches glb files in subdirectories
313
-
314
- ## [0.10.3-pre] - 2023-01-09
315
- - fix: issue with pack-gltf running out of memory when invoked for directory with many glbs
316
- - change: await squoosh pool close
317
- - change: disable extension read-write logs by default
318
-
319
- ## [0.10.2-pre] - 2023-01-07
320
- - add: mesh simplification now welds vertices with tiny threshold to be able to simplify disjointed meshes
321
- - change: progressive loading handling of unknown slot, dont throw for unknown texture slot but instead log warning and proceed without making the texture progressively loaded
322
- - change: update gltf-transform dependency to 2.5.1
323
-
324
- ## [0.10.1-pre] - 2023-01-04
325
- - fix: error in progressive texture resize where `maxSize` could be 0
326
-
327
- ## [0.10.0-pre] - 2023-01-04
328
- - add: caching for texture transforms
329
- - change: use one needle_transform function to handle compressions of textures in one loop instead of mulitple toktx and squoosh transform methods
330
-
331
- ## [0.9.1-pre] - 2023-01-03
332
- - add: opaque extension support for primitive extensions to support mesh compression settings passed through when using progressive transformations
333
-
334
- ## [0.9.0-pre] - 2023-01-03
335
- - add: ``NEEDLE_mesh_compression`` support for running gltf-transform simplify per primitive
336
-
337
- ## [0.8.1-pre.1] - 2022-12-14
338
- - add: quality option to ``NEEDLE_compression_texture`` for webp compression
339
- - fix: progressive glb should always use name from guid and index
340
-
341
- ## [0.8.0-pre] - 2022-12-13
342
- - add: webp compression mode
343
- - change: progressive texture glbs use guid as filename
344
- - change: pack-gltf can now take directory as argument
345
-
346
- ## [0.7.1-pre] - 2022-12-08
347
- - fix: processing gltf multiple times did cause texture json pointers being resolved wrongly including loosing previously set extensions
348
-
349
- ## [0.7.0-pre] - 2022-12-05
350
- - add: make-progressive tool to transform an existing glbs and resize images with high res images being loaded from external glbs
351
-
352
- ## [0.6.4-pre] - 2022-12-03
353
- - add: compression mode ``none`` to skip toktx compression
354
- - fix: issue with texture pointer not finding previously assigned sampler when writing
355
- - fix: if commandline parsing fails take path containing ``KTX-Software`` as additional toktx search path
356
-
357
- ## [0.6.3-pre] - 2022-10-27
358
- - fix: options.file nullreference error
359
-
360
- ## [0.6.2-pre] - 2022-10-20
361
- - change: toktx temp folder adjusted, use uuid for shorter names, generate uuid once per file [PR](https://github.com/donmccurdy/glTF-Transform/pull/708)
362
-
363
- ## [0.6.1-pre] - 2022-10-20
364
- - fix: NEEDLE_compression_settings havent been passed to toktx anymore
365
-
366
- ## [0.6.0-pre] - 2022-10-19
367
- - add: generate toktx textures in ``glTF-transform`` subdirectory, input and output textures having the same random name and are prefixed with the texture index
368
-
369
- ## [0.5.1-pre] - 2022-10-12
370
- - fix texture extensions surviving multiple compressions (e.g. compression same glb multiple times)
371
- - fix cli args when invoked via npm run
372
-
373
- ## [0.5.0-pre] - 2022-10-11
374
- - add draco support again
375
-
376
- ## [0.4.1-pre] - 2022-10-11
377
- - fix texture extension pass-through
378
-
379
- ## [0.4.0-pre] - 2022-10-11
380
- - update toktx to gltf-Transform v2.4.4
381
-
382
- ## [0.3.0-pre] - 2022-10-06
383
- - add: handle NEEDLE_compression_texture extension and API to toktx to control cli arguments per texture
384
-
385
- ## [0.2.2-pre] - 2022-10-03
386
- - add: allow setting ``--toktxPath`` from commandline on windows
387
-
388
- ## [0.2.1-pre] - 2022-10-03
389
- - fix bug where EXT_texture_exr extension would be inserted in all textures
390
-
391
- ## [0.2.0-pre] - 2022-10-02
392
- - handle KHR_animation_pointer
393
- - handle texture json pointers
394
-
395
- ## [0.1.3-pre] - 2022-09-26
1
+ # Changelog
2
+ All notable changes to this package will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [2.2.1-alpha.5] - 2023-06-18
8
+ - add: `stats` now includes json and animation size info
9
+ - change: VRM's are compressed with meshopt again
10
+ - change: usecase `product` now uses webp compression
11
+
12
+ ## [2.2.1-alpha.4] - 2023-06-17
13
+ - add: `--verbose` option to transform command
14
+ - add: `stats` command to create stats.needle.json
15
+ - add: automatically detect mimetype mismatch and attempt to fix it
16
+
17
+ ## [2.2.1-alpha] - 2023-06-15
18
+ - fix: issue with progressive mesh cache key calculation when running multiple transform processes with different configurations
19
+
20
+ ## [2.2.0-alpha.11] - 2023-06-14
21
+ - fix: issue where progressive transform with un-indexed meshes would fail
22
+
23
+ ## [2.2.0-alpha.10] - 2023-06-13
24
+ - fix: progressive transform of converted GLB files where meshes don't have indicies
25
+ - fix: skip progressive texture generation for textures for textures that already match the lowest LOD size
26
+ - fix: if compression is set to None the LOD textures should respect that setting and also not be compressed
27
+ - fix: fallback mesh density calculation for meshes that aren't indexed
28
+ - fix: NEEDLE_mesh_compression extension falsely overriding primitive extensions
29
+
30
+ ## [2.2.0-alpha.5] - 2023-06-06
31
+ - add: CLI `--progressive` option to `transform` command (default is true)
32
+ - add: CLI `--compress` option to `transform` command (default is true)
33
+ - add: config `meshes: { lods: boolean }` option
34
+ - remove: CLI "compress" command
35
+ - change: enable texture LODs by default
36
+ - fix: `--config` path can now point to a directory or a `needle.config.json` file as well
37
+ - fix: mesh LOD regression caused by change in gltf-transform `weld` behaviour
38
+ - fix: KTX SOFTWARE >= 4.3.0 is installed
39
+
40
+ ## [2.1.0-alpha.6] - 2023-06-04
41
+ - fix: errors when invoking npm scripts caused by the cli program
42
+ - fix: remove cache directory error
43
+ - fix: remove dedup for textures since this currently causes issues with gltf-progressive loading
44
+
45
+ ## [2.1.0-alpha] - 2023-06-03
46
+ - add: compression config support for high-level usecases that can be passed via commandline arguments or via config. Available options are currently `default`, `world` and `product`.
47
+ - add: texture LODs can now be generated by passing in the path to a compression config. `--config <path/to/config.json>`
48
+ - change: VRMs now use draco mesh compression by default
49
+
50
+ ### Config Examples
51
+ - `default` - use default compression. When not explictly configured textures will be compressed with ETC1S
52
+ - `product` - when not explictly configured textures will use UASTC for `metallicRoughnessTexture` and `normalTexture`
53
+ - `world` - generate texture LODs when enabled (and not explictly disabled by `textures: { lods: false }`)
54
+ ```json
55
+ {
56
+ "usecase": "default" // optional
57
+ "textures" : {
58
+ "lods": true
59
+ }
60
+ }
61
+ ```
62
+ The config can also be part of a `needle.config.json`:
63
+ ```json
64
+ {
65
+ ... regular needle.config
66
+ "gltf": {
67
+ "usecase": "default" // optional
68
+ "textures": {
69
+ "lods": true
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ ## [2.0.0-alpha] - 2023-06-01
76
+ - update gltf-transform dependency to 4.x
77
+ - change: ensure ETC1S and UASTC textures are power of 2
78
+
79
+ - CLI: commands can be run with `needle-gltf <command>`
80
+ - CLI: add `--cache` to allow disabling cache with `--cache False` (default true)
81
+ - CLI: add `--stats` to produce `.needle.stats.json` (default false)
82
+ - CLI: change `--output` to be the optional second argument
83
+
84
+ ## [1.6.0-alpha.7] - 2023-05-30
85
+ - fix: npx cli command return wrong error due to `packGLTF` not returning a booelan
86
+ - fix: mjs script import paths
87
+
88
+ ## [1.6.0-alpha.5] - 2023-05-28
89
+ - fix: determine build pipeline version
90
+ - change: throw error and exit process if packing or transform fails
91
+
92
+ ## [1.6.0-alpha.2] - 2023-05-27
93
+ - add: `gltf-build-pipeline` commandline support with `transform` and `compress` (pack-gltf) options.
94
+
95
+ ## [1.5.0-alpha.12] - 2023-05-20
96
+ - add: pack-gltf now also runs `resample` for animations
97
+ - fix: nullreference error in accessing opaque debug options
98
+
99
+ ## [1.5.0-alpha.10] - 2023-05-17
100
+ - add: `generateLods` option to progressive texture settings
101
+
102
+ ## [1.5.0-alpha.9] - 2023-05-16
103
+ - add: start of VRM 1.0 support. Not implemented is the `VRMC_materials_mtoon` extension
104
+
105
+ ## [1.5.0-alpha.8] - 2023-05-16
106
+ - fix: issue where updating ktx compressed texture extension also flattened the path
107
+
108
+ ## [1.5.0-alpha.7] - 2023-05-16
109
+ - fix: external resources that are KTX2 compressed are now saved with a `.ktx2` extension
110
+ - change: toktx now uses compression "auto" mode to select uastc or etc1s
111
+ - change: toktx now checks the slots and increases quality for `metallicRoughnessTexture` and `normalTexture` but keeps using ETC1S for smaller file size
112
+
113
+ ## [1.5.0-alpha.6] - 2023-05-15
114
+ - fix: If not further specified then automatically use UASTC for textures that are in either `normalTexture` or `metallicRoughnessTexture` slots
115
+
116
+ ## [1.5.0-alpha.5] - 2023-05-04
117
+ - fix: NEEDLE_opaque should handle if VRM texture index is negative
118
+ - change: exit with code 1 if any file packing fails
119
+
120
+ ## [1.5.0-alpha.4] - 2023-05-03
121
+ - fix: issue in NEEDLE_opaque resolving of VRM textures, also resolve `meta.texture`
122
+ - fix: VRMs now compress meshes with mesh-opt if nothing is specified
123
+ - change: include version in cache directory
124
+
125
+ ## [1.5.0-alpha.3] - 2023-05-03
126
+ - add: VRM progressive textures support
127
+ - fix: VRM format should be saved as GLB. See https://github.com/donmccurdy/glTF-Transform/issues/1390
128
+ - fix: VRM texture index handling
129
+
130
+ ## [1.5.0-alpha] - 2023-05-01
131
+ - add: NEEDLE_opaque `node: <index>` retargeting
132
+ - add: passthrough VRM extension
133
+
134
+ ## [1.4.11] - 2023-04-29
135
+ - add: NEEDLE_progressive mesh now run sparse transform
136
+ - change: cli params for debug and caching are now `--debug` and `--no-caching`
137
+
138
+ ## [1.4.10] - 2023-04-23
139
+ - add: NEEDLE_progressive can now load and process already draco compressed meshes
140
+
141
+ ## [1.4.9] - 2023-04-23
142
+ - add: NEEDLE_progressive now have `hash` field for LODs which is generated using the content of the LOD and it's settings that produced it.
143
+ - fix: NEEDLE_progressive catches error when copying mesh with extensions where the copy operation fails
144
+
145
+ ## [1.4.8] - 2023-04-22
146
+ - fix: update sharp package to `^0.32.6`
147
+ - change: NEEDLE_progressive meshes max LOD error increased
148
+
149
+ ## [1.4.7] - 2023-04-16
150
+ - add: `asset.extras.needle` now contains information about used build pipeline
151
+
152
+ ## [1.4.6] - 2023-04-10
153
+ - fix: NEEDLE_progressive meshes do not revert primitive data for skinned meshes anymore. See NE-4596
154
+
155
+ ## [1.4.5] - 2023-04-05
156
+ - fix: generating mesh and texture LOD for glbs without `NEEDLE_` extension
157
+ - fix: guid generation for progressive meshes when no `NEEDLE_` extension is present
158
+
159
+ ## [1.4.4] - 2023-04-03
160
+ - change: clamp simplification error for LOD meshes to 5%
161
+
162
+ ## [1.4.3] - 2023-04-02
163
+ - release
164
+ - fix: generate cache key for meshes
165
+
166
+ ## [1.4.1-beta.15] - 2023-04-02
167
+ - fix: issue where discarding all LODs might result in broken mesh due to simplify having modified the original mesh
168
+ - fix: don't produce LODs if GLB/glTF was produced with old generator
169
+
170
+ ## [1.4.1-beta.13] - 2023-03-26
171
+ - change: passthrough `NEEDLE_editor` & `NEEDLE_gltf_dependencies` extensions
172
+
173
+ ## [1.4.1-beta.12] - 2023-03-23
174
+ - add: NEEDLE_progressive LODs can now contain more info per texture or mesh. Meshes contain vertex- and index counts
175
+ - change: the cache can now store and retrieve meta information
176
+
177
+ ## [1.4.1-beta.11] - 2023-03-20
178
+ - add: NEEDLE_progressive LOD meshes morph targets data
179
+ - fix: NEEDLE_progressive should check if simplifcation did result in improved meshes (> 32 verts removed && > 5 % improvement) and otherwise discard LODs (and the whole extension if no improvement was made)
180
+ - change: Unity NEEDLE_progressive logs
181
+
182
+ ## [1.4.1-beta.10] - 2023-03-19
183
+ - change: NEEDLE_progressive calculates density per mesh level
184
+ - change: NEEDLE_progressive `uri` field is removed and added `lod` array of objects
185
+
186
+ ## [1.4.1-beta.8] - 2023-03-18
187
+ - change: if an asset doesnt have a guid we use a uuid package now
188
+ - change: ignore mesh LODs with vertex count < 4
189
+ - change: allow generating mesh LODs without extension (if the mesh has > 32 vertices)
190
+ - change: omit generated LODs if the change is too small (e.g. the vertex count didnt change enough)
191
+
192
+ ## [1.4.1-beta.6] - 2023-03-15
193
+ - add: caching support for mesh LODs
194
+
195
+ ## [1.4.1-beta.5] - 2023-03-15
196
+ - add: auto LODs now calculate mesh density
197
+ - change: generate 6 LOD level
198
+ - change: use ratio 0.5 of the previous LOD level
199
+ - change: bump gltf-transform to 3.10.1 to fix simplifier
200
+ - change: add sparse transform to progressive transform
201
+
202
+ ## [1.4.1-beta.3] - 2023-03-14
203
+ - fix: wait for mesh simplifier to be ready
204
+
205
+ ## [1.4.1-beta.2] - 2023-03-13
206
+ - change: update gltf-transform to `^3.10.0`
207
+ - change: progressive mesh transform does now set ratio for LODs (see [simplifier issue 661 on github](https://github.com/zeux/meshoptimizer/issues/661))
208
+ - fix: issue where progressive meshes were not generated if a mesh was multiple times in the glTF
209
+ - change: simplify to use ratio, fix issue where not all meshes were processed
210
+ - change: auto LOD max error set to 0.1
211
+
212
+ ## [1.4.0-beta] - 2023-03-12
213
+ - add: progressive mesh transform to automatically generate mesh LOD levels (currently we only generate one low poly version)
214
+
215
+ ## [1.3.1] - 2023-10-20
216
+ - fix: meshopt with khr_animation_2 extension was not correctly processed: animated node and target were not passed to gltf-transform which caused a wrong processing of meshopt. We now pass this information to the gltf-transform AnimationChannel object
217
+ - change: bump gltf-transform to 3.7.3
218
+
219
+ ## [1.2.4] - 2023-09-30
220
+ - fix: bug in progressive texture transform where extension wasnt added correctly (NE-3627)
221
+
222
+ ## [1.2.3] - 2023-09-29
223
+ - fix: bug in progressive texture transform where texture wasnt found
224
+
225
+ ## [1.2.2] - 2023-08-14
226
+ - remove: legacy squoosh dependency
227
+
228
+ ## [1.2.1] - 2023-07-25
229
+ - change: set reference to materials used by json pointers
230
+
231
+ ## [1.2.0] - 2023-07-21
232
+ - add: resolving of material json pointers
233
+
234
+ ## [1.1.6] - 2023-07-10
235
+ - change: bump gltf-transform dependency to latest 3.4.6
236
+
237
+ ## [1.1.5] - 2023-06-26
238
+ - change: bump gltf-transform dependency to latest 3.4.3
239
+
240
+ ## [1.1.4] - 2023-06-09
241
+ - fix: progressive texture transform didnt pass mesh compression setting through
242
+
243
+ ## [1.1.3] - 2023-05-24
244
+ - minor change adding info about reduced size after processing gltf files
245
+
246
+ ## [1.1.2] - 2023-05-24
247
+ - fix: wasm out of memory error caused by starting to many compression processes at once
248
+
249
+ ## [1.1.1] - 2023-05-18
250
+ - fix: fix progressive texture processing for empty slots array, assume texture slot "baseColorTexture" (for custom shader support)
251
+
252
+ ## [1.1.0] - 2023-05-06
253
+ - add: support for per glb mesh compression selection (none, draco or meshopt)
254
+
255
+ ## [1.0.6] - 2023-05-06
256
+ - fix: dont add textures to cache when toktx is not installed
257
+
258
+ ## [1.0.5] - 2023-05-06
259
+ - fix: catch exception in cases where toktx is not installed (e.g. in CI environment) and log warning instead
260
+
261
+ ## [1.0.4] - 2023-04-24
262
+ - fix: error caused by missing simplifier
263
+
264
+ ## [1.0.3] - 2023-04-24
265
+ - fix: webp quality setting not being rounded resulting in compression to fail
266
+
267
+ ## [1.0.2] - 2023-04-19
268
+ - change: progressive should not log error out when running for already compressed gltf
269
+ - change: ignore EXT_texture_exr extension re-assignment
270
+
271
+ ## [1.0.1] - 2023-04-17
272
+ - fix: register meshopt decoder
273
+ - fix: catch exception in document read
274
+ - change: log gpu memory estimation for textures
275
+
276
+ ## [1.0.0] - 2023-04-04
277
+ - change: file utils use needle.config.json to find files if no directory was specified
278
+ - change: add generator info
279
+ - change: try catch toktx exception
280
+ - change: improve relative path handling
281
+ - change: use env variable set by npm to resolve relative paths
282
+ - add: option to disallow toktx using `no-toktx` commandline parameter
283
+ - update to gltf-transform 3.1.4
284
+
285
+ ## [0.11.2-pre] - 2023-01-30
286
+ - fix: clean up logic for finding toktx to only use one approach
287
+
288
+ ## [0.11.1-pre] - 2023-01-27
289
+ - fix: getting correct gltf transform texture for texture definition
290
+ - fix: opaque extension now also uses getTexture util method
291
+
292
+ ## [0.11.0-pre] - 2023-01-25
293
+ - add: script `transform` does run progressive and gltf-pack
294
+ - change: script `transform:progressive` can now process all files in passed in directory
295
+
296
+ ## [0.10.10-pre] - 2023-01-25
297
+ - add: `NEEDLE_TOKTX` environment variable
298
+ - fix: env variable handling
299
+
300
+ ## [0.10.9-pre] - 2023-01-20
301
+ - fix: set mime-type to KTX2 when using cached texture data that was processed with default toktx settings
302
+
303
+ ## [0.10.8-pre] - 2023-01-18
304
+ - fix: pack-gltf should run toktx with default settings when no compression extension was found in texture
305
+
306
+ ## [0.10.7-pre] - 2023-01-18
307
+ - fix: pack-gltf when invoked with single glb path
308
+
309
+ ## [0.10.6-pre.1] - 2023-01-13
310
+ - fix: support for glbs using old texture pointer format ``textures/`` (new format is ``/textures/``)
311
+
312
+ ## [0.10.5-pre] - 2023-01-12
313
+ - fix: pack-gltf running in sequence again to avoid wasm memory error with many glbs
314
+
315
+ ## [0.10.4-pre] - 2023-01-11
316
+ - change: simplify mesh logs `lockBorder` setting
317
+ - change: pack-gltf now searches glb files in subdirectories
318
+
319
+ ## [0.10.3-pre] - 2023-01-09
320
+ - fix: issue with pack-gltf running out of memory when invoked for directory with many glbs
321
+ - change: await squoosh pool close
322
+ - change: disable extension read-write logs by default
323
+
324
+ ## [0.10.2-pre] - 2023-01-07
325
+ - add: mesh simplification now welds vertices with tiny threshold to be able to simplify disjointed meshes
326
+ - change: progressive loading handling of unknown slot, dont throw for unknown texture slot but instead log warning and proceed without making the texture progressively loaded
327
+ - change: update gltf-transform dependency to 2.5.1
328
+
329
+ ## [0.10.1-pre] - 2023-01-04
330
+ - fix: error in progressive texture resize where `maxSize` could be 0
331
+
332
+ ## [0.10.0-pre] - 2023-01-04
333
+ - add: caching for texture transforms
334
+ - change: use one needle_transform function to handle compressions of textures in one loop instead of mulitple toktx and squoosh transform methods
335
+
336
+ ## [0.9.1-pre] - 2023-01-03
337
+ - add: opaque extension support for primitive extensions to support mesh compression settings passed through when using progressive transformations
338
+
339
+ ## [0.9.0-pre] - 2023-01-03
340
+ - add: ``NEEDLE_mesh_compression`` support for running gltf-transform simplify per primitive
341
+
342
+ ## [0.8.1-pre.1] - 2022-12-14
343
+ - add: quality option to ``NEEDLE_compression_texture`` for webp compression
344
+ - fix: progressive glb should always use name from guid and index
345
+
346
+ ## [0.8.0-pre] - 2022-12-13
347
+ - add: webp compression mode
348
+ - change: progressive texture glbs use guid as filename
349
+ - change: pack-gltf can now take directory as argument
350
+
351
+ ## [0.7.1-pre] - 2022-12-08
352
+ - fix: processing gltf multiple times did cause texture json pointers being resolved wrongly including loosing previously set extensions
353
+
354
+ ## [0.7.0-pre] - 2022-12-05
355
+ - add: make-progressive tool to transform an existing glbs and resize images with high res images being loaded from external glbs
356
+
357
+ ## [0.6.4-pre] - 2022-12-03
358
+ - add: compression mode ``none`` to skip toktx compression
359
+ - fix: issue with texture pointer not finding previously assigned sampler when writing
360
+ - fix: if commandline parsing fails take path containing ``KTX-Software`` as additional toktx search path
361
+
362
+ ## [0.6.3-pre] - 2022-10-27
363
+ - fix: options.file nullreference error
364
+
365
+ ## [0.6.2-pre] - 2022-10-20
366
+ - change: toktx temp folder adjusted, use uuid for shorter names, generate uuid once per file [PR](https://github.com/donmccurdy/glTF-Transform/pull/708)
367
+
368
+ ## [0.6.1-pre] - 2022-10-20
369
+ - fix: NEEDLE_compression_settings havent been passed to toktx anymore
370
+
371
+ ## [0.6.0-pre] - 2022-10-19
372
+ - add: generate toktx textures in ``glTF-transform`` subdirectory, input and output textures having the same random name and are prefixed with the texture index
373
+
374
+ ## [0.5.1-pre] - 2022-10-12
375
+ - fix texture extensions surviving multiple compressions (e.g. compression same glb multiple times)
376
+ - fix cli args when invoked via npm run
377
+
378
+ ## [0.5.0-pre] - 2022-10-11
379
+ - add draco support again
380
+
381
+ ## [0.4.1-pre] - 2022-10-11
382
+ - fix texture extension pass-through
383
+
384
+ ## [0.4.0-pre] - 2022-10-11
385
+ - update toktx to gltf-Transform v2.4.4
386
+
387
+ ## [0.3.0-pre] - 2022-10-06
388
+ - add: handle NEEDLE_compression_texture extension and API to toktx to control cli arguments per texture
389
+
390
+ ## [0.2.2-pre] - 2022-10-03
391
+ - add: allow setting ``--toktxPath`` from commandline on windows
392
+
393
+ ## [0.2.1-pre] - 2022-10-03
394
+ - fix bug where EXT_texture_exr extension would be inserted in all textures
395
+
396
+ ## [0.2.0-pre] - 2022-10-02
397
+ - handle KHR_animation_pointer
398
+ - handle texture json pointers
399
+
400
+ ## [0.1.3-pre] - 2022-09-26
396
401
  - initial release