Threaded server support
This commit is contained in:
14
innernaut.py
14
innernaut.py
@ -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')
|
||||
|
Reference in New Issue
Block a user