← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Canvas(val width: Int, val height: Int, val groundRow: Int)

The canvas every published frame is drawn on; groundRow is the pixel row the feet stand on.

Link copied to clipboard
@Serializable(with = MirrorPairSerializer::class)
data class MirrorPair(val first: String, val second: String)

Two facings that may be mirrored into each other. Only permission: nothing is mirrored unless a clip opts in. Written in roto.json as a two-element array, ["EAST", "WEST"].

Link copied to clipboard
@Serializable
sealed interface OutputFormat

A file a project asks for beside its published frames. Stored in roto.json as an object whose type names the kind.

Link copied to clipboard
class Project(root: Path, val config: ProjectConfig)

A consuming project: its config and the root folder holding roto.json. Turns the config's relative paths and templates into files under root; every path stays inside it.

Link copied to clipboard
@Serializable
data class ProjectConfig(val id: String, val palette: String, val ramps: String, val facings: List<String>, val mirrorPairs: List<MirrorPair> = emptyList(), val actions: List<String>, val canvas: Canvas, val output: @Serializable(with = PathTemplateSerializer::class) PathTemplate, val manifest: @Serializable(with = PathTemplateSerializer::class) PathTemplate, val afterPublish: List<@Serializable(with = TemplateSerializer::class) Template> = emptyList(), val formats: List<OutputFormat> = emptyList())

A consuming project's roto.json: everything Roto is told about the project it publishes into. Roto has no built-in notion of facings, actions, canvas size or folder layout; they all come from here. Validated on construction, so a loaded config is always usable.

Link copied to clipboard

Reads and writes ProjectConfig as roto.json, which sits at the consuming project's root; a bad file is a ProjectConfigException.

Link copied to clipboard
class ProjectConfigException(message: String, cause: Throwable? = null) : IOException

A roto.json that is malformed or fails ProjectConfig's validation.