mdx-m3-viewer
Version:
A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.
19 lines (15 loc) • 391 B
text/typescript
/**
* war3map.shd - the shadow file.
*/
export default class War3MapShd {
shadows: Uint8Array = new Uint8Array(0);
load(buffer: ArrayBuffer, width: number, height: number) {
this.shadows = new Uint8Array(buffer.slice(0, width * height * 16));
}
save() {
return this.shadows.slice().buffer;
}
getByteLength() {
return this.shadows.length;
}
}