Пример #1
0
 def __init__(self):
     self.tkKeyboard = Keyboard()
     self.ev = ""
     self.key = ""
     self.winx, self.winy = 0, 0
     self.width, self.height = 1920, 1180
     self.event_list = []
Пример #2
0
shader = Shader('shaders/uv_light')
#========================================

# load model_loadmodel
mymodel = Model(file_string='models/Triceratops/Triceratops.egg',
                name='Triceratops',
                x=0,
                y=-1,
                z=40,
                sx=0.005,
                sy=0.005,
                sz=0.005)
mymodel.set_shader(shader)

# Fetch key presses
mykeys = Keyboard()

while 1:
    DISPLAY.clear()

    mymodel.draw()
    mymodel.rotateIncZ(0.001)
    mymodel.rotateIncX(-0.00317543)
    mymodel.rotateIncY(0.11)

    k = mykeys.read()
    if k > -1:
        if k == 112: screenshot('Triceratops.jpg')
        elif k == 27:
            mykeys.close()
            DISPLAY.destroy()