Tweaks
This commit is contained in:
@ -4,6 +4,8 @@ from flight.client import *
|
||||
from flight.server import FlightServer
|
||||
|
||||
|
||||
Width = 1920
|
||||
Height = 1080
|
||||
MaskOuterRadius = 460
|
||||
MaskInnerRadius = 400
|
||||
BeadSeparation = 15
|
||||
@ -45,5 +47,5 @@ OddBeadColor = Color.red(1)
|
||||
EvenBeadColor = Color.white(0)
|
||||
|
||||
|
||||
server = FlightServer.ensure_threaded_instance()
|
||||
client = FlightClient('http://flight.local:8888')
|
||||
#server = FlightServer.ensure_threaded_instance()
|
||||
client = FlightClient() #'http://flight.local:8888')
|
||||
|
24
cues.py
24
cues.py
@ -25,8 +25,8 @@ with Cue('Q03', name='Multiple masks'):
|
||||
period = 3
|
||||
scale = 1 / (1 + (t / period) // 1)
|
||||
Match('#mask').scale = scale
|
||||
Match('#mask Rect').width = container.width / scale
|
||||
Match('#mask Rect').height = container.height / scale
|
||||
Match('#mask Rect').width = Width / scale
|
||||
Match('#mask Rect').height = Height / scale
|
||||
|
||||
with Cue('Q04', name='Blinking eyes') as Q2:
|
||||
period = 3
|
||||
@ -103,8 +103,8 @@ with Cue('Q21', name='Twinkling stars', fadeIn=1, fadeOut=1):
|
||||
count = gt / period + phase
|
||||
Match('#stars').fader = 1
|
||||
with Match('.star') as m:
|
||||
m.x = (uniform('Q21.x', i)[count] - 0.5) * screen.width
|
||||
m.y = (uniform('Q21.y', i)[count] - 0.5) * screen.height
|
||||
m.x = (uniform('Q21.x', i)[count] - 0.5) * Width
|
||||
m.y = (uniform('Q21.y', i)[count] - 0.5) * Height
|
||||
Match('.star').scale = uniform('Q21.scale', i)[count]
|
||||
Match('.star .fill').color = white(sine(count))
|
||||
|
||||
@ -114,8 +114,8 @@ with Cue('Q22', name='Bouncing stars', fadeIn=1, fadeOut=1):
|
||||
count = gt / period + phase
|
||||
Match('#stars').fader = 1
|
||||
with Match('.star') as m:
|
||||
m.x = (uniform('Q21.x', i)[count] - 0.5) * screen.width
|
||||
m.y = (uniform('Q21.y', i)[count] - 0.5) * screen.height
|
||||
m.x = (uniform('Q21.x', i)[count] - 0.5) * Width
|
||||
m.y = (uniform('Q21.y', i)[count] - 0.5) * Height
|
||||
m.rotate = count / 5
|
||||
m.scale = bounce(count) * 25
|
||||
Match('.star .outline').color = hsv(uniform('Q22.hue', i)[count], 1, bounce(count))
|
||||
@ -129,8 +129,8 @@ with Cue('Q23', name='Thin stars', fadeIn=1, fadeOut=1):
|
||||
with Match('.star') as m:
|
||||
m.lineWidth = sine(count) / 5
|
||||
m.scale = 50
|
||||
m.x = (uniform('Q23.x')[i] - 0.5) * screen.width
|
||||
m.y = (uniform('Q23.y')[i] - 0.5) * screen.height
|
||||
m.x = (uniform('Q23.x')[i] - 0.5) * Width
|
||||
m.y = (uniform('Q23.y')[i] - 0.5) * Height
|
||||
m.rotate = count / 10
|
||||
Match('.star .outline').color = hsv(hue, 0.75, 1)
|
||||
|
||||
@ -140,8 +140,8 @@ with Cue('Q24', name='Rushing stars', fadeIn=1, fadeOut=1):
|
||||
count = gt / period + phase
|
||||
Match('#stars').fader = 1
|
||||
with Match('.star') as m:
|
||||
m.x = (uniform('Q24.x', i)[count] - 0.5) * screen.width * 2 * (count % 1)
|
||||
m.y = (uniform('Q24.y', i)[count] - 0.5) * screen.height * 2 * (count % 1)
|
||||
m.x = (uniform('Q24.x', i)[count] - 0.5) * Width * 2 * (count % 1)
|
||||
m.y = (uniform('Q24.y', i)[count] - 0.5) * Height * 2 * (count % 1)
|
||||
m.color = white(sine(count))
|
||||
m.scale = count % 1
|
||||
|
||||
@ -173,8 +173,8 @@ with Cue('Q51', name='Blowing bubbles', fadeIn=1, fadeOut=1):
|
||||
count = gt / period + phase
|
||||
Match('#bubbles').fader = 1
|
||||
with Match('.bubble') as m:
|
||||
m.x = (uniform('Q51.x', i)[count] - 0.5) * screen.width * 2 * (count % 1)
|
||||
m.y = (uniform('Q51.y', i)[count] - 0.5) * screen.height * 2 * (count % 1)
|
||||
m.x = (uniform('Q51.x', i)[count] - 0.5) * Width * 2 * (count % 1)
|
||||
m.y = (uniform('Q51.y', i)[count] - 0.5) * Height * 2 * (count % 1)
|
||||
m.scale = uniform('Q51.scale', i)[count] * 10
|
||||
Match('.bubble .inside').color = white(0.3 * sine(count))
|
||||
Match('.bubble .outside').color = hsv(uniform('Q51.hue', i)[count], 0.8, sine(count))
|
||||
|
2
setup.py
2
setup.py
@ -60,7 +60,7 @@ def Spiral(count, startRadius=10, loops=2, **kwargs):
|
||||
|
||||
|
||||
|
||||
with Screen('main', width=1920, height=1080) as screen:
|
||||
with Screen('main', width=Width, height=Height) as screen:
|
||||
with Pattern('beads', width=BeadSeparation * 2, height=BeadSeparation * 2) as beads:
|
||||
for x in range(3):
|
||||
for y in range(3):
|
||||
|
Reference in New Issue
Block a user