render

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package render provides the interfaces for the various renderers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Iso

func Iso(fdf Engine, screenWidth, screenHeight int) image.Rectangle

Iso is a helper function to initialize an isomorphic projection.

Types

type Engine

type Engine interface {
	SetProjection(projection.Projection) image.Rectangle
	GetProjection() projection.Projection

	GetHeightFactor() float64
	SetHeightFactor(float64)

	Draw() image.Image

	CurrentMapName() string
	ListMaps() []fs.DirEntry
	LoadMap(string) error
}

Engine defines the possible methods to interract from the Renderer to the Engine.

type Renderer

type Renderer interface {
	Run(Engine) error
}

Renderer defines what a renderer can do.

Directories

Path Synopsis
Package ebitenrenderer provides a ebiten impementation of the renderer.
Package ebitenrenderer provides a ebiten impementation of the renderer.
Package pngrenderer provides a stdlib image/png impementation of the renderer.
Package pngrenderer provides a stdlib image/png impementation of the renderer.

Jump to

Keyboard shortcuts

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