@needle-tools/gltf-build-pipeline 2.2.1-alpha.2 → 2.2.1-alpha.4

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