Help us shape the future of Go! Take the 2026 Go Developer Survey

processorassets

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package processorassets validates optional generated level textures from build tools.

Index

Constants

View Source
const CatalogName = "assets.json"
View Source
const Marker = "karty-processed@1\n"
View Source
const MaxCatalogBytes = 64 << 10
View Source
const RegistryName = ".karty/processed/assets.json"

Variables

View Source
var ErrCatalog = errors.New("invalid processor asset catalog")

Functions

func Encode

func Encode(catalog Catalog) ([]byte, error)

Encode writes the canonical generated registry using the versioned catalog codec.

Types

type Catalog

type Catalog struct {
	Version  uint32    `json:"version"`
	Textures []Texture `json:"textures"`
}

func Decode

func Decode(data []byte) (Catalog, error)

type Texture

type Texture struct {
	Level     string `json:"level"`
	Name      string `json:"name"`
	Source    string `json:"source"`
	Key       string `json:"key"`
	Profile   string `json:"profile"`
	Processor string `json:"processor,omitempty"`
	ID        uint32 `json:"id,omitempty"`
}

func AssignIDs

func AssignIDs(root *os.Root, textures []Texture) ([]Texture, error)

AssignIDs appends generated textures after each level's original sorted catalog.

func Read

func Read(root *os.Root) ([]Texture, error)

Read reads only the transactionally published, owned processor registry.

Jump to

Keyboard shortcuts

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