public function next()
    {
        if (!isset($this->states[++$this->index])) {
            $this->index = 0;
        }

        $state = $this->fab->paint(
            $this->states[$this->index]
        );

        foreach ($this->trajectories as &$trajectory) {
            if (count($trajectory) >= $this->maxWidth) {
                array_shift($trajectory);
            }

            $trajectory[] = $state;
        }

        return $this->trajectories;
    }
public function next()
    {
        if (!isset($this->states[++$this->index])) {
            $this->index = 0;
        }

        $state = $this->fab->paint(
            $this->states[$this->index]
        );

        foreach ($this->trajectories as &$trajectory) {
            if (count($trajectory) >= $this->maxWidth) {
                array_shift($trajectory);
            }

            $trajectory[] = $state;
        }

        return $this->trajectories;
    }
public function next ( ) { if ( ! isset ( $ this -> states [ ++ $ this -> index ] ) ) { $ this -> index = 0 ; } $ state = $ this -> fab -> paint ( $ this -> states [ $ this -> index ] ) ; foreach ( $ this -> trajectories as & $ trajectory ) { if ( count ( $ trajectory ) >= $ this -> maxWidth ) { array_shift ( $ trajectory ) ; } $ trajectory [ ] = $ state ; } return $ this -> trajectories ; }
Gets the next rainbow state in the rolling index.

@return array The next rainbow state.
Gets the next rainbow state in the rolling index .