Загрузка данных


import turtle
import math

# --- Настройка окна ---
screen = turtle.Screen()
screen.setup(500, 600)
screen.bgcolor("#1a1a2e")
screen.title("Idle Shell 3.13.5")
screen.tracer(0)

t = turtle.Turtle()
t.hideturtle()
t.speed(0)
t.penup()

def circle(x, y, r, color):
    t.goto(x, y - r)
    t.setheading(0)
    t.fillcolor(color)
    t.pencolor(color)
    t.begin_fill()
    t.circle(r)
    t.end_fill()

def oval(x, y, rx, ry, color):
    t.goto(x, y)
    t.setheading(0)
    t.fillcolor(color)
    t.pencolor(color)
    t.begin_fill()
    for i in range(2):
        t.circle(rx, 90)
        t.circle(ry, 90)
    t.end_fill()

def line(x1, y1, x2, y2, color, w):
    t.goto(x1, y1)
    t.pencolor(color)
    t.pensize(w)
    t.pendown()
    t.goto(x2, y2)
    t.penup()

def draw_girl(x, y, squash):
    t.clear()
    sy = 1 - squash * 0.15
    sx = 1 + squash * 0.15
    def X(v): return x + v * sx
    def Y(v): return y + v * sy

    # ноги
    line(X(-12), Y(20), X(-14), Y(55), "#f5c9a6", 8)
    line(X(12),  Y(20), X(14),  Y(55), "#f5c9a6", 8)

    # платье
    t.goto(X(-25), Y(-20))
    t.fillcolor("#ff6b9d")
    t.pencolor("#ff6b9d")
    t.begin_fill()
    t.goto(X(25), Y(-20))
    t.goto(X(35), Y(30))
    t.goto(X(-35), Y(30))
    t.goto(X(-25), Y(-20))
    t.end_fill()
    t.penup()

    # руки
    line(X(-25), Y(-10), X(-42), Y(10), "#f5c9a6", 6)
    line(X(25),  Y(-10), X(42),  Y(10), "#f5c9a6", 6)

    # задние волосы
    oval(X(0), Y(-10), 38 * sx, 45 * sy, "#7a4a2b")

    # голова
    circle(X(0), Y(-35), 28 * sx, "#ffdcb8")

    # чёлка
    circle(X(0), Y(-45), 29 * sx, "#8b5a2b")

    # глаза
    oval(X(-10), Y(-33), 4, 6, "#2a2a2a")
    oval(X(10),  Y(-33), 4, 6, "#2a2a2a")
    circle(X(-11), Y(-35), 1.5, "white")
    circle(X(9),   Y(-35), 1.5, "white")

    # румянец
    oval(X(-16), Y(-26), 5, 3, "#ff9eb5")
    oval(X(16),  Y(-26), 5, 3, "#ff9eb5")

    # улыбка
    t.goto(X(-5), Y(-26))
    t.pencolor("#c96a7a")
    t.pensize(2)
    t.setheading(-60)
    t.pendown()
    t.circle(6, 120)
    t.penup()
    t.setheading(0)

    # звёздочки
    for i in range(6):
        a = t._delay + i  # используем счётчик
    screen.update()

t._delay = 0

def animate():
    t._delay += 0.08
    jump = abs(math.sin(t._delay)) * 120
    y = -150 + jump
    squash = math.cos(t._delay * 2) * 0.3
    draw_girl(0, y, squash)
    screen.ontimer(animate, 30)

animate()
screen.mainloop()