feat: code split build assets

This commit is contained in:
TrèsAbhi committed 2024-01-07 20:07:45 -06:00
1 parent 5a25f335cd
commit 1f39ecefe4
11 files changed
+492 -375

No files matched your search

+4 -2
View File
@@ -43,7 +43,7 @@ const omitMeshNames = {
export async function extractModel(
data: string,
path: string,
baseColor: Vector3Tuple,
baseColor?: Vector3Tuple,
) {
const sc2Path = `${data}/3d/${path}.sc2.dvpl`;
const scgPath = `${data}/3d/${path}.scg.dvpl`;
@@ -85,7 +85,9 @@ export async function extractModel(
.setImage(
await readTexture(
`${data}/3d/${dirname(path)}/${textures.albedo}`,
{ mutation: TextureMutation.BaseColor, baseColor },
baseColor
? { mutation: TextureMutation.BaseColor, baseColor }
: undefined,
),
),
);