UNPKG

mdx-m3-viewer

Version:

A browser WebGL model viewer. Mainly focused on models of the games Warcraft 3 and Starcraft 2.

24 lines (19 loc) 448 B
import BinaryStream from '../../../common/binarystream'; /** * A map order. */ export default class MapOrder { u1: number = 0; path: string = ''; load(stream: BinaryStream) { this.u1 = stream.readInt8(); this.path = stream.readUntilNull(); } save(stream: BinaryStream) { stream.writeInt8(this.u1); stream.write(`${this.path}\0`); } getByteLength() { return 2 + this.path.length; } }