# `Cauldron3D.Formats.Wad3`
[🔗](https://github.com/jaman/cauldron/blob/v0.3.3/cauldron_3d_formats/lib/cauldron_3d/formats/wad3.ex#L1)

`WAD3` collections: wall textures with their mips and their own palettes, and pictures
with their own palettes.

    textures = Cauldron3D.Formats.Wad3.textures(File.read!("halflife.wad"))
    textures["c1a0_labflrd"]
    #=> [%Cauldron3D.Texture{palette: <<...>>}, ...]

    Cauldron3D.Formats.Wad3.pictures(File.read!("gfx.wad"))["crosshairs"]

Names are lower case. In a texture whose name begins `{`, colour 255 is see-through.

# `font`

```elixir
@spec font(binary()) :: map() | nil
```

A font lump: `%{texture:, height:, glyphs:}`, `texture` the 256-pixel-wide sheet of
characters with its palette (colour 255 see-through), `height` a character's height in
pixels, and `glyphs` a tuple of 256 `{x, y, width}` places on the sheet. `nil` when it
is not one.

# `fonts`

```elixir
@spec fonts(binary() | nil) :: %{required(String.t()) =&gt; map()}
```

Every font in the collection, by name, as `font/1` reads it.

# `lumps`

```elixir
@spec lumps(binary() | nil) :: [{byte(), String.t(), binary()}]
```

The lumps of a `WAD3` as `{type, name, bytes}`.

# `picture`

```elixir
@spec picture(binary()) :: Cauldron3D.Texture.t() | nil
```

A picture with its palette: width, height, pixels, then 256 colours; `nil` when it is not one.

# `pictures`

```elixir
@spec pictures(binary() | nil) :: %{required(String.t()) =&gt; Cauldron3D.Texture.t()}
```

Every picture in the collection, by name.

# `textures`

```elixir
@spec textures(binary() | nil) :: %{required(String.t()) =&gt; [Cauldron3D.Texture.t()]}
```

Every texture in the collection: its four mips, by name.

---

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