target

package
v0.0.0-...-b8a6a29 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: Unlicense Imports: 1 Imported by: 0

Documentation

Overview

Package target defines different known output formats for the texture packer.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Unknown format, should used for error responses
	Unknown = Format{"unknown", nil, ""}
	// Love format for the love2d game engine
	Love = Format{"love", loveTemplate, "lua"}
	// Starling format for the Starling game engine
	Starling = Format{"starling", starlingTemplate, "xml"}
)

Functions

This section is empty.

Types

type Format

type Format struct {
	// Name describes this output format
	Name string
	// Template is a go text template that will
	// be used to render the atlas descriptor file.
	Template *template.Template
	// Ext is the file extension that should be
	// used when the descriptor file is written to
	// the file system.
	Ext string
}

Format represents a target atlas format.

func FormatNamed

func FormatNamed(name string) Format

FormatNamed returns a known format with the given name.

func (Format) IsValid

func (f Format) IsValid() bool

IsValid checks that a format has a valid template and file extension

Jump to

Keyboard shortcuts

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