feat: generalization x3

This commit is contained in:
TrèsAbhi committed 2023-12-28 13:11:52 -06:00
1 parent 2b81c71c5a
commit def75da1d8
2 files changed
+76 -77

No files matched your search

+1 -2
View File
@@ -3,12 +3,11 @@ import { readDVPLFile } from '../blitz/readDVPLFile';
import { DdsStream } from '../streams/dds';
export async function readTexture(path: string) {
console.log(path);
const ddsTexturePath = path.replace('.tex', '.dx11.dds.dvpl');
const decompressedDvpl = await readDVPLFile(ddsTexturePath);
const stream = new DdsStream(decompressedDvpl);
const ddsRaw = await stream.dds();
const png = await sharp(ddsRaw.data, { raw: ddsRaw }).png().toBuffer();
return png;