ui

package
v0.0.0-...-9989d13 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectsByZ

type ObjectsByZ []engine.Object

ObjectsByZ is a helper type for sorting objects by Z index.

func (ObjectsByZ) Len

func (objs ObjectsByZ) Len() int

func (ObjectsByZ) Less

func (objs ObjectsByZ) Less(i, j int) bool

func (ObjectsByZ) Swap

func (objs ObjectsByZ) Swap(i, j int)

type Renderer

type Renderer struct {
	GFXSource *dom.Image
	Sprites   map[string]Sprite
	Layers    []string
	Zoom      int
}

func NewRenderer

func NewRenderer(gfxSource *dom.Image, sprites map[string]Sprite, layers []string) *Renderer

func (*Renderer) Draw

func (renderer *Renderer) Draw(dest *dom.Context2D, objectsByLayer map[string][]engine.Object)

type Sprite

type Sprite struct {
	X int
	Y int

	W int
	H int

	Frames int
}

Jump to

Keyboard shortcuts

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