Documentation ¶
Index ¶
- func FromJson(file string, obj any) error
- func FromJsonFs(f fs.FS, file string, obj any) error
- func ReadImage(p string) (image.Image, error)
- func ToJson(file string, obj any) error
- func Walk(base string, tileSet string, f func(sheet RawSpriteSheet, dir Directory) error) error
- func WalkDirs(base string, tileSet string, sheet RawSpriteSheet, ...) error
- func WalkSheets(base string, tileSet string, f func(sheet RawSpriteSheet) error) error
- func WriteImage(file string, img image.Image) error
- type Directory
- type File
- type RawSprite
- type RawSpriteSheet
- type Sprite
- type SpriteSheet
- type TileSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WalkDirs ¶
func WalkDirs(base string, tileSet string, sheet RawSpriteSheet, f func(sheet RawSpriteSheet, dir Directory) error) error
func WalkSheets ¶
func WalkSheets(base string, tileSet string, f func(sheet RawSpriteSheet) error) error
Types ¶
type RawSprite ¶
type RawSprite struct { Id string `json:"id"` File []string `json:"file"` Height int `json:"height,omitempty"` YOffset int `json:"y_offset,omitempty"` AnimFrames int `json:"animation_frames,omitempty"` AnimSpeed int `json:"animation_speed,omitempty"` Multitile [][]string `json:"multitile,omitempty"` }
type RawSpriteSheet ¶
type Sprite ¶
type Sprite struct { Id string `json:"id"` Index []int `json:"index"` Height int `json:"height,omitempty"` YOffset int `json:"y_offset,omitempty"` AnimFrames int `json:"animation_frames,omitempty"` AnimSpeed int `json:"animation_speed,omitempty"` Multitile [][]int `json:"multitile,omitempty"` }
func (*Sprite) IsAnimated ¶
func (*Sprite) IsMultitile ¶
type SpriteSheet ¶
Click to show internal directories.
Click to hide internal directories.