@needle-tools/gltf-build-pipeline 1.6.0-alpha.6 → 2.0.0-alpha
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 +11 -1
- package/README.md +18 -0
- package/dist/package.json +31 -25
- package/dist/src/cli/index.js +37 -25
- package/dist/src/extensions/NEEDLE_opaque/NEEDLE_opaque.d.ts +1 -1
- package/dist/src/extensions/NEEDLE_opaque/NEEDLE_opaque.js +53 -24
- package/dist/src/scripts/pack-gltf.js +12 -17
- package/dist/src/transforms/needle_mesh_transform.js +3 -4
- package/dist/src/transforms/needle_progressive.js +48 -4
- package/dist/src/transforms/needle_toktx.js +52 -22
- package/dist/src/transforms/toktx.d.ts +9 -35
- package/dist/src/transforms/toktx.js +73 -92
- package/dist/src/utils/fileutils.d.ts +1 -0
- package/dist/src/utils/fileutils.js +9 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/dist/src/utils/stats.d.ts +9 -4
- package/dist/src/utils/stats.js +9 -3
- package/dist/src/utils/texture.d.ts +2 -0
- package/dist/src/utils/texture.js +8 -0
- package/package.json +32 -26
- package/scripts/clear-caches.mjs +1 -1
- package/scripts/defaults.mjs +2 -2
- package/scripts/fileutils.mjs +1 -1
- package/scripts/index.mjs +1 -1
- package/scripts/limit-caches.mjs +1 -1
- package/scripts/make-progressive.mjs +2 -2
- package/scripts/pack-gltf.mjs +1 -1
- package/tsconfig.json +1 -1
package/package.json
CHANGED
|
@@ -1,30 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-build-pipeline",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha",
|
|
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",
|
|
7
7
|
"readme": "README.md",
|
|
8
|
+
"author": {
|
|
9
|
+
"name": "Needle",
|
|
10
|
+
"email": "help@needle.tools",
|
|
11
|
+
"url": "https://needle.tools/"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/needle-tools/needle-gltf-extensions.git"
|
|
16
|
+
},
|
|
8
17
|
"bin": {
|
|
9
|
-
"gltf-build-pipeline": "./dist/src/cli/index.js"
|
|
18
|
+
"gltf-build-pipeline": "./dist/src/cli/index.js",
|
|
19
|
+
"needle-gltf": "./dist/src/cli/index.js"
|
|
10
20
|
},
|
|
11
21
|
"scripts": {
|
|
12
22
|
"start": "node scripts/index.mjs",
|
|
13
23
|
"dev": "npm-watch compile",
|
|
24
|
+
"compile": "tsc || exit 1",
|
|
25
|
+
"clear-caches": "node scripts/clear-caches.mjs",
|
|
26
|
+
"limit-caches": "node scripts/limit-caches.mjs",
|
|
14
27
|
"transform": "node scripts/index.mjs",
|
|
15
28
|
"transform:make-progressive": "node scripts/make-progressive.mjs",
|
|
16
29
|
"transform:pack-gltf": "node --no-experimental-fetch scripts/pack-gltf.mjs",
|
|
17
30
|
"pack-gltf": "node --no-experimental-fetch scripts/pack-gltf.mjs",
|
|
18
|
-
"dev:pack-gltf": "npm run compile && node scripts/pack-gltf.mjs"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"
|
|
31
|
+
"dev:pack-gltf": "npm run compile && node scripts/pack-gltf.mjs"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@img/sharp-win32-x64": "^0.33.4",
|
|
35
|
+
"@types/node": "^18.7.23",
|
|
36
|
+
"npm-watch": "^0.13.0",
|
|
37
|
+
"typescript": "^4.9.5"
|
|
38
|
+
},
|
|
39
|
+
"optionalDependencies": {
|
|
40
|
+
"@img/sharp-linux-arm": "^0.33.4",
|
|
41
|
+
"@img/sharp-win32-x64": "^0.33.4"
|
|
22
42
|
},
|
|
23
43
|
"dependencies": {
|
|
24
44
|
"@donmccurdy/caporal": "~0.0.10",
|
|
25
|
-
"@gltf-transform/
|
|
26
|
-
"@gltf-transform/
|
|
27
|
-
"@gltf-transform/
|
|
45
|
+
"@gltf-transform/cli": "^4.0.1",
|
|
46
|
+
"@gltf-transform/core": "^4.0.1",
|
|
47
|
+
"@gltf-transform/extensions": "^4.0.1",
|
|
48
|
+
"@gltf-transform/functions": "^4.0.1",
|
|
28
49
|
"command-exists": "^1.2.9",
|
|
29
50
|
"command-line-args": "^5.2.1",
|
|
30
51
|
"draco3dgltf": "^1.5.3",
|
|
@@ -36,7 +57,7 @@
|
|
|
36
57
|
"ndarray-pixels": "^2.0.1",
|
|
37
58
|
"p-limit": "3.1.0",
|
|
38
59
|
"semver": "^7.3.7",
|
|
39
|
-
"sharp": "^0.
|
|
60
|
+
"sharp": "^0.33.4",
|
|
40
61
|
"tmp": "^0.2.1",
|
|
41
62
|
"uuid": "^9.0.1"
|
|
42
63
|
},
|
|
@@ -48,20 +69,5 @@
|
|
|
48
69
|
"extensions": "ts",
|
|
49
70
|
"quiet": false
|
|
50
71
|
}
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@types/node": "^18.7.23",
|
|
54
|
-
"nodemon": "^3.1.2",
|
|
55
|
-
"npm-watch": "^0.13.0",
|
|
56
|
-
"typescript": "^4.9.5"
|
|
57
|
-
},
|
|
58
|
-
"author": {
|
|
59
|
-
"name": "Needle",
|
|
60
|
-
"email": "help@needle.tools",
|
|
61
|
-
"url": "https://needle.tools/"
|
|
62
|
-
},
|
|
63
|
-
"repository": {
|
|
64
|
-
"type": "git",
|
|
65
|
-
"url": "git+https://github.com/needle-tools/needle-gltf-extensions.git"
|
|
66
72
|
}
|
|
67
|
-
}
|
|
73
|
+
}
|
package/scripts/clear-caches.mjs
CHANGED
package/scripts/defaults.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
|
|
2
|
-
import { ALL_EXTENSIONS as NEEDLE_EXTENSIONS } from "../dist/extensions/NEEDLE_opaque/index.js";
|
|
3
|
-
import { NEEDLE_progressive } from '../dist/index.js';
|
|
2
|
+
import { ALL_EXTENSIONS as NEEDLE_EXTENSIONS } from "../dist/src/extensions/NEEDLE_opaque/index.js";
|
|
3
|
+
import { NEEDLE_progressive } from '../dist/src/index.js';
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
export function registerExtensions(node) {
|
package/scripts/fileutils.mjs
CHANGED
package/scripts/index.mjs
CHANGED
package/scripts/limit-caches.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getConfig, getVersion } from '../dist/index.js';
|
|
2
|
-
import { make_progressive } from '../dist/transforms/needle_progressive.js';
|
|
1
|
+
import { getConfig, getVersion } from '../dist/src/index.js';
|
|
2
|
+
import { make_progressive } from '../dist/src/transforms/needle_progressive.js';
|
|
3
3
|
|
|
4
4
|
const args = process.argv;
|
|
5
5
|
|
package/scripts/pack-gltf.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import commandLineArgs from "command-line-args";
|
|
2
2
|
import { foreachGLTF } from './fileutils.mjs';
|
|
3
|
-
import { getVersion, limitCacheSize, getConfig, packGLTF, printStats } from '../dist/index.js';
|
|
3
|
+
import { getVersion, limitCacheSize, getConfig, packGLTF, printStats } from '../dist/src/index.js';
|
|
4
4
|
|
|
5
5
|
console.log(`[Needle Build Pipeline] pack glTF — version ${getVersion()}`)
|
|
6
6
|
|