mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: kit 3
This commit is contained in:
1 parent
e53bdd8e19
commit
051997d2d3
21 files changed
+105
-96
No files matched your search
@@ -3,7 +3,7 @@ import { IndividualTankStats } from '../../types/tanksStats';
|
||||
import { AllStats } from '../blitz/getAccountInfo';
|
||||
import { ReadStream, WriteStream } from './buffer';
|
||||
|
||||
export interface BlitzrinthTankStats extends AllStats {
|
||||
export interface BlitzkitTankStats extends AllStats {
|
||||
id: number;
|
||||
battle_life_time: number;
|
||||
last_battle_time: number;
|
||||
@@ -123,7 +123,7 @@ export class RtscReadStream extends ReadStream {
|
||||
win_and_survived: this.uint32(),
|
||||
wins: this.uint32(),
|
||||
xp: this.uint32(),
|
||||
} satisfies BlitzrinthTankStats;
|
||||
} satisfies BlitzkitTankStats;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,10 +16,10 @@ interface PolygonGroupRaw {
|
||||
vertices: ArrayBuffer;
|
||||
}
|
||||
|
||||
type BlitzrinthVertex = { attribute: VertexAttribute; value: number[] }[];
|
||||
type BlitzkitVertex = { attribute: VertexAttribute; value: number[] }[];
|
||||
|
||||
interface BlitzrinthPolygonGroup {
|
||||
vertices: BlitzrinthVertex[];
|
||||
interface BlitzkitPolygonGroup {
|
||||
vertices: BlitzkitVertex[];
|
||||
indices: number[];
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ export class ScgReadStream extends ScpgReadStream {
|
||||
scg() {
|
||||
const header = this.header();
|
||||
const polygonGroupsRaw: PolygonGroupRaw[] = [];
|
||||
const polygonGroups = new Map<bigint, BlitzrinthPolygonGroup>();
|
||||
const polygonGroups = new Map<bigint, BlitzkitPolygonGroup>();
|
||||
|
||||
for (let index = 0; index < header.nodeCount; index++) {
|
||||
const polygonGroupRaw = this.ka() as PolygonGroupRaw;
|
||||
@@ -83,7 +83,7 @@ export class ScgReadStream extends ScpgReadStream {
|
||||
}
|
||||
|
||||
const verticesStream = new ScpgReadStream(polygonGroupRaw.vertices);
|
||||
const vertices: BlitzrinthVertex[] = [];
|
||||
const vertices: BlitzkitVertex[] = [];
|
||||
const { format, stride } = ScgReadStream.parseVertexFormat(
|
||||
polygonGroupRaw.vertexFormat,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user