4]:
        jumpCycle = 20

    if key[0]:
        if not key[1]:
            playerDir = playerDir - 0.07 # left
            change = True
    elif key[1]:
        playerDir = playerDir + 0.07 # right
        change = True

    if change:
        playerDir = playerDir + 2 * pi
        playerDir = playerDir % (2 * pi)
        doc["sky"].style.backgroundPosition = "{}px 0".format(
            floor(1 - playerDir / (2 * pi) * 2400))

    if key[2] and not key[3]:
        if playerVelY < 0.1:
            playe