@needle-tools/gltf-build-pipeline 1.0.2 → 1.0.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ 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.0.4] - 2023-04-24
8
+ - fix: error caused by missing simplifier
9
+
10
+ ## [1.0.3] - 2023-04-24
11
+ - fix: webp quality setting not being rounded resulting in compression to fail
12
+
7
13
  ## [1.0.2] - 2023-04-19
8
14
  - change: progressive should not log error out when running for already compressed gltf
9
15
  - change: ignore EXT_texture_exr extension re-assignment
@@ -11,6 +11,8 @@ export const needle_mesh_transform = function (_options) {
11
11
  return (document, _context) => {
12
12
  const logger = document.getLogger();
13
13
  const options = { ...SIMPLIFY_DEFAULTS, ..._options };
14
+ if (!options.simplifier)
15
+ options.simplifier = simplifier;
14
16
  const weldOptions = {
15
17
  ...WELD_DEFAULTS,
16
18
  tolerance: 0.00000000001,
@@ -34,7 +34,7 @@ export class NeedleWebPContext {
34
34
  };
35
35
  if (typeof options !== "string" && options.quality >= 0) {
36
36
  // the quality range is 0-1 so we remap to 0-100
37
- options.quality = settings.quality * 100;
37
+ options.quality = Math.round(settings.quality * 100);
38
38
  }
39
39
  if (options.quality <= 0) {
40
40
  options.quality = 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-build-pipeline",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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",