@loaders.gl/textures 4.3.0-alpha.7 → 4.3.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/dist/basis-loader.d.ts +1 -1
- package/dist/basis-loader.d.ts.map +1 -1
- package/dist/basis-loader.js +1 -1
- package/dist/basis-worker-node.js +51 -30
- package/dist/basis-worker.js +2 -2
- package/dist/compressed-texture-loader.d.ts.map +1 -1
- package/dist/compressed-texture-loader.js +1 -1
- package/dist/compressed-texture-worker.js +3 -6
- package/dist/crunch-loader.d.ts.map +1 -1
- package/dist/crunch-worker.js +2 -2
- package/dist/dist.dev.js +1 -4
- package/dist/dist.min.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +2 -2
- package/dist/ktx2-basis-writer-worker-node.js +51 -30
- package/dist/ktx2-basis-writer-worker.js +2 -2
- package/dist/lib/parsers/parse-basis.d.ts +1 -1
- package/dist/lib/parsers/parse-basis.d.ts.map +1 -1
- package/dist/lib/parsers/parse-basis.js +1 -1
- package/dist/lib/utils/version.js +1 -1
- package/dist/npy-loader.d.ts.map +1 -1
- package/dist/npy-worker.js +1 -1
- package/package.json +7 -7
- package/src/basis-loader.ts +1 -1
- package/src/compressed-texture-loader.ts +1 -1
- package/src/lib/parsers/parse-basis.ts +1 -1
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
);
|
|
11
11
|
globalThis._loadersgl_.version = NPM_TAG;
|
|
12
12
|
} else {
|
|
13
|
-
globalThis._loadersgl_.version = "4.3.0-alpha.
|
|
13
|
+
globalThis._loadersgl_.version = "4.3.0-alpha.8";
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
return globalThis._loadersgl_.version;
|
|
@@ -249,7 +249,7 @@
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
// src/lib/utils/version.ts
|
|
252
|
-
var VERSION2 = true ? "4.3.0-alpha.
|
|
252
|
+
var VERSION2 = true ? "4.3.0-alpha.8" : "latest";
|
|
253
253
|
|
|
254
254
|
// src/lib/parsers/basis-module-loader.ts
|
|
255
255
|
var BASIS_EXTERNAL_LIBRARIES = {
|
|
@@ -6,7 +6,7 @@ export type BasisFormat = 'etc1' | 'etc2' | 'bc1' | 'bc3' | 'bc4' | 'bc5' | 'bc7
|
|
|
6
6
|
* @param options
|
|
7
7
|
* @returns compressed texture data
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export declare function parseBasis(data: ArrayBuffer, options: any): Promise<TextureLevel[][]>;
|
|
10
10
|
/**
|
|
11
11
|
* Select transcode format from the list of supported formats
|
|
12
12
|
* @returns key for OutputFormat map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-basis.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-basis.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAMrD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,oBAAoB,GACpB,QAAQ,GACR,cAAc,GACd,eAAe,GACf,UAAU,GACV,SAAS,GACT,6BAA6B,GAC7B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAoDf;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"parse-basis.d.ts","sourceRoot":"","sources":["../../../src/lib/parsers/parse-basis.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAMrD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,oBAAoB,GACpB,QAAQ,GACR,cAAc,GACd,eAAe,GACf,UAAU,GACV,SAAS,GACT,6BAA6B,GAC7B,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAoDf;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,KAAA,GAAG,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAwBtF;AA6KD;;;GAGG;AACH,wBAAgB,0BAA0B,IACtC,WAAW,GACX;IACE,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;CACtB,CAoBJ"}
|
|
@@ -54,7 +54,7 @@ const OutputFormat = {
|
|
|
54
54
|
* @param options
|
|
55
55
|
* @returns compressed texture data
|
|
56
56
|
*/
|
|
57
|
-
export
|
|
57
|
+
export async function parseBasis(data, options) {
|
|
58
58
|
if (options.basis.containerFormat === 'auto') {
|
|
59
59
|
if (isKTX(data)) {
|
|
60
60
|
const fileConstructors = await loadBasisEncoderModule(options);
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// Version constant cannot be imported, it needs to correspond to the build version of **this** module.
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
export const VERSION = typeof "4.3.0-alpha.
|
|
7
|
+
export const VERSION = typeof "4.3.0-alpha.8" !== 'undefined' ? "4.3.0-alpha.8" : 'latest';
|
package/dist/npy-loader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npy-loader.d.ts","sourceRoot":"","sources":["../src/npy-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,mCAAgC;AAK1D,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,gCAAgC;IAChC,GAAG,CAAC,EAAE;QACJ,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"npy-loader.d.ts","sourceRoot":"","sources":["../src/npy-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAEtF,OAAO,EAAC,QAAQ,EAAE,OAAO,EAAC,mCAAgC;AAK1D,gCAAgC;AAChC,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,gCAAgC;IAChC,GAAG,CAAC,EAAE;QACJ,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;uBACD,OAAO;wBACb,KAAK;;;;;;;;;;;;CAamC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,SAAS;;kCAGO,WAAW,YAAY,aAAa;uBAtBtC,OAAO;wBACb,KAAK;;;;;;;;;;;;CAsBuC,CAAC"}
|
package/dist/npy-worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/textures",
|
|
3
|
-
"version": "4.3.0-
|
|
3
|
+
"version": "4.3.0-beta.1",
|
|
4
4
|
"description": "Framework-independent loaders for compressed and super compressed (basis) textures ",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
"build-crunch-worker": "esbuild src/workers/crunch-worker.ts --outfile=dist/crunch-worker.js --target=esnext --bundle --define:__VERSION__=\\\"$npm_package_version\\\""
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@loaders.gl/images": "4.3.0-
|
|
58
|
-
"@loaders.gl/loader-utils": "4.3.0-
|
|
59
|
-
"@loaders.gl/schema": "4.3.0-
|
|
60
|
-
"@loaders.gl/worker-utils": "4.3.0-
|
|
61
|
-
"@math.gl/types": "^4.0
|
|
57
|
+
"@loaders.gl/images": "4.3.0-beta.1",
|
|
58
|
+
"@loaders.gl/loader-utils": "4.3.0-beta.1",
|
|
59
|
+
"@loaders.gl/schema": "4.3.0-beta.1",
|
|
60
|
+
"@loaders.gl/worker-utils": "4.3.0-beta.1",
|
|
61
|
+
"@math.gl/types": "^4.1.0",
|
|
62
62
|
"ktx-parse": "^0.7.0",
|
|
63
63
|
"texture-compressor": "^1.0.2"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@loaders.gl/core": "^4.0.0"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "992d24e7d4e3015a91fa1cbfe87ee7dc1b333322"
|
|
69
69
|
}
|
package/src/basis-loader.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type {Loader, LoaderOptions, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
6
6
|
import type {TextureLevel} from '@loaders.gl/schema';
|
|
7
7
|
import {VERSION} from './lib/utils/version';
|
|
8
|
-
import parseBasis from './lib/parsers/parse-basis';
|
|
8
|
+
import {parseBasis} from './lib/parsers/parse-basis';
|
|
9
9
|
|
|
10
10
|
/** Options for the BasisLoader */
|
|
11
11
|
export type BasisLoaderOptions = LoaderOptions & {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import type {Loader, LoaderWithParser} from '@loaders.gl/loader-utils';
|
|
6
6
|
import {VERSION} from './lib/utils/version';
|
|
7
7
|
import {parseCompressedTexture} from './lib/parsers/parse-compressed-texture';
|
|
8
|
-
import parseBasis from './lib/parsers/parse-basis';
|
|
8
|
+
import {parseBasis} from './lib/parsers/parse-basis';
|
|
9
9
|
|
|
10
10
|
/** Options for the CompressedTextureLoader */
|
|
11
11
|
export type CompressedTextureLoaderOptions = {
|
|
@@ -84,7 +84,7 @@ const OutputFormat: Record<string, BasisOutputOptions> = {
|
|
|
84
84
|
* @param options
|
|
85
85
|
* @returns compressed texture data
|
|
86
86
|
*/
|
|
87
|
-
export
|
|
87
|
+
export async function parseBasis(data: ArrayBuffer, options): Promise<TextureLevel[][]> {
|
|
88
88
|
if (options.basis.containerFormat === 'auto') {
|
|
89
89
|
if (isKTX(data)) {
|
|
90
90
|
const fileConstructors = await loadBasisEncoderModule(options);
|