@needle-tools/gltf-build-pipeline 1.4.9 → 1.4.10
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.4.10] - 2023-04-23
|
|
8
|
+
- add: NEEDLE_progressive can now load and process already draco compressed meshes
|
|
9
|
+
|
|
7
10
|
## [1.4.9] - 2023-04-23
|
|
8
11
|
- add: NEEDLE_progressive now have `hash` field for LODs which is generated using the content of the LOD and it's settings that produced it.
|
|
9
12
|
- fix: NEEDLE_progressive catches error when copying mesh with extensions where the copy operation fails
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BufferUtils, Document, NodeIO, PropertyType } from '@gltf-transform/core';
|
|
2
2
|
import { SIMPLIFY_DEFAULTS, WELD_DEFAULTS, listTextureSlots, sparse } from '@gltf-transform/functions';
|
|
3
|
+
import draco3d from 'draco3dgltf';
|
|
3
4
|
import { NEEDLE_PROGRESSIVE_EXTENSION_NAME, NEEDLE_progressive } from "../extensions/NEEDLE_progressive/index.js";
|
|
4
5
|
import { createOpaqueExtension, currentGenerator, NEEDLE_compression_texture, NEEDLE_mesh_compression, NEEDLE_progressive_mesh_settings, NEEDLE_progressive_texture_settings, registerExtensions as registerDefaultExtensions } from '../extensions/index.js';
|
|
5
6
|
import path, { basename } from 'path';
|
|
@@ -49,6 +50,8 @@ async function process(file, opts) {
|
|
|
49
50
|
registerExtensions(io);
|
|
50
51
|
io.registerDependencies({
|
|
51
52
|
'meshopt.decoder': MeshoptDecoder,
|
|
53
|
+
'draco3d.decoder': await draco3d.createDecoderModule(),
|
|
54
|
+
'draco3d.encoder': await draco3d.createEncoderModule(),
|
|
52
55
|
});
|
|
53
56
|
const document = await io.read(file).catch((err) => {
|
|
54
57
|
// Log this message as a warning, it happens when trying to run on a already compressed gltf file (e.g. pre-processed. When logging an error we fail the build which is not desired)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.10",
|
|
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",
|