@needle-tools/gltf-build-pipeline 1.1.0 → 1.1.1
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,6 +4,9 @@ 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
|
+
## [1.1.1] - 2023-05-18
|
|
8
|
+
- fix: fix progressive texture processing for empty slots array, assume texture slot "baseColorTexture" (for custom shader support)
|
|
9
|
+
|
|
7
10
|
## [1.1.0] - 2023-05-06
|
|
8
11
|
- add: support for per glb mesh compression selection (none, draco or meshopt)
|
|
9
12
|
|
|
@@ -181,6 +181,10 @@ function createTextureLod(basePath, level, texture, slots, guid, textureIndex) {
|
|
|
181
181
|
newTexture.setImage(img);
|
|
182
182
|
newTexture.setURI(texture.getURI());
|
|
183
183
|
newTexture.setMimeType(texture.getMimeType());
|
|
184
|
+
if (!slots?.length) {
|
|
185
|
+
console.warn(`WARN: No material slots found for texture at index ${textureIndex} (name: \"${texture.getName()}\") → will assume slot \"baseColorTexture\"`);
|
|
186
|
+
slots = ["baseColorTexture"];
|
|
187
|
+
}
|
|
184
188
|
// create material adding the texture to the same slot
|
|
185
189
|
for (const slot of slots) {
|
|
186
190
|
const newMaterial = newDoc.createMaterial();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Pipeline and tools for optimizing gltf files using gltf-transform and compression settings within glTF extensions",
|
|
5
5
|
"main": "index.mjs",
|
|
6
6
|
"type": "module",
|