@needle-tools/gltf-build-pipeline 2.11.3 → 2.11.4-next.bddd383
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/dist/cache/cache.js
CHANGED
|
@@ -39,7 +39,7 @@ export const cacheSizeLimit = 1024 * 5;
|
|
|
39
39
|
*/
|
|
40
40
|
export function limitCacheSize(maxSizeMB = cacheSizeLimit) {
|
|
41
41
|
const dir = getCacheDirectory(true);
|
|
42
|
-
console.log(`Limit cache size to ${maxSizeMB.toFixed(2)} MB at ${dir}
|
|
42
|
+
console.log(`Limit cache size to ${maxSizeMB.toFixed(2)} MB at ${dir}`);
|
|
43
43
|
let totalSize = 0;
|
|
44
44
|
const files = new Array();
|
|
45
45
|
function recurseDirectories(dir) {
|
package/dist/cli/index.js
CHANGED
|
@@ -184,7 +184,8 @@ Each version will be compressed and written to the output directory.
|
|
|
184
184
|
}
|
|
185
185
|
});
|
|
186
186
|
printStats(stats, logger, config);
|
|
187
|
-
|
|
187
|
+
if (useCache)
|
|
188
|
+
limitCacheSize();
|
|
188
189
|
});
|
|
189
190
|
program.run().catch(err => {
|
|
190
191
|
// Since we still invoke this package with paths when running npm scripts we need to ignore this error
|
|
@@ -79,6 +79,8 @@ async function applyMeshCompression(document, transform_context, context) {
|
|
|
79
79
|
document.getLogger().info(`[${NAME}]: ${compressionModel.compression.toUpperCase()} → will apply ${compressionModel.compression} mesh compression`);
|
|
80
80
|
if (compressionModel.compression === "draco") {
|
|
81
81
|
const transform = draco({
|
|
82
|
+
encodeSpeed: 8,
|
|
83
|
+
decodeSpeed: 8,
|
|
82
84
|
quantizationVolume: isLOD ? "scene" : undefined
|
|
83
85
|
});
|
|
84
86
|
return transform(document, transform_context);
|
|
@@ -92,6 +94,8 @@ async function applyMeshCompression(document, transform_context, context) {
|
|
|
92
94
|
// by default we still want to run draco if the root doesnt have a compression model configured
|
|
93
95
|
document.getLogger().info(`[${NAME}]: → will apply draco mesh compression (default)`);
|
|
94
96
|
const transform = draco({
|
|
97
|
+
encodeSpeed: 8,
|
|
98
|
+
decodeSpeed: 8,
|
|
95
99
|
quantizationVolume: isLOD ? "scene" : undefined
|
|
96
100
|
});
|
|
97
101
|
return transform(document, transform_context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "2.11.
|
|
1
|
+
export declare const version = "2.11.4-next.bddd383";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "2.11.
|
|
1
|
+
export const version = "2.11.4-next.bddd383";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.4-next.bddd383",
|
|
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",
|