fix: i hate ai copilots doing binary

This commit is contained in:
TrèsAbhi committed 2023-12-28 17:55:47 -06:00
1 parent ce4f7a55b6
commit fdd8aac017
2 files changed
+54 -45

No files matched your search

+1
View File
@@ -6,6 +6,7 @@ export async function readTexture(path: string) {
const ddsTexturePath = path.replace('.tex', '.dx11.dds.dvpl');
const decompressedDvpl = await readDVPLFile(ddsTexturePath);
const stream = new DdsStream(decompressedDvpl);
console.log('Reading', ddsTexturePath);
const ddsRaw = await stream.dds();
return await sharp(ddsRaw.data, { raw: ddsRaw }).png().toBuffer();