# `Cauldron2D.Atlas.Manifest`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_2d/lib/cauldron_2d/atlas/manifest.ex#L1)

The `atlas.txt` beside an art directory's pictures: what a text renderer draws for
each art, and how fast its frames go.

    wall	# 	#5a7cf0	
    flame	f 	#ff7000	12
    flame_blue	f 	#3070ff	12	from flame; colour F #3070ff

One art a line, tab-separated: the name, the glyph (two columns), the colour as
`#rrggbb`, the frames a second, and, for an art made from another, its derivation
as `Linocut.Derive` reads it; an empty field leaves that setting to the picture.
Four more fields make an art stand or pose: its height in storeys, its faces as
`top=ART side=ART south=ART` (`top`, `side`, `north`, `east`, `south`, `west`), its
poses as `front=ART back=ART side=ART`, each naming other arts of the same directory,
and how tall it stands in tiles when drawn as a billboard — the projections draw a
standing art of no height at its picture's size against the tile unless this says
otherwise.

    house	# 	#a08060			2	top=roof side=wall south=door
    hero	@ 						front=hero_front back=hero_back side=hero_side	0.75
`Cauldron2D.Atlas.load/3` reads it as the defaults under its `:arts`, and builds the
derived arts after the pictures.

# `entry`

```elixir
@type entry() :: %{
  optional(:glyph) =&gt; String.t(),
  optional(:color) =&gt; {byte(), byte(), byte()},
  optional(:fps) =&gt; pos_integer(),
  optional(:derive) =&gt; String.t(),
  optional(:height) =&gt; non_neg_integer(),
  optional(:faces) =&gt; %{required(atom()) =&gt; atom()},
  optional(:poses) =&gt; %{required(atom()) =&gt; atom()},
  optional(:stand) =&gt; number()
}
```

# `t`

```elixir
@type t() :: %{required(atom()) =&gt; entry()}
```

# `arts`

```elixir
@spec arts(t(), keyword()) :: keyword()
```

The manifest's entries as `Cauldron2D.Atlas.load/3`'s `:arts`, with `arts` laid over them.

# `derived`

```elixir
@spec derived(t()) :: [{atom(), String.t()}]
```

The derived arts, name and derivation, in name order.

# `file_name`

```elixir
@spec file_name() :: String.t()
```

The manifest's file name.

# `parse`

```elixir
@spec parse(String.t()) :: t()
```

The entries the text holds.

# `read`

```elixir
@spec read(Path.t()) :: t()
```

The manifest in `dir`, empty when there is none.

# `render`

```elixir
@spec render(t()) :: String.t()
```

The manifest as text.

# `write`

```elixir
@spec write(Path.t(), t()) :: :ok | {:error, term()}
```

Write the manifest to `dir`, one art a line in name order.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
