Threaded server support

This commit is contained in:
2019-09-18 10:37:35 +01:00
parent 592fe8c274
commit 9c4f85f865

View File

@ -1,3 +1,12 @@
#%%
from flight.server import FlightServer
server = FlightServer.ensure_threaded_instance()
#%%
import math
@ -104,7 +113,7 @@ with Screen('main', width=1920, height=1080) as screen:
client.activate()
with Cue('Q1', name='Spinning triangles') as Q1:
period = 20
period = 10
count = t / period
Match('#outer').rotate = count
Match('#inner').rotate = -count
@ -118,3 +127,6 @@ with Cue('Q2', name='Blinking eyes') as Q2:
blink = 1 - when((cycle > offset) & (cycle < offset + duration), impulse((cycle - offset) / duration), 0)
Match('.pupil > Rect').y = -PupilHeight / 2 * blink
Match('.pupil > Rect').height = PupilHeight * blink
start('#Q1')