Match day
A fixture's score, minute and chances, live from a feed
Events · 30 s · 2.1 kB
A simulated feed: the page sends each line to the video as it arrives. The scene itself fetches nothing.
Use it
Edit in the studio
<script type="module" src="https://makini.st/player.js"></script>
<makinist-player scene="https://makini.st/scenes/match-day.json" data='{
"home": "Larkspur FC",
"away": "Saltmarsh Albion",
"home_colour": "#e11d48",
"away_colour": "#38bdf8",
"accent": "#facc15",
"competition": "COUNTY CUP · QUARTER-FINAL",
"where": "Larkspur Park · Saturday, 15:00",
"headline": "A full house for the cup, and the first meeting in eleven years.",
"facts": "A County Cup quarter-final at Larkspur Park, kicking off on Saturday at 15:00. The two sides last met eleven years ago."
}'></makinist-player>
makinist export match-day.json --data larkspur.json --out larkspur.mp4
[dependencies]
makinist-eval = { git = "https://tangled.org/borag.tngl.sh/makinist" }
makinist-schema = { git = "https://tangled.org/borag.tngl.sh/makinist" }
The tag plays this customer's version in any page: the browser draws it from the scene and their row, and no video file is sent.
The scene
match-day.json
{
"format": "makinist/4",
"canvas": {
"width": 1280,
"height": 720,
"fps": 60,
"duration_frames": 1800
},
"background": "#07090b",
"state": {
"home": "",
"away": "",
"home_colour": "#ffffff",
"away_colour": "#ffffff",
"accent": "#facc15",
"competition": "",
"where": "",
"headline": "",
"home_score": 0,
"away_score": 0,
"minute": 0,
"home_shots": 0,
"away_shots": 0,
"status": "LIVE",
"intro": 1,
"news_a": "",
"news_b": "",
"a_on": 0,
"b_on": 0,
"a_typed": 0,
"b_typed": 0,
"reply": "",
"facts": "",
"question": "",
"side": 0,
"said": 0,
"shade": 0
},
"tween": {
"home_score": {
"frames": 40,
"ease": "power2.out"
},
"away_score": {
"frames": 40,
"ease": "power2.out"
},
"minute": {
"frames": 60
},
"home_shots": {
"frames": 45,
"ease": "power2.out"
},
"away_shots": {
"frames": 45,
"ease": "power2.out"
},
"intro": {
"frames": 8
},
"a_on": {
"frames": 8
},
"b_on": {
"frames": 8
},
"a_typed": {
"frames": 50
},
"b_typed": {
"frames": 50
},
"said": {
"frames": 12
},
"shade": {
"frames": 12
}
},
"layers": [
{
"id": "pitch",
"kind": "rect",
"props": {
"x": 0,
"y": 0,
"w": 1280,
"h": 720,
"fill": {
"linear": {
"from": [
0,
0
],
"to": [
0,
1
],
"stops": [
{
"at": 0,
"color": "#0f1a14"
},
{
"at": 1,
"color": "#07090b"
}
]
}
}
}
},
{
"id": "home.band",
"kind": "rect",
"props": {
"x": 0,
"y": 0,
"w": 640,
"h": 6,
"fill": {
"bind": "home_colour"
}
},
"tracks": {
"opacity": [
{
"frame": 0,
"value": 0
},
{
"frame": 30,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "away.band",
"kind": "rect",
"props": {
"x": 640,
"y": 0,
"w": 640,
"h": 6,
"fill": {
"bind": "away_colour"
}
},
"tracks": {
"opacity": [
{
"frame": 0,
"value": 0
},
{
"frame": 30,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "competition",
"kind": "text",
"props": {
"x": 80,
"y": 84,
"size": 22,
"fill": {
"bind": "accent"
}
},
"text": {
"template": "{competition}",
"font": "Inter SemiBold"
},
"tracks": {
"opacity": [
{
"frame": 6,
"value": 0
},
{
"frame": 30,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "where",
"kind": "text",
"props": {
"x": 80,
"y": 116,
"size": 20,
"fill": "#a3acbd"
},
"text": {
"template": "{where}",
"font": "Inter Regular"
},
"tracks": {
"opacity": [
{
"frame": 14,
"value": 0
},
{
"frame": 38,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "live.pill",
"kind": "rect",
"props": {
"x": 1088,
"y": 58,
"w": 96,
"h": 40,
"radius": 20,
"fill": "#ef444426"
},
"tracks": {
"opacity": [
{
"frame": 10,
"value": 0
},
{
"frame": 34,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "live.dot",
"kind": "rect",
"props": {
"x": 1104,
"y": 72,
"w": 12,
"h": 12,
"radius": 6,
"fill": "#ef4444"
},
"tracks": {
"opacity": [
{
"frame": 0,
"value": 1
},
{
"frame": 90,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 135,
"value": 1,
"ease": "power2.out"
},
{
"frame": 180,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 225,
"value": 1,
"ease": "power2.out"
},
{
"frame": 270,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 315,
"value": 1,
"ease": "power2.out"
},
{
"frame": 360,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 405,
"value": 1,
"ease": "power2.out"
},
{
"frame": 450,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 495,
"value": 1,
"ease": "power2.out"
},
{
"frame": 540,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 585,
"value": 1,
"ease": "power2.out"
},
{
"frame": 630,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 675,
"value": 1,
"ease": "power2.out"
},
{
"frame": 720,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 765,
"value": 1,
"ease": "power2.out"
},
{
"frame": 810,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 855,
"value": 1,
"ease": "power2.out"
},
{
"frame": 900,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 945,
"value": 1,
"ease": "power2.out"
},
{
"frame": 990,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1035,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1080,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1125,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1170,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1215,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1260,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1305,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1350,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1395,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1440,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1485,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1530,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1575,
"value": 1,
"ease": "power2.out"
},
{
"frame": 1620,
"value": 0.25,
"ease": "power2.out"
},
{
"frame": 1665,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "live.word",
"kind": "text",
"props": {
"x": 1126,
"y": 86,
"size": 18,
"fill": "#ffffff"
},
"text": {
"template": "{status}",
"font": "Inter SemiBold"
},
"tracks": {
"opacity": [
{
"frame": 10,
"value": 0
},
{
"frame": 34,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "home.name",
"kind": "text",
"props": {
"x": 80,
"y": 300,
"size": 40,
"width": 400,
"fill": "#ffffff"
},
"text": {
"template": "{home}",
"font": "Inter Display Bold",
"align": "right"
},
"tracks": {
"opacity": [
{
"frame": 20,
"value": 0
},
{
"frame": 44,
"value": 1,
"ease": "power2.out"
}
],
"x": [
{
"frame": 20,
"value": 40
},
{
"frame": 50,
"value": 80,
"ease": "power2.out"
}
]
}
},
{
"id": "home.colour",
"kind": "rect",
"props": {
"x": 400,
"y": 236,
"w": 80,
"h": 6,
"radius": 3,
"fill": {
"bind": "home_colour"
}
},
"tracks": {
"opacity": [
{
"frame": 30,
"value": 0
},
{
"frame": 54,
"value": 1,
"ease": "power2.out"
}
],
"x": [
{
"frame": 30,
"value": 360
},
{
"frame": 60,
"value": 400,
"ease": "power2.out"
}
]
}
},
{
"id": "away.name",
"kind": "text",
"props": {
"x": 800,
"y": 300,
"size": 40,
"width": 400,
"fill": "#ffffff"
},
"text": {
"template": "{away}",
"font": "Inter Display Bold"
},
"tracks": {
"opacity": [
{
"frame": 20,
"value": 0
},
{
"frame": 44,
"value": 1,
"ease": "power2.out"
}
],
"x": [
{
"frame": 20,
"value": 840
},
{
"frame": 50,
"value": 800,
"ease": "power2.out"
}
]
}
},
{
"id": "away.colour",
"kind": "rect",
"props": {
"x": 800,
"y": 236,
"w": 80,
"h": 6,
"radius": 3,
"fill": {
"bind": "away_colour"
}
},
"tracks": {
"opacity": [
{
"frame": 30,
"value": 0
},
{
"frame": 54,
"value": 1,
"ease": "power2.out"
}
],
"x": [
{
"frame": 30,
"value": 840
},
{
"frame": 60,
"value": 800,
"ease": "power2.out"
}
]
}
},
{
"id": "score",
"kind": "text",
"props": {
"x": 490,
"y": 316,
"size": 100,
"width": 300,
"fill": "#ffffff"
},
"text": {
"template": "{home_score:0} – {away_score:0}",
"font": "Inter Display Bold",
"align": "center"
},
"tracks": {
"opacity": [
{
"frame": 30,
"value": 0
},
{
"frame": 54,
"value": 1,
"ease": "power2.out"
}
],
"size": [
{
"frame": 30,
"value": 76
},
{
"frame": 70,
"value": 100,
"ease": "power2.out"
}
]
}
},
{
"id": "minute",
"kind": "text",
"props": {
"x": 520,
"y": 372,
"size": 28,
"width": 240,
"fill": {
"bind": "accent"
}
},
"text": {
"template": "{minute:0}′",
"font": "Inter SemiBold",
"align": "center"
},
"tracks": {
"opacity": [
{
"frame": 40,
"value": 0
},
{
"frame": 64,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots.title",
"kind": "text",
"props": {
"x": 80,
"y": 472,
"size": 20,
"fill": "#a3acbd"
},
"text": {
"template": "Shots",
"font": "Inter SemiBold"
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots.home",
"kind": "text",
"props": {
"x": 80,
"y": 517,
"size": 24,
"width": 60,
"fill": "#ffffff"
},
"text": {
"template": "{home_shots:0}",
"font": "Inter SemiBold",
"align": "right"
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots.away",
"kind": "text",
"props": {
"x": 80,
"y": 565,
"size": 24,
"width": 60,
"fill": "#ffffff"
},
"text": {
"template": "{away_shots:0}",
"font": "Inter SemiBold",
"align": "right"
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots.track.home",
"kind": "rect",
"props": {
"x": 160,
"y": 496,
"w": 1040,
"h": 30,
"radius": 8,
"fill": "#ffffff14"
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots.track.away",
"kind": "rect",
"props": {
"x": 160,
"y": 544,
"w": 1040,
"h": 30,
"radius": 8,
"fill": "#ffffff14"
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "shots",
"kind": "chart",
"props": {
"x": 160,
"y": 496,
"w": 1040,
"h": 78,
"gap": 18,
"radius": 8,
"fill": {
"bind": "home_colour"
}
},
"chart": {
"type": "bar",
"direction": "right",
"values": [
{
"bind": "home_shots"
},
{
"bind": "away_shots"
}
],
"max": 20,
"highlight": {
"index": 2,
"fill": {
"bind": "away_colour"
}
}
},
"tracks": {
"opacity": [
{
"frame": 50,
"value": 0
},
{
"frame": 74,
"value": 1,
"ease": "power2.out"
}
],
"grow": [
{
"frame": 60,
"value": 0
},
{
"frame": 110,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "ask.shade",
"kind": "chart",
"props": {
"x": 160,
"y": 496,
"w": 1040,
"h": 78,
"gap": 18,
"radius": 8,
"fill": "#07090bb3",
"opacity": {
"bind": "shade"
}
},
"chart": {
"type": "bar",
"direction": "right",
"values": [
{
"bind": "home_shots"
},
{
"bind": "away_shots"
}
],
"max": 20,
"highlight": {
"index": {
"bind": "side"
},
"fill": "#00000000"
}
},
"tracks": {
"grow": [
{
"frame": 60,
"value": 0
},
{
"frame": 110,
"value": 1,
"ease": "power2.out"
}
]
}
},
{
"id": "headline",
"kind": "text",
"props": {
"x": 80,
"y": 640,
"size": 34,
"width": 1120,
"fill": "#ffffff",
"opacity": {
"bind": "intro"
}
},
"text": {
"template": "{headline}",
"font": "Instrument Serif",
"animate": {
"by": "word",
"from": 70,
"stagger": 7,
"frames": 30,
"ease": "power2.out",
"rise": 18
}
}
},
{
"id": "news.a",
"kind": "text",
"props": {
"x": 80,
"y": 640,
"size": 34,
"width": 1120,
"fill": "#ffffff",
"opacity": {
"bind": "a_on"
},
"reveal": {
"bind": "a_typed"
}
},
"text": {
"template": "{news_a}",
"font": "Instrument Serif"
}
},
{
"id": "news.b",
"kind": "text",
"props": {
"x": 80,
"y": 640,
"size": 34,
"width": 1120,
"fill": "#ffffff",
"opacity": {
"bind": "b_on"
},
"reveal": {
"bind": "b_typed"
}
},
"text": {
"template": "{news_b}",
"font": "Instrument Serif"
}
},
{
"id": "ask.reply",
"kind": "text",
"props": {
"line_height": 1.3,
"opacity": {
"bind": "said"
},
"x": 340,
"y": 412,
"size": 22,
"fill": "#ffffff",
"width": 600
},
"text": {
"template": "{reply}",
"font": "Inter Regular",
"align": "center"
}
}
],
"on": [
{
"event": "ask:sent",
"set": {
"reply": "",
"said": 0,
"shade": 0
}
},
{
"event": "ask:answered",
"set": {
"said": 1,
"shade": 0
}
},
{
"event": "ask:answered",
"if": {
"side": 1
},
"set": {
"shade": 1
}
},
{
"event": "ask:answered",
"if": {
"side": 2
},
"set": {
"shade": 1
}
},
{
"event": "ask:failed",
"set": {
"reply": "Sorry, I couldn't answer that. Try again?",
"said": 1
}
}
],
"ask": {
"instructions": "You are the host of one customer's video, for the match between `home` and `away`, live. Answer their question in `reply` in one or two short sentences, at most 160 characters, warm and plain, in the language they ask in. Use only facts from the live score, minute, shots and status the video shows, and from `facts`: never invent a price, a date, a place or a promise. Set `side` to the side your answer is about (home or away), or none. If the question is about anything else, say kindly that you can only talk about this match. Never say a score, a minute or a shot count the video does not show.",
"writes": [
"reply",
"side"
],
"choices": {
"side": [
[
"none",
0
],
[
"home",
1
],
[
"away",
2
]
]
},
"question": "question",
"suggestions": [
"Who's winning?",
"Who's had more chances?",
"How long is left?",
"What's the score?"
]
}
}
The data row
row.json
{
"home": "Larkspur FC",
"away": "Saltmarsh Albion",
"home_colour": "#e11d48",
"away_colour": "#38bdf8",
"accent": "#facc15",
"competition": "COUNTY CUP · QUARTER-FINAL",
"where": "Larkspur Park · Saturday, 15:00",
"headline": "A full house for the cup, and the first meeting in eleven years.",
"facts": "A County Cup quarter-final at Larkspur Park, kicking off on Saturday at 15:00. The two sides last met eleven years ago."
}