Compare commits

...

2 commits

Author SHA1 Message Date
dc2aa2c6d6 Added loading screen show function. 2023-05-23 20:58:43 +02:00
72afe49203 Removed old .bmp files.
Added a loading screen - ProotScreen.
Added a loading screen display function.
2023-05-23 20:58:23 +02:00
7 changed files with 21 additions and 1 deletions

BIN
faces/ProotScreen.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -56,6 +56,13 @@ class Point2D:
return (self.x, self.y) == (other.x, other.y)
def set_ProotScreen():
prootScreen_frame_canvas = matrix.CreateFrameCanvas()
image_prootScreen = Image.open("faces/eyeLeftOpen.png")
prootScreen_frame_canvas.SetImage(image_prootScreen, unsafe=False)
matrix.SwapOnVSync(prootScreen_frame_canvas)
def mirror_points(points: list[Point2D]) -> list[Point2D]:
mirrored_points = []
for point in points:
@ -148,6 +155,14 @@ def interpolate_point_pairs(pairs: list[tuple[Point2D, Point2D]], percentage: fl
return interpolated_points
print("start setting ProotScreen")
startT = curr_time = round(time.time()*1000)
# setting ProotScreen, This is the loading splash screen
set_ProotScreen()
endT = curr_time = round(time.time()*1000)
print("setting ProotScreen took: " + str(endT - startT) + " ms")
print("start configuring matrix")
@ -290,6 +305,11 @@ client.loop_start()
while True:
# this sleep sets the time between finishing one screen update and the next starting
# TODO replace this mechanism with an interupt to use the cpu time between frame updates.
time.sleep(0.01)
update_screen()
# TODO create a splash screen to display super quick before the rest of the assets are loading