Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnimatedSprite ¶
type AnimatedSprite struct {
// contains filtered or unexported fields
}
AnimatedSprite holds gif frames and manages timing. don't forget to call `a.Update(dt)`
func LoadGif ¶
func LoadGif(file io.Reader) (*AnimatedSprite, error)
LoadGif returns an AnimatedSprite
func (*AnimatedSprite) Draw ¶
func (a *AnimatedSprite) Draw(t pixel.Target, m pixel.Matrix)
Draw a gif frame onto a target
func (*AnimatedSprite) Update ¶
func (a *AnimatedSprite) Update(dt float64)
Update gif frame based on time that has passed since last call to Update Get dt in your mainloop like this: `dt = time.Since(last).Seconds()`
Click to show internal directories.
Click to hide internal directories.