Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AudioExtensions = map[string]AudioType{ ".wav": AudioTypeWav, ".ogg": AudioTypeOgg, ".mp3": AudioTypeMP3, }
Functions ¶
Types ¶
type Atlas ¶
type Atlas struct {
// contains filtered or unexported fields
}
func ParseAtlas ¶
func (*Atlas) GetAnimClip ¶ added in v0.3.0
func (a *Atlas) GetAnimClip(name string) graphics.AnimationClip
func (*Atlas) GetAnimClips ¶ added in v0.3.0
func (*Atlas) GetAnimation ¶ added in v0.3.0
func (*Atlas) GetAnimations ¶ added in v0.3.0
func (*Atlas) GetSubImage ¶ added in v0.3.0
func (*Atlas) GetSubImages ¶ added in v0.3.0
type AudioBuffer ¶ added in v0.7.0
func (*AudioBuffer) Close ¶ added in v0.7.0
func (b *AudioBuffer) Close() error
type AudioStream ¶ added in v0.7.0
type AudioStream struct {
Data audio.ReadSeekCloser
Length int64
}
func ParseAudioStream ¶ added in v0.7.0
func ParseAudioStream(name string, b []byte) (*AudioStream, error)
type ClipG ¶ added in v0.3.0
type ClipG struct {
Name string
AnimClip graphics.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)
GetAudioStream(name string) (*AudioStream, error)
GetAudioBytes(name string) ([]byte, error)
GetXMLDOM(name string) ([]dom.Node, error)
}
func NewContainer ¶
func NewContainer(ctx context.Context, fs Filesystem) Container
type Error ¶ added in v0.7.0
type Error string
const (
ErrUnsupportedAudioType Error = "unsupported audio type and/or extension"
)
type Filesystem ¶
Filesystem interface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.