aseprite

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 11 Imported by: 11

README

aseprite

Aseprite Go Parser

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cell added in v0.1.1

type Cell struct {
	PositionX int16
	PositionY int16
	Opacity   int8
	Image     *image.RGBA

	Duration uint16

	EbitenImage *ebiten.Image
	// contains filtered or unexported fields
}

Cell represents an image

type Layer

type Layer struct {
	BlendMode int16
	Name      string
	Opacity   int8
	Flags     int16

	Cells []*Cell
	// contains filtered or unexported fields
}

Layer represents layers of a sprite

type Sprite

type Sprite struct {
	Width  uint16
	Height uint16

	Tags []*Tag

	Layers map[string]*Layer
	// contains filtered or unexported fields
}

Sprite represents an aseprite sprite file

func Decode added in v0.1.3

func Decode(f io.ReadSeeker) (*Sprite, error)

Decode will decode provided asperite file

func Load

func Load(path string) (*Sprite, error)

Load loads a sprite

type Tag added in v0.1.7

type Tag struct {
	From               int16
	To                 int16
	Name               string
	Color              color.RGBA
	AnimationDirection int8
}

Tag represents animation groupings

Jump to

Keyboard shortcuts

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