smooth out scrolling

This commit is contained in:
2026-08-02 05:56:46 -04:00
parent d6e00f287a
commit fe7ffcf963
3 changed files with 5 additions and 9 deletions
+2 -5
View File
@@ -16,8 +16,8 @@ preferred_teams = [
]
scroll_x = 0
scroll_speed = 10
frames_per_tick = 2
scroll_speed = 1
frames_per_tick = 1
tick = 0
times_scrolled = 0
virtual_canvas = None
@@ -198,13 +198,10 @@ def draw_frame(matrix):
blit_slice(matrix.canvas, virtual_canvas, scroll_x)
draw_text_overlay(matrix.canvas, ordered, scroll_x)
print(tick)
tick += 1
if tick >= frames_per_tick:
tick = 0
next_x = scroll_x + scroll_speed
print(scroll_x, scroll_speed, next_x, total_scroll_width)
if next_x >= total_scroll_width:
scroll_x = 0
tick = 0