Handbook
Glossary
papier-world
Vocabulary
papier
Definition
USING:
arrays
game.worlds
hashtables
images
papier.render
;
IN:
papier
TUPLE:
papier-world
<
game-world
{
slabs
array
initial:
{
}
}
{
slabs-by-name
hashtable
initial:
H{
}
}
{
slab-images
hashtable
initial:
H{
}
}
{
atlas
image
initial:
T{
image
}
}
{
uniforms
papier-uniforms
initial:
T{
papier-uniforms
}
}
{
renderer
papier-renderer
initial:
T{
papier-renderer
}
}
;
Methods
USING:
accessors
game.worlds
gpu
gpu.textures
images
kernel
papier
papier.render
;
M:
papier-world
begin-game-world
init-gpu
set-papier-state
<papier-renderer>
>>renderer
load-slabs
>>slabs
load-images
[
>>slab-images
]
[
>>atlas
]
bi*
papier-uniforms
new
over
dim4
fov
near-plane
far-plane
<p-matrix>
>>p_matrix
eye
>>eye
RGBA
ubyte-components
T{
texture-parameters
{
min-mipmap-filter
f
}
}
<texture-2d>
>>atlas
>>uniforms
prepare-world-slabs
;
USING:
accessors
kernel
papier
papier.render
ui.gadgets.worlds
;
M:
papier-world
draw-world*
[
renderer>>
]
[
uniforms>>
]
[
slabs>>
]
tri
draw-slabs
;
USING:
accessors
kernel
papier
papier.render
ui.gadgets.worlds
;
M:
papier-world
resize-world
[
uniforms>>
]
[
dim4
fov
near-plane
far-plane
<p-matrix>
]
bi
>>p_matrix
drop
;
USING:
accessors
game.worlds
kernel
papier
;
M:
papier-world
tick-game-world
dup
slabs>>
update-slabs
dup
focused?>>
[
dup
keyboard-input
[
move-player
]
[
drop
stop-player
]
if*
]
[
drop
]
if
;