resources

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const SampleRate = 44100

Variables

View Source
var (
	UserConfigFile string
	UserKeymapFile string

	CrosshairsSheet *CrosshairsSheetConfig
)

Functions

func FileAt

func FileAt(path string) (fs.File, error)

func InitResources added in v0.0.1

func InitResources()

func LoadFont

func LoadFont(path string, size float64) (font.Face, error)

func NewAudioStream

func NewAudioStream(audioBytes []byte, path string) (io.ReadSeeker, int64, error)

func NewAudioStreamFromFile

func NewAudioStreamFromFile(path string) (io.ReadSeeker, int64, error)

func NewFontFromFile

func NewFontFromFile(path string) (*sfnt.Font, string, error)

func NewImageFromFile

func NewImageFromFile(path string) (*ebiten.Image, image.Image, error)

func NewScaledImageFromFile

func NewScaledImageFromFile(path string, scale float64) (*ebiten.Image, image.Image, error)

func NewShaderFromFile

func NewShaderFromFile(path string) (*ebiten.Shader, error)

func ReadDir

func ReadDir(path string) ([]fs.DirEntry, error)

func ReadFile

func ReadFile(path string) ([]byte, error)

Types

type CrosshairsSheetConfig added in v0.0.1

type CrosshairsSheetConfig struct {
	Columns int `yaml:"columns" validate:"gt=0"`
	Rows    int `yaml:"rows" validate:"gt=0"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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