@needle-tools/gltf-build-pipeline 2.12.1 → 2.13.0-beta.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 +3 -0
- package/dist/cache/cache.js +9 -0
- package/dist/utils/version.gen.d.ts +1 -1
- package/dist/utils/version.gen.js +1 -1
- package/package.json +4 -2
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
|
+
## [2.13.0-beta] - 2025-10-20
|
|
8
|
+
- Use xxhash-wasm for buffer hashing
|
|
9
|
+
|
|
7
10
|
## [2.12.0] - 2025-09-13
|
|
8
11
|
- Update meshoptimizer to 0.25 and use `simplifyWithAttributes` by default
|
|
9
12
|
|
package/dist/cache/cache.js
CHANGED
|
@@ -4,6 +4,11 @@ import fs, { statSync } from 'fs';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { getVersion } from "../utils/version.js";
|
|
6
6
|
// import * as CHECKDISCSPACE from 'check-disk-space'
|
|
7
|
+
import xxhash from "xxhash-wasm";
|
|
8
|
+
let hasher = null;
|
|
9
|
+
xxhash().then(module => {
|
|
10
|
+
hasher = module.create32();
|
|
11
|
+
});
|
|
7
12
|
/**
|
|
8
13
|
* Get the available space on the cache directory in bytes.
|
|
9
14
|
*/
|
|
@@ -299,6 +304,10 @@ function hashObject(obj, depth = 0) {
|
|
|
299
304
|
}
|
|
300
305
|
}
|
|
301
306
|
function hashBuffer(buffer, offset, length) {
|
|
307
|
+
if (hasher) {
|
|
308
|
+
const view = new Uint8Array(buffer, offset, length);
|
|
309
|
+
return hasher.update(view).digest();
|
|
310
|
+
}
|
|
302
311
|
let hash = 0;
|
|
303
312
|
const view = new Uint8Array(buffer, offset, length);
|
|
304
313
|
for (let i = 0; i < view.length; i++) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.
|
|
1
|
+
export declare const version = "2.13.0-beta.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "2.
|
|
1
|
+
export const version = "2.13.0-beta.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0-beta.1",
|
|
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",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"start": "node scripts/index.mjs",
|
|
26
26
|
"dev": "npm-watch compile",
|
|
27
27
|
"publish-package": "npm run compile && npm publish",
|
|
28
|
+
"preinstall": "node tools/prebuild.mjs",
|
|
28
29
|
"prepublishOnly": "npm run compile",
|
|
29
30
|
"compile": "node tools/prebuild.mjs && (tsc || exit 1) && node tools/postbuild.mjs",
|
|
30
31
|
"clear-caches": "node scripts/clear-caches.mjs",
|
|
@@ -64,7 +65,8 @@
|
|
|
64
65
|
"semver": "^7.3.7",
|
|
65
66
|
"sharp": "^0.33.4",
|
|
66
67
|
"tmp": "^0.2.1",
|
|
67
|
-
"uuid": "^9.0.1"
|
|
68
|
+
"uuid": "^9.0.1",
|
|
69
|
+
"xxhash-wasm": "^1.1.0"
|
|
68
70
|
},
|
|
69
71
|
"watch": {
|
|
70
72
|
"compile": {
|