atlas

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Atlas

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

Atlas represents an image atlas

func (*Atlas) AppendUnique

func (a *Atlas) AppendUnique(img *image.RGBA) (gid *model.GID)

AppendUnique will append if unique and return new index, otherwise returns existing index

func (*Atlas) Bake

func (a *Atlas) Bake(m *pb.Map) (img *image.RGBA, err error)

Bake returns the internal image

func (*Atlas) LastTileIndex

func (a *Atlas) LastTileIndex() int

LastTileIndex returns the last added index

type Decoder

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

Decoder decodes image files to compacted image file

func NewDecoder

func NewDecoder(r io.Reader, m *pb.Map, t *pb.TileSet, usedTiles map[uint32]bool) (d *Decoder)

NewDecoder creates a new decoder

func (*Decoder) Decode

func (d *Decoder) Decode(a *Atlas) (err error)

Decode reads a TMX xml and outputs to a protobuf file

Jump to

Keyboard shortcuts

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