mirror of
https://github.com/Astatin3/luavid.git
synced 2026-06-08 16:18:01 -06:00
Proper error handling
This commit is contained in:
+3
-6
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user