|
|
@@ -189,11 +189,9 @@ export class KTX2FileReader {
|
|
|
}
|
|
|
|
|
|
if (header.faceCount > 1) {
|
|
|
- //throw new Error(`Failed to parse KTX2 file - Cube textures are not currently supported.`);
|
|
|
+ throw new Error(`Failed to parse KTX2 file - Cube textures are not currently supported.`);
|
|
|
}
|
|
|
|
|
|
- console.log(header);
|
|
|
-
|
|
|
offsetInFile += hdrReader.byteOffset;
|
|
|
|
|
|
/**
|
|
|
@@ -215,8 +213,6 @@ export class KTX2FileReader {
|
|
|
|
|
|
offsetInFile += levelReader.byteOffset;
|
|
|
|
|
|
- console.log(levels);
|
|
|
-
|
|
|
/**
|
|
|
* Get the data format descriptor (DFD) blocks
|
|
|
*/
|
|
|
@@ -275,14 +271,6 @@ export class KTX2FileReader {
|
|
|
dfdBlock.samples.push(sample);
|
|
|
}
|
|
|
|
|
|
- console.log(dfdBlock);
|
|
|
-
|
|
|
- /*if (header.vkFormat !== KhronosTextureContainer2.VK_FORMAT_UNDEFINED &&
|
|
|
- !(header.supercompressionScheme === supercompressionScheme.BasisLZ ||
|
|
|
- dfdBlock.colorModel === dfdModel.UASTC)) {
|
|
|
- throw new Error(`Failed to upload - Only Basis Universal supercompression is currently supported.`);
|
|
|
- }*/
|
|
|
-
|
|
|
/**
|
|
|
* Get the Supercompression Global Data (sgd)
|
|
|
*/
|
|
|
@@ -322,8 +310,6 @@ export class KTX2FileReader {
|
|
|
sgd.extendedData = new Uint8Array(this._data.buffer, extendedByteOffset, sgd.extendedByteLength);
|
|
|
}
|
|
|
|
|
|
- console.log("sgd", sgd);
|
|
|
-
|
|
|
}
|
|
|
|
|
|
private _getImageCount(): number {
|