From 483b625f2db4d1ce85ce3f51ad382b77d87cb2a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Sun, 10 Dec 2023 17:14:05 -0600 Subject: [PATCH] feat: cleanup --- scripts/buildAssets.ts | 4 ++-- src/core/blitz/SCPGStream.ts | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/scripts/buildAssets.ts b/scripts/buildAssets.ts index dd428e460..8d143790d 100644 --- a/scripts/buildAssets.ts +++ b/scripts/buildAssets.ts @@ -314,8 +314,8 @@ if (allTargets || targets?.includes('tankModels')) { const scgStream = await SCPGStream.fromDVPLFile( `${DATA}/${DOI['3d']}/${scgPath}.dvpl`, ); - const sc2Data = sc2Stream.consumeSC2(); - const scgData = scgStream.consumeSCG(); + const sc2 = sc2Stream.consumeSC2(); + const scg = scgStream.consumeSCG(); } }), ); diff --git a/src/core/blitz/SCPGStream.ts b/src/core/blitz/SCPGStream.ts index ae6e5cb0b..1ac7f6c71 100644 --- a/src/core/blitz/SCPGStream.ts +++ b/src/core/blitz/SCPGStream.ts @@ -81,14 +81,8 @@ interface PolygonGroup extends Omit { } 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.TEXCOORD1, VertexType.TEXCOORD2, @@ -96,10 +90,9 @@ const VECTOR_SIZES = [ VertexType.ANGLE_SIN_COS, ], [ - // vector 3; 3d vector VertexType.VERTEX, VertexType.NORMAL, - // VertexType.TANGENT, MOVED TO 4 + // VertexType.TANGENT, // moved to 4 VertexType.BINORMAL, VertexType.CUBETEXCOORD0, VertexType.CUBETEXCOORD1, @@ -107,17 +100,15 @@ const VECTOR_SIZES = [ VertexType.CUBETEXCOORD3, ], [ - // vector 4; 4d vector or something more complex - VertexType.TANGENT, // UNCONFIRMED VertexType.PIVOT4, VertexType.JOINTINDEX, VertexType.JOINTWEIGHT, + VertexType.TANGENT, // moved from 3 ], ]; export class SCPGStream { public index = 0; - constructor(public buffer: Buffer) {} skip(size: number) {