def __init__(self, bor): self.set_defaults() self.bor = bor self.palette = [Color.white(), Color.red(), Color.green(), Color.blue(), Color(255,255,0), Color(0,255,255), Color(255,0,255), Color(255,121,0), Color.black()] self.current = Color.blue()
def __init__(self, bor): # self.currnet_idx = 16 self.currnet_idx = 19 texte = text.Text(bor) texte.set_text(10, 1, "XD XD XD XD") self.effects = [ texte, # 0 pixels.Pixels(bor), # 1 rainbow.Rainbow(bor), # 2 sinrainbow2.SinRainbow2(bor), # 3 sinrainbow.SinRainbow(bor), # 4 # tetris.Tetris(10, 10), metaballs.Metaballs(bor), # 5 disco.Disco(), # 6 pulsingcolor.PulsingColor(Color.blue()), # 7 xdcolor.XDColor(Color.red()), # 8 xdcolor.XDColor(Color.green()), # 9 xdcolor.XDColor(Color.blue()), # 10 solidcolor.SolidColor(Color.black()), # 11 droplet.Droplet(bor), # 12 paint.Paint(bor), # 13 tennis.Tennis(bor), # 14 rays.Rays(bor), # 15 plasma.Plasma(bor), # 16 #GifPlayer('/home/pi/xD-Table-Py/effects/gifplayer/gifs/fireplace_smol.gif'), # 17 GifPlayer( '/home/pi/xD-Table-Py/effects/gifplayer/gifs/fireplace_doniel.gif' ), # 17 rainbow_slow.RainbowSlow(bor), # 18 kibana.Heatmap(), # 19 ]
def __init__(self, bor): self.set_defaults() self.bor = bor self.dt = 0 self.cx = 4.5 self.cy = 4.5 self.cr = .0 self.dr = 3 self.cc = Color.blue()
def render(self, display): #display.fill(Color.blue()) for y in range(display.height): for x in range(display.width): dist = self.dist_to_circle(x, y) dist = 1.0 / (dist + 1.0) if dist > 1.0: print(dist) # print(dist) display.set(x, y, Color.blue().fade(dist))
def __init__(self, bor): self.set_defaults() self.bor = bor self.width = bor.width self.height = bor.height self.ball = Ball(self) self.paddle1 = Paddle(self, 0, Color.red()) self.paddle2 = Paddle(self, bor.height - 1, Color.blue()) self.win_animation = False self.factor = 1.0 self.dfactor = 0.9