Versions in this module Expand all Collapse all v3 v3.0.1 Aug 8, 2022 v3.0.0 Aug 8, 2022 Changes in this version + const Paused + const Playing + var DefaultDelta = time.Millisecond * 16 + func DrawAnime(screen *ebiten.Image, anim *Animation, x, y, rot, sx, sy, ox, oy float64) + func DrawAnimeWithOpts(screen *ebiten.Image, anim *Animation, opts *DrawOptions, ...) + func DrawSprite(screen *ebiten.Image, spr *Sprite, index int, ...) + func DrawSpriteWithOpts(screen *ebiten.Image, spr *Sprite, index int, opts *DrawOptions, ...) + func Nop(anim *Animation, loops int) + func Pause(anim *Animation, loops int) + func PauseAtEnd(anim *Animation, loops int) + func PauseAtStart(anim *Animation, loops int) + type Animation struct + func New(img *ebiten.Image, frames []*image.Rectangle, durations interface{}, ...) *Animation + func NewAnimation(sprite *Sprite, durations interface{}, onLoop ...OnLoop) *Animation + func (anim *Animation) Clone() *Animation + func (anim *Animation) Draw(screen *ebiten.Image, opts *DrawOptions) + func (anim *Animation) DrawWithShader(screen *ebiten.Image, opts *DrawOptions, shaderOpts *ShaderOptions) + func (anim *Animation) Durations() []time.Duration + func (anim *Animation) GoToFrame(position int) + func (anim *Animation) H() int + func (anim *Animation) Pause() + func (anim *Animation) PauseAtEnd() + func (anim *Animation) PauseAtStart() + func (anim *Animation) Position() int + func (anim *Animation) Resume() + func (anim *Animation) SetDurations(durations interface{}) + func (anim *Animation) Size() (int, int) + func (anim *Animation) Sprite() *Sprite + func (anim *Animation) Status() Status + func (anim *Animation) Timer() time.Duration + func (anim *Animation) TotalDuration() time.Duration + func (anim *Animation) Update() + func (anim *Animation) UpdateWithDelta(elapsedTime time.Duration) + func (anim *Animation) W() int + type DrawOptions struct + ColorM ebiten.ColorM + CompositeMode ebiten.CompositeMode + OriginX float64 + OriginY float64 + Rotate float64 + ScaleX float64 + ScaleY float64 + X float64 + Y float64 + func DrawOpts(x, y float64, args ...float64) *DrawOptions + func (drawOpts *DrawOptions) Reset() + func (drawOpts *DrawOptions) ResetValues(x, y, rot, sx, sy, ox, oy float64) + func (drawOpts *DrawOptions) SetOrigin(x, y float64) + func (drawOpts *DrawOptions) SetPos(x, y float64) + func (drawOpts *DrawOptions) SetRot(r float64) + func (drawOpts *DrawOptions) SetScale(x, y float64) + type Grid struct + func NewGrid(frameWidth, frameHeight, imageWidth, imageHeight int, args ...int) *Grid + func (g *Grid) Frames(args ...interface{}) []*image.Rectangle + func (g *Grid) G(args ...interface{}) []*image.Rectangle + func (g *Grid) GetFrames(args ...interface{}) []*image.Rectangle + func (g *Grid) Height() int + func (g *Grid) Width() int + type OnLoop func(anim *Animation, loops int) + type ShaderOptions struct + Images [3]*ebiten.Image + Shader *ebiten.Shader + Uniforms map[string]interface{} + type Sprite struct + func NewSprite(img *ebiten.Image, frames []*image.Rectangle) *Sprite + func (spr *Sprite) Draw(screen *ebiten.Image, index int, opts *DrawOptions) + func (spr *Sprite) DrawWithShader(screen *ebiten.Image, index int, opts *DrawOptions, shaderOpts *ShaderOptions) + func (spr *Sprite) FlipH() + func (spr *Sprite) FlipV() + func (spr *Sprite) H() int + func (spr *Sprite) Height() int + func (spr *Sprite) IsEnd(index int) bool + func (spr *Sprite) Length() int + func (spr *Sprite) LoopIndex(index int) int + func (spr *Sprite) RandomIndex() int + func (spr *Sprite) SetFlipH(flipH bool) + func (spr *Sprite) SetFlipV(flipV bool) + func (spr *Sprite) Size() (int, int) + func (spr *Sprite) W() int + func (spr *Sprite) Width() int + type SpriteSize struct + H int + W int + type SpriteSizeF struct + H float64 + W float64 + type Status int Other modules containing this package github.com/yohamta/ganim8 github.com/yohamta/ganim8/v2