36 lines
1.1 KiB
PHP
36 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once __DIR__."/../vendor/autoload.php";
|
|
|
|
use NoccyLabs\Spinner\Spinner;
|
|
|
|
// Create three spinners with various refresh rates...
|
|
$spinner1 = new Spinner(fps:5);
|
|
$spinner2 = new Spinner(fps:10);
|
|
$spinner3 = new Spinner(fps:20);
|
|
|
|
Spinner::setDefaultStyle(NoccyLabs\Spinner\Style\RollingBallStyle::class);
|
|
$spinner4 = new Spinner(fps:5);
|
|
$spinner5 = new Spinner(fps:10);
|
|
$spinner6 = new Spinner(fps:20);
|
|
|
|
Spinner::setDefaultStyle(NoccyLabs\Spinner\Style\SpinnerStyle::class);
|
|
$spinner7 = new Spinner(fps:5);
|
|
$spinner8 = new Spinner(fps:10);
|
|
$spinner9 = new Spinner(fps:20);
|
|
|
|
$spinner10 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\SpinningBarStyle::class);
|
|
|
|
$spinner11 = new Spinner(fps:10, style:NoccyLabs\Spinner\Style\BrailleBounceStyle::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!
|
|
while(true) {
|
|
echo "\r $spinner1 $spinner2 $spinner3 $spinner4 $spinner5 $spinner6 $spinner7 $spinner8 $spinner9 $spinner10 $spinner11 $spinner12 $spinner13 ";
|
|
usleep(10000);
|
|
}
|
|
|