0.2.0 • Published 7 months ago

typewad v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

typewad

Doom1 WAD parser

Using

import fs from 'fs';
import { WadReader, WadMap, WadMapLump } from 'typewad';

(async () => {
  const buffer = fs.readFileSync('test/dyst2.wad');
  const reader = new WadReader(buffer);
  const map = new WadMap(reader, 'MAP01');

  let i = 0;
  for (const thing of map.get(WadMapLump.Things)) {
    console.log(`[Thing ${i++}] type: ${thing.type}, x: ${thing.x}, y: ${thing.y}, angle: ${thing.angle} flags: ${thing.flags}`);
  }
})();
0.2.0

7 months ago

0.1.0

7 months ago