Aller au contenu principal
Preuve sociale

Sortie en direct du vrai moteur de rendu — modifiez les réglages et elle se met à jour instantanément.

Note en étoiles

motion design

Cinq étoiles se posent en ligne, la note s'incrémente dessous, puis ce qu'elle évalue.

Idéal pour : Une note moyenne et le nombre de personnes qui l'ont donnée.

Réglages

Police
Thème
Taille
Humeur

L'utiliser dans un film

Ce que vous pouvez changer :scorelabel
Pour 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": "Rating",
  "narration": "Write the sentence the voice says over this scene; its length is the scene's.",
  "data": {
    "motion": {
      "spec": {
        "version": 1,
        "name": "Star rating",
        "intent": "an average rating with how many people gave it",
        "camera": "pushIn",
        "exit": "mirror",
        "params": [
          {
            "name": "score",
            "type": "text",
            "label": "Score",
            "default": "4.8 / 5",
            "maxLength": 10
          },
          {
            "name": "label",
            "type": "text",
            "label": "What it rates",
            "default": "average from 2,300 verified reviews",
            "maxLength": 48
          }
        ],
        "layers": [
          {
            "id": "star1",
            "kind": "icon",
            "icon": "star",
            "color": "c1",
            "box": {
              "col": 0.5,
              "row": 0.3,
              "cols": 2,
              "rows": 2.4
            },
            "tall": {
              "col": 0.5,
              "row": 1.2,
              "cols": 2,
              "rows": 1.8
            },
            "enter": {
              "primitive": "scaleSettle"
            }
          },
          {
            "id": "star2",
            "kind": "icon",
            "icon": "star",
            "color": "c1",
            "box": {
              "col": 2.75,
              "row": 0.3,
              "cols": 2,
              "rows": 2.4
            },
            "tall": {
              "col": 2.75,
              "row": 1.2,
              "cols": 2,
              "rows": 1.8
            },
            "enter": {
              "primitive": "scaleSettle"
            }
          },
          {
            "id": "star3",
            "kind": "icon",
            "icon": "star",
            "color": "c1",
            "box": {
              "col": 5,
              "row": 0.3,
              "cols": 2,
              "rows": 2.4
            },
            "tall": {
              "col": 5,
              "row": 1.2,
              "cols": 2,
              "rows": 1.8
            },
            "enter": {
              "primitive": "scaleSettle"
            }
          },
          {
            "id": "star4",
            "kind": "icon",
            "icon": "star",
            "color": "c1",
            "box": {
              "col": 7.25,
              "row": 0.3,
              "cols": 2,
              "rows": 2.4
            },
            "tall": {
              "col": 7.25,
              "row": 1.2,
              "cols": 2,
              "rows": 1.8
            },
            "enter": {
              "primitive": "scaleSettle"
            }
          },
          {
            "id": "star5",
            "kind": "icon",
            "icon": "star",
            "color": "c1",
            "box": {
              "col": 9.5,
              "row": 0.3,
              "cols": 2,
              "rows": 2.4
            },
            "tall": {
              "col": 9.5,
              "row": 1.2,
              "cols": 2,
              "rows": 1.8
            },
            "enter": {
              "primitive": "scaleSettle"
            }
          },
          {
            "id": "score",
            "kind": "number",
            "value": "{{score}}",
            "role": "hero",
            "color": "gradient",
            "align": "center",
            "box": {
              "col": 0.5,
              "row": 3.2,
              "cols": 11,
              "rows": 5
            },
            "tall": {
              "col": 0,
              "row": 3.6,
              "cols": 12,
              "rows": 3.6
            },
            "enter": {
              "primitive": "countUp",
              "order": 1
            }
          },
          {
            "id": "label",
            "kind": "text",
            "text": "{{label}}",
            "role": "headline",
            "color": "sub",
            "align": "center",
            "maxLines": 2,
            "box": {
              "col": 0.5,
              "row": 8.6,
              "cols": 11,
              "rows": 3.2
            },
            "tall": {
              "col": 0.3,
              "row": 7.8,
              "cols": 11.4,
              "rows": 3.4
            },
            "enter": {
              "primitive": "fadeUp",
              "order": 2
            }
          }
        ]
      },
      "name": "Star rating"
    }
  }
}

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 : « Star rating ».

Autres animations Preuve sociale