Dans une application console, un spinner ascii peut être utilisé, comme le curseur d'attente de l'interface graphique, pour indiquer que le travail est en cours. Une roulette commune fait défiler ces 4 caractères: '|', '/', '-', '\'
Quelles sont les autres séquences d'animation cycliques pour pimenter une application console?
Des ballons...
. o O @ *
Beaucoup de choix avec Unicode, y compris et ⌛!
← ↖ ↑ ↗ → ↘ ↓ ↙
▁ ▂ ▃ ▄ ▅ ▆ ▇ █ ▇ ▆ ▅ ▄ ▃ ▁
▉▊▋▌▍▎▏▎▍▌▋▊▉
▖ ▘ ▝ ▗
┤ ┘ ┴ └ ├ ┌ ┬ ┐
◢ ◣ ◤ ◥
◰ ◳ ◲ ◱
◴ ◷ ◶ ◵
◐ ◓ ◑ ◒
◡◡ ⊙⊙ ◠◠
⣾⣽⣻⢿⡿⣟⣯⣷ ⠁⠂⠄⡀⢀⠠⠐⠈
L'ensemble du bloc braille, même dans un ordre aléatoire http://www.fileformat.info/info/unicode/block/braille_patterns/images.htm
Si vous avez plus d’un caractère d’espace, vous pouvez utiliser animée ASCII art. Par exemple, vous pouvez créer une barre de progression telle que:
[ ]
[== ]
[===== ]
[======== ]
ou un indicateur de progression "balle qui rebondit" (qui se déplace d'avant en arrière) comme:
(-*--------) // moving -->
(-----*----) // moving -->
(---------*) // moving -->
(--------*-) // moving <--
(---*------) // moving <--
(*---------) // moving <--
Quelque chose de plus avancé comme cette animation de chargement pourrait également fonctionner.
Edit: Il y a aussi le "jouet de bureau"
╔════╤╤╤╤════╗ ╔════╤╤╤╤════╗ ╔════╤╤╤╤════╗ ╔════╤╤╤╤════╗
║ │││ \ ║ ║ ││││ ║ ║ / │││ ║ ║ ││││ ║
║ │││ O ║ -> ║ ││││ ║ -> ║ O │││ ║ -> ║ ││││ ║
║ OOO ║ ║ OOOO ║ ║ OOO ║ ║ OOOO ║
Et bien sûr, il y a le exemple ultime d'animation ASCII art , ==, si vous aviez le temps de mettre en oeuvre quelque chose de similaire (il faudrait "pimenter une application console" au extrême).
Éditez: Si votre console prend en charge les couleurs, vous pouvez également pimenter une roulette standard fastidieuse en faisant défiler les couleurs. Commencez avec une ligne rouge, puis passez lentement à travers l’arc-en-ciel jusqu’à violet en tournant. Cela peut sembler particulièrement cool avec l'indicateur "balle qui rebondit" ci-dessus si vous avez la balle "Peindre" la barre d'une couleur différente à chaque passage.
Regardez-les en action ici:
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+
" ' \\@ >"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="+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;
}
Il y a plus de @ cli-spinners , avec l'aimable autorisation de Sindre Sorhus.
Vous pouvez attraper le JSON pour eux ici .
Je les ai authentifiés ici: JsBin
Certainement LOLLERSKATES!
/\O | _O | O
/\/ | //|_ | /_
/\ | | | |\
/ \ | /| | / |
LOL LOL | LLOL | LOLLOL
-----------+----------+-----------
Frame 0 | Frame 1 | Frame 2
Il existait un éditeur de liens DOS nommé blinker, de Blink Inc. Il affichait une animation similaire à celle-ci lorsqu'il fonctionnait:
(o)(o)
(-)(-)
(_)(_)
Avec le premier cadre affiché pendant environ une seconde et les deux autres animant brièvement une ou deux secondes, la ligne de commande semble clignoter des yeux. L'effet était plutôt cool, en fait.
L'éditeur de liens avait même des options pour cligner d'un œil, et vous pouviez choisir quel œil clignerait.
J'ai utilisé un cycle de
Working.
Working..
Working...
Je sais que c'est inspirant
fish
est un module Python qui anime un poisson ASCII qui va et vient, et qui ne le fait pas comme le poisson console rare?
>))'>
>))'>
>))'>
<'((<
<'((<
Tous pris de:
http://llizard.cwahi.net/animals.html
Les chauves-souris en vol!
/^v^\
/^v^\ /^v^\
/^v^\
/^v^\
Flap Flap!
\^v^/
\^v^/ \^v^/
\^v^/
\^v^/
Wow wow un archer!
/\
/__\_{)
|--<<)__\
\ / (
\/ )
/|
\ \
~ ~
/| \
/_|_{)/
---<< | | )
\ | (
\| )
/|
\ \
~ ~
\
/|{)/
---<< +-|-)
\| (
)
/|
\ \
~ ~
/\
/__\_{)
|--<<)__\
\ / (
\/ __)
\ |__
~ ~
/| \
/_|_{)/
---<< | | )
\ | (
\|__)
\ |__
~ ~
\
/|{)/
---<< +-|-)
\| (
__)
\ |__
~ ~
Super cycliste
---------- __o
-------- _ \<,_
------- (*)/ (*)
Wheeeee!
Faire voler un cerf-volant
/\
'\/
' +
' +
' +
' +
' +
' +
'
'
'
'
'
'
'
'
__ '
\o . '
\\/
/\
/ /
Cette pêche est assez jolie aussi
Si vous savez à quel point du processus vous êtes, j'aime bien la barre de pourcentage. Il a l'air agréable, intuitif et facile à mettre en œuvre:
| 0%
||||| 5%
|||||||||||||||||||||| 26%
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 100%
(Les exemples ci-dessus ne sont pas exacts)
En Javascript en utilisant un sélecteur jQuery:
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);
Essayez ces
Je suis heureux de ne pas être le seul à être assez fou pour perdre du temps à ce sujet!
Voici mes favoris (certains utilisant des codes dos ascii):
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
Fait un effet "pluie" mignon:
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();
}
}
}
Dans une application, j'ai vu 1,2,3,4,5,6,7,8,9,0.
Avec l'aimable autorisation de l'un de mes collègues, voici une mise en œuvre astucieuse en 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);
}
D'après mon analyse, cela ne fonctionne que sur une machine little-endian avec au moins 32 mots et le jeu de caractères ASCII). Mais c'est plutôt diaboliquement intelligent.
J'ai vu
echo -e "\033[41;1m$1 \033[0m"
Dans bash, construisez continuellement une barre de progression basée sur un caractère de bloc.
J'ai écrit un livre qui a traversé la norme\|/- mais la gauche a _ et passa à la position suivante. C'était censé ressembler à une série de fileuses, chacune tombant au sol avant que la suivante ne commence. La nécessité était que mon programme essayait à plusieurs reprises et attendait un résultat donné. Je voulais représenter chaque fois qu'il essayait et aussi combien de fois il l'avait essayé sans utiliser beaucoup d'espace à l'écran (ou compter).
Après l’avoir écrit, c’était beaucoup moins cool que je ne le pensais, mais cela servait à quoi.