Decision Tree: Two Levels. Native 1920×1080, 8s at 30fps.
A question with two answers, each leading to two outcomes. The dot drops, splits to the two answer tags, splits again to four outcome switches, then the recommended outcome switches on.
Motion. Dot falls (ease-in); first branches draw as twin dots run (ease in-out); answer tags pop; second branches draw as four dots run; outcome switches pop; the picked switch flips on with one burst and the others dim. Why it moves. change: each split is a choice, and the switch shows where the advice lands.
Mount
Copy every manifest file into your project (plus af-toggle-runtime). Mount with a unique host id, data-composition-id="af-toggle-decision-tree-16x9", data-composition-src="compositions/af-toggle-decision-tree-16x9.html", data-duration="8" and data-variable-values. Use the variant whose size matches your project (16x9, 9x16, 4x5, 1x1): each is laid out natively, never scaled.
Content slots
Nested slots are JSON strings. Every slot is checked against constraints.json and measured against the layout before anything draws; the block stops with a message naming the slot and the fix (it never truncates or shrinks text).
question (required): {"type":"string","minLength":1,"maxLength":48}a (required): {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":10},"leaves":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"string","minLength":1,"maxLength":14}}},"required":["label","leaves"]}b (required): {"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":10},"leaves":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"string","minLength":1,"maxLength":14}}},"required":["label","leaves"]}pick: {"type":"string","enum":["none","a0","a1","b0","b1"]}
a is drawn on the left, b on the right. 16:9 spreads the four outcomes across; the other sizes stack each pair under its answer.
Style: colourway (lime, cobalt, coral), accent (optional hex), footer, ground: dark only, exit (slide or cut).
Timing
8s. Everything has landed by 4.8s (60%), then the scene holds for reading (the grid and the faint rings slow to a residual drift, text stays still) and slides out to the left in a motion blur over the last 0.5 s, leaving the empty ground.
Example
``json { "question": "Do people watch past 3 seconds?", "a": "{\"label\":\"Yes\",\"leaves\":[\"Keep the hook\",\"Test payoff\"]}", "b": "{\"label\":\"No\",\"leaves\":[\"Rewrite line 1\",\"Cut the intro\"]}", "pick": "b0" } ``