feat: more game parity x2

This commit is contained in:
TrèsAbhi committed 2023-12-29 13:01:45 -06:00
1 parent b90938108a
commit 12ee9d381d
4 files changed
+17 -4

No files matched your search

+2
View File
@@ -141,9 +141,11 @@ export async function extractModel(
components.forEach((component) => {
switch (component['comp.typename']) {
case 'ScenarioComponent':
case 'LodComponent':
case 'DecorItemComponent':
case 'NewSlotComponent':
case 'StateSwitcherComponent':
case 'SlotComponent':
break;
+3 -3
View File
@@ -74,9 +74,9 @@ export async function readTexture(path: string, options?: ReadTextureOptions) {
const b = dds.data[index + 2] / 255;
const a = dds.data[index + 3] / 255;
const invA = 1 - a;
const rPrime = invA * options.baseColor[0] + r;
const gPrime = invA * options.baseColor[1] + g;
const bPrime = invA * options.baseColor[2] + b;
const rPrime = r + invA * options.baseColor[0];
const gPrime = g + invA * options.baseColor[1];
const bPrime = b + invA * options.baseColor[2];
dds.data[index] = Math.round(clamp(rPrime * 255, 0, 255));
dds.data[index + 1] = Math.round(clamp(gPrime * 255, 0, 255));
+10 -1
View File
@@ -168,7 +168,16 @@ export type Component =
};
};
};
};
}
| {
'comp.typename': 'ScenarioComponent';
'scenario.scriptId': string;
}
| ({
'comp.typename': 'StateSwitcherComponent';
'ssc.activeState': number;
'ssc.statesCount': number;
} & Record<`ssc.state${number}`, string>);
interface SceneComponents {
count: number;