# `Yarnspinnex.Projection`
[🔗](https://github.com/atavistock/yarnspinnex/blob/main/lib/yarnspinnex/projection.ex#L1)

A host-built view of game state that dialogue is allowed to read. `fields` holds the readable
values; `source` keeps a reference to whatever it was projected from, for the host's own use.
Dialogue reads `fields` and can never reach `source`.

# `t`

```elixir
@type t() :: %Yarnspinnex.Projection{
  fields: %{optional(atom() | String.t()) =&gt; term()},
  source: term()
}
```

# `new`

```elixir
@spec new(
  map(),
  keyword()
) :: t()
```

Builds a projection from a map of readable fields, optionally remembering its `:source`.

---

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