Added a wide braille dot style

This commit is contained in:
Chris 2022-10-05 14:33:06 +02:00
parent 466dc76306
commit 99773d353a
2 changed files with 49 additions and 1 deletions

View File

@ -25,9 +25,11 @@ $spinner11 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\BrailleBounceStyl
$spinner12 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\BrailleTallDotsStyle::class); $spinner12 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\BrailleTallDotsStyle::class);
$spinner13 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\BrailleWideDotsStyle::class);
// And blast them out every 10ms! // And blast them out every 10ms!
while(true) { while(true) {
echo "\r $spinner1 $spinner2 $spinner3 $spinner4 $spinner5 $spinner6 $spinner7 $spinner8 $spinner9 $spinner10 $spinner11 $spinner12 "; echo "\r $spinner1 $spinner2 $spinner3 $spinner4 $spinner5 $spinner6 $spinner7 $spinner8 $spinner9 $spinner10 $spinner11 $spinner12 $spinner13 ";
usleep(10000); usleep(10000);
} }

View File

@ -0,0 +1,46 @@
<?php
namespace NoccyLabs\Spinner\Style;
class BrailleWideDotsStyle implements StyleInterface
{
public function getFrames(): array
{
return [
"",
"",
"",
"⢀⣠",
"⣀⣀",
"",
"⣆⡀",
"",
"",
"⠋⠁",
"⠉⠉",
"⠈⠙",
];
}
}
/*
| xxx0 xxx1 xxx2 xxx3 xxx4 xxx5 xxx6 xxx7 xxx8 xxx9 xxxA xxxB xxxC xxxD xxxE xxxF
280x |
281x |
282x |
283x |
284x |
285x |
286x |
287x |
288x |
289x |
28Ax |
28Bx |
28Cx |
28Dx |
28Ex |
28Fx |
*/