Handbook
Glossary
fluids-world
Vocabulary
fluids
Definition
USING:
game.worlds
kernel
;
IN:
fluids
TUPLE:
fluids-world
<
game-world
particles texture ramp
{
paused
boolean
initial:
f
}
;
Methods
USING:
accessors
fluids
game.worlds
gpu
kernel
namespaces
;
M:
fluids-world
begin-game-world
dup
fluid
set
init-gpu
initial-particles
clone
>>particles
"vocab:fluids/particle2.pgm"
make-texture
>>texture
"vocab:fluids/colors.ppm"
make-texture
>>ramp
drop
;
USING:
accessors
destructors
fluids
gpu.effects.blur
gpu.effects.step
gpu.state
gpu.util
kernel
make
math.vectors
sequences
specialized-arrays.instances.alien.c-types.float
ui.gadgets.worlds
;
M::
fluids-world
draw-world*
( world -- )
world
particles>>
[
[
p>>
[
first
,
]
[
second
,
]
bi
]
each
]
curry
float-array{
}
make
:>
verts
[
verts world
texture>>
30.0 world
dim>>
{
4 4
}
v/
blended-point-sprite-batch
&dispose
blend-state
new
set-gpu-state
gaussian-blur
&dispose
world
ramp>>
world
dim>>
step-texture
&dispose
world
dim>>
draw-texture
]
with-destructors
;
USING:
fluids
game.worlds
kernel
;
M:
fluids-world
end-game-world
drop
;
USING:
accessors
fluids
game.worlds
kernel
;
M:
fluids-world
tick-game-world
dup
paused>>
[
drop
]
[
integrate
]
if
;