mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
24 lines (21 loc) • 537 B
text/typescript
/**
* A block.
*/
export default class Block {
offset: number = 0;
compressedSize: number = 0;
normalSize: number = 0;
flags: number = 0;
load(typedArray: Uint32Array) {
this.offset = typedArray[0];
this.compressedSize = typedArray[1];
this.normalSize = typedArray[2];
this.flags = typedArray[3];
}
save(typedArray: Uint32Array) {
typedArray[0] = this.offset;
typedArray[1] = this.compressedSize;
typedArray[2] = this.normalSize;
typedArray[3] = this.flags;
}
}