feat: pvr parser

This commit is contained in:
TrèsAbhi committed 2023-12-29 19:56:50 -06:00
1 parent 12ee9d381d
commit 376b3f04e5
5 files changed
+264 -47

No files matched your search

+8 -3
View File
@@ -93,15 +93,19 @@ export async function extractModel(
);
}
if (textures.baseNormalMap) {
if (textures.baseNormalMap ?? textures.normalmap) {
const isBase = textures.baseNormalMap !== undefined;
material.setNormalTexture(
document
.createTexture(node.materialName)
.setMimeType('image/png')
.setImage(
await readTexture(
`${data}/3d/${dirname(path)}/${textures.baseNormalMap}`,
{ mutation: TextureMutation.Normal },
`${data}/3d/${dirname(path)}/${
textures.baseNormalMap ?? textures.normalmap
}`,
isBase ? { mutation: TextureMutation.Normal } : undefined,
),
),
);
@@ -146,6 +150,7 @@ export async function extractModel(
case 'DecorItemComponent':
case 'NewSlotComponent':
case 'StateSwitcherComponent':
case 'CustomPropertiesComponent':
case 'SlotComponent':
break;