UNPKG

mdx-m3-viewer

Version:

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

20 lines (16 loc) 391 B
import BinaryStream from '../../../common/binarystream'; /** * A random item. */ export default class RandomItem { chance: number = 0; id: string = '\0\0\0\0'; load(stream: BinaryStream) { this.chance = stream.readInt32(); this.id = stream.read(4); } save(stream: BinaryStream) { stream.writeInt32(this.chance); stream.write(this.id); } }