示例#1
0
 def _setup_tickers(self):
     self.clear_tickers()
     self.add_ticker(speed(fade(self.outside, Rainbow), self.parameter('speed')))
     self.add_ticker(speed(offset(fade(self.spokes, Rainbow), 1.0 * self.parameter('interval').get()), self.parameter('speed').get()))
     self.add_ticker(speed(offset(fade(self.star, Rainbow), 2.0 * self.parameter('interval').get()), self.parameter('speed').get()))
     self.add_ticker(speed(offset(fade(self.pentagon, Rainbow), 3.0 * self.parameter('interval').get()), self.parameter('speed').get()))
     self.add_ticker(speed(offset(fade(self.spikes, Rainbow), 4.0 * self.parameter('interval').get()), self.parameter('speed').get()))
 def _setup_tickers(self):
     self.clear_tickers()
     self.add_ticker(
         flash((), (255, 255, 255), self.parameter('flash-on'),
               self.parameter('flash-off')), 1)
     self.add_ticker(
         speed(fade(self.outside, Rainbow), self.parameter('speed')))
     self.add_ticker(
         speed(
             offset(fade(self.spokes, Rainbow),
                    1.0 * self.parameter('interval').get()),
             self.parameter('speed').get()))
     self.add_ticker(
         speed(
             offset(fade(self.star, Rainbow),
                    2.0 * self.parameter('interval').get()),
             self.parameter('speed').get()))
     self.add_ticker(
         speed(
             offset(fade(self.pentagon, Rainbow),
                    3.0 * self.parameter('interval').get()),
             self.parameter('speed').get()))
     self.add_ticker(
         speed(
             offset(fade(self.spikes, Rainbow),
                    4.0 * self.parameter('interval').get()),
             self.parameter('speed').get()))
    def setup(self):
        self.add_ticker(flash((), [1.0, 1.0, 1.0], 0.2, 0.8), 1)

        self.add_ticker(fade(self.outside, Rainbow))
        self.add_ticker(offset(fade(self.spokes, Rainbow), 0.05))
        self.add_ticker(offset(fade(self.star, Rainbow), 0.1))
        self.add_ticker(offset(fade(self.pentagon, Rainbow), 0.15))
        self.add_ticker(offset(fade(self.spikes, Rainbow), 0.2))
示例#4
0
 def advance(self):
     if self.idx < len(self.all_fixtures) - 1:
         self.remove_ticker(self.constant_ticker)
         self.idx += 1
         self.remove_ticker(self.active_ticker)
         self.active_ticker = self.add_ticker(speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
     else:
         self.idx = 0
         self.remove_ticker(self.active_ticker)
         self.constant_ticker = self.add_ticker(constant((), (0, 0, 0)), 0)
         self.active_ticker = self.add_ticker(speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
 def advance(self):
     if self.idx < len(self.all_fixtures) - 1:
         self.remove_ticker(self.constant_ticker)
         self.idx += 1
         self.remove_ticker(self.active_ticker)
         self.active_ticker = self.add_ticker(
             speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
     else:
         self.idx = 0
         self.remove_ticker(self.active_ticker)
         self.constant_ticker = self.add_ticker(constant((), (0, 0, 0)), 0)
         self.active_ticker = self.add_ticker(
             speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
示例#6
0
 def _create_tickers(self):
     self.clear_tickers()
     fixtures = self.scene().fixtures()
     midpoint_tuples = [(f.strand, f.address, f.midpoint()) for f in fixtures]
     extents = self.scene().extents()
     center = tuple([0.5 * c for c in extents])
     for strand, address, midpoint in midpoint_tuples:
         dx, dy = (midpoint[0] - center[0], midpoint[1] - center[1])
         angle = (math.pi + math.atan2(dy, dx)) / (2.0 * math.pi) * self.parameter('width').get()
         self.add_ticker(speed(offset(fade((strand, address), Rainbow), angle), self.parameter('speed')))
示例#7
0
 def _create_tickers(self):
     self.clear_tickers()
     fixtures = self.scene().fixtures()
     midpoint_tuples = [(f.strand, f.address, f.midpoint()) for f in fixtures]
     extents = self.scene().extents()
     center = self.scene().center_point()
     for strand, address, midpoint in midpoint_tuples:
         dx, dy = (midpoint[0] - center[0], midpoint[1] - center[1])
         angle = (math.pi + math.atan2(dy, dx)) / (2.0 * math.pi) * self.parameter('width').get()
         self.add_ticker(speed(offset(fade((strand, address), Rainbow), angle), self.parameter('speed')))
 def setup(self):
     self.add_ticker(fade(self.outside, Rainbow))
     self.add_ticker(offset(fade(self.spokes, Rainbow), 0.05))
     self.add_ticker(offset(fade(self.star, Rainbow), 0.1))
     self.add_ticker(offset(fade(self.pentagon, Rainbow), 0.15))
     self.add_ticker(offset(fade(self.spikes, Rainbow), 0.2))
 def setup(self):
     self.constant_ticker = self.add_ticker(constant((), (0, 0, 0)), 0)
     self.active_ticker = self.add_ticker(
         speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
     self.add_ticker(callback(self.advance, 0.1), 1)
示例#10
0
 def setup(self):
     self.add_parameter(FloatParameter('speed', 0.2))
     self.add_ticker(speed(fade((), Rainbow), self.parameter('speed')))
示例#11
0
 def setup(self):
     self.add_ticker( speed(fade((), Rainbow), 0.2) )
示例#12
0
 def setup(self):
     self.constant_ticker = self.add_ticker(constant((), (0, 0, 0)), 0)
     self.active_ticker = self.add_ticker(speed(fade(self.all_fixtures[self.idx], Rainbow), 0.25), 1)
     self.add_ticker(callback(self.advance, 0.1), 1)