Compare commits
2 commits
49ee35b55f
...
dc2aa2c6d6
Author | SHA1 | Date | |
---|---|---|---|
dc2aa2c6d6 | |||
72afe49203 |
7 changed files with 21 additions and 1 deletions
BIN
faces/ProotScreen.png
Normal file
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 |
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue