Cauldron2D.Easel.Web.Router (Cauldron2D.Easel.Web v0.1.3)

Copy Markdown View Source

Mounts the editor in a game's Phoenix router.

import Cauldron2D.Easel.Web.Router

scope "/" do
  pipe_through :browser
  easel "/easel", dir: "priv/art", tile: 16, atlas: :my_game
end

The pages are <path> (the arts) and <path>/<art> (the editor), with their own root layout and scripts under <path>/assets. The scope must fetch the session, as a :browser pipeline does. :atlas is the name saves install into; leave it out and saves only write the files.

Summary

Functions

The routes of an editor on dir at path; options :dir, :tile (required) and :atlas.

Functions

easel(path, opts)

(macro)

The routes of an editor on dir at path; options :dir, :tile (required) and :atlas.