@needle-tools/gltf-build-pipeline 2.10.0-next.8757b68 → 2.10.0-stable.69fecbe

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,41 +4,45 @@ All notable changes to this package will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
- ## [2.9.5] - 2024-05-23
7
+ ## [2.10.0] - 2025-07-09
8
+ - add: support for Needle MaterialX extensions
9
+ - bump gltf-transform to 4.1.4
10
+
11
+ ## [2.9.5] - 2025-05-23
8
12
  - change: `product` usecase uses `UASTC` compression for 'normalTexture'
9
13
  - update gltf-transform to 4.1.3
10
14
 
11
- ## [2.9.0] - 2024-05-22
15
+ ## [2.9.0] - 2025-05-22
12
16
  - add: initial texture compression mode support for `world` and `product`
13
17
 
14
- ## [2.8.1] - 2024-04-17
18
+ ## [2.8.1] - 2025-04-17
15
19
  - bump version
16
20
 
17
- ## [2.8.1-alpha.0] - 2024-03-26
21
+ ## [2.8.1-alpha.0] - 2025-03-26
18
22
  - Fix: Issue where cache key gets longer depending on the primitive count
19
23
  - Fix: Cache key not taking index buffer into account
20
24
  - Fix: Caching of mesh LODs did clone shared mesh attributes for every primitive instead of re-using previous clones
21
25
 
22
- ## [2.8.0-alpha.2] - 2024-03-04
26
+ ## [2.8.0-alpha.2] - 2025-03-04
23
27
  - change: use webp compression for textures smaller than 32x32
24
28
  - fix: webp compression for small textures (64x64)
25
29
 
26
- ## [2.8.0-alpha.0] - 2024-02-27
30
+ ## [2.8.0-alpha.0] - 2025-02-27
27
31
  - change: `product` usecase now uses webp compression for 'normalTexture' and 'metallicRoughnessTexture' textures
28
32
 
29
- ## [2.7.1] - 2024-02-14
33
+ ## [2.7.1] - 2025-02-14
30
34
  - fix: bug in caching path due to change in 2.7.0-alpha.2
31
35
 
32
- ## [2.7.0] - 2024-02-13
36
+ ## [2.7.0] - 2025-02-13
33
37
  - bump version
34
38
 
35
- ## [2.7.0-alpha.2] - 2024-02-13
39
+ ## [2.7.0-alpha.2] - 2025-02-13
36
40
  - fix: processing for some very large meshes where hashing the meshes failed (for caching the results)
37
41
 
38
- ## [2.7.0-alpha.1] - 2024-01-13
42
+ ## [2.7.0-alpha.1] - 2025-01-13
39
43
  - fix: handle LOD omitting and remove deleted files from progressive transform results list
40
44
 
41
- ## [2.7.0-alpha] - 2024-01-13
45
+ ## [2.7.0-alpha] - 2025-01-13
42
46
  - add: VRM mesh simplification support
43
47
  - fix: issue where the output directory was not created if it didn't exist yet
44
48
  - fix: try resolve deduplicated meshes
@@ -115,6 +115,8 @@ export class NeedleToktxContext {
115
115
  }
116
116
  if (slots.length > 0)
117
117
  logger.debug(`${prefix}: Slots → [${slots.join(', ')}]`);
118
+ else
119
+ logger.debug(`${prefix}: No slots, assuming default texture.`);
118
120
  let srcImage = texture.getImage();
119
121
  let srcExtension = texture.getURI()
120
122
  ? FileUtils.extension(texture.getURI())
@@ -134,7 +136,8 @@ export class NeedleToktxContext {
134
136
  dstSize[1] = ceilMultipleOfFour(dstSize[1]);
135
137
  logger.warn(`${prefix}: Resizing ${srcSize.join('x')} → ${dstSize.join('x')}px`);
136
138
  instance.resize(dstSize[0], dstSize[1], { fit: 'fill', kernel: TextureResizeFilter.LANCZOS3 });
137
- srcImage = BufferUtils.toView(await instance.toBuffer());
139
+ const buffer = await instance.toBuffer();
140
+ srcImage = BufferUtils.toView(new Uint8Array(buffer));
138
141
  srcExtension = 'png';
139
142
  srcMimeType = 'image/png';
140
143
  }
@@ -142,7 +145,8 @@ export class NeedleToktxContext {
142
145
  const inPath = tmpName + '.' + srcExtension;
143
146
  const outPath = tmpName + '.ktx2';
144
147
  // const inBytes = image.byteLength;
145
- await fs.writeFile(inPath, Buffer.from(srcImage));
148
+ const buffer = Buffer.from(srcImage);
149
+ await fs.writeFile(inPath, buffer);
146
150
  let mode = Mode.ETC1S;
147
151
  let quality = 128;
148
152
  let compression = 1;
@@ -1 +1 @@
1
- export declare const version = "2.10.0-next.8757b68";
1
+ export declare const version = "2.10.0-stable.69fecbe";
@@ -1 +1 @@
1
- export const version = "2.10.0-next.8757b68";
1
+ export const version = "2.10.0-stable.69fecbe";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-build-pipeline",
3
- "version": "2.10.0-next.8757b68",
3
+ "version": "2.10.0-stable.69fecbe",
4
4
  "description": "Pipeline and tools for optimizing gltf files using gltf-transform and compression settings within glTF extensions",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -48,9 +48,9 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@donmccurdy/caporal": "~0.0.10",
51
- "@gltf-transform/core": "4.1.3",
52
- "@gltf-transform/extensions": "4.1.3",
53
- "@gltf-transform/functions": "4.1.3",
51
+ "@gltf-transform/core": "4.1.4",
52
+ "@gltf-transform/extensions": "4.1.4",
53
+ "@gltf-transform/functions": "4.1.4",
54
54
  "command-exists": "^1.2.9",
55
55
  "command-line-args": "^5.2.1",
56
56
  "draco3dgltf": "^1.5.3",