Versions in this module Expand all Collapse all v0 v0.0.1 Jan 8, 2026 Changes in this version + const ErrorNoTagByName + const PlayBackward + const PlayForward + const PlayPingPong + const PlayPingPongReverse + type File struct + FrameHeight int32 + FrameWidth int32 + Frames []Frame + Height int32 + ImagePath string + Layers []Layer + Path string + Slices []Slice + Tags []Tag + Width int32 + func Open(jsonPath string, fs fs.FS) (*File, error) + func Read(fileData []byte) *File + func (file *File) CreatePlayer() *Player + func (file *File) HasSlice(sliceName string) bool + func (file *File) HasTag(tagName string) bool + func (file *File) SliceByName(sliceName string) (Slice, bool) + func (file *File) SliceRect(sliceName string, frameIdx int) (Rect, bool) + func (file *File) SliceRectForTag(sliceName, tagName string, relFrame int) (Rect, bool) + func (file *File) TagByName(tagName string) (Tag, bool) + type Frame struct + Duration float32 + H int + Index int + Name string + Rotated bool + Src struct{ ... } + Trimmed bool + W int + X int + Y int + type Layer struct + BlendMode string + Name string + Opacity uint8 + type Player struct + CurrentTag Tag + File *File + FrameIndex int + OnFrameChange func() + OnLoop func() + OnTagEnter func(tag Tag) + OnTagExit func(tag Tag) + PlaySpeed float32 + PrevFrameIndex int + func (player *Player) Clone() *Player + func (player *Player) CurrentFrame() (Frame, bool) + func (player *Player) CurrentFrameCoords() (int, int, int, int) + func (player *Player) CurrentUVCoords() (float64, float64) + func (player *Player) FrameIndexInAnimation() int + func (player *Player) Play(tagName string) error + func (player *Player) SetFrameIndexInAnimation(frameIndex int) + func (player *Player) TouchingTagByName(tagName string) bool + func (player *Player) TouchingTags() []Tag + func (player *Player) Update(dt float32) + type Rect struct + H int + W int + X int + Y int + type Slice struct + Color int64 + Data string + Keys []SliceKey + Name string + func (slice Slice) IsEmpty() bool + type SliceKey struct + Frame int32 + H int + W int + X int + Y int + func (key SliceKey) Center() (int, int) + type Tag struct + Direction string + End int + File *File + Name string + Start int + func (tag Tag) IsEmpty() bool