Cauldron2D.Easel.View (Cauldron2D.Easel v0.1.0)

Copy Markdown View Source

An easel as a browser canvas draws it: the frame in hand as CSS colours, the frame before it as a ghost, the palette, and the frames' count and rate. What the LiveView editor and the notebook editor both send to their script.

Cauldron2D.Easel.View.payload(easel, zoom: 16, onion: true)

Summary

Functions

A colour as CSS: #rrggbb, rgba(...) for a translucent one, nil for none.

The payload for easel.

Functions

css(arg1)

@spec css(Cauldron2D.Easel.rgba() | nil) :: String.t() | nil

A colour as CSS: #rrggbb, rgba(...) for a translucent one, nil for none.

payload(easel, opts \\ [])

@spec payload(Cauldron2D.Easel.t(), keyword()) :: map()

The payload for easel.

Options

  • :zoom — pixels a picture pixel on the canvas. Default 16
  • :onion — show the frame before as a ghost. Default false
  • :shown — the frame to draw instead of the one in hand, for playback. Default none