"file": "goomba.gif", "fps": 1, "x": 60 }, { "file": "qblock.gif", "fps": 5, "x": 80 }] sign = farnsworth.sign(provides_logo=False, is_dynamic=True, preferred_duration=5.0) for gif in gifs: gif["file"] = sign.locate_file(gif["file"]) gif["sprite"] = farnsworth.sprite(gif_source=gif["file"], scale_y_to=config.PIXELS_HIGH) gif["sprite"].move_to(gif["x"], 0) gif["clock"] = farnsworth.clock(1.0 / gif["fps"]) while True: sign.front_layer().blank() for gif in gifs: if gif["clock"].tick(): gif["sprite"].advance_image() gif["sprite"].paint(sign.front_layer()) sign.paint()
#!/usr/bin/python import farnsworth import config import constants sign = farnsworth.sign( provides_logo=False, is_dynamic=True, preferred_duration=5.0 ) gif = sign.locate_file('nyan_cat.gif') cat = farnsworth.sprite(gif_source=gif, scale_y_to=config.PIXELS_HIGH) clock = farnsworth.clock(0.1) while True: sign.front_layer().blank(constants.COLORS["WHITE"]) if clock.tick(): #cat.cycle_image() cat.advance_image() cat.paint( sign.front_layer() ) sign.paint()
#!/usr/bin/python from time import sleep import farnsworth import config sign = farnsworth.sign( provides_logo=False, is_dynamic=True, preferred_duration=9.0 ) walker = farnsworth.sprite( sign.locate_file('01.bmp') ) walker.add_image( sign.locate_file('02.bmp') ) walker.add_image( sign.locate_file('03.bmp') ) walker.add_image( sign.locate_file('04.bmp') ) walker.add_image( sign.locate_file('05.bmp') ) walker.add_image( sign.locate_file('06.bmp') ) walker.add_image( sign.locate_file('07.bmp') ) walker.add_image( sign.locate_file('08.bmp') ) walker.add_image( sign.locate_file('09.bmp') ) walker.add_image( sign.locate_file('10.bmp') ) walker.add_image( sign.locate_file('11.bmp') ) walker.add_image( sign.locate_file('12.bmp') ) walker.add_image( sign.locate_file('13.bmp') ) walker.add_image( sign.locate_file('14.bmp') ) walker.add_image( sign.locate_file('15.bmp') ) walker.add_image( sign.locate_file('16.bmp') ) walker.move_to(-10,0) walker.tween_to(95,0,150)
#!/usr/bin/python from time import sleep import farnsworth import config sign = farnsworth.sign(provides_logo=False, is_dynamic=True, preferred_duration=9.0) walker = farnsworth.sprite(sign.locate_file('01.bmp')) walker.add_image(sign.locate_file('02.bmp')) walker.add_image(sign.locate_file('03.bmp')) walker.add_image(sign.locate_file('04.bmp')) walker.add_image(sign.locate_file('05.bmp')) walker.add_image(sign.locate_file('06.bmp')) walker.add_image(sign.locate_file('07.bmp')) walker.add_image(sign.locate_file('08.bmp')) walker.add_image(sign.locate_file('09.bmp')) walker.add_image(sign.locate_file('10.bmp')) walker.add_image(sign.locate_file('11.bmp')) walker.add_image(sign.locate_file('12.bmp')) walker.add_image(sign.locate_file('13.bmp')) walker.add_image(sign.locate_file('14.bmp')) walker.add_image(sign.locate_file('15.bmp')) walker.add_image(sign.locate_file('16.bmp')) walker.move_to(-10, 0) walker.tween_to(95, 0, 150)
#!/usr/bin/python import farnsworth sign = farnsworth.sign( provides_logo=False, is_dynamic=True, preferred_duration=9 ) pacman = farnsworth.sprite( sign.locate_file('pacman_1.bmp') ) pacman.add_image( sign.locate_file('pacman_2.bmp') ) pacman.add_image( sign.locate_file('pacman_3.bmp') ) pacman.move_to(-16,0) pacman.tween_to(95,0,95) blinky = farnsworth.sprite( sign.locate_file('blinky_1.bmp') ) blinky.add_image( sign.locate_file('blinky_2.bmp') ) blinky.move_to(-50,0) blinky.tween_to(96,0,107) pellet1 = farnsworth.sprite( sign.locate_file('pellet.bmp') ) pellet1.move_to(4,7) pellet2 = farnsworth.sprite( sign.locate_file('pellet.bmp') ) pellet2.move_to(12,7) pellet3 = farnsworth.sprite( sign.locate_file('pellet.bmp') ) pellet3.move_to(20,7) pellet4 = farnsworth.sprite( sign.locate_file('pellet.bmp') ) pellet4.move_to(28,7)
#!/usr/bin/python import farnsworth sign = farnsworth.sign(provides_logo=False, is_dynamic=True, preferred_duration=5.0) pacman = farnsworth.sprite(sign.locate_file('pac_man_0.bmp')) pacman.add_image(sign.locate_file('pac_man_1.bmp')) pacman.add_image(sign.locate_file('pac_man_2.bmp')) pacman.move_to(70, 1) ghost = farnsworth.sprite(sign.locate_file('ghost_1.bmp')) ghost.add_image(sign.locate_file('ghost_2.bmp')) ghost.move_to(20, 0) pellet = farnsworth.sprite(sign.locate_file('pellet.bmp')) pellet.move_to(93, 7) clock = farnsworth.clock(0.25) new_x = 0 while True: sign.front_layer().blank() if clock.tick(): pacman.cycle_image() ghost.advance_image()
#!/usr/bin/python from time import sleep import farnsworth sign = farnsworth.sign(provides_logo=False, is_dynamic=False, preferred_duration=5.0) science = sign.locate_file('science.bmp') s = farnsworth.sprite(base_image=science) while True: sign.front_layer().blank() s.paint(sign.front_layer()) sign.paint() sleep(0.1)
#!/usr/bin/python import farnsworth import config sign = farnsworth.sign(provides_logo=False, is_dynamic=True, preferred_duration=5.0) gif = sign.locate_file('nyan_cat.gif') cat = farnsworth.sprite(gif_source=gif, scale_y_to=config.PIXELS_HIGH) clock = farnsworth.clock(0.1) while True: sign.front_layer().blank() if clock.tick(): #cat.cycle_image() cat.advance_image() cat.paint(sign.front_layer()) sign.paint()
#!/usr/bin/env python import farnsworth import config import constants import datetime import time sign = farnsworth.sign( provides_logo=False, is_dynamic=True, preferred_duration=15.0 ) octgif=sign.locate_file('october.gif') octsprite=farnsworth.sprite(gif_source=octgif,scale_y_to=config.PIXELS_HIGH) decgif=sign.locate_file('december.gif') decsprite=farnsworth.sprite(gif_source=decgif) tvegif=sign.locate_file('tvegif.gif') tvesprite=farnsworth.sprite(gif_source=tvegif) clock = farnsworth.clock(0.1) t=datetime.datetime.now() m=t.strftime("%B") d=t.strftime("%d") while True:
#!/usr/bin/python from time import sleep import farnsworth sign = farnsworth.sign( provides_logo=True, is_dynamic=False, preferred_duration=5.0 ) science = sign.locate_file('km_logo.bmp') s = farnsworth.sprite(base_image=science) while True: sign.front_layer().blank() s.paint( sign.front_layer() ) sign.paint() sleep(0.1)
"x": 40 }, { "file": "goomba.gif", "fps": 1, "x": 60 }, { "file": "qblock.gif", "fps": 5, "x": 80 } ] sign = farnsworth.sign( provides_logo=False, is_dynamic=True, preferred_duration=10.0 ) for gif in gifs: gif["file"] = sign.locate_file(gif["file"]) gif["sprite"] = farnsworth.sprite(gif_source=gif["file"], scale_y_to=config.PIXELS_HIGH) gif["sprite"].move_to( gif["x"], 0 ) gif["clock"] = farnsworth.clock( 1.0 / gif["fps"] ) while True: sign.front_layer().blank() for gif in gifs: if gif["clock"].tick(): gif["sprite"].advance_image() gif["sprite"].paint( sign.front_layer() ) sign.front_layer().render_string("CENTER","CENTER","FONT_5x5","GIF RENDERING",constants.COLORS['WHITE'] ) sign.paint()
#!/usr/bin/python import farnsworth sign = farnsworth.sign(provides_logo=False, is_dynamic=True, preferred_duration=9) pacman = farnsworth.sprite(sign.locate_file('pacman_1.bmp')) pacman.add_image(sign.locate_file('pacman_2.bmp')) pacman.add_image(sign.locate_file('pacman_3.bmp')) pacman.move_to(-16, 0) pacman.tween_to(95, 0, 95) blinky = farnsworth.sprite(sign.locate_file('blinky_1.bmp')) blinky.add_image(sign.locate_file('blinky_2.bmp')) blinky.move_to(-50, 0) blinky.tween_to(96, 0, 107) pellet1 = farnsworth.sprite(sign.locate_file('pellet.bmp')) pellet1.move_to(4, 7) pellet2 = farnsworth.sprite(sign.locate_file('pellet.bmp')) pellet2.move_to(12, 7) pellet3 = farnsworth.sprite(sign.locate_file('pellet.bmp')) pellet3.move_to(20, 7) pellet4 = farnsworth.sprite(sign.locate_file('pellet.bmp')) pellet4.move_to(28, 7)