Пример #1
0
def export_loop():
    global chrono, frame
    while chrono < movie_duration:
        chrono += DT
        frame += 1
        rules.tick(dt)
        # tick with the constant DT, regardless of real time interval
        # so that even if refresh is slow no frame should be missing
        glClear(GL_COLOR_BUFFER_BIT)
        shapes.paint()
        save_a_frame(frame)
        print(frame)
    print 'done'
    print 'image dir is : ', os.getcwd()
    exit(0)
Пример #2
0
def export_loop():
    global chrono, frame
    while chrono < movie_duration:
        chrono += DT
        frame += 1
        rules.tick(dt)
        # tick with the constant DT, regardless of real time interval
        # so that even if refresh is slow no frame should be missing
        glClear(GL_COLOR_BUFFER_BIT)
        shapes.paint()
        save_a_frame(frame)
        print(frame)
    print 'done'
    print'image dir is : ', os.getcwd()
    exit(0)
Пример #3
0
Файл: field.py Проект: msarch/py
def tick(dt):
    if paused:
        pass
    else:
        rules.tick(dt)
Пример #4
0
def tick(dt):
    if paused:
        pass
    else:
        rules.tick(dt)