renderer

package
v0.0.0-...-50a2a80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2024 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTickDelay = time.Millisecond * 120

Variables

This section is empty.

Functions

This section is empty.

Types

type Renderer

type Renderer struct {

	// A initialized tcell screen instance.
	Screen tcell.Screen
	// The amount of random fish to generate. This is static for now, but
	// planned to be dynamic in the future.
	SwarmSize int
	// A delay to reduce the render speed with.
	// As defined in `render.DefaultTickDelay` the default delay is 120ms.
	TickDelay time.Duration
	// Signals if the renderer has been stopped recently. This can be used
	// as a hook to stop and start the renderer.
	Stopped chan bool
	// contains filtered or unexported fields
}

func New

func New(sc tcell.Screen, swarmSize int, tickDelay time.Duration) *Renderer

func (*Renderer) Destroy

func (r *Renderer) Destroy()

func (*Renderer) Reset

func (r *Renderer) Reset()

func (*Renderer) Restart

func (r *Renderer) Restart()

func (*Renderer) Start

func (r *Renderer) Start()

func (*Renderer) Stop

func (r *Renderer) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL