btxpack

package module
v0.0.0-...-72831fc Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 9 Imported by: 0

README

Btxpack

Bare Texture Packer

Install

go install github.com/intervinn/btxpack/cmd@latest

Usage

Consumes folder of images, emits combined image and the metadata file.

btxpack [assets] [atlas.png] [atlas.json]

License

MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSupported

func IsSupported(name string) bool

func WriteAtlasImg

func WriteAtlasImg(recs []Rec, to string) error

func WriteAtlasMeta

func WriteAtlasMeta(recs []Rec, to string) error

Types

type Img

type Img struct {
	image.Rectangle
	Image image.Image
	Src   string
}

func ScanDir

func ScanDir(root string) ([]Img, error)

type Meta

type Meta struct {
	Name string `json:"name"`
	X    int    `json:"x"`
	Y    int    `json:"y"`
	W    int    `json:"w"`
	H    int    `json:"h"`
}

type Rec

type Rec struct {
	Img
	X int
	Y int
}

func Layout

func Layout(imgs []Img) []Rec

rn it just puts all sprites in line with eachother need to make some more efficient algorithm in future

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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