// THE GOAL STACK (module `goals`, region `goals`): every goal he names drops a // sticky note onto a pile in a corner of the footage; the same goal said // again merges into its note with a count ("lose 100 ×8") and comes to the // front; a goal with a deadline counts down to the render date ("by // Christmas · 50 days left · needs 226.5"). Read off the schedule's measure // slice (`render.chrome.deck.goals`; measure-extras.mjs goalStates, // chrome-measure-extras.mjs goalsHtml). import { goalsHtml } from "../chrome-measure-extras.mjs"; import { goalStates } from "../measure-extras.mjs"; import { measureExtraModule } from "./measure-extras-module.mjs"; import { MEASURE_LIMITS } from "./measure-extras-settings.mjs"; export default measureExtraModule({ id: "goals", z: 68, title: "Goal stack", summary: "Each goal he names as a sticky note on a pile -- a repeat merged with its count, a deadline counted down to the render date.", states: goalStates, html: goalsHtml, needs: "a goal (a goal or goalLoss row)", ui: [ { key: "max", type: "number", min: MEASURE_LIMITS.max[0], max: MEASURE_LIMITS.max[1], label: "Notes shown", default: 4 }, { key: "color", type: "color", label: "Paper (default the palette's amber)" }, { key: "countdown", type: "boolean", label: "Count a deadline down to the render date", default: true }, { key: "base", type: "boolean", label: "Say the weight he had stated when he set it", default: false }, { key: "baseMaxDays", type: "number", min: MEASURE_LIMITS.baseMaxDays[0], max: MEASURE_LIMITS.baseMaxDays[1], label: "A base weight said at most this many days before the goal (unset: any age)" }, { key: "flash", type: "boolean", label: "Flash its outline when its value changes (unset: deck.measure.flash)" }, ], docs: { intro: "A sticky note per goal on a pile in a corner of the footage box, read off the schedule's `measure` slice (`render.chrome.deck.goals`, measure-extras.mjs): each goal or goalLoss event drops one, turned a little, onto the pile; the same goal in the same words (\"lose 100\") merges into its note with a count (\"×8\") and comes to the front; `max` notes show, the newest in front, with the goals set so far under them. A goal with a `deadline` counts down to `measure.asOfRender` (\"by Christmas · 50 days left · needs 226.5\"): Christmas is the next 25 Dec from the day he said it, \"next year\" a year on, a named year that year; words that name no date (\"by my birthday\") keep their label and no countdown. On whenever the cut has a measure slice with a goal on camera; `false` turns it off. Up for `hold` seconds after each goal (default 20), the pile as it stands each time. The four measure extras sit at anchors of the footage box by default, clear of the instrument panel's right column and of the top-left, where the streams' face cam most often is (the diet badge bottom-left, the goal stack bottom-right, the moving start top-right, the promise clock top-centre); `position` or `x`/`y` move one.", rows: [ ["`deck.goals`", "`true` · `false` · `{show, position, x, y, scale, hold, finale, max, color, countdown, base, baseMaxDays}` · default on with a measure slice", "`umtool look
deck.goals=false`"], ["`deck.goals.position`, `.x`/`.y`, `.scale`", "`top-left` `top-right` `bottom-left` `bottom-right` `top-center` `bottom-center` · design px · 0.5–2 · default `bottom-right`, unset, 1", "`umtool look
deck.goals.position=bottom-left`"], ["`deck.goals.position=shelf`", "its shelf form (`deck.shelf`): the count of goals set in a column, then the notes fanned sideways like the diet's tags -- ordered by the dial's goal board (measure-goals.mjs \`goalsAt(goalBoard(schedule.measure), t)\`, so the shelf and the dial always agree): its headline -- the closest goal in force -- in front with \"+N more\" for the others in force, the rest by recency; a goal the board misses struck in red, MISSED on it, for the dial's 6 s; with no goal in force, the newest in front; a new goal landing from above as on the pile; each older one showing its goal's words in the strip beside it (all of each when there is room); a repeat comes to the front with its ×n. The fan takes the shelf's spare width (shelfLayout), up to its notes side by side. On the shelf it stays up from the first goal (`hold` unset). What the dial draws of the goal stays on the dial", "`umtool look
deck.shelf.items='[\"diet\",\"goals\"]' deck.goals.position=shelf`"], ["`deck.goals.max`, `.color`, `.countdown`", "1–8 notes · #hex paper · bool · default 4, the palette's amber, `true`", "`umtool look
deck.goals.max=6`"], ["`deck.goals.base`", "bool · default `false`: each note also says the weight he had stated when he set the goal -- \"LOSE 100 (FROM 346.7)\", its qualifier kept (\"(FROM ≈390)\") -- the slice's own base for that goal, the one the gauge reckons its target from (measure-slice.mjs `goalBase`: the start of the run open when he set it, else the latest weight he gave by the goal's date, stated or remembered). A goal with no base (no weight by then, a target goal such as \"250 LB\", a base the scale's foot refuses) shows none -- never one made up. On a back card it is a line of its own, right-aligned like the label", "`umtool look
deck.goals.base=true`"], ["`deck.goals.baseMaxDays`", "whole days 0–36500 · unset (default): every base counts. A loss goal's base is a weight he gave by the goal's date, however long before; with this set, a base counts only when its weight was SAID (its row's date, never a remembered weight's as-of) at most that many days before the goal's date. A staler one is no base: the note carries no \"(FROM …)\", and the slice resolves no target from it -- the dial draws no goal weight and no tick for that goal, his words (\"LOSE 100\") stay. It is the slice's rule (measure-slice.mjs `goalBaseMaxDays`), so the notes, the shelf and the dial agree; it needs `deck.goals` as settings (`deck.goals.base=true deck.goals.baseMaxDays=365`), and `baseMaxDays=null` takes it off", "`umtool look
deck.goals.baseMaxDays=365` (`--take deck.goals.hold=0`"],
["`deck.goals.flash`", "bool · unset (default): follows `deck.measure.flash` -- THE UPDATE FLASH (update-flash.mjs): the note that lands lights as a goal is set -- not the first note (the stack coming up), not the board's own changes; a thin outline in its own colour, up over 0.15 s and gone over 0.7 s, no size change, never on frame 0 or while the deck is away", "`umtool look deck.goals.flash=false`"],
],
},
});