Proper error handling

This commit is contained in:
Michael Mikovsky
2025-07-30 14:39:41 -06:00
parent 309c94dec6
commit 6093c32245
6 changed files with 26 additions and 124 deletions
+3 -6
View File
@@ -1,5 +1,4 @@
local screen_size = {1920, 1080};
local screen_size = { 1920, 1080 };
local scale = 300;
local length_seconds = 10;
@@ -63,7 +62,7 @@ function renderLine(pos, line)
local p1r = rotatePoint(p1, { pos[1], pos[2], pos[3] });
local p2r = rotatePoint(p2, { pos[1], pos[2], pos[3] });
local p1s = Point((scale * p1r[1]) + (screen_size[1] / 2), (scale * p1r[2]) + (screen_size[2]/ 2))
local p1s = Point((scale * p1r[1]) + (screen_size[1] / 2), (scale * p1r[2]) + (screen_size[2] / 2))
local p2s = Point((scale * p2r[1]) + (screen_size[1] / 2), (scale * p2r[2]) + (screen_size[2] / 2))
return Line(p1s, p2s, Color(255, 255, 255), 2.0)
@@ -82,14 +81,12 @@ for i = 0, updates, 1 do
animate(Animation(
renderLine(pos, line),
renderLine(nextpos, line),
spf, EaseInOut()
spf, Linear()
))
end
pos = nextpos;
print(pos[1])
render(spf)
end