Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created October 10, 2012 20:36
Show Gist options
  • Save tshirtman/3868265 to your computer and use it in GitHub Desktop.
Save tshirtman/3868265 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.lang import Builder
Builder.load_string(
'''
#:import Image kivy.core.image.Image
#:import time time.time
Widget:
texture_1: Image('Sky_back_layer.png').texture
texture_2: Image('Vegetation_(middle_layer).png').texture
texture_2: Image('Ground_(front_layer).png').texture
texture_1.wrap: 'repeat'
texture_2.wrap: 'repeat'
texture_3.wrap: 'repeat'
texture_1.uvpos: time() * 0.001, 0
texture_2.uvpos: time() * 0.01, 0
texture_3.uvpos: time() * 0.1, 0
canvas:
Rectangle:
pos: self.pos
size: self.size
texture: self.texture_1
Rectangle:
pos: self.pos
size: self.size
texture: self.texture_1
Rectangle:
pos: self.pos
size: self.size
texture: self.texture_1
''')
class MyApp(App):
pass
if __name__ == '__main__':
MyApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment