io

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(name string, s Filesystem) ([]byte, error)

Types

type AnimG added in v0.3.0

type AnimG struct {
	Name string
	Anim core.Animation
}

type Atlas

type Atlas struct {
	// contains filtered or unexported fields
}

func ParseAtlas

func ParseAtlas(b []byte) (*Atlas, error)

func (*Atlas) GetAnimClip added in v0.3.0

func (a *Atlas) GetAnimClip(name string) core.AnimationClip

func (*Atlas) GetAnimClips added in v0.3.0

func (a *Atlas) GetAnimClips() []ClipG

func (*Atlas) GetAnimation added in v0.3.0

func (a *Atlas) GetAnimation(name string) core.Animation

func (*Atlas) GetAnimations added in v0.3.0

func (a *Atlas) GetAnimations() []AnimG

func (*Atlas) GetSubImage added in v0.3.0

func (a *Atlas) GetSubImage(name string) *Sprite

func (*Atlas) GetSubImages added in v0.3.0

func (a *Atlas) GetSubImages() []*Sprite

type ClipG added in v0.3.0

type ClipG struct {
	Name     string
	AnimClip core.AnimationClip
}

type Container

type Container interface {
	Len() int64
	FS() Filesystem
	Load(name string) chan struct{}
	Unload(name string) (bool, error)
	LoadAll(names []string) (progress chan float64, done chan struct{})
	UnloadAll()
	Get(name string) ([]byte, error)
	GetImage(name string) (image.Image, error)
	GetAtlas(name string) (*Atlas, error)
}

func NewContainer

func NewContainer(ctx context.Context, fs Filesystem) Container

type File

type File interface {
	io.Closer
	io.Reader
	io.Seeker
	Stat() (FileInfo, error)
}

File interface is almost a copy of http.File

type FileInfo

type FileInfo interface {
	Size() int64
	IsDir() bool
}

FileInfo interface

type Filesystem

type Filesystem interface {
	Open(name string) (File, error)
	Stat(name string) (FileInfo, error)
}

Filesystem interface

type Sprite added in v0.3.0

type Sprite struct {
	Name  string
	Image *ebiten.Image
	Pivot image.Point
}

type SubImageG added in v0.3.0

type SubImageG struct {
	Name     string
	SubImage *ebiten.Image
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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