Versions in this module Expand all Collapse all v0 v0.3.1 Sep 3, 2019 v0.3.0 Sep 3, 2019 Changes in this version type File + func Open(filePath string) (*File, error) + func (f *File) Animation(animation string) *Animation + func (f *File) FrameBoundaries() Boundary + func (f *File) Slice(slice string) *Slice v0.2.0 Sep 3, 2019 v0.1.0 Sep 3, 2019 Changes in this version + type Animation struct + Direction Direction + From int + Name string + To int + type AnimationInfo struct + CurrentAnimation *Animation + CurrentFrame int + PlaySpeed float32 + Playing bool + PrevCurrentFrame int + PrevFrame int + func (i *AnimationInfo) AnimationFinished() bool + func (i *AnimationInfo) IsPlaying(animation string) bool + type Boundary struct + Height int + Width int + X int + Y int + func (b *Boundary) Rectangle() *image.Rectangle + type Direction uint8 + const PlayForward + const PlayPingPong + const PlayReverse + func DirectionFromString(str string) Direction + func (d *Direction) UnmarshalJSON(data []byte) error + func (i Direction) String() string + type Error struct + func (e *Error) Error() string + func (e *Error) Unwrap() error + type File struct + Frames FrameData + Meta MetaData + func NewFile(data []byte) (*File, error) + func (f *File) GetAnimation(animation string) *Animation + func (f *File) GetFrameBoundaries() Boundary + func (f *File) GetSlice(slice string) *Slice + func (f *File) HasAnimation(animation string) bool + func (f *File) HasSlice(slice string) bool + func (f *File) Play(animation string) error + func (f *File) Update(dt float32) + type Frame struct + Duration int + FileName string + FrameBoundaries Boundary + Rotated bool + SourceSize WidthHeight + SpriteSourceSize Boundary + Trimmed bool + type FrameData struct + IsMap bool + func (d *FrameData) FrameAtIndex(index int) Frame + func (d *FrameData) FrameAtKey(key string) Frame + func (d *FrameData) FrameMap() map[string]Frame + func (d *FrameData) FrameSlice() []Frame + func (d *FrameData) LenFrames() int + func (d *FrameData) UnmarshalJSON(data []byte) error + type Layer struct + BlendMode string + Name string + Opacity int + type MetaData struct + Animations []Animation + App string + Format string + Image string + Layers []Layer + Scale string + Size WidthHeight + Slices []Slice + Version string + func (m *MetaData) LenAnimations() int + func (m *MetaData) LenLayers() int + func (m *MetaData) LenSlices() int + type Slice struct + Color string + Keys []SliceKey + Name string + type SliceKey struct + Bounds Boundary + Center Boundary + FrameNum int + Pivot image.Point + type WidthHeight struct + Height int + Width int