Docs Documentación

Story Engine Vocabulary

The story engine is the code that runs a story page: it lays out the cards and the object, moves between steps, and decides what to keep loaded. Its code lives in assets/js/telar-story/ and is built into assets/js/telar-story.js. This page defines the terms the code, its comments and these docs use for the parts of a story and the ways it moves, so that each term names one thing.

CSS classes, data-* attributes and the max_viewer_cards setting keep their older names, because sites and the Compositor read them. Where an older name differs from a term on this page, the entry says so.

The Parts of a Story

A story is built from these parts:

Moving Between Steps

These terms describe what happens when the reader goes from one step to the next:

Developers can tune the move duration for testing with ?nav=base,perUnit,maxSeconds in the page URL. ?nav=1.2,0 gives every move the base duration, whatever the camera travels.

Layouts

A story page uses one of two layouts.

The page uses the vertical layout when any of these is true of the window:

The terms for the cards and the space around them:

What Stays Loaded

The engine keeps a capped number of objects loaded, so a long story does not hold every image and player in memory:

These are the only uses of “pool” in the engine.

Stacking

Each scene’s cards and plate use their own block of z-index values, its z-range, so a later scene covers an earlier one as a unit.