UNPKG
nlump
Version:
latest (0.2.3)
0.2.3
0.2.2
0.2.1
0.2.0
0.1.1
0.1.0
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
Work with lumps from a WAD file as used by Doom et al
github.com/nrkn/nlump
nrkn/nlump
nlump
/
readers
/
flat.js
17 lines
(11 loc)
•
260 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
module
.
exports
=
buffer
=>
{
const
width =
64
const
height =
64
const
pixels = []
const
count = width * height
for
(
var
i =
0
; i < count; i++ ){ pixels.
push
( buffer.
readUInt8
( i ) ) }
return
pixels }