@geoinsight/react-components 1.0.4 → 1.0.6
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/.pnp.cjs +2014 -3638
- package/.yarn/install-state.gz +0 -0
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
- package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/CHANGELOG.md +70 -85
- package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/package.json +11 -11
- package/dist/cjs/components/button/index.stories.d.ts +12 -9
- package/dist/cjs/components/map/map-mapbox.d.ts +0 -1
- package/dist/cjs/index.css +67 -184
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +47 -213
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/button/index.stories.d.ts +12 -9
- package/dist/esm/components/map/map-mapbox.d.ts +0 -1
- package/dist/esm/index.css +67 -184
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +49 -192
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -5
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/.ready +0 -0
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/LICENSE.txt +0 -116
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/README.md +0 -149
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/banner.ts +0 -4
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/check-bundle-size.js +0 -77
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-debug-index-file.ts +0 -19
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-query-test-fixtures.ts +0 -126
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-shaders.ts +0 -35
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-struct-arrays.ts +0 -437
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-style-code.ts +0 -280
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-style-spec.ts +0 -323
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/generate-typings.ts +0 -26
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/readme.md +0 -52
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/release-notes.js +0 -45
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/rollup_plugin_minify_style_spec.ts +0 -25
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/build/rollup_plugins.ts +0 -52
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp-worker.js +0 -2
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp-worker.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp.js +0 -2
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-csp.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl-dev.js +0 -51935
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.css +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.d.ts +0 -11736
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.js +0 -44
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/maplibre-gl.js.map +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/package.json +0 -1
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/dist/style-spec/index.d.ts +0 -1768
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/package.json +0 -182
- package/.yarn/unplugged/maplibre-gl-npm-2.4.0-9fa603cf50/node_modules/maplibre-gl/postinstall.js +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/.editorconfig +0 -7
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/.ready +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/LICENSE +0 -21
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/README.md +0 -108
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/PVRTexToolCLI +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/astcenc +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/darwin/crunch +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/PVRTexToolCLI +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/astcenc +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/linux/crunch +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/texture-compressor.js +0 -3
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-PVRTexToolCLI.txt +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-astcenc.txt +0 -137
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/LICENSE-crunch.txt +0 -25
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/PVRTexToolCLI.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/astcenc.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/bin/win32/crunch.exe +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/argsHandler.js +0 -101
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/argsHandler.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithCrunch.js +0 -48
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithCrunch.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithPVRTexTool.js +0 -51
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/compressWithPVRTexTool.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/spawnProcess.js +0 -45
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/spawnProcess.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/validateArgs.js +0 -36
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/compressors/validateArgs.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/constants.js +0 -85
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/constants.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/index.js +0 -33
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/index.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/utilities.js +0 -52
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/lib/utilities.js.map +0 -1
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/cli/package.json +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/argsHandler.d.ts +0 -14
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/compressWithCrunch.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/compressWithPVRTexTool.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/spawnProcess.d.ts +0 -9
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/compressors/validateArgs.d.ts +0 -11
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/constants.d.ts +0 -45
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/index.d.ts +0 -5
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/dist/types/lib/utilities.d.ts +0 -43
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/RECOMMENDED_PARAMETERS.md +0 -17
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/SUPPORTED_DEVICES_TABLE.md +0 -47
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/SUPPORTED_PARAMETERS.md +0 -154
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/KTXLoader.js +0 -149
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-astc-4x4.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-astc-8x8.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt1.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt1A.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt3.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-dxt5.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc1.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc2.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-etc2A.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc2BPP.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc2BPPA.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc4BPP.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/flippedY-mipmaps/example-pvrtc4BPPA.ktx +0 -0
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/data/main.js +0 -195
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/docs/index.html +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/argsHandler.ts +0 -135
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/compressWithCrunch.ts +0 -66
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/compressWithPVRTexTool.ts +0 -91
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/spawnProcess.ts +0 -57
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/compressors/validateArgs.ts +0 -53
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/constants.ts +0 -86
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/index.ts +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/lib/utilities.ts +0 -57
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/package.json +0 -37
- package/.yarn/unplugged/texture-compressor-npm-1.0.2-c655a54095/node_modules/texture-compressor/tslint.json +0 -12
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-linux-x64-gnu-npm-1.3.106-7bb327124d → @swc-core-linux-x64-gnu-npm-1.4.0-07735121da}/node_modules/@swc/core-linux-x64-gnu/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/.ready +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/LICENSE +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/Visitor.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/Visitor.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/binding.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/binding.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/bindings/README.md +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/bindings/binding_core_wasm/package.json +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/index.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/index.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/postinstall.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/spack.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/spack.js +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/util.d.ts +0 -0
- /package/.yarn/unplugged/{@swc-core-virtual-22cde85fc1 → @swc-core-virtual-a4869543ec}/node_modules/@swc/core/util.js +0 -0
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Native
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
// Utilities
|
|
7
|
-
const utilities_1 = require("../utilities");
|
|
8
|
-
/**
|
|
9
|
-
* Spawn a child process of a texture compression tool (e.g. PVRTexTool, Crunch)
|
|
10
|
-
*
|
|
11
|
-
* @param args Command line arguments
|
|
12
|
-
* @param flagMapping Flags to pass to the texture compression tool
|
|
13
|
-
* @param binaryName Name of the texture compression tool
|
|
14
|
-
*/
|
|
15
|
-
exports.spawnProcess = (args, flagMapping, binaryName) => {
|
|
16
|
-
const toolPath = path_1.join(utilities_1.getBinaryDirectory(), binaryName);
|
|
17
|
-
const toolFlags = args.flags ? utilities_1.splitFlagAndValue(utilities_1.createFlagsForTool(args.flags)) : [];
|
|
18
|
-
const combinedFlags = [...flagMapping, ...toolFlags];
|
|
19
|
-
return new Promise((resolve, reject) => {
|
|
20
|
-
if (args.verbose) {
|
|
21
|
-
console.log(`Using flags: ${combinedFlags}`);
|
|
22
|
-
}
|
|
23
|
-
const child = child_process_1.spawn(toolPath, combinedFlags, {
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
env: {
|
|
26
|
-
PATH: utilities_1.getBinaryDirectory() || process.env,
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
if (args.verbose) {
|
|
30
|
-
child.stdout.on('data', (data) => console.log(`${data}`));
|
|
31
|
-
child.stderr.on('data', (data) => {
|
|
32
|
-
console.log(`${data}`);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
child.once('exit', (code) => {
|
|
36
|
-
if (code !== 0) {
|
|
37
|
-
reject(new Error(`Compression tool exited with error code ${code}`));
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
resolve();
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=spawnProcess.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spawnProcess.js","sourceRoot":"","sources":["../../../../lib/compressors/spawnProcess.ts"],"names":[],"mappings":";;AAAA,SAAS;AACT,iDAAsC;AACtC,+BAA4B;AAK5B,YAAY;AACZ,4CAAyF;AAEzF;;;;;;GAMG;AACU,QAAA,YAAY,GAAG,CAC1B,IAAc,EACd,WAAqB,EACrB,UAAkB,EACJ,EAAE;IAChB,MAAM,QAAQ,GAAG,WAAI,CAAC,8BAAkB,EAAE,EAAE,UAAU,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,6BAAiB,CAAC,8BAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACtF,MAAM,aAAa,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,SAAS,CAAC,CAAC;IAErD,OAAO,IAAI,OAAO,CAChB,CAAC,OAAO,EAAE,MAAM,EAAQ,EAAE;QACxB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,CAAC,GAAG,CAAC,gBAAgB,aAAa,EAAE,CAAC,CAAC;SAC9C;QAED,MAAM,KAAK,GAAG,qBAAK,CAAC,QAAQ,EAAE,aAAa,EAAE;YAC3C,aAAa;YACb,GAAG,EAAE;gBACH,IAAI,EAAE,8BAAkB,EAAE,IAAI,OAAO,CAAC,GAAG;aAC1C;SACF,CAAC,CAAC;QAEH,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;YAElE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;gBACvC,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;YACzB,CAAC,CAAC,CAAC;SACJ;QAED,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE;YAClC,IAAI,IAAI,KAAK,CAAC,EAAE;gBACd,MAAM,CAAC,IAAI,KAAK,CAAC,2CAA2C,IAAI,EAAE,CAAC,CAAC,CAAC;aACtE;iBAAM;gBACL,OAAO,EAAE,CAAC;aACX;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CACF,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Utilities
|
|
4
|
-
const utilities_1 = require("../utilities");
|
|
5
|
-
/**
|
|
6
|
-
* Validate if the passed in images are accepted by the compression tool
|
|
7
|
-
*
|
|
8
|
-
* @param args Command line arguments
|
|
9
|
-
* @param inputTypes List of valid input types
|
|
10
|
-
* @param outputTypes List of valid output types
|
|
11
|
-
* @param compressionTypes List of valid compression types
|
|
12
|
-
* @param qualityTypes List of valid quality types
|
|
13
|
-
*/
|
|
14
|
-
exports.validateArgs = (args, inputTypes, outputTypes, compressionTypes, qualityTypes) => {
|
|
15
|
-
if (!args.input) {
|
|
16
|
-
throw new Error('Input path is required');
|
|
17
|
-
}
|
|
18
|
-
if (!args.output) {
|
|
19
|
-
throw new Error('Output path is required');
|
|
20
|
-
}
|
|
21
|
-
const inputFileExtension = utilities_1.getFileExtension(args.input);
|
|
22
|
-
const outputFileExtension = utilities_1.getFileExtension(args.output);
|
|
23
|
-
if (!outputTypes.includes(outputFileExtension)) {
|
|
24
|
-
throw new Error(`${outputFileExtension} is not supported. The supported filetypes are: [${outputTypes}]`);
|
|
25
|
-
}
|
|
26
|
-
if (!inputTypes.includes(inputFileExtension)) {
|
|
27
|
-
throw new Error(`${inputFileExtension} is not supported. The supported filetypes are: [${inputTypes}]`);
|
|
28
|
-
}
|
|
29
|
-
if (!args.compression) {
|
|
30
|
-
throw new Error(`Supported compression options: ${compressionTypes}`);
|
|
31
|
-
}
|
|
32
|
-
if (!args.quality) {
|
|
33
|
-
throw new Error(`Supported quality options: ${qualityTypes}`);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=validateArgs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validateArgs.js","sourceRoot":"","sources":["../../../../lib/compressors/validateArgs.ts"],"names":[],"mappings":";;AAGA,YAAY;AACZ,4CAAgD;AAEhD;;;;;;;;GAQG;AACU,QAAA,YAAY,GAAG,CAC1B,IAAc,EACd,UAAoB,EACpB,WAAqB,EACrB,gBAA0B,EAC1B,YAAsB,EAChB,EAAE;IACR,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;KAC3C;IAED,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QAChB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;KAC5C;IAED,MAAM,kBAAkB,GAAG,4BAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,4BAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAE1D,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;QAC9C,MAAM,IAAI,KAAK,CACb,GAAG,mBAAmB,oDAAoD,WAAW,GAAG,CACzF,CAAC;KACH;IAED,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE;QAC5C,MAAM,IAAI,KAAK,CACb,GAAG,kBAAkB,oDAAoD,UAAU,GAAG,CACvF,CAAC;KACH;IAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,kCAAkC,gBAAgB,EAAE,CAAC,CAAC;KACvE;IAED,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;QACjB,MAAM,IAAI,KAAK,CAAC,8BAA8B,YAAY,EAAE,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/**
|
|
4
|
-
* General constants
|
|
5
|
-
*/
|
|
6
|
-
exports.COMPRESSION_FORMAT_FLAGS = ['astc', 'etc', 'pvrtc', 's3tc'];
|
|
7
|
-
/**
|
|
8
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
9
|
-
* Compression tool: ASTCenc (https://github.com/ARM-software/astc-encoder)
|
|
10
|
-
* WebGL extension: https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/
|
|
11
|
-
*/
|
|
12
|
-
exports.ASTC = 'astc';
|
|
13
|
-
exports.IS_ASTC = process.argv.includes(exports.ASTC);
|
|
14
|
-
exports.ASTC_SUPPORTED_INPUT_TYPES = ['.jpeg', '.jpg', '.png', '.bmp', '.gif'];
|
|
15
|
-
exports.ASTC_SUPPORTED_OUTPUT_TYPES = ['.ktx'];
|
|
16
|
-
exports.ASTC_COMPRESSION_TYPES = [
|
|
17
|
-
'ASTC_4x4',
|
|
18
|
-
'ASTC_5x4',
|
|
19
|
-
'ASTC_5x5',
|
|
20
|
-
'ASTC_6x5',
|
|
21
|
-
'ASTC_6x6',
|
|
22
|
-
'ASTC_8x5',
|
|
23
|
-
'ASTC_8x6',
|
|
24
|
-
'ASTC_8x8',
|
|
25
|
-
'ASTC_10x5',
|
|
26
|
-
'ASTC_10x6',
|
|
27
|
-
'ASTC_10x8',
|
|
28
|
-
'ASTC_10x10',
|
|
29
|
-
'ASTC_12x10',
|
|
30
|
-
'ASTC_12x12',
|
|
31
|
-
'ASTC_3x3x3',
|
|
32
|
-
'ASTC_4x3x3',
|
|
33
|
-
'ASTC_4x4x3',
|
|
34
|
-
'ASTC_4x4x4',
|
|
35
|
-
'ASTC_5x4x4',
|
|
36
|
-
'ASTC_5x5x4',
|
|
37
|
-
'ASTC_5x5x5',
|
|
38
|
-
'ASTC_6x5x5',
|
|
39
|
-
'ASTC_6x6x5',
|
|
40
|
-
'ASTC_6x6x6',
|
|
41
|
-
];
|
|
42
|
-
exports.ASTC_QUALITY_TYPES = [
|
|
43
|
-
'astcveryfast',
|
|
44
|
-
'astcfast',
|
|
45
|
-
'astcmedium',
|
|
46
|
-
'astcthorough',
|
|
47
|
-
'astcexhaustive',
|
|
48
|
-
];
|
|
49
|
-
/**
|
|
50
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
51
|
-
* WebGL extension: https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/
|
|
52
|
-
*/
|
|
53
|
-
exports.ETC = 'etc';
|
|
54
|
-
exports.IS_ETC = process.argv.includes(exports.ETC);
|
|
55
|
-
exports.ETC_SUPPORTED_INPUT_TYPES = ['.jpeg', '.jpg', '.png', '.bmp'];
|
|
56
|
-
exports.ETC_SUPPORTED_OUTPUT_TYPES = ['.ktx'];
|
|
57
|
-
exports.ETC_COMPRESSION_TYPES = ['ETC1', 'ETC2_RGBA', 'ETC2_RGB'];
|
|
58
|
-
exports.ETC_QUALITY_TYPES = ['etcfast', 'etcslow', 'etcfastperceptual', 'etcslowperceptual'];
|
|
59
|
-
/**
|
|
60
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
61
|
-
* WebGL extension: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/
|
|
62
|
-
*/
|
|
63
|
-
exports.PVRTC = 'pvrtc';
|
|
64
|
-
exports.IS_PVRTC = process.argv.includes(exports.PVRTC);
|
|
65
|
-
exports.PVRTC_SUPPORTED_INPUT_TYPES = ['.jpeg', '.jpg', '.png', '.bmp'];
|
|
66
|
-
exports.PVRTC_SUPPORTED_OUTPUT_TYPES = ['.ktx'];
|
|
67
|
-
exports.PVRTC_COMPRESSION_TYPES = ['PVRTC1_2', 'PVRTC1_4', 'PVRTC1_2_RGB', 'PVRTC1_4_RGB'];
|
|
68
|
-
exports.PVRTC_QUALITY_TYPES = [
|
|
69
|
-
'pvrtcfastest',
|
|
70
|
-
'pvrtcfast',
|
|
71
|
-
'pvrtcnormal',
|
|
72
|
-
'pvrtchigh',
|
|
73
|
-
'pvrtcbest',
|
|
74
|
-
];
|
|
75
|
-
/**
|
|
76
|
-
* Compression tool: Crunch (https://github.com/BinomialLLC/crunch/blob/235946f7a1cf8b9c97e8bf0e8062d5439a51dec7/crunch/crunch.cpp#L70-L181)
|
|
77
|
-
* WebGL extension: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/
|
|
78
|
-
*/
|
|
79
|
-
exports.S3TC = 's3tc';
|
|
80
|
-
exports.IS_S3TC = process.argv.includes(exports.S3TC);
|
|
81
|
-
exports.S3TC_SUPPORTED_INPUT_TYPES = ['.jpeg', '.jpg', '.png', '.bmp', '.gif'];
|
|
82
|
-
exports.S3TC_SUPPORTED_OUTPUT_TYPES = ['.ktx'];
|
|
83
|
-
exports.S3TC_COMPRESSION_TYPES = ['DXT1', 'DXT1A', 'DXT3', 'DXT5'];
|
|
84
|
-
exports.S3TC_QUALITY_TYPES = ['superfast', 'fast', 'normal', 'better', 'uber'];
|
|
85
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../lib/constants.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACU,QAAA,wBAAwB,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEzE;;;;GAIG;AACU,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAI,CAAC,CAAC;AACtC,QAAA,0BAA0B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACvE,QAAA,2BAA2B,GAAG,CAAC,MAAM,CAAC,CAAC;AACvC,QAAA,sBAAsB,GAAG;IACpC,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;CACb,CAAC;AACW,QAAA,kBAAkB,GAAG;IAChC,cAAc;IACd,UAAU;IACV,YAAY;IACZ,cAAc;IACd,gBAAgB;CACjB,CAAC;AAEF;;;GAGG;AACU,QAAA,GAAG,GAAG,KAAK,CAAC;AACZ,QAAA,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAG,CAAC,CAAC;AACpC,QAAA,yBAAyB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC9D,QAAA,0BAA0B,GAAG,CAAC,MAAM,CAAC,CAAC;AACtC,QAAA,qBAAqB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;AAC1D,QAAA,iBAAiB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;AAElG;;;GAGG;AACU,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAK,CAAC,CAAC;AACxC,QAAA,2BAA2B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAChE,QAAA,4BAA4B,GAAG,CAAC,MAAM,CAAC,CAAC;AACxC,QAAA,uBAAuB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AACnF,QAAA,mBAAmB,GAAG;IACjC,cAAc;IACd,WAAW;IACX,aAAa;IACb,WAAW;IACX,WAAW;CACZ,CAAC;AAEF;;;GAGG;AACU,QAAA,IAAI,GAAG,MAAM,CAAC;AACd,QAAA,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAI,CAAC,CAAC;AACtC,QAAA,0BAA0B,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACvE,QAAA,2BAA2B,GAAG,CAAC,MAAM,CAAC,CAAC;AACvC,QAAA,sBAAsB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC3D,QAAA,kBAAkB,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
// Compressors
|
|
4
|
-
const compressWithCrunch_1 = require("./compressors/compressWithCrunch");
|
|
5
|
-
const compressWithPVRTexTool_1 = require("./compressors/compressWithPVRTexTool");
|
|
6
|
-
// Constants
|
|
7
|
-
const constants_1 = require("./constants");
|
|
8
|
-
/**
|
|
9
|
-
* Pack a texture into a GPU compressed texture format
|
|
10
|
-
*/
|
|
11
|
-
exports.pack = (CLIArgs) => {
|
|
12
|
-
let args;
|
|
13
|
-
if (!CLIArgs) {
|
|
14
|
-
args = require('./argsHandler').CLIArgs;
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
args = CLIArgs;
|
|
18
|
-
}
|
|
19
|
-
if (!args.type) {
|
|
20
|
-
throw new Error(`Supported compression formats: ${constants_1.COMPRESSION_FORMAT_FLAGS}`);
|
|
21
|
-
}
|
|
22
|
-
switch (args.type) {
|
|
23
|
-
case 'astc':
|
|
24
|
-
case 'etc':
|
|
25
|
-
case 'pvrtc':
|
|
26
|
-
return compressWithPVRTexTool_1.compressWithPVRTexTool(args);
|
|
27
|
-
case 's3tc':
|
|
28
|
-
return compressWithCrunch_1.compressWithCrunch(args);
|
|
29
|
-
default:
|
|
30
|
-
throw new Error(`Compression format: ${args.type} was not recognized`);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":";;AAGA,cAAc;AACd,yEAAsE;AACtE,iFAA8E;AAE9E,YAAY;AACZ,2CAAuD;AAEvD;;GAEG;AACU,QAAA,IAAI,GAAG,CAAC,OAAkB,EAAgB,EAAE;IACvD,IAAI,IAAc,CAAC;IAEnB,IAAI,CAAC,OAAO,EAAE;QACZ,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,OAAO,CAAC;KACzC;SAAM;QACL,IAAI,GAAG,OAAO,CAAC;KAChB;IAED,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,kCAAkC,oCAAwB,EAAE,CAAC,CAAC;KAC/E;IAED,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK,CAAC;QACX,KAAK,OAAO;YACV,OAAO,+CAAsB,CAAC,IAAI,CAAC,CAAC;QACtC,KAAK,MAAM;YACT,OAAO,uCAAkB,CAAC,IAAI,CAAC,CAAC;QAClC;YACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,IAAI,qBAAqB,CAAC,CAAC;KAC1E;AACH,CAAC,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// Native
|
|
7
|
-
const os_1 = require("os");
|
|
8
|
-
const path_1 = require("path");
|
|
9
|
-
// Vendor
|
|
10
|
-
// @ts-ignore
|
|
11
|
-
const image_size_1 = __importDefault(require("image-size"));
|
|
12
|
-
/**
|
|
13
|
-
* Get the /bin/ directory from the root of the project
|
|
14
|
-
*/
|
|
15
|
-
exports.getBinaryDirectory = () => path_1.join(__dirname, '../../../bin/', os_1.platform());
|
|
16
|
-
/**
|
|
17
|
-
* Get a file extension from a file path (without a file basename)
|
|
18
|
-
*
|
|
19
|
-
* @param filepath Input filepath
|
|
20
|
-
*/
|
|
21
|
-
exports.getFileExtension = (filepath) => path_1.parse(filepath).ext;
|
|
22
|
-
/**
|
|
23
|
-
* Get a file basename from a file path (without a file extension)
|
|
24
|
-
*
|
|
25
|
-
* @param filepath Input filepath
|
|
26
|
-
*/
|
|
27
|
-
exports.getFileName = (filepath) => path_1.basename(filepath, exports.getFileExtension(filepath));
|
|
28
|
-
/**
|
|
29
|
-
* Get image size
|
|
30
|
-
*
|
|
31
|
-
* @param filepath Path to image
|
|
32
|
-
*/
|
|
33
|
-
exports.getImageSize = (filepath) => image_size_1.default(filepath);
|
|
34
|
-
/**
|
|
35
|
-
* Get mip map levels based on initial value
|
|
36
|
-
*
|
|
37
|
-
* @param value Initial value
|
|
38
|
-
*/
|
|
39
|
-
exports.getMipChainLevels = (value) => Math.floor(Math.log2(value)) + 1;
|
|
40
|
-
/**
|
|
41
|
-
* Create flags out of custom flags passed in through the --flag parameter
|
|
42
|
-
*
|
|
43
|
-
* @param flags Array of flags to pass to the tool
|
|
44
|
-
*/
|
|
45
|
-
exports.createFlagsForTool = (flags) => flags.map(flag => `-${flag}`);
|
|
46
|
-
/**
|
|
47
|
-
* Split flag name and flag value passed in through the --flag parameter
|
|
48
|
-
*
|
|
49
|
-
* @param flags Array of flags to pass to the tool
|
|
50
|
-
*/
|
|
51
|
-
exports.splitFlagAndValue = (flags) => [].concat(...flags.map(flag => flag.split(' ')));
|
|
52
|
-
//# sourceMappingURL=utilities.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utilities.js","sourceRoot":"","sources":["../../../lib/utilities.ts"],"names":[],"mappings":";;;;;AAAA,SAAS;AACT,2BAA8B;AAC9B,+BAA6C;AAE7C,SAAS;AACT,aAAa;AACb,4DAAmC;AAEnC;;GAEG;AACU,QAAA,kBAAkB,GAAG,GAAW,EAAE,CAAC,WAAI,CAAC,SAAS,EAAE,eAAe,EAAE,aAAQ,EAAE,CAAC,CAAC;AAE7F;;;;GAIG;AACU,QAAA,gBAAgB,GAAG,CAAC,QAAgB,EAAU,EAAE,CAAC,YAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC;AAElF;;;;GAIG;AACU,QAAA,WAAW,GAAG,CAAC,QAAgB,EAAU,EAAE,CACtD,eAAQ,CAAC,QAAQ,EAAE,wBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAEjD;;;;GAIG;AACU,QAAA,YAAY,GAAG,CAAC,QAAgB,EAAqC,EAAE,CAClF,oBAAS,CAAC,QAAQ,CAAC,CAAC;AAEtB;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;AAE7F;;;;GAIG;AACU,QAAA,kBAAkB,GAAG,CAAC,KAAe,EAAY,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;AAE/F;;;;GAIG;AACU,QAAA,iBAAiB,GAAG,CAAC,KAAY,EAAY,EAAE,CAC1D,EAAE,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "texture-compressor",
|
|
3
|
-
"version": "1.0.2",
|
|
4
|
-
"description": "CLI tool for texture compression using ASTC, ETC, PVRTC and S3TC in a KTX container.",
|
|
5
|
-
"main": "dist/cli/lib/index.js",
|
|
6
|
-
"types": "dist/types/lib/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "tsc -w",
|
|
9
|
-
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'",
|
|
10
|
-
"prebuild": "rimraf dist",
|
|
11
|
-
"build": "tsc"
|
|
12
|
-
},
|
|
13
|
-
"bin": {
|
|
14
|
-
"texture-compressor": "./bin/texture-compressor.js"
|
|
15
|
-
},
|
|
16
|
-
"author": "Tim van Scherpenzeel",
|
|
17
|
-
"license": "MIT",
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"argparse": "^1.0.10",
|
|
20
|
-
"image-size": "^0.7.4"
|
|
21
|
-
},
|
|
22
|
-
"devDependencies": {
|
|
23
|
-
"@types/argparse": "^1.0.36",
|
|
24
|
-
"@types/node": "^12.0.2",
|
|
25
|
-
"prettier": "^1.17.1",
|
|
26
|
-
"rimraf": "^2.6.3",
|
|
27
|
-
"tslint": "^5.16.0",
|
|
28
|
-
"tslint-config-prettier": "^1.18.0",
|
|
29
|
-
"typescript": "^3.4.5"
|
|
30
|
-
},
|
|
31
|
-
"prettier": {
|
|
32
|
-
"semi": true,
|
|
33
|
-
"singleQuote": true,
|
|
34
|
-
"trailingComma": "es5",
|
|
35
|
-
"printWidth": 100
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ICLIArgs {
|
|
2
|
-
input: string;
|
|
3
|
-
output: string;
|
|
4
|
-
type: string;
|
|
5
|
-
compression: string;
|
|
6
|
-
quality: string;
|
|
7
|
-
mipmap?: boolean;
|
|
8
|
-
flipY?: boolean;
|
|
9
|
-
square?: string;
|
|
10
|
-
pot?: string;
|
|
11
|
-
flags?: string[] | null;
|
|
12
|
-
verbose?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare const CLIArgs: ICLIArgs;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ICLIArgs } from '../argsHandler';
|
|
2
|
-
/**
|
|
3
|
-
* Spawn a child process of a texture compression tool (e.g. PVRTexTool, Crunch)
|
|
4
|
-
*
|
|
5
|
-
* @param args Command line arguments
|
|
6
|
-
* @param flagMapping Flags to pass to the texture compression tool
|
|
7
|
-
* @param binaryName Name of the texture compression tool
|
|
8
|
-
*/
|
|
9
|
-
export declare const spawnProcess: (args: ICLIArgs, flagMapping: string[], binaryName: string) => Promise<any>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ICLIArgs } from '../argsHandler';
|
|
2
|
-
/**
|
|
3
|
-
* Validate if the passed in images are accepted by the compression tool
|
|
4
|
-
*
|
|
5
|
-
* @param args Command line arguments
|
|
6
|
-
* @param inputTypes List of valid input types
|
|
7
|
-
* @param outputTypes List of valid output types
|
|
8
|
-
* @param compressionTypes List of valid compression types
|
|
9
|
-
* @param qualityTypes List of valid quality types
|
|
10
|
-
*/
|
|
11
|
-
export declare const validateArgs: (args: ICLIArgs, inputTypes: string[], outputTypes: string[], compressionTypes: string[], qualityTypes: string[]) => void;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* General constants
|
|
3
|
-
*/
|
|
4
|
-
export declare const COMPRESSION_FORMAT_FLAGS: string[];
|
|
5
|
-
/**
|
|
6
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
7
|
-
* Compression tool: ASTCenc (https://github.com/ARM-software/astc-encoder)
|
|
8
|
-
* WebGL extension: https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_astc/
|
|
9
|
-
*/
|
|
10
|
-
export declare const ASTC = "astc";
|
|
11
|
-
export declare const IS_ASTC: boolean;
|
|
12
|
-
export declare const ASTC_SUPPORTED_INPUT_TYPES: string[];
|
|
13
|
-
export declare const ASTC_SUPPORTED_OUTPUT_TYPES: string[];
|
|
14
|
-
export declare const ASTC_COMPRESSION_TYPES: string[];
|
|
15
|
-
export declare const ASTC_QUALITY_TYPES: string[];
|
|
16
|
-
/**
|
|
17
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
18
|
-
* WebGL extension: https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc/
|
|
19
|
-
*/
|
|
20
|
-
export declare const ETC = "etc";
|
|
21
|
-
export declare const IS_ETC: boolean;
|
|
22
|
-
export declare const ETC_SUPPORTED_INPUT_TYPES: string[];
|
|
23
|
-
export declare const ETC_SUPPORTED_OUTPUT_TYPES: string[];
|
|
24
|
-
export declare const ETC_COMPRESSION_TYPES: string[];
|
|
25
|
-
export declare const ETC_QUALITY_TYPES: string[];
|
|
26
|
-
/**
|
|
27
|
-
* Compression tool: PVRTexTool (http://cdn.imgtec.com/sdk-documentation/PVRTexTool.User+Manual.pdf)
|
|
28
|
-
* WebGL extension: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/
|
|
29
|
-
*/
|
|
30
|
-
export declare const PVRTC = "pvrtc";
|
|
31
|
-
export declare const IS_PVRTC: boolean;
|
|
32
|
-
export declare const PVRTC_SUPPORTED_INPUT_TYPES: string[];
|
|
33
|
-
export declare const PVRTC_SUPPORTED_OUTPUT_TYPES: string[];
|
|
34
|
-
export declare const PVRTC_COMPRESSION_TYPES: string[];
|
|
35
|
-
export declare const PVRTC_QUALITY_TYPES: string[];
|
|
36
|
-
/**
|
|
37
|
-
* Compression tool: Crunch (https://github.com/BinomialLLC/crunch/blob/235946f7a1cf8b9c97e8bf0e8062d5439a51dec7/crunch/crunch.cpp#L70-L181)
|
|
38
|
-
* WebGL extension: http://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/
|
|
39
|
-
*/
|
|
40
|
-
export declare const S3TC = "s3tc";
|
|
41
|
-
export declare const IS_S3TC: boolean;
|
|
42
|
-
export declare const S3TC_SUPPORTED_INPUT_TYPES: string[];
|
|
43
|
-
export declare const S3TC_SUPPORTED_OUTPUT_TYPES: string[];
|
|
44
|
-
export declare const S3TC_COMPRESSION_TYPES: string[];
|
|
45
|
-
export declare const S3TC_QUALITY_TYPES: string[];
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get the /bin/ directory from the root of the project
|
|
3
|
-
*/
|
|
4
|
-
export declare const getBinaryDirectory: () => string;
|
|
5
|
-
/**
|
|
6
|
-
* Get a file extension from a file path (without a file basename)
|
|
7
|
-
*
|
|
8
|
-
* @param filepath Input filepath
|
|
9
|
-
*/
|
|
10
|
-
export declare const getFileExtension: (filepath: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Get a file basename from a file path (without a file extension)
|
|
13
|
-
*
|
|
14
|
-
* @param filepath Input filepath
|
|
15
|
-
*/
|
|
16
|
-
export declare const getFileName: (filepath: string) => string;
|
|
17
|
-
/**
|
|
18
|
-
* Get image size
|
|
19
|
-
*
|
|
20
|
-
* @param filepath Path to image
|
|
21
|
-
*/
|
|
22
|
-
export declare const getImageSize: (filepath: string) => {
|
|
23
|
-
width: number;
|
|
24
|
-
height: number;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Get mip map levels based on initial value
|
|
28
|
-
*
|
|
29
|
-
* @param value Initial value
|
|
30
|
-
*/
|
|
31
|
-
export declare const getMipChainLevels: (value: number) => number;
|
|
32
|
-
/**
|
|
33
|
-
* Create flags out of custom flags passed in through the --flag parameter
|
|
34
|
-
*
|
|
35
|
-
* @param flags Array of flags to pass to the tool
|
|
36
|
-
*/
|
|
37
|
-
export declare const createFlagsForTool: (flags: string[]) => string[];
|
|
38
|
-
/**
|
|
39
|
-
* Split flag name and flag value passed in through the --flag parameter
|
|
40
|
-
*
|
|
41
|
-
* @param flags Array of flags to pass to the tool
|
|
42
|
-
*/
|
|
43
|
-
export declare const splitFlagAndValue: (flags: any[]) => string[];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Recommended parameters
|
|
2
|
-
|
|
3
|
-
## ASTC
|
|
4
|
-
|
|
5
|
-
Usually I use `ASTC_4x4` or `ASTC_8x8` compression with quality `astcmedium`.
|
|
6
|
-
|
|
7
|
-
## ETC
|
|
8
|
-
|
|
9
|
-
Usually I use `ETC2_RGB` or `ETC2_RGBA` (with alpha channel) compression with quality `etcfast`.
|
|
10
|
-
|
|
11
|
-
## PVRTC
|
|
12
|
-
|
|
13
|
-
Usually I use `PVRTC1_4_RGB` or `PVRTC1_4` (with alpha channel) compression with quality `pvrtcnormal`.
|
|
14
|
-
|
|
15
|
-
## S3TC
|
|
16
|
-
|
|
17
|
-
Usually I use `DXT1`, `DXT1A` (with alpha channel) or `DXT5` compression with quality `normal`.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# Supported devices table
|
|
2
|
-
|
|
3
|
-
| Device | OS | OS version | Browser | Browser version | ASTC | ETC | ETC1 | S3TC | PVRTC |
|
|
4
|
-
| ----------------------- | ------- | ---------- | ------------- | --------------- | ---- | --- | ---- | ---- | ----- |
|
|
5
|
-
| Apple iPad 5th | iOS | 11.0.3 | Mobile Safari | 11.0 | | | | | X |
|
|
6
|
-
| Apple iPad Air 2 | iOS | 8.4 | Mobile Safari | 8.0 | | | | | X |
|
|
7
|
-
| Apple iPad Mini 3 | iOS | 8.1.2 | Mobile Safari | 8.0 | | | | | X |
|
|
8
|
-
| Apple iPad Pro | iOS | 11.2.1 | Mobile Safari | 11.0 | | | | | X |
|
|
9
|
-
| Apple iPhone 5S | iOS | 8.1.3 | Mobile Safari | 8.0 | | | | | X |
|
|
10
|
-
| Apple iPhone 6 Plus | iOS | 8.1 | Mobile Safari | 8.0 | | | | | X |
|
|
11
|
-
| Apple iPhone 6 | iOS | 8.1.3 | Mobile Safari | 8.0 | | | | | X |
|
|
12
|
-
| Apple iPhone 6S Plus | iOS | 9.0.1 | Mobile Safari | 9.0 | | | | | X |
|
|
13
|
-
| Apple iPhone 6S | iOS | 9.1 | Mobile Safari | 9.0 | | | | | X |
|
|
14
|
-
| Apple iPhone 7 | iOS | 10.3.1 | Mobile Safari | 10.0 | | | | | X |
|
|
15
|
-
| Apple iPhone 8 | iOS | 11.0 | Mobile Safari | 11.0 | | | | | X |
|
|
16
|
-
| Apple iPhone 8 | iOS | 11.0 | Mobile Safari | 11.0 | | | | | X |
|
|
17
|
-
| Apple iPhone SE | iOS | 11.2.1 | Mobile Safari | 11.0 | | | | | X |
|
|
18
|
-
| Apple iPhone X | iOS | 11.2 | Mobile Safari | 11.0 | | | | | X |
|
|
19
|
-
| Google Nexus 5X | Android | 7.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
20
|
-
| Google Nexus 6P | Android | 7.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
21
|
-
| Google Pixel 2 | Android | 8.0.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
22
|
-
| Google Pixel 2 | Android | 8.0.0 | Firefox | 51.0 | | X | X | | |
|
|
23
|
-
| Google Pixel | Android | 7.1 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
24
|
-
| Google Pixel | Android | 8.0.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
25
|
-
| Google Pixel | Android | 8.0.0 | Firefox | 51.0 | | X | X | | |
|
|
26
|
-
| LG G5 | Android | 6.0.1 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
27
|
-
| MacOS High Sierra | Mac OS | 10.13.3 | Chrome | 65.0.3325.181 | | | | X | |
|
|
28
|
-
| MacOS High Sierra | Mac OS | 10.13 | Firefox | 59.0 | | | | X | |
|
|
29
|
-
| MacOS High Sierra | Mac OS | 10.13.3 | Safari | 11.0.3 | | | | X | |
|
|
30
|
-
| Motorola Moto X 2nd Gen | Android | 6.0 | Chrome | 63.0.3239.111 | | | X | | |
|
|
31
|
-
| Oculus Go | Android | 7.1.2 | Oculus | 4.5.1.108860099 | X | X | X | | |
|
|
32
|
-
| Samsung S6 | Android | 5.0.2 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
33
|
-
| Samsung S7 | Android | 6.0.1 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
34
|
-
| Samsung S7 | Android | 6.0.1 | Firefox | 51.0 | | X | X | | |
|
|
35
|
-
| Samsung S8 | Android | 7.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
36
|
-
| Samsung S8 | Android | 7.0 | Firefox | 51.0 | | X | X | | |
|
|
37
|
-
| Samsung S8+ | Android | 7.0 | Chrome | 63.0.3239.111 | X | | X | | |
|
|
38
|
-
| Samsung S8+ | Android | 7.0 | Firefox | 51.0 | | X | X | | |
|
|
39
|
-
| Windows 10 | Windows | 10 | Chrome | 65.0.3325.146 | | | X | X | |
|
|
40
|
-
| Windows 10 | Windows | 10 | Edge | 14.14393 | | | | X | |
|
|
41
|
-
| Windows 10 | Windows | 10 | Edge | 15.15063 | | | | X | |
|
|
42
|
-
| Windows 10 | Windows | 10 | Edge | 16.16299 | | | | X | |
|
|
43
|
-
| Windows 10 | Windows | 10 | Firefox | 59.0 | | | | X | |
|
|
44
|
-
| Windows 10 | Windows | 10 | IE | 11.0 | | | | X | |
|
|
45
|
-
| Windows 7 | Windows | 7 | IE | 10.0 | | | | | |
|
|
46
|
-
| Windows 7 | Windows | 7 | IE | 11.0 | | | | X | |
|
|
47
|
-
| Windows 8 | Windows | 8 | IE | 10.0 | | | | | |
|