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) 392 B
import BinaryStream from '../../../common/binarystream'; /** * An inventory item. */ export default class InventoryItem { slot: number = 0; id: string = '\0\0\0\0'; load(stream: BinaryStream) { this.slot = stream.readInt32(); this.id = stream.read(4); } save(stream: BinaryStream) { stream.writeInt32(this.slot); stream.write(this.id); } }