 CONSTANT: terrain-vertex-row-length $[ 512 1 + 2 * ]
 
 TUPLE: player
-    location yaw pitch velocity ;
+    location yaw pitch velocity velocity-modifier ;
 
 TUPLE: terrain-world < game-world
     player

CONSTANT: JUMP $[ 1.0 1024.0 / ]
CONSTANT: MOUSE-SCALE $[ 1.0 10.0 / ]
CONSTANT: MOVEMENT-SPEED $[ 1.0 16384.0 / ]
CONSTANT: FRICTION 0.95
CONSTANT: COMPONENT-SCALE { 0.5 0.01 0.0005 0.0 }
CONSTANT: SKY-PERIOD 1200
CONSTANT: SKY-SPEED 0.0005

    [ dx>> MOUSE-SCALE * look-horizontally ]
    [ dy>> MOUSE-SCALE * look-vertically ] 2bi ;


terrain-world H{
    { T{ key-up { mods { A+ } } { sym "RET" } } [ toggle-fullscreen ] }
} set-gestures

:: handle-input ( world -- )
    world player>> :> player
    read-keyboard keys>> :> keys
    key-left-shift keys nth [
        { 2.0 1.0 2.0 } player (>>velocity-modifier)
    ] when
    key-left-shift keys nth [
        { 1.0 1.0 1.0 } player (>>velocity-modifier)
    ] unless

    key-w keys nth [ player walk-forward ] when 
    key-s keys nth [ player walk-backward ] when 
    key-a keys nth [ player walk-leftward ] when 
