Documentation is work in progress and not completeEditor
FlashCC/Making a deck/Section 11 of 29

Generation

buildSlides runs once and returns plain layers — the geometry constants, how a composition is chosen, and what each of the eight compositions produces.

buildSlides(texts, theme, roles?, options?) → Slide[]. Runs once and returns plain layers.

  1. 1.Drop blank texts. Roles are indexed by the original position, so they stay attached to their text even when earlier entries were empty.
  2. 2.Nothing survives → one empty slide. Never an empty deck.
  3. 3.Per entry: pick a composition, compute the regions, build the layers, apply fonts.
  4. 4.The image placeholder is layer 0 (back), so it and the text cannot hide each other.

Geometry

W 1080 · H 1350 · M 96 · COL 888 · BAND 430 · BAND_GAP 56, inner height 1158.

Image settingImage bandText region
No image—96, 96, 888, 1158
above96, 96, 888, 43096, 582, 888, 672
below96, 824, 888, 43096, 96, 888, 672

With images off, text gets the whole safe box — which is why "never" produces a visibly larger hook.

Composition selection

CYCLE = [heading-body, statement, numbered, quote, underline, caps]. BY_ROLE = { hook: title, cta: block, takeaway: statement, lesson: statement, turn: quote, result: numbered }.

Without roles: slide 1 is title, the last is block (when total > 2), everything else cycles. With roles, a pinned composition is used unless it would repeat the previous slide.

Framework123456789
problemtitleheading-bodystatementnumberedquoteunderlinecapsblock
showcasetitleheading-bodystatementnumberedquoteunderlinenumberedblock
educationaltitleheading-bodystatementnumberedquoteunderlinestatementblock
storytitleheading-bodystatementnumberedquoteunderlinenumberedstatementblock

The eight compositions

idBandLadderLayers
titleabove104→40, w700Rule (accent bar), Title
heading-bodyabovehead 58→30 (capped at 40% of region), body 40→22 in mutedHeading, Body
statementbelow76→30, w700, centredStatement
numberedbelowbody 46→22, numeral fixed 100pxNumber, Tick, Text
quoteabove62→26, italic, indent 44Bar, Quote
underlinebelow70→30, w700Text, Underline
capsbelow56→22, uppercase, tracked 0.06Text
blockabove68→26, centred, text in theme.bgBlock (full-bleed 0→1080), Text

heading-body silently delegates to underline when the text has no sentence break, so a slide whose composition "is" heading-body can render as a single underlined block. caps is the only composition that measures uppercased and tracked, since that is what renders. block is the only layer that ignores the 96px margin. numbered’s numeral is the slide’s position in the deck, not the nth point — "Fix 1" on slide 5 displays 05.

Decor

0 removes accent rules, 1 normal, 1.8 bold. It scales the rule’s height (quote’s bar: width). block ignores it entirely. title and underline also reserve vertical space for the rule, so turning decor off changes the type fit, not just the graphics.