anim

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TICKS_PER_SECOND = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Animation

type Animation interface {
	Init(image.Image)
	Update(time.Duration) image.Image
}

func Random

func Random() Animation

type Animator

type Animator struct {
	*screen.Trigger
	// contains filtered or unexported fields
}

func NewAnimator

func NewAnimator(
	ctx context.Context,
	animation Animation,
	initial image.Image,
	fps int,
) *Animator

func (*Animator) Render

func (a *Animator) Render(size mux.Size) *tty.State

func (*Animator) Write

func (a *Animator) Write(data []byte) (n int, err error)

type Conway

type Conway struct {
	// contains filtered or unexported fields
}

func (*Conway) Init

func (c *Conway) Init(start image.Image)

func (*Conway) Update

func (c *Conway) Update(delta time.Duration) image.Image

type Cyform

type Cyform struct {
	// contains filtered or unexported fields
}

func (*Cyform) Init

func (c *Cyform) Init(start image.Image)

func (*Cyform) Update

func (c *Cyform) Update(delta time.Duration) image.Image

type Midjo

type Midjo struct {
	// contains filtered or unexported fields
}

func (*Midjo) Init

func (m *Midjo) Init(start image.Image)

func (*Midjo) Update

func (mid *Midjo) Update(delta time.Duration) image.Image

Jump to

Keyboard shortcuts

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