Documentation ¶
Index ¶
- type Animation
- type AnimationFrame
- type AseFrame
- type AseFrameTag
- type AseMeta
- type AseSheet
- type Load
- func (load *Load) AseAnimation(spritesheet *Spritesheet, filepath string) (*Animation, error)
- func (load *Load) AseSheet(filepath string) (*AseSheet, error)
- func (load *Load) Data(filepath string) ([]byte, error)
- func (load *Load) Font(filepath string, size float64) (font.Face, error)
- func (load *Load) Image(filepath string) (image.Image, error)
- func (load *Load) Json(filepath string, dat interface{}) error
- func (load *Load) Mountpoints(filepath string) (packer.MountFrames, error)
- func (load *Load) Open(filepath string) (fs.File, error)
- func (load *Load) Sprite(filepath string, smooth bool) (*glitch.Sprite, error)
- func (load *Load) Spritesheet(filepath string, smooth bool) (*Spritesheet, error)
- func (load *Load) Texture(filepath string, smooth bool) (*glitch.Texture, error)
- func (load *Load) Yaml(filepath string, dat interface{}) error
- type Spritesheet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Animation ¶
type Animation struct { Frames map[string][]AnimationFrame // contains filtered or unexported fields }
TODO - Assumes that all animations share the same spritesheet
type AnimationFrame ¶
type AseFrameTag ¶
type AseMeta ¶
type AseMeta struct {
FrameTags []AseFrameTag `json:frameTags`
}
type Load ¶
type Load struct {
// contains filtered or unexported fields
}
func (*Load) AseAnimation ¶
func (load *Load) AseAnimation(spritesheet *Spritesheet, filepath string) (*Animation, error)
TODO - Assumptions: frame name is <filename>-<framenumber>.png (Aseprite doesn't export the file name. But you could maybe repack their spritesheet into your own)
func (*Load) Mountpoints ¶
func (load *Load) Mountpoints(filepath string) (packer.MountFrames, error)
func (*Load) Spritesheet ¶
func (load *Load) Spritesheet(filepath string, smooth bool) (*Spritesheet, error)
type Spritesheet ¶
type Spritesheet struct {
// contains filtered or unexported fields
}
func NewSpritesheet ¶
func (*Spritesheet) GetNinePanel ¶
func (s *Spritesheet) GetNinePanel(name string, border glm.Rect) (*glitch.NinePanelSprite, error)
func (*Spritesheet) Picture ¶
func (s *Spritesheet) Picture() *glitch.Texture
Click to show internal directories.
Click to hide internal directories.