Handbook
Glossary
read-mtl ( file -- material-dictionary )
Vocabulary
game
.
models
.
obj
.
private
Inputs
file
a
pathname
Outputs
material-dictionary
an
assoc
Word description
Read the specified material file and generate a material dictionary keyed by material name.
Definition
USING:
io.encodings.ascii
io.files
kernel
make
namespaces
sequences
;
IN:
game.models.obj.private
:
read-mtl
( file -- material-dictionary )
[
f
current-material
,,
H{
}
clone
material-dictionary
,,
]
H{
}
make
[
ascii
file-lines
[
line>mtl
]
each
md
]
with-variables
;