goengine

package
v0.0.0-...-050d007 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewScreenImage

func NewScreenImage(engine *Engine, sprite *EbitenSprite)

Types

type Config

type Config struct {
	Window *WindowConfig
}

type DebufInfo

type DebufInfo struct {
	FPS float64
}

type EbitenSprite

type EbitenSprite struct {
	Path string
	// contains filtered or unexported fields
}

type EbitenWindow

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

func NewEbitenWindow

func NewEbitenWindow(config *WindowConfig, engine *Engine) (*EbitenWindow, error)

func (*EbitenWindow) Draw

func (e *EbitenWindow) Draw(screen *ebiten.Image)

func (*EbitenWindow) Layout

func (e *EbitenWindow) Layout(outsideWidth, outsideHeight int) (int, int)

func (*EbitenWindow) LayoutF

func (e *EbitenWindow) LayoutF(outsideWidth, outsideHeight float64) (float64, float64)

func (*EbitenWindow) Open

func (e *EbitenWindow) Open() error

@Cleanup.

func (*EbitenWindow) Update

func (e *EbitenWindow) Update() error

func (*EbitenWindow) UpdateConfig

func (e *EbitenWindow) UpdateConfig(newConfig *WindowConfig)

type Engine

type Engine struct {
	ECS *goecs.Layer
	// contains filtered or unexported fields
}

func NewEngine

func NewEngine(c *Config) (*Engine, error)

func (*Engine) Draw

func (e *Engine) Draw(screen *ebiten.Image)

@Incomplete: Abstract away ebiten in engine layer

func (*Engine) Run

func (e *Engine) Run() error

func (*Engine) Update

func (e *Engine) Update() error

func (*Engine) UpdateConfig

func (e *Engine) UpdateConfig(update func(*Config))

type Shader

type Shader struct {
	Name string // @Cleanup: Do i need this? I can get name of the file...
	Path string
	// contains filtered or unexported fields
}

type Shaders

type Shaders struct {
	*gomemory.UnsafePool[string, ebiten.Shader]
	// contains filtered or unexported fields
}

func NewShaders

func NewShaders(count int) *Shaders

type Transfrom

type Transfrom struct {
	Position gomath.Vec2
	Scale    gomath.Vec2
	Rotation float64
}

type WindowConfig

type WindowConfig struct {
	Title string
	Size  gomath.Vec2
	Scale float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳