Handbook
Glossary
line>obj ( line -- )
Vocabulary
game
.
models
.
obj
.
private
Inputs
line
a
string
Outputs
None
Word description
Process a line from the object file within the current parsing context.
Definition
USING:
assocs
combinators
kernel
namespaces
sequences
;
IN:
game.models.obj.private
:
line>obj
( line -- )
split-string
[
unclip
{
{
"mtllib"
[
first
read-mtl
material-dictionary
set
]
}
{
"v"
[
strings>numbers
3
head
vp
[
push*
]
change
]
}
{
"vt"
[
strings>numbers
2
head
vt
[
push*
]
change
]
}
{
"vn"
[
strings>numbers
3
head
vn
[
push*
]
change
]
}
{
"usemtl"
[
push-current-model
first
md
at
current-material
set
]
}
{
"f"
[
strings>faces
face>aos
[
~quotation~
each
]
each
]
}
[
2drop
]
}
case
]
unless-empty
;