Example #1
0
 def SplitRandOut(self, strip):
     color = Color(randint(0, 255), randint(0, 255), randint(0, 255))
     frame1 = KeyFrame(self.StepDef, strip, delay=50, color=color)
     self.AddFrame(frame1)
     frame2 = KeyFrame(self.StepDef, strip, delay=50, color=Color(0, 0, 0))
     self.AddFrame(frame2)
     return self
Example #2
0
 def SplitRandIn(self, strip):
     color = Color(randint(0, 255), randint(0, 255), randint(0, 255))
     frame1 = KeyFrame(self.StepDef, strip, delay=50, color=color)
     self.AddFrame(frame1)
     frame1 = KeyFrame(self.StepDef, strip, delay=50, color=self.base_color)
     self.AddFrame(frame1)
     return self
Example #3
0
    def FadeRand(self, strip, iterations=1):
        for j in range(iterations):
            color = Color(randint(0, 255), randint(0, 255), randint(0, 255))
            frame1 = KeyFrame(self.FadeDef, strip, stBright=0, edBright=self.max_brightness, col=color, delay=20)
            frame2 = KeyFrame(self.FadeDef, strip, stBright=self.max_brightness, edBright=-1, col=color, delay=20)
            self.AddFrame(frame1)
            self.AddFrame(frame2)

        return self
Example #4
0
 def FadeColoursOut(self, strip, colors, iterations=1):
     frame = KeyFrame(self.FadeDef, strip, stBright=self.max_brightness, edBright=0, col=self.base_color, delay=20)
     self.AddFrame(frame)
     for x in range(iterations):
         for j in colors:
             frame1 = KeyFrame(self.FadeDef, strip, stBright=0, edBright=self.max_brightness, col=j, delay=20)
             frame2 = KeyFrame(self.FadeDef, strip, stBright=self.max_brightness, edBright=-1, col=j, delay=20)
             self.AddFrame(frame1)
             self.AddFrame(frame2)
     return self
Example #5
0
    def WipeRandOut(self, strip, direction=1, iterations=1):
        ledCount = strip.numPixels()
        workingRange = self.CalculateRange(direction, ledCount)

        for x in range(iterations):
            for j in workingRange:
                frame1 = KeyFrame(self.WipeDef, strip, pos=j, col=Color(randint(0, 255), randint(0, 255), randint(0, 255)), delay=40)
                self.AddFrame(frame1)
        for j in workingRange:
                frame1 = KeyFrame(self.WipeDef, strip, pos=j, col=Color(0,0,0), delay=40)
                self.AddFrame(frame1)
        return self
Example #6
0
    def BounceRand(self, strip, iterations=2):
        color = Color(randint(0, 255), randint(0, 255), randint(0, 255))
        for j in range(iterations):
            frame1 = KeyFrame(self.Left, strip, delay=30, color=color, size=4)
            frame2 = KeyFrame(self.Right, strip, delay=30, color=color, size=4)
            self.AddFrame(frame1)
            self.AddFrame(frame2)

        frame3 = KeyFrame(self.FadeDef,
                          strip,
                          stBright=0,
                          edBright=self.max_brightness,
                          col=self.base_color,
                          delay=20)
        self.AddFrame(frame3)
        return self
Example #7
0
 def WipeOut(self, strip, direction=1, color=Color(0,0,255)):
     ledCount = strip.numPixels()
     workingRange = self.CalculateRange(direction, ledCount)
     
     for j in workingRange:
         frame2 = KeyFrame(self.WipeDef, strip, pos=j, col=Color(0,0,0), delay=40)
         self.AddFrame(frame2)
     return self
Example #8
0
 def FadeIn(self, strip):
     frame1 = KeyFrame(self.FadeDef, strip, stBright=0, edBright=self.max_brightness, col=self.base_color, delay=20)
     self.AddFrame(frame1)
     return self
Example #9
0
 def SplitOut(self, strip):
     frame1 = KeyFrame(self.StepDef, strip, delay=50, color=Color(0, 0, 0))
     self.AddFrame(frame1)
     return self
Example #10
0
 def SplitIn(self, strip):
     frame1 = KeyFrame(self.StepDef, strip, delay=50, color=self.base_color)
     self.AddFrame(frame1)
     return self
Example #11
0
 def BuildIn(self, strip, color=Color(30, 30, 90)):
     #colours = self.GenerateRandomColours()
     frame1 = KeyFrame(self.BuildDef, strip, colours=color, delay=30)
     self.AddFrame(frame1)
     return self