Cauldron2D.Parallax.Preview (Cauldron2D v0.2.2)

Copy Markdown View Source

A camera moved across a set of layers, as a list of pictures.

Cauldron2D.Parallax.Preview.frames(:beast, layers,
  focus: {0.0, 11.0},
  size: {44, 22},
  travel: {60.0, 0.0},
  frames: 90
)

Each picture is the layers behind the world with those in front laid over them and nothing of the world between, so a set of layers can be looked at before a game is built.

Summary

Functions

The pictures a camera sees as it travels.

Functions

frames(atlas, layers, opts)

The pictures a camera sees as it travels.

Options

  • :focus — the world point the camera starts on, required
  • :size — {columns, rows} of the picture in tiles, required
  • :travel — how far the camera moves over the whole run, in tiles. Default {40.0, 0.0}
  • :frames — how many pictures. Default 60
  • :ms — milliseconds between pictures, for drift and animation. Default 33
  • :scale — a positive integer dividing the tile size. Default 1