anim

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TICKS_PER_SECOND = 10
)

Variables

View Source
var Animations = map[string]Creator{}
View Source
var EXAMPLE_MD string

Functions

func NewAnimator

func NewAnimator(
	ctx context.Context,
	animation Animation,
	initial image.Image,
	fps int,
	options ...Option,
) *taro.Program

func NewStory added in v0.1.6

func NewStory(
	ctx context.Context,
	creator Creator,
) *taro.Program

Types

type Animation

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

func RandomAnimation added in v0.1.6

func RandomAnimation() Animation

type Animator

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

func (*Animator) Init added in v0.1.6

func (a *Animator) Init() tea.Cmd

func (*Animator) Update added in v0.1.6

func (a *Animator) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Animator) View added in v0.1.6

func (a *Animator) View(state *tty.State)

type Collapse added in v0.1.5

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

func (*Collapse) Init added in v0.1.5

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

func (*Collapse) Update added in v0.1.5

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

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 Creator added in v0.1.6

type Creator func() Animation

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 Markdown added in v0.1.6

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

func (*Markdown) Init added in v0.1.6

func (s *Markdown) Init() tea.Cmd

func (*Markdown) Update added in v0.1.6

func (s *Markdown) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Markdown) View added in v0.1.6

func (s *Markdown) View(state *tty.State)

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

type Option added in v0.1.6

type Option func(*Animator)

func WithStartTime added in v0.1.6

func WithStartTime(start time.Time) Option

type Story added in v0.1.6

type Story struct {
	util.Lifetime
	// contains filtered or unexported fields
}

func (*Story) Init added in v0.1.6

func (s *Story) Init() tea.Cmd

func (*Story) Update added in v0.1.6

func (s *Story) Update(msg tea.Msg) (taro.Model, tea.Cmd)

func (*Story) View added in v0.1.6

func (s *Story) View(state *tty.State)

Jump to

Keyboard shortcuts

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