summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--honey/init.lua10
-rw-r--r--save24
2 files changed, 18 insertions, 16 deletions
diff --git a/honey/init.lua b/honey/init.lua
index d2f5279..887cf02 100644
--- a/honey/init.lua
+++ b/honey/init.lua
@@ -33,10 +33,12 @@ function loop(window, update)
while not window:shouldClose() do
local time = glfw.GetTime()
local dt = time - prevTime
- prevTime = time
- update(dt)
- window:swapBuffers()
- glfw.PollEvents()
+ if dt > 1/60 then
+ prevTime = time
+ update(dt)
+ window:swapBuffers()
+ glfw.PollEvents()
+ end
end
end
diff --git a/save b/save
index 69147da..cc1b230 100644
--- a/save
+++ b/save
@@ -1,12 +1,12 @@
-Entity("2a08965c-962c-4800-9033-8127e39e891c", {renderQuad={textures={ourTexture={filename="44d9a0ec1c18e6126a5e9d9d9317f5ac.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
-Entity("62f52427-4a91-4d9b-8728-b84c029a491c", {onFramebufferSize={script="scripts.viewportResize"},onKey={script="scripts.loadSaveQuit"}})
-Entity("a5d93d49-f1bf-4481-a9b2-a535c7f572fe", {onScroll={script="scripts.character.cameraDistance"},node={parent="5ed47a34-36bf-45b3-b6a0-c77bbb3da102",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 20.0000, 0.0000, 0.0000, 0.0000, 1.0000}},onFramebufferSize={script="scripts.cameraHandleResize"},camera={render="screen",projection=Mat4{2.5518, 0.0000, 0.0000, 0.0000, 0.0000, 2.4142, 0.0000, 0.0000, 0.0000, 0.0000, -1.0002, -0.2000, 0.0000, 0.0000, -1.0000, 0.0000}}})
-Entity("66a57409-094d-4ccb-80b8-b76e68d1cf35", {script={script="scripts.capsuleMove"},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 6.9968, 0.0000, 0.0000, -1.0000, 3.8860, 0.0000, 1.0000, 0.0000, 6.7345, 0.0000, 0.0000, 0.0000, 1.0000}},collision={class="capsule",length=2,collide=-3,radius=1,category=2},renderMesh={mesh={index=1,filename="assets/capsule.obj"},textures={ourTexture={filename="assets/green-grass.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},physics={mass={class="capsule",direction=3,length=2,mass=10,radius=1},maxAngularSpeed=0,surface=true,velocity=Vec3{0.0000, 0.0080, 0.0000},angularVelocity=Vec3{0.0000, 0.0000, 0.0000}}})
-Entity("cb39f828-cf3b-4eb5-b165-b51cea3d065e", {spring={F=0},node={parent="66a57409-094d-4ccb-80b8-b76e68d1cf35",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="spring"},collision={class="ray",length=4,collide=-3,category=2},onCollision={script="scripts.character.spring"}})
-Entity("50f43874-fef7-43ec-bbaf-51095ec4a154", {node={parent="66a57409-094d-4ccb-80b8-b76e68d1cf35",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, 1.0000, 0.0000, 0.0000, -1.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="p"}})
-Entity("5ed47a34-36bf-45b3-b6a0-c77bbb3da102", {node={parent="50f43874-fef7-43ec-bbaf-51095ec4a154",matrix=Mat4{-0.8090, 0.2759, -0.5190, 0.0000, 0.0000, 0.8829, 0.4695, 0.0000, 0.5878, 0.3798, -0.7143, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="pivot"},onCursorPos={script="scripts.cameraPivot"},pitchyaw={pitch=-28,yaw=-144}})
-Entity("b26e69d3-0707-42a0-8f02-91b3e96de271", {collision={class="plane"},node={matrix=Mat4{0.9962, -0.0872, 0.0000, 0.0000, 0.0872, 0.9962, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}})
-Entity("10192474-032a-4d1f-84d1-ddd283bfec5d", {renderMesh={mesh={index=1,filename="assets/skybox.obj"},textures={ourTexture={filename="assets/skyboxsun5deg2_tn.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={matrix=Mat4{2.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -2.0000, 0.0000, 0.0000, 2.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}})
-Entity("8cc5b679-57a4-4337-8328-fa618a900c3f", {renderMesh={mesh={index=1,filename="builtin.quad"},textures={ourTexture={filename="assets/green+grass-1024x1024.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={parent="b26e69d3-0707-42a0-8f02-91b3e96de271",matrix=Mat4{20.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -20.0000, 0.0000, 0.0000, 20.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}})
-Entity("5ce8bc4a-b6ce-4e6f-8a1c-4c9ae4b0d500", {node={matrix=Mat4{-0.5859, 0.8104, 0.0000, -40.8664, -0.8104, -0.5859, 0.0000, -2.5749, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}},collision={class="sphere",radius=1},renderMesh={mesh={index=1,filename="assets/icosahedron.obj"},textures={ourTexture={filename="77155.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},physics={mass={class="sphere",density=1,radius=1},surface=true,velocity=Vec3{-7.1146, -0.6224, 0.0000},angularVelocity=Vec3{0.0000, 0.0000, 7.1418}}})
-Entity("b79ee907-fe95-41d7-9496-1be53e2a5c0e", {renderMesh={mesh={index=1,filename="builtin.quad"},shader={vertex="vertex.glsl",fragment="fragment.glsl"}},node={parent="5ce8bc4a-b6ce-4e6f-8a1c-4c9ae4b0d500",matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 2.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}})
+Entity("6125722e-117e-4b11-8e59-cce4aa71e3cf", {onFramebufferSize={script="scripts.viewportResize"},onKey={script="scripts.loadSaveQuit"}})
+Entity("db53fb2e-27e5-4e65-89ef-6618d80b719c", {node={matrix=Mat4{2.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -2.0000, 0.0000, 0.0000, 2.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}},renderMesh={mesh={index=1,filename="assets/skybox.obj"},textures={ourTexture={filename="assets/skyboxsun5deg2_tn.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
+Entity("0af7062f-ed92-45ad-a1f7-dbd3c758594d", {physics={mass={mass=10,direction=3,length=2,class="capsule",radius=1},surface=true,angularVelocity=Vec3{0.0000, 0.0000, 0.0000},velocity=Vec3{0.0000, 0.1504, 0.0000},maxAngularSpeed=0},script={script="scripts.capsuleMove"},collision={category=2,collide=-3,length=2,radius=1,class="capsule"},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 12.0272, 0.0000, 0.0000, -1.0000, 3.8831, 0.0000, 1.0000, 0.0000, 10.1611, 0.0000, 0.0000, 0.0000, 1.0000}},renderMesh={mesh={index=1,filename="assets/capsule.obj"},textures={ourTexture={filename="assets/green-grass.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
+Entity("59d34701-6307-4f67-9f99-0a825a0c5313", {onCollision={script="scripts.character.spring"},collision={category=2,collide=-3,length=4,class="ray"},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="spring",parent="0af7062f-ed92-45ad-a1f7-dbd3c758594d"},spring={F=0}})
+Entity("0e7e43f9-dc58-4353-b4f4-3ab1647c5821", {node={matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, 1.0000, 0.0000, 0.0000, -1.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="p",parent="0af7062f-ed92-45ad-a1f7-dbd3c758594d"}})
+Entity("d6b08ebe-afcb-4c3c-bb22-930a815d9461", {onCursorPos={script="scripts.cameraPivot"},pitchyaw={yaw=-47,pitch=-55},node={matrix=Mat4{0.6820, 0.5991, -0.4195, 0.0000, 0.0000, 0.5736, 0.8192, 0.0000, 0.7314, -0.5587, 0.3912, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},name="pivot",parent="0e7e43f9-dc58-4353-b4f4-3ab1647c5821"}})
+Entity("0808b4e9-e146-481b-bf03-bd44b9770b28", {onFramebufferSize={script="scripts.cameraHandleResize"},camera={render="screen",projection=Mat4{1.8107, 0.0000, 0.0000, 0.0000, 0.0000, 2.4142, 0.0000, 0.0000, 0.0000, 0.0000, -1.0002, -0.2000, 0.0000, 0.0000, -1.0000, 0.0000}},node={matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 20.0000, 0.0000, 0.0000, 0.0000, 1.0000},parent="d6b08ebe-afcb-4c3c-bb22-930a815d9461"},onScroll={script="scripts.character.cameraDistance"}})
+Entity("ff28a90b-ddd1-486b-9d1f-687e14b078af", {collision={class="plane"},node={matrix=Mat4{0.9962, -0.0872, 0.0000, 0.0000, 0.0872, 0.9962, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000}}})
+Entity("da5c24ba-d7eb-422a-a9b7-462f319823ed", {node={matrix=Mat4{20.0000, 0.0000, 0.0000, 0.0000, 0.0000, -0.0000, -20.0000, 0.0000, 0.0000, 20.0000, -0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},parent="ff28a90b-ddd1-486b-9d1f-687e14b078af"},renderMesh={mesh={index=1,filename="builtin.quad"},textures={ourTexture={filename="assets/green+grass-1024x1024.jpg"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
+Entity("ad903cd6-1140-4200-91e8-d659e3b6042e", {physics={mass={density=1,radius=1,class="sphere"},surface=true,velocity=Vec3{4.8712, 0.4262, 5.5202},angularVelocity=Vec3{4.7231, 9.3525, -4.8898}},collision={class="sphere",radius=1},node={matrix=Mat4{-0.7602, 0.0251, 0.6492, 63.6585, 0.2834, 0.9120, 0.2967, 6.5699, -0.5846, 0.4095, -0.7004, 29.2635, 0.0000, 0.0000, 0.0000, 1.0000}},renderMesh={mesh={index=1,filename="assets/icosahedron.obj"},textures={ourTexture={filename="77155.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
+Entity("c21c91b2-e99d-494b-b360-0604e5c4108f", {node={matrix=Mat4{1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000, 0.0000, 2.0000, 0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 1.0000},parent="ad903cd6-1140-4200-91e8-d659e3b6042e"},renderMesh={mesh={index=1,filename="builtin.quad"},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})
+Entity("919959df-5c9b-41ce-9dc1-5ec3f069f320", {renderQuad={textures={ourTexture={filename="44d9a0ec1c18e6126a5e9d9d9317f5ac.png"}},shader={vertex="vertex.glsl",fragment="fragment.glsl"}}})