控制帧率的海龟画圆动画_control fps in turtle animation

"""
   控制帧率的海龟画圆动画_control fps in turtle animation
   本程序结合了pygame的时钟功能,这样能控制帧率fps
"""

import turtle
import pygame

screen = turtle.getscreen()   # 获取屏幕
screen.delay(0)
screen.tracer(0)              # 关闭自动刷新

turtle.shape('turtle')
turtle.penup()

fps = 60                      # 设定帧率
clock = pygame.time.Clock()

You must log in to read the rest of this article. Please log in or register as a user.