animation

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidName

func IsValidName(name string) bool

Types

type Animation

type Animation struct {
	Parts  []*Part `json:"parts"`
	Width  int     `json:"width"`
	Height int     `json:"height"`
}

func NewAnimation

func NewAnimation() *Animation

func (*Animation) CanExport

func (a *Animation) CanExport() bool

func (*Animation) ExportAsGif

func (a *Animation) ExportAsGif(path string) (err error)

type AnimationP

type AnimationP struct {
	Name        string                     `json:"name"`
	Animation   *Animation                 `json:"animation"`
	SpriteSheet map[string]image.Rectangle `json:"spriteSheet"`
}

永続化用モデル

type Part

type Part struct {
	Sprite  sprite.Sprite `json:"sprite"`
	Scale   float64       `json:"scale"`
	DiffX   int           `json:"diffX"`
	DiffY   int           `json:"diffY"`
	Reverse bool          `json:"reverse"`
	Length  int           `json:"length"`
}

func NewPart

func NewPart(sprite sprite.Sprite, len int) *Part

Jump to

Keyboard shortcuts

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