コード例 #1
0
ファイル: EqEffect.py プロジェクト: LedBurn/LedBurnLEDs
 def __init__(self, indexes, brightness=1.0, hue1=0.6, hue2=0.8):
     Effect.__init__(self, indexes)
     self.brightness = brightness
     self.hue1 = hue1
     self.hue2 = hue2
     self.eq_start = random.uniform(0.2, 0.7)
     self.curr_pos = self.eq_start
     self.last_time_percent = 0
コード例 #2
0
 def __init__(self, indexes, num_of_dark):
     """
     :param indexes: 
     :param base_color: 
     :param single_pix_color: 
     :param tot_range_pixels: you can decide that the total number of pixel will be different than len(indexes)
     """
     Effect.__init__(self, indexes)
     self.num_of_dark = num_of_dark
コード例 #3
0
 def __init__(self,
              indexes,
              from_color,
              to_color,
              type=GoToColorEffectType.CONST_SPEED):
     Effect.__init__(self, indexes)
     self.from_color = from_color
     self.to_color = to_color
     self.type = type
コード例 #4
0
 def __init__(self, indexes, hue):
     Effect.__init__(self, indexes)
     self._start_percent = random.random() * 0.2
     self._full_percent = self._start_percent + max(0.1,
                                                    random.random() * 0.3)
     self._stop_percent = 1.0 - random.random() * 0.2
     self._decent_percent = self._stop_percent - max(
         0.1,
         random.random() * 0.3)
     self.hue = hue
     self.max_brightness = 0.5 * random.random()
コード例 #5
0
 def __init__(self, indexes, base_color, single_pix_color,
              tot_range_pixels):
     """
     :param indexes: 
     :param base_color: 
     :param single_pix_color: 
     :param tot_range_pixels: you can decide that the total number of pixel will be different than len(indexes)
     """
     Effect.__init__(self, indexes)
     self.base_color = base_color
     self.single_pix_color = single_pix_color
     self.tot_range_pixels = tot_range_pixels
コード例 #6
0
ファイル: SpikeEffect.py プロジェクト: LedBurn/LedBurnLEDs
 def __init__(self, indexes, timed_color, tail_percent, tot_range_pixels, circular=False):
     """
     :param indexes: 
     :param base_color: 
     :param tail_percent: out of the tot_range_pixels 
     :param tot_range_pixels: you can decide that the total number of pixel will be different than len(indexes)
     """
     Effect.__init__(self, indexes)
     self.timed_color = timed_color
     self.tail_percent = tail_percent
     self.tot_range_pixels = tot_range_pixels
     self.tot_pixel_with_tail = tot_range_pixels if circular else (1 + tail_percent) * tot_range_pixels
     self.circular = circular
コード例 #7
0
ファイル: ConfettiEffect.py プロジェクト: LedBurn/LedBurnLEDs
    def __init__(self,
                 indexes,
                 leds_percent_per_beat,
                 brightness=1.0,
                 fade_factor=0.9):
        Effect.__init__(self, indexes)
        self.hue = 0
        self.fade_factor = fade_factor

        self.brightness = brightness
        self.number_of_leds_per_beat = int(leds_percent_per_beat *
                                           len(self.indexes))
        self.lighted_counter = 0
コード例 #8
0
    def __init__(self, indexes, timed_color, start_time, on_time_start,
                 on_time_end, dark_time, location_percent):
        """
        
        :param indexes: 
        :param timed_color: 
        :param start_time: when the star starts to shine 
        :param on_time_start: when the star receive full brightness
        :param on_time_end: when the star starts to disappear
        :param dark_time: when the star goes dark
        please use like this 0 <= start_time <= on_time_start <= on_time_end <= dark_time <= 1.0
        """
        Effect.__init__(self, indexes)
        self.timed_color = timed_color

        self.start_time = start_time
        self.on_time_start = on_time_start
        self.on_time_end = on_time_end
        self.dark_time = dark_time
        self.location_percent = location_percent
コード例 #9
0
 def __init__(self, indexes, leds_percent_per_cycle):
     Effect.__init__(self, indexes)
     self._leds_per_cycle = max(
         int(leds_percent_per_cycle * len(self.indexes)), 1)
     self.hue = 0
コード例 #10
0
 def __init__(self, indexes, timed_color):
     Effect.__init__(self, indexes)
     self.timed_color = timed_color
コード例 #11
0
 def __init__(self, indexes, color1, color2):
     Effect.__init__(self, indexes)
     self.color1 = color1
     self.color2 = color2
コード例 #12
0
 def __init__(self, indexes, strting_hue):
     Effect.__init__(self, indexes)
     self.hue = strting_hue
     self.fibonacci(1)
     self.start_fib = 1
コード例 #13
0
ファイル: RainbowEffect.py プロジェクト: LedBurn/LedBurnLEDs
 def __init__(self, indexes):
     Effect.__init__(self, indexes)
コード例 #14
0
 def __init__(self, indexes, number_of_snakes):
     Effect.__init__(self, indexes)
     self._number_of_snakes = number_of_snakes
     self.hue_start = random.random()
     self.start_pos = 0
コード例 #15
0
 def __init__(self, indexes, color):
     Effect.__init__(self, indexes)
     self.color = color
コード例 #16
0
 def __init__(self, indexes, color):
     Effect.__init__(self, indexes)
     self.color = color
     self.currentOnLed = -1
コード例 #17
0
ファイル: GradientEffect.py プロジェクト: LedBurn/LedBurnLEDs
 def __init__(self, indexes, from_color, to_color, power=1):
     Effect.__init__(self, indexes)
     self.from_color = from_color
     self.to_color = to_color
     self.power = power
コード例 #18
0
 def __init__(self, indexes, add_red_bootom=True):
     Effect.__init__(self, indexes)
     self.loop_num = 0
     self.add_red_bootom = add_red_bootom
     self.create_effects()
     self.previous_time = 1
コード例 #19
0
ファイル: FadeOutEffect.py プロジェクト: LedBurn/LedBurnLEDs
 def __init__(self, indexes, color):
     Effect.__init__(self, indexes)
     self.color = color
     self.to_color = [0, 0, 0]
     self.power = 3
コード例 #20
0
 def __init__(self, indexes, num_of_blinks, color):
     Effect.__init__(self, indexes)
     self.num_of_blinks = num_of_blinks
     self.color = color