diff options
Diffstat (limited to 'main.lua')
-rw-r--r-- | main.lua | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -43,7 +43,7 @@ entities:addComponents(camera, { transform={ matrix=Mat4():identity():translate(Vec3{0, 0, -6}), }, - z = {value=-6}, + z = {value=-60}, script={ script="cameraRotationScript", }, @@ -93,8 +93,8 @@ entities:addComponents(id, { density = 1, radius = 1, }, - velocity = Vec3{ 0, 0, 0 }, - angularVelocity = Vec3{ 0, 0, 0 }, + velocity = Vec3{ 0, 10, 0 }, + angularVelocity = Vec3{ 0, 1, 0 }, }, }) @@ -118,6 +118,9 @@ window:setKeyCallback(function(_, key, scancode, action) if action == glfw.PRESS then if key == glfw.KEY_ESCAPE then window:setShouldClose(true) + elseif key == glfw.KEY_SPACE then + entities:save("save") + elseif key == glfw.KEY_L then end end end) @@ -150,6 +153,10 @@ end local fpsAverage = averager(200) + +entities:load("save") + + -- main loop honey.loop(window, function(dt) gl.ClearColor(0.2, 0.4, 1.0, 1.0) |