How the map is drawn, layered over Cauldron2D.Renderer.
Two settings select a rendering mode, in order of precedence:
- the
SCRIBER_MODEenvironment variable config :scriber, :mode
Either may be pixel, text, or the name of a specific pixel protocol. When neither is
set the engine resolves the mode itself from CAULDRON_MODE, its own config, and the terminal's
capabilities.
Example
System.put_env("SCRIBER_MODE", "text")
Scriber.Renderer.mode()
#=> :text
Summary
Functions
A one-line description of the resolved mode and protocol, for the status bar.
Whether the map is drawn as an image (:pixel) or as characters (:text).
The mode selected by SCRIBER_MODE or config :scriber, :mode.
The pixel protocol the map is drawn with, or nil in text mode.
Functions
@spec describe() :: String.t()
A one-line description of the resolved mode and protocol, for the status bar.
@spec mode() :: :pixel | :text
Whether the map is drawn as an image (:pixel) or as characters (:text).
@spec override() :: atom() | nil
The mode selected by SCRIBER_MODE or config :scriber, :mode.
Returns nil when neither is set, or when config :scriber, :mode holds a non-atom, which
leaves the mode for the engine to resolve. Every other function in this module passes this
value to Cauldron2D.Renderer.
@spec protocol() :: atom() | nil
The pixel protocol the map is drawn with, or nil in text mode.