feat: cleanup

This commit is contained in:
TrèsAbhi committed 2023-12-10 17:14:05 -06:00
1 parent d18cf625d0
commit 483b625f2d
2 files changed
+5 -14

No files matched your search

+2 -2
View File
@@ -314,8 +314,8 @@ if (allTargets || targets?.includes('tankModels')) {
const scgStream = await SCPGStream.fromDVPLFile( const scgStream = await SCPGStream.fromDVPLFile(
`${DATA}/${DOI['3d']}/${scgPath}.dvpl`, `${DATA}/${DOI['3d']}/${scgPath}.dvpl`,
); );
const sc2Data = sc2Stream.consumeSC2(); const sc2 = sc2Stream.consumeSC2();
const scgData = scgStream.consumeSCG(); const scg = scgStream.consumeSCG();
} }
}), }),
); );
+3 -12
View File
@@ -81,14 +81,8 @@ interface PolygonGroup extends Omit<PolygonGroupRaw, 'indices'> {
} }
const VECTOR_SIZES = [ const VECTOR_SIZES = [
[VertexType.COLOR, VertexType.FLEXIBILITY, VertexType.HARD_JOINTINDEX],
[ [
// vector 1; basically array of 1 number
VertexType.COLOR,
VertexType.FLEXIBILITY,
VertexType.HARD_JOINTINDEX,
],
[
// vector 2; 2d vector
VertexType.TEXCOORD0, VertexType.TEXCOORD0,
VertexType.TEXCOORD1, VertexType.TEXCOORD1,
VertexType.TEXCOORD2, VertexType.TEXCOORD2,
@@ -96,10 +90,9 @@ const VECTOR_SIZES = [
VertexType.ANGLE_SIN_COS, VertexType.ANGLE_SIN_COS,
], ],
[ [
// vector 3; 3d vector
VertexType.VERTEX, VertexType.VERTEX,
VertexType.NORMAL, VertexType.NORMAL,
// VertexType.TANGENT, MOVED TO 4 // VertexType.TANGENT, // moved to 4
VertexType.BINORMAL, VertexType.BINORMAL,
VertexType.CUBETEXCOORD0, VertexType.CUBETEXCOORD0,
VertexType.CUBETEXCOORD1, VertexType.CUBETEXCOORD1,
@@ -107,17 +100,15 @@ const VECTOR_SIZES = [
VertexType.CUBETEXCOORD3, VertexType.CUBETEXCOORD3,
], ],
[ [
// vector 4; 4d vector or something more complex
VertexType.TANGENT, // UNCONFIRMED
VertexType.PIVOT4, VertexType.PIVOT4,
VertexType.JOINTINDEX, VertexType.JOINTINDEX,
VertexType.JOINTWEIGHT, VertexType.JOINTWEIGHT,
VertexType.TANGENT, // moved from 3
], ],
]; ];
export class SCPGStream { export class SCPGStream {
public index = 0; public index = 0;
constructor(public buffer: Buffer) {} constructor(public buffer: Buffer) {}
skip(size: number) { skip(size: number) {