@needle-tools/gltf-build-pipeline 2.9.1 → 2.9.2

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.
@@ -206,7 +206,7 @@ async function processTexture(texture, index, document, logger, context) {
206
206
  if (mimeType === "image/webp") {
207
207
  successFullyProcessed = await context.webPContext.process(index, texture, {
208
208
  ...webpOptions,
209
- quality: .9,
209
+ quality: .95,
210
210
  }, context);
211
211
  }
212
212
  else if (canRunToktx) {
@@ -31,11 +31,11 @@ export class NeedleWebPContext {
31
31
  // the quality range is 0-1 so we remap to 0-100
32
32
  options.quality = Math.round(settings.quality * 100);
33
33
  }
34
- if (options.quality <= 0) {
35
- options.quality = 1;
34
+ if (options.quality < 0) {
35
+ options.quality = undefined; // If quality is 0 we use the default value
36
36
  }
37
37
  // console.log(options);
38
- this.logger.info(`→ Will compress texture ${texture.getName()} to webp with quality ${options.quality}`);
38
+ this.logger.info(`→ Will compress texture ${texture.getName()} to webp with quality '${options.quality === undefined ? 'default' : options.quality}'`);
39
39
  const buffer = await sharp(texture.getImage()).toFormat('webp', options).toBuffer();
40
40
  texture
41
41
  .setMimeType('image/webp')
@@ -1 +1 @@
1
- export declare const version = "2.9.1";
1
+ export declare const version = "2.9.2";
@@ -1 +1 @@
1
- export const version = "2.9.1";
1
+ export const version = "2.9.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-build-pipeline",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
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",