def next_scene(self, i):
        red = Red().scene()
        purple = Purple().scene()

        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(purple, red, (i + 1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(red, purple, (i + 1) / 10)

        return scene
    def next_scene(self, i):
        orange = Orange().scene()
        red = Red().scene()

        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(red, orange, (i+1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(orange, red, (i + 1) / 10)

        return scene
    def next_scene(self, i):
        blue = Blue().scene()
        cyan = Cyan().scene()

        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(cyan, blue, (i+1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(blue, cyan, (i + 1) / 10)

        return scene
Ejemplo n.º 4
0
    def next_scene(self, i):
        red = Red().scene()
        green = Green().scene()

        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(green, red, (i + 1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(red, green, (i + 1) / 10)

        return scene
Ejemplo n.º 5
0
    def next_scene(self, i):
        green = Green().scene()
        greenLight = GreenLight().scene()

        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(greenLight, green, (i + 1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(green, greenLight, (i + 1) / 10)

        return scene
    def next_scene(self, i):
        scene1 = [{
            1: 0, #  int(255 * division),  # Luminosité
            2: 255,  # Red
            3: 200,
            4: 0,
            5: 0,  # Strobe,
            6: 0, # int(255 * division),  # Luminosité Lampe 2
            7: 255,  # Red
            8: 200,
            9: 0,
            10: 0,  # Strobe,
            13: int(255 * 1/2),
            14: int(255 * 1/6)
        }]

        scene2 = [{
            1: 0,  # int(255 * division),  # Luminosité
            2: 255,  # Red
            3: 200,
            4: 0,
            5: 0,  # Strobe,
            6: 0,  # int(255 * division),  # Luminosité Lampe 2
            7: 255,  # Red
            8: 200,
            9: 0,
            10: 0,  # Strobe,
            13: int(255 * 1/6),
            14: int(255 * 1/2)
        }]

        #if i % 2 == 0:
        #    scene = scene1
        #else:
        #    scene = scene2

        #return scene
        scene = []
        if i % 2 == 0:
            for i in range(0, 10, 1):
                scene += between(scene1, scene2, (i+1) / 10)

        else:
            for i in range(0, 10, 1):
                scene += between(scene2, scene1, (i + 1) / 10)
        return scene
Ejemplo n.º 7
0
 def _generate(self, color1, color2):
     scene = []
     for i in range(0, 10, 1):
         scene += between(color2, color1, (i + 1) / 10)
     return scene
Ejemplo n.º 8
0
 def test_between(self):
     self.assertEqual(50, between([{1: 0}], [{1: 100}], 0.5)[0][1])
Ejemplo n.º 9
0
def withColoredFlash(effect, level=0.75):
    wait = [{"type": "wait", "duration": 0.05}]

    return effect + wait + between(Blackout().scene(), effect, level)
Ejemplo n.º 10
0
    def next_scene(self, i):
        wait = [{"type": "wait", "duration": 0.05}]

        return WhiteStrobe().scene() + wait + between(Blackout().scene(),
                                                      WhiteStrobe().scene(),
                                                      0.75)