Comparaison
Sortie en direct du vrai moteur de rendu — modifiez les réglages et elle se met à jour instantanément.
Lignes avant / après
motion design
Indicateur par indicateur, l'ancienne valeur et la nouvelle côte à côte.
Idéal pour : Ce qui a changé après le passage, en deux ou trois chiffres.
Réglages
Police
Thème
Taille
Humeur
L'utiliser dans un film
Ce que vous pouvez changer :
titlebeforeLabelafterLabelrowsPour les développeurs (MCP et JSON)
Voici la scène exacte à envoyer à create_animation (MCP) : gardez la structure, changez les mots et écrivez la narration — c'est la voix qui fixe la durée de la scène. Collez-la dans update_storyboard avec set_data pour modifier un film déjà fait.
{
"visual": "motion",
"heading": "Before / after",
"narration": "Write the sentence the voice says over this scene; its length is the scene's.",
"data": {
"motion": {
"spec": {
"version": 1,
"name": "Before and after",
"intent": "comparison: before vs after: 1-3 rows, each a metric with its old and new value",
"stagger": "item",
"params": [
{
"name": "title",
"type": "text",
"default": "Month one against month six",
"maxLength": 48,
"label": "Title"
},
{
"name": "beforeLabel",
"type": "text",
"default": "Before",
"maxLength": 18,
"label": "Before"
},
{
"name": "afterLabel",
"type": "text",
"default": "After",
"maxLength": 18,
"label": "After"
},
{
"name": "rows",
"type": "list",
"default": [
{
"label": "Setup",
"before": "3 days",
"after": "20 min"
},
{
"label": "Churn",
"before": "6.8%",
"after": "2.9%"
}
],
"min": 1,
"max": 3,
"items": "record",
"label": "Rows"
}
],
"layers": [
{
"id": "title",
"kind": "text",
"text": "{{title}}",
"role": "headline",
"align": "center",
"maxLines": 1,
"box": {
"col": 0,
"row": 0,
"cols": 12,
"rows": 2.2
},
"tall": {
"col": 0,
"row": 1.1500000000000004,
"cols": 12,
"rows": 2
},
"enter": {
"primitive": "maskReveal",
"order": 0
}
},
{
"id": "beforeCard",
"kind": "shape",
"shape": "rect",
"fill": "surface",
"radius": "lg",
"elevation": 1,
"box": {
"col": 0,
"row": 2.6,
"cols": 5.8,
"rows": 9.4
},
"tall": {
"col": 0,
"row": 3.3500000000000005,
"cols": 5.8,
"rows": 7.5
},
"enter": {
"primitive": "fadeUp",
"order": 1
}
},
{
"id": "afterCard",
"kind": "shape",
"shape": "rect",
"fill": "surface",
"radius": "lg",
"elevation": 3,
"stroke": "c1",
"strokeWidth": "thin",
"box": {
"col": 6.2,
"row": 2.6,
"cols": 5.8,
"rows": 9.4
},
"tall": {
"col": 6.2,
"row": 3.3500000000000005,
"cols": 5.8,
"rows": 7.5
},
"enter": {
"primitive": "scaleSettle",
"order": 2
}
},
{
"id": "beforeLabel",
"kind": "text",
"text": "{{beforeLabel}}",
"role": "label",
"uppercase": true,
"color": "sub",
"align": "center",
"maxLines": 1,
"box": {
"col": 0.3,
"row": 3,
"cols": 5.2,
"rows": 0.7
},
"tall": {
"col": 0.3,
"row": 3.7000000000000006,
"cols": 5.2,
"rows": 0.6
},
"enter": {
"primitive": "fadeUp",
"distance": "nudge",
"order": 1
}
},
{
"id": "afterLabel",
"kind": "text",
"text": "{{afterLabel}}",
"role": "label",
"uppercase": true,
"color": "c2",
"align": "center",
"maxLines": 1,
"box": {
"col": 6.5,
"row": 3,
"cols": 5.2,
"rows": 0.7
},
"tall": {
"col": 6.5,
"row": 3.7000000000000006,
"cols": 5.2,
"rows": 0.6
},
"enter": {
"primitive": "fadeUp",
"distance": "nudge",
"order": 2
}
},
{
"id": "bMetric",
"kind": "text",
"text": "{{item.label}}",
"role": "body",
"color": "sub",
"align": "center",
"maxLines": 1,
"repeat": {
"param": "rows",
"flow": "column",
"gap": "md"
},
"box": {
"col": 0.3,
"row": 4,
"cols": 5.2,
"rows": 7.699999999999999
},
"tall": {
"col": 0.3,
"row": 4.550000000000001,
"cols": 5.2,
"rows": 6.050000000000001
},
"valign": "start",
"enter": {
"primitive": "fadeUp",
"distance": "nudge",
"order": 2
}
},
{
"id": "before",
"kind": "text",
"text": "{{item.before}}",
"role": "headline",
"color": "sub",
"align": "center",
"maxLines": 1,
"repeat": {
"param": "rows",
"flow": "column",
"gap": "md"
},
"box": {
"col": 0.3,
"row": 4,
"cols": 5.2,
"rows": 7.699999999999999
},
"tall": {
"col": 0.3,
"row": 4.550000000000001,
"cols": 5.2,
"rows": 6.050000000000001
},
"valign": "end",
"enter": {
"primitive": "fadeUp",
"order": 2
}
},
{
"id": "aMetric",
"kind": "text",
"text": "{{item.label}}",
"role": "body",
"color": "sub",
"align": "center",
"maxLines": 1,
"repeat": {
"param": "rows",
"flow": "column",
"gap": "md"
},
"box": {
"col": 6.5,
"row": 4,
"cols": 5.2,
"rows": 7.699999999999999
},
"tall": {
"col": 6.5,
"row": 4.550000000000001,
"cols": 5.2,
"rows": 6.050000000000001
},
"valign": "start",
"enter": {
"primitive": "fadeUp",
"distance": "nudge",
"order": 3
}
},
{
"id": "after",
"kind": "text",
"text": "{{item.after}}",
"role": "display",
"color": "gradient",
"align": "center",
"maxLines": 1,
"repeat": {
"param": "rows",
"flow": "column",
"gap": "md"
},
"box": {
"col": 6.5,
"row": 4,
"cols": 5.2,
"rows": 7.699999999999999
},
"tall": {
"col": 6.5,
"row": 4.550000000000001,
"cols": 5.2,
"rows": 6.050000000000001
},
"valign": "end",
"enter": {
"primitive": "scaleSettle",
"spring": "settle",
"order": 3
},
"exit": {
"primitive": "exitLift"
}
}
]
},
"name": "Before and after"
}
}
}Réutilisez-la : enregistrez data.motion.spec une fois avec save_motion_spec (vérifiée comme avec validate_motion_spec), puis toute scène peut utiliser le visuel « motion » avec data.motion.specId et ses propres paramètres. Nom de la spec : « Before and after ».