mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: generalization x3
This commit is contained in:
1 parent
2b81c71c5a
commit
def75da1d8
2 files changed
+76
-77
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user