Cooler ASCII Spinners? [closed]

做~自己de王妃 提交于 2019-11-28 02:31:12

Balloons...

. o O @ *
Joe Koberg

Lots of choices with Unicode, including ⌚ and ⌛!

  • ← ↖ ↑ ↗ → ↘ ↓ ↙

  • ▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▁

  • ▉▊▋▌▍▎▏▎▍▌▋▊▉

  • ▖ ▘ ▝ ▗

  • ┤ ┘ ┴ └ ├ ┌ ┬ ┐

  • ◢ ◣ ◤ ◥

  • ◰ ◳ ◲ ◱

  • ◴ ◷ ◶ ◵

  • ◐ ◓ ◑ ◒

  • ◡◡ ⊙⊙ ◠◠

  • ⣾⣽⣻⢿⡿⣟⣯⣷ ⠁⠂⠄⡀⢀⠠⠐⠈ The entire braille block, even in random order http://www.fileformat.info/info/unicode/block/braille_patterns/images.htm

If you have more than one character worth of space, you can use animated ASCII art. For example, you can do a progress bar like:

[          ]
[==        ]
[=====     ]
[========  ]

or a "bouncing ball" progress indicator (that moves back and forth) like:

(-*--------) // moving -->
(-----*----) // moving -->
(---------*) // moving -->
(--------*-) // moving <--
(---*------) // moving <--
(*---------) // moving <--

Something more advanced like this loading animation might also work.

Edit: There's also the "executive desk toy"

╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗
║    │││ \   ║    ║    ││││    ║    ║   / │││    ║    ║    ││││    ║
║    │││  O  ║ -> ║    ││││    ║ -> ║  O  │││    ║ -> ║    ││││    ║
║    OOO     ║    ║    OOOO    ║    ║     OOO    ║    ║    OOOO    ║

And of course there's the ultimate example of animated ASCII art, if you had the time to implement something similar (it would take "spicing up a console application" to the extreme).

Edit: If your console supports color, you can also spice up an otherwise-boring standard spinner by cycling through colors as you spin. Start off with a red line, then slowly fade through the rainbow up to violet as you spin. This can look especially cool with the "bouncing ball" indicator above if you have the ball "paint" the bar a different color on every pass.

Watch them in action here:

var nl = "\r\n";
var spinners = [
  "←↖↑↗→↘↓↙",
  "▁▃▄▅▆▇█▇▆▅▄▃",
  "▉▊▋▌▍▎▏▎▍▌▋▊▉",
  "▖▘▝▗",
  "▌▀▐▄",
  "┤┘┴└├┌┬┐",
  "◢◣◤◥",
  "◰◳◲◱",
  "◴◷◶◵",
  "◐◓◑◒",
  "|/-\\",
  ".oO@*", ["◡◡", "⊙⊙", "◠◠"],
  ["◜ ", " ◝", " ◞", "◟ "],
  "◇◈◆",
  "⣾⣽⣻⢿⡿⣟⣯⣷",
  "⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖⡗⡘⡙⡚⡛⡜⡝⡞⡟⡠⡡⡢⡣⡤⡥⡦⡧⡨⡩⡪⡫⡬⡭⡮⡯⡰⡱⡲⡳⡴⡵⡶⡷⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⢈⢉⢊⢋⢌⢍⢎⢏⢐⢑⢒⢓⢔⢕⢖⢗⢘⢙⢚⢛⢜⢝⢞⢟⢠⢡⢢⢣⢤⢥⢦⢧⢨⢩⢪⢫⢬⢭⢮⢯⢰⢱⢲⢳⢴⢵⢶⢷⢸⢹⢺⢻⢼⢽⢾⢿⣀⣁⣂⣃⣄⣅⣆⣇⣈⣉⣊⣋⣌⣍⣎⣏⣐⣑⣒⣓⣔⣕⣖⣗⣘⣙⣚⣛⣜⣝⣞⣟⣠⣡⣢⣣⣤⣥⣦⣧⣨⣩⣪⣫⣬⣭⣮⣯⣰⣱⣲⣳⣴⣵⣶⣷⣸⣹⣺⣻⣼⣽⣾⣿",
  "⠁⠂⠄⡀⢀⠠⠐⠈", [">))'>", " >))'>", "  >))'>", "   >))'>", "    >))'>", "   <'((<", "  <'((<", " <'((<"],
  ["    /\\O\n     /\\/\n    /\\\n   /  \\\n LOL  LOL", "     _O\n   //|_\n    |\n   /|\n   LLOL", "      O\n     /_\n     |\\\n    / |\n  LOLLOL"],
  [
    "╔════╤╤╤╤════╗\n║    │││ \\   ║\n║    │││  O  ║\n║    OOO     ║",
    "╔════╤╤╤╤════╗\n║    ││││    ║\n║    ││││    ║\n║    OOOO    ║",
    "╔════╤╤╤╤════╗\n║   / │││    ║\n║  O  │││    ║\n║     OOO    ║",
    "╔════╤╤╤╤════╗\n║    ││││    ║\n║    ││││    ║\n║    OOOO    ║"
  ],
  [
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\===%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\===%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\===%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\===%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\===%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\ ==%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\  =%^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\   %^,"+nl+
"        '     \\@   >"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\    ,^%"+nl+
"        '     \\@  <"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\    ,^%="+nl+
"        '     \\@  <"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\    ,^%=="+nl+
"        '     \\@  <"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"          '  \\    ,^%==="+nl+
"        '     \\@  <"+nl+
"      '        `\\/>     _"+nl+
"    '       ______>,^____\\"+nl+
"  '         \\-=-=-=-=-=-/{}"+nl+
"'-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"         '   \\    ,^%==="+nl+
"       '      \\@  <"+nl+
"     '         `\\/>     _"+nl+
"   '        ______>,^____\\"+nl+
" '          \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"        '    \\    ,^%==="+nl+
"     '        \\@  <"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"           '\\"+nl+
"        '    \\    ,^%==="+nl+
"     '        \\@  <"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"             '|"+nl+
"         '    |   ,^%---"+nl+
"     '        |@  <  \\"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"               '/"+nl+
"          '    /  ,^%---"+nl+
"      '       /@  <  \\"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"             '|"+nl+
"         '    |   ,^%---"+nl+
"     '        |@  <  \\"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"               '/"+nl+
"          '    /  ,^%---"+nl+
"      '       /@  <  \\"+nl+
"  '            `\\/>     _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                '/"+nl+
"           '    /   ,^%---"+nl+
"      '        /@  <   \\"+nl+
"  '             `\\/>    _"+nl+
"            ______>,^____\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                 '|"+nl+
"           '     /   ,^%---"+nl+
"      '         /@  <   \\"+nl+
"  '              `\\/>   _"+nl+
"            _______>,^___\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                 '\\"+nl+
"           '      |   ,^%---"+nl+
"      '          /@  <   \\"+nl+
"  '               `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                 '|"+nl+
"           '     /   ,^%---"+nl+
"      '         /@  <   \\"+nl+
"  '              `\\/>   _"+nl+
"            _______>,^___\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                 '\\"+nl+
"           '      |   ,^%---"+nl+
"      '          /@  <   \\"+nl+
"  '               `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"'                 '/"+nl+
"  '        '      / \\_,^%---"+nl+
"    ' '          /@  <   \\"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
";''"+nl+
"   '              '/ /"+nl+
"    '        '    /  \\,^%==="+nl+
"      '  '       /@  <"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
"   ;''"+nl+
"      '           '/ /"+nl+
"     '       '    /  \\,^%==="+nl+
"       ' '       /@  <"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
"     ;''"+nl+
"        '"+nl+
"       '          '/ /"+nl+
"         '   '    /  \\,^%==="+nl+
"                 /@  <"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
"       ;'"+nl+
"         '"+nl+
"       '          '/ /"+nl+
"        '   '     /  \\,^%=="+nl+
"                 /@  <"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
"            ; "+nl+
"          '"+nl+
"        '         '/ /"+nl+
"         '   '    /  \\,^%="+nl+
"                 /@  <"+nl+
"                  `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
"'.      ;'."+nl+
"  '-     .'       '/ _"+nl+
"*) /    '     '   /  \\=%"+nl+
"  _\\     ' '     /@    >"+nl+
"'~                `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
"`-."+nl+
"   '.        ;"+nl+
"     '-    .  '   '/_"+nl+
"{ (*) /   '   '   / \\==@^"+nl+
"     _\\   ' '    /@    >"+nl+
".;;'~             `\\/>  _"+nl+
"            ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
"  \\\\\\\\"+nl+
".-'   `-.   ;"+nl+
"         '.'"+nl+
"           '-   '|"+nl+
"     {{ (*) / '' |===@^"+nl+
"           _\\    |@   >"+nl+
"      .;;'~       `\\/>  _"+nl+
"/~~''~      ________>,^__\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
"        \\\\\\\\      ;"+nl+
"      .-'   `-.  '"+nl+
"   .-'         '. ''"+nl+
" .'              '-      \\"+nl+
"'          {{ (*) /===@^,/"+nl+
"-.               _\\    >"+nl+
"  ~-.       .;;'~|@ \\/> _"+nl+
"    ///~~''~______`__>,^_\\"+nl+
"            \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
"             \\\\\\\\ "+nl+
"           .-'   `-."+nl+
"        .-'         '."+nl+
"      .'              '-        \\"+nl+
"(`-.-'          {{ (*) /  ===@^,/"+nl+
" } .'~-.              _\\/     >"+nl+
" (/     ~-.      .;;'~ /   \\/> "+nl+
"          ///~''~_____/@____>,^"+nl+
"                 \\-=-=-`-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
"             \\\\\\\\      YIKES"+nl+
"           .-'   `-."+nl+
"        .-'         '.          /"+nl+
"      .'              '- ---@^,/"+nl+
" (`-.-'          {{ (*) /  /  >"+nl+
"  } .'~-.              _\\   \\/> "+nl+
"  (/     ~-.      .;;'~_____>,^"+nl+
"           ///~''~-=-=|@-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
"                       YIKES"+nl+
"              \\\\\\\\"+nl+
"            .-'   `-.          \\"+nl+
"         .-'         '.  ---@^,/"+nl+
"       .'              '-  /  >"+nl+
" (`-.-'          {{ (*) /   \\/> "+nl+
"  } .'~-.              _\\___>,^"+nl+
"  (/     ~-.      .;;'~/=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~/@-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",


" "+nl+
" "+nl+
"                       YIKES"+nl+
" "+nl+
"              \\\\\\\\             _"+nl+
"            .-'   `-.    ---@^,/"+nl+
"         .-'         '.    /  >"+nl+
"       .'              '-   \\/> "+nl+
" (`-.-' .  .  `  {{ (*) /___>,^"+nl+
"  } .'~-.    .  `      _\\-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-/-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
"                       YIKES"+nl+
" "+nl+
"                               _"+nl+
"  ` .         \\\\\\\\       ---@^,/"+nl+
"      `  `  .-'   `-.  .  '/  >"+nl+
"       ` .-'         '.  '  \\/> "+nl+
"       `'  `           '-___>,^"+nl+
" (`-.-' .  .  `  {{ (*) /-=-=-/{}"+nl+
"-~-~-~-~-~-~-`-.  . ` ' \\~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
"                       YIKES"+nl+
" "+nl+
"                               _"+nl+
"  ` .                 '  ---=^,/"+nl+
"      `  `         .   .   /  >"+nl+
"   `   `      \\\\\\\\   '      \\/> "+nl+
"      `  `  .-'   `-. ______>,^"+nl+
"       ` .-'         '.-=-=-=-/{}"+nl+
"~-~-~-~-~-.-~-~-~-'-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
"                       YIKES"+nl+
" "+nl+
"` .                     '      _"+nl+
"     `  `                ---@^,/"+nl+
"   `   `             '     /  >"+nl+
"     `  `                   \\/> "+nl+
"      `     `      __________>,^"+nl+
"             ` \\\\\\\\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~'    `-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
"                         ."+nl+
"                       '       _"+nl+
"  ` .                    ---@^,/"+nl+
"      `  `                 /  >"+nl+
"   `   `     .              \\/> "+nl+
"      `  `     .   __________>,^"+nl+
"       `     `   ` \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~\\\\\\\\.~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"  `   .                        _"+nl+
"   ``                '   ===-^,/"+nl+
" `      `                     >"+nl+
"     `             '        \\/> "+nl+
"         `      .  __________>,^"+nl+
"              `    \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-`-.-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" .   `                    '    _"+nl+
"   `      `              ===-^,/"+nl+
"                     .        >"+nl+
"         `       '          \\/> "+nl+
"             .     __________>,^"+nl+
"                `  \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"  `                            _"+nl+
"   `                     ===-^,/"+nl+
" `      `              '      >"+nl+
"     `                      \\/> "+nl+
"                   __________>,^"+nl+
"                   \\-=-=-=-=-=-/{я}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" `                        '    _"+nl+
"  `                      ===-^,/"+nl+
"                              >"+nl+
"                            \\/> "+nl+
"                   __________>,^"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                               _"+nl+
"                         ===%^,/"+nl+
"                              >"+nl+
"                            \\/> "+nl+
"                   __________>,^"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                               \\"+nl+
"                         ---%^,/"+nl+
"                           /  >"+nl+
"                            _/> "+nl+
"                   __________>,^"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                             _"+nl+
"                       ---%^,/ "+nl+
"                         /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                           />  _"+nl+
"                   _______/_>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===-^,"+nl+
"                            >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                          \\/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===-^,"+nl+
"                            >"+nl+
"                          \\/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                          \\/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                  Rats.  /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                  Rats.  /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                  Rats.  /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                 я  \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                  Rats.  /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                  Rats.  /  >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===-^,"+nl+
"                            >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ===%^,"+nl+
"                            >"+nl+
"                          _/>  _"+nl+
"                   _________>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-я~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
"                         /  >"+nl+
"                           />  _"+nl+
"                   _______/_>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"+nl+
"-ejm97-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~",

" "+nl+
" "+nl+
" "+nl+
" "+nl+
" "+nl+
"                       ---%^,"+nl+
" I lost my fishing rod.  /  >"+nl+
"                           />  _"+nl+
"                   _______/_>,^_\\"+nl+
"                   \\-=-=-=-=-=-/{}"+nl+
"-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~"+nl+
"~ejm97~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-"], // "Fishing" taken from http://asciimator.net/kangaroo/fishing.html
];



for (var s = 0; s < spinners.length; ++s) {
  var spinner = spinners[s];
  var div = document.createElement('div');
  var el = document.createElement('pre');
  div.appendChild(el);
  document.body.appendChild(div);

  (function(spinner, el) {
    var i = 0;
    setInterval(function() {
      el.innerHTML = spinner[i];
      i = (i + 1) % spinner.length;
    }, 300);
  })(spinner, el);
}
pre {
  font-family: monospace;
  font-size: 1.5em;
  font-weight: bold;
  border: 1px solid #eee;
  display: inline-block;
  margin: .25em;
}

There's more @ cli-spinners, courtesy of Sindre Sorhus.

You can nab the JSON for them here.

I JavaScriptified them here: JsBin

Definitely LOLLERSKATES!

    /\O    |    _O    |      O
     /\/   |   //|_   |     /_
    /\     |    |     |     |\
   /  \    |   /|     |    / |
 LOL  LOL  |   LLOL   |  LOLLOL
-----------+----------+-----------
  Frame 0  | Frame 1  |  Frame 2   

There used to be a a DOS linker named blinker, by Blink Inc. It would display an animation similar to this while it was working:

(o)(o)

(-)(-)

(_)(_)

With the first frame displaying for about a second, and the other two animating briefly once a second or two, making the command line appear to blink its eyes. The effect was pretty cool, actually.

The linker even had options to blink one eye, and you could choose which eye would blink.

I've used a cycle of

Working. 
Working..
Working...

Inspirational I know

fish is a Python module that animates an ASCII fish going back and forth, and who doesn't like the rare console fish?

>))'>
    >))'>
        >))'>
    <'((<
<'((<

All taken from:

http://llizard.cwahi.net/animals.html

Bats Flying!

                   /^v^\
         /^v^\                      /^v^\
                /^v^\

  /^v^\

Flap flap!

                   \^v^/
         \^v^/                      \^v^/
                \^v^/

  \^v^/

Wow wow An Archer!

       /\
      /__\_{)
     |--<<)__\
      \  /  (
       \/   )
           /|
           \ \
           ~ ~

         /|   \
        /_|_{)/
---<<   | |  )
        \ |  (
         \|  )
            /|
            \ \
            ~ ~
             \
         /|{)/
---<<   +-|-)
         \| (
            )
           /|
           \ \
           ~ ~

       /\
      /__\_{)
     |--<<)__\
      \  /  (
       \/ __)
           \ |__
          ~    ~

         /|   \
        /_|_{)/
---<<   | |  )
        \ |  (
         \|__)
           \ |__
           ~    ~


             \
         /|{)/
---<<   +-|-)
         \| (
          __)
           \ |__
          ~    ~

Super Cyclist

                        ---------- __o
                       --------  _ \<,_
                     -------    (*)/ (*)

Wheeeee!

Flying a Kite

                                                /\
                                               '\/
                                              '  +
                                             '     +
                                           '      +
                                         '         +
                                       '             +
                                     '                  +
                                   '
                                 '
                               '
                             '
                           '
                        '
                    '
                '
__          '
\o  .   '
 \\/
 /\
/ /

This fishing one is pretty hillarious as well

http://asciimator.net/kangaroo/fishing.html

If you know how far through the process you are I like the percentage bar. It looks nice, feels intuitive and is easy to implement:

| 0%

||||| 5%

|||||||||||||||||||||| 26%

||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 100%

(Examples above are not exact)

StefanoCudini

In Javascript using one jQuery selectors:

var spins = [
    "←↖↑↗→↘↓↙",
    "▁▃▄▅▆▇█▇▆▅▄▃",
    "▉▊▋▌▍▎▏▎▍▌▋▊▉",
    "▖▘▝▗",
    "┤┘┴└├┌┬┐",
    "◢◣◤◥",
    "◰ ◳ ◲ ◱",
    "◴◷◶◵",
    "◐◓◑◒",
    "|/-\\"];

    var spin = spins[0],
        title$ = $('title'),
        i=0;

    setInterval(function() {
        i = i==spin.length-1 ? 0 : ++i;
        title$.text('('+ spin[i] +') Loading...');
    },300);

Try these

  • '+', 'x'
  • 'v', '<', '^', '>'

I'm glad I'm not the only one crazy enough to waste time on this!

Here are my favourites (some using dos ascii codes):

             classic: "/-\\|";
       bouncing ball: ".oOo";
better bouncing ball: [46, 111, 79, 248, 79, 111]; // (.oO°Oo.)

[180, 217, 193, 192, 195, 218, 194, 191];  // ┤ ┘ ┴ └ ├ ┌ ┬ ┐
[185, 188, 202, 200, 204, 201, 203, 187];  // double piped version of that 
[219, 220, 223];                           // block colours

Makes a cute "rain" effect:

using System;
using System.Text;
using System.Threading;

namespace CSharpSandbox
{
    class Program
    {
        static Random rnd = new Random();
        static char[,] Step(char[,] matrix)
        {
            int width = matrix.GetUpperBound(0) + 1;
            int height = matrix.GetUpperBound(1) + 1;

            char[,] res = new char[width, height];
            for (int h = 0; h < height; h++)
            {
                for (int w = 0; w < width; w++)
                {
                    char c;
                    if (h == 0)
                        c = rnd.Next(2) == 0 ? ' ' : '*';
                    else
                        c = matrix[w, h - 1];

                    res[w, h] = c;
                }
            }

            return res;
        }

        static string ToString(char[,] matrix)
        {
            int width = matrix.GetUpperBound(0) + 1;
            int height = matrix.GetUpperBound(1) + 1;
            StringBuilder sb = new StringBuilder();

            for (int h = 0; h < height; h++)
            {
                for (int w = 0; w < width; w++)
                {
                    sb.Append(matrix[w, h]);
                }
                sb.AppendLine();
            }
            return sb.ToString();
        }

        static Timer timer;
        static void Spinner()
        {
            char[,] matrix = new char[10, 5];
            timer = new Timer(_ =>
                {
                    string s = ToString(matrix);

                    Console.SetCursorPosition(0, 0);
                    Console.Write(s);

                    matrix = Step(matrix);
                },
                null,
                0,
                200);
        }

        static void Main(string[] args)
        {
            Spinner();
            Console.ReadLine();
        }
    }
}

In one application, I saw 1,2,3,4,5,6,7,8,9,0.

Courtesy of a co-worker of mine, here's a nifty implementation in C:

#define COW 2172
char* moo = "MO ";
void wrap() {
    int i,j;
    for(i=0;doSomething(i);i++)
        j=COW-moo[i&3],fputs(&j,stderr);
}

From my analysis, it only works on a little-endian machine with at least 32-bit words and the ASCII character set. But it's rather diabolically clever.

I have seen

 echo -e "\033[41;1m$1 \033[0m"

In bash to continually build a progress bar based on a block character.

I wrote one that cycled through the standard \ | / - but the left a _ and moved on to the next position. It was intended to look as though there were a series of spinners, each dropping to the floor before the next one started. The need for this was that my program was repeatedly trying something and waiting for a certain result. I wanted to represent each time it tried and also how many times it had tried without using up a lot of screen space (or count).

After I wrote it it looked a lot less cool than I thought it would, but it served its purpose.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!