16
Thumby / Re: Sudoku v1.0 by AirConsole
« on: October 28, 2021, 05:03:52 PM »
I think the QR code is even more out of place than the ad, but each to one's own.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
def animate(line_count,line_length,total_line_count,x,y,aspect_ratio,direction,speed):
current_line=0
line_limit=total_line_count-1
while aspect_ratio==0:
if direction==0:
frame_edge=y+line_count
line_switch=lambda a,b: a-b
elif direction==1:
frame_edge==y
line_switch=lambda a,b: a+b
while(1):
if current_line>line_limit:
current_line-=current_line
for i in range(line_count):
if current_line+i>line_limit:
prevent_overflow=line_limit
else:
prevent_overflow=0
thumby.display.blit(line_set[current_line+i-prevent_overflow],x,line_switch(frame_edge,i),line_length,1)
thumby.display.update()
wait(speed)
current_line+=1
while aspect_ratio==1:
if direction==0:
frame_edge=x+line_count
line_switch=lambda a,b: a-b
elif direction==1:
frame_edge==x
line_switch=lambda a,b: a+b
while(1):
if current_line>line_limit:
current_line-=current_line
for i in range(line_count):
if current_line+i>line_limit:
prevent_overflow=line_limit
else:
prevent_overflow=0
thumby.display.blit(line_set[current_line+i-prevent_overflow],line_switch(frame_edge,i),y,1,line_length)
thumby.display.update()
wait(speed)
current_line+=1