asesprite

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnimationNotFoundError

func AnimationNotFoundError(name string) error

func NewSpritesheet added in v0.0.1

func NewSpritesheet(decodedImage image.Image, jsonBytes []byte) (sprites.Spritesheet, error)

NewSpritesheet returns an implementation of SpriteSheetLoader from an Asesprite JSON payload and a sprite sheet image. Sprite sheet data must be in array-style format; hash format is unsupported at this time.

func NewSpritesheetFromFileSystem added in v0.0.1

func NewSpritesheetFromFileSystem(filesystem fs.FS, imagePath string, jsonPath string) (sprites.Spritesheet, error)

NewSpritesheet returns an implementation of SpriteSheetLoader from a filesystem. Sprite sheet data must be in array-style format; hash format is unsupported at this time.

func NewSpritesheetFromFiles added in v0.0.1

func NewSpritesheetFromFiles(imagePath string, jsonPath string) (sprites.Spritesheet, error)

NewSpritesheet returns an implementation of SpriteSheetLoader from disk. Sprite sheet data must be in array-style format; hash format is unsupported at this time.

Types

type AsespriteSpriteSheet added in v0.0.1

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

AsespriteSpriteSheet is the logical grouping of an Asesprite sprite sheet's image and its accompanying data.

func (*AsespriteSpriteSheet) AllAnimations added in v0.0.1

func (s *AsespriteSpriteSheet) AllAnimations() (map[string]*sprites.Animation, error)

func (*AsespriteSpriteSheet) Animation added in v0.0.1

func (spritesheet *AsespriteSpriteSheet) Animation(name string) (*sprites.Animation, error)

Jump to

Keyboard shortcuts

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