/** * Displays animation on screen */ public function animate() { for ($time = 0; $time <= $this->meta['t']; $time += $this->meta['f']) { foreach ($this->frames as $frame) { fwrite(STDOUT, $frame); $this->sleepMilli($this->meta['f']); Console::moveCursorRel(-$this->meta['w'], -$this->meta['h']); $time += $this->meta['f']; // necessary, dont mess } } Console::moveCursorRel($this->meta['w'], $this->meta['h']); fwrite(STDOUT, "\n"); }
public function testIsCli() { $this->assertTrue(Console::isCli()); }