Deal the hand at a champ select's entry and let it leave at its end (#87)
The entry plays once the window shows the champ select (not behind « Paramètres »): a band of gold light sweeps the page in 900 ms, the title comes in rising 8 px, and the Anvil champions come up from the bottom of the window, the first at 380 ms then one every 110 ms. A card still dealt is lifted once in its place; reasons arriving meanwhile show on their card without dealing again, and cards arriving late with the statistics are dealt from then. An ally's confirmation lowers its card of the hand 8 px as it greys, where it then rests. At the end, the hand leaves from the last card, then the veil of the tabs covers the champ select and the end is applied under it, the home coming back as #74 leaves it. The moving cards are drawn by the page over the cached hand, from where the grid placed them (`stage.rs`, as `card_lift`): the grid is never drawn again for them, no statistics are computed, and no frame is asked at rest. The Windows setting off, a hidden window or a covered page show the end state at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WYQB8paBcLk67XoAUYARBK
This commit is contained in:
1 parent
ee2ab5cc33
commit
b1c5c3a8cc
11 files changed
+1287
-89
No files matched your search
+4
-2
@@ -35,7 +35,7 @@ Au survol ou au focus clavier, la fiche du champion apparaît en glissant sur la
|
||||
|
||||
1. La détection d’une sélection Arena affiche automatiquement la rangée de cartes dans la fenêtre existante, sous la bannière de sélection. Le joueur garde le focus dans League : une fenêtre réduite ou cachée dans la zone de notification se rouvre à l’entrée en sélection, sans prendre le focus, et reste ouverte à la fin de la sélection. Ce comportement n’a pas de réglage.
|
||||
2. La rangée « Champions de l’Enclume » contient **tous** les champions marqués d’une enclume dans la sélection en cours, dans le tri choisi. Au-dessous, « Autres champions » est replié par défaut. L’ouvrir affiche tous les champions sans enclume, avec le même tri et les mêmes cartes. Sa recherche par nom filtre uniquement cette section.
|
||||
3. Dans les deux sections, les cartes gardent leur place lorsqu’un champion est validé, banni ou pris par un allié. Son portrait est grisé et la carte indique les raisons applicables : « Validé », « Banni », « Pris par un allié », et « Indisponible » pour un champion que le client ne propose pas (non possédé ou désactivé). Un champion validé et banni porte les deux indications.
|
||||
3. Dans les deux sections, les cartes gardent leur place lorsqu’un champion est validé, banni ou pris par un allié (dans la main, une carte prise par un allié s’abaisse seulement de 8 px). Son portrait est grisé et la carte indique les raisons applicables : « Validé », « Banni », « Pris par un allié », et « Indisponible » pour un champion que le client ne propose pas (non possédé ou désactivé). Un champion validé et banni porte les deux indications.
|
||||
4. Une présélection alliée laisse la carte dans son état courant. « Pris par un allié » apparaît à la confirmation du choix. Les bans et les choix alliés expirent avec la sélection : ils n’affectent ni les coches personnelles, ni le compteur du Défi, ni la sélection suivante.
|
||||
|
||||
### Identité
|
||||
@@ -57,7 +57,9 @@ Cette section décrit l’identité « L’Anneau ». [La page de référence](p
|
||||
**Animations.** Elles sont toujours déclenchées par un événement et ne dessinent rien au repos. Elles suivent le réglage Windows « Afficher les animations », lu au démarrage et à chacun de ses changements : coupé, chaque animation laisse place à son état final. L’appli n’a pas de réglage « Animations ». « Défi » est visible quand la fenêtre est affichée et non réduite (Windows ne signale pas une fenêtre seulement recouverte), sans « Statistiques », « Paramètres » ni sélection devant lui.
|
||||
|
||||
- Fin d’une Partie suivie en direct. Un top 1 déclenche la comète, la bannière et « Validé ». Une nouvelle Marque fait monter la graduation d’un cran et remplit la coche. Sinon, la graduation clignote et la ligne « Dernière Partie » apparaît en fondu. L’animation est différée jusqu’à ce que « Défi » soit visible, elle ne joue que la plus forte des Parties terminées entre-temps, et elle est abandonnée si une sélection commence. Les Parties importées ou lues dans l’historique n’animent rien.
|
||||
- Entrée en sélection : balayage, titre, cartes distribuées. Sortie : les cartes se retirent.
|
||||
- Entrée en sélection, dès que la fenêtre la montre : une bande de lumière dorée traverse la fenêtre (≈ 0,9 s), « Sélection des champions » arrive en fondu en montant de 8 px, puis les Champions de l’Enclume montent du bas de la fenêtre l’un après l’autre (départ à 380 ms, puis toutes les 110 ms), sans rotation. Depuis « Statistiques », l’appli passe d’abord à « Défi ». Une carte encore en mouvement ne réagit au survol qu’une fois posée, et les motifs qui arrivent pendant la distribution s’affichent sur leur carte sans la relancer. Réglage Windows coupé : la main apparaît posée, sans balayage.
|
||||
- Confirmation d’un allié : « Pris par un allié » apparaît sur sa carte de la main, qui s’abaisse de 8 px et se grise ; elle reste 8 px plus bas que les autres. Rien d’autre ne bouge.
|
||||
- Sortie de sélection : les cartes de la main descendent en s’effaçant (≈ 0,3 s, de la dernière à la première), puis l’accueil revient comme après un changement d’onglet, dans l’état décrit plus haut (« Tous », recherche vide).
|
||||
- Transitions entre « Défi » et « Statistiques » : l’écran sortant passe sous un voile de la couleur du fond (≈ 130 ms), puis l’entrant en sort (≈ 280 ms). La barre du haut ne bouge pas. Changer d’onglet pendant une transition repart de là où en est le voile. Les sélecteurs de Saison et de Format sont sur la ligne du titre « Statistiques », sous le voile : la barre du haut, commune aux deux onglets, garde sa hauteur. Pas de glissement : déplacer l’écran redessinerait à chaque image la grille, l’anneau et les graphiques, qui sont en cache.
|
||||
- Survol et focus clavier : le même sur toutes les cartes (grille de l’accueil, main de la sélection, « Autres champions »), en ≈ 350 ms. Une carte jouable monte de 10 px avec une ombre dorée ; une carte grisée monte de 4 px, sans ombre dorée. L’illustration zoome à 107 % dans la carte, qui garde sa taille, pendant que le nom et les coches s’effacent et que la fiche glisse depuis le bas. Quitter une carte en cours d’animation repart de là où elle en est. Une seule carte est levée à la fois : une carte levée au clavier redescend dès que le pointeur bouge. Une molette la repose aussitôt, même en haut ou en bas de la liste. Le voile sur les cartes voisines ne s’applique que dans la main de la sélection. Réglage Windows coupé : la fiche apparaît sans glisser et la carte ne monte pas.
|
||||
- Limites de GPUI, sans le modifier (ADR-0004) : pas de rotation, pas d’espacement des lettres animé, une montée de la carte au lieu d’un grossissement, un voile au lieu d’un filtre ou d’un fondu de l’écran entier.
|
||||
|
||||
+2
-1
@@ -45,10 +45,11 @@ GPUI and gpui-component are not modified to meet a budget: the app's own renderi
|
||||
|
||||
The identity (ring, banner, animations; `docs/interface.md`) follows the same rule:
|
||||
|
||||
- **Animations are triggered by an event** (end of a followed Match, champ select entering or leaving, card hover, tab change) and **draw nothing at rest**. No timer or loop keeps a frame going once an animation is over, and none runs while the window is hidden or minimised. They follow the Windows « Show animations » setting.
|
||||
- **Animations are triggered by an event** (end of a followed Match, champ select entering or leaving, an ally's confirmation, card hover, tab change) and **draw nothing at rest**. No timer or loop keeps a frame going once an animation is over, and none runs while the window is hidden or minimised. They follow the Windows « Show animations » setting.
|
||||
- **The foundation** (`crates/app/src/motion.rs`, with the page saying when « Défi » is visible, #86) decides whether the app animates, and when. The Windows setting reaches GPUI's `App::reduce_motion`: gpui-base reads it at start, and the window's own `WM_SETTINGCHANGE` for `SPI_SETCLIENTAREAANIMATION` reads it again, with no polling. When it is off, a tab switch shows its end state at once, and an animation asked for is not played; turning it off ends a transition running and drops the animation waiting, as soon as Windows says so (`AnimationSetting`). An animation asked for while « Défi » is not visible (window minimised or hidden in the notification area, « Statistiques », « Paramètres » or a champ select in front) waits in `Deferred`: only the strongest is kept, it plays once when « Défi » shows again, and a champ select that starts abandons it.
|
||||
- **Tab transitions lay a veil, never move the screen.** A cached view's cache key holds its bounds and its opacity, so fading or sliding the screen itself would draw the grid, the ring and the charts again at every frame and build the cards again. The veil, of the page's background, covers the screen leaving (130 ms) then lifts off the one arriving (280 ms). Each frame is asked for by the transition itself (`on_next_frame`), and none once the veil is lifted. A window hidden during a transition ends it at once. The champion table is a cached view too, laid out by the space the page gives it, so the veil's frames do not draw it. The screen arriving is prepared (its rows copied and sorted, its cards built) only when it is shown, so a switch undone under the veil prepares nothing. Structural tests check that a transition draws neither the grid, the ring nor the table again, builds no card, recomputes no statistics, and asks for no frame at rest. The charts arriving play gpui-kit's own short entry, as after any switch.
|
||||
- **A card hovered is drawn over its grid, which stays cached** (#88). The cards of a grid never change on hover or focus: the page draws the card under the pointer or the keyboard (and those settling back) lifted over the grid, in a deferred layer painted after the page, from where the grid last placed it (`card_lift.rs`). The grid records its visible cards' bounds and indices while it lays out its rows, so drawing them over it reads no layout, searches no card and copies none: the lifted card is the grid's card as it is at each frame. The layer covers each lifted card's place with the page's background, and in the hand lays the veil on the other cards. Each frame is asked for by the page's render while a card moves (`request_animation_frame`), and none once they are still. A wheel drops the grid's lifted cards at once, even at either end of the list, and so does a grid no longer shown (the home under a champ select, the hand after it) or a card filtered out, so no frame is asked for a card no longer drawn; a tab switch or « Paramètres » drops them all, and a hidden window or the setting turned off shows their end state at once. Structural tests check that hovering a card, through its whole animation, draws none of the grid, builds no card and computes no statistics, and that no frame is asked for at rest. A zoomed illustration overflows the card and is cut square by GPUI's rectangular clip: a frame of the page's background rounds its corners again, which nicks the gold glow by a few pixels at each corner.
|
||||
- **A champ select enters and leaves over its cached hand** (#87). The entry starts once the window shows it, not behind « Paramètres »: a band of gold light (four two-stop gradients side by side, GPUI's gradients have two stops) crosses the page in 900 ms, the title comes in rising in 700 ms, and the Anvil champions are dealt from the bottom of the window, the first at 380 ms then one every 110 ms, each in 700 ms. The cards dealt, the card an ally just took (it rests 8 px lower in the hand, and goes down there as it greys) and the cards leaving at the end are drawn by the page over the hand's grid, in a deferred layer that covers their places with the page's background, from where the grid last placed them (`stage.rs`), as the lifted cards are: the grid is never drawn again for them, and a card's reasons changing during the deal show on it without dealing again. The hand's cards come with the statistics, loaded at each new champ select: they are dealt from when they come. A card still dealt is lifted once in its place. At the end, the hand leaves (320 ms per card, from the last, 35 ms apart), then the veil of the tabs covers the champ select from 240 ms and the end is applied under it: the home is prepared only then. Each frame is asked for by the motion itself, none once it is over or while the hand waits for its cards; a hidden window, the page covered or the setting turned off shows the end state at once. Structural tests on the Arena capture pilot the sequence step by step and check that it draws the hand's grid again for no frame, builds no card, sorts nothing and computes no statistics, and asks for no frame at rest.
|
||||
- **The end of a followed Match is drawn over the cached ring, the cached grid and the banner** (#89). The comet, the flaring tick and the bouncing crown are a function of the page's render in a layer over the ring (`Ring::match_layer`): the ring is not drawn again, and the comet and the tick are built at each frame only while the animation runs, unlike the ring's own shapes, built once per set of ticks; the crown is the ring's own, moved. The card that changes is drawn over its grid like a lifted card at rest (`card_lift.rs`), and stays in the grid until the animation ends even if the filter leaves it out. With the pointer on the grid, nothing moves under it: the grid of the new statistics (order, cards, filter) is prepared when they arrive, and the pointer leaving only puts it in place. The banner's counter rolls in painted over its place in the title, and the splash of the champion validé settles in with the banner's own decode. The animation is fixed when it starts (tick, duration) and reads no statistics at each frame; each frame is asked for by the page's render while it runs, and none after. Structural tests check that it draws neither the grid nor the ring again, tessellates no crown, builds no card, recomputes no statistics and asks for no frame at rest, and that leaving a grid it held still sorts nothing and builds no card.
|
||||
- **Two splashes decoded at most**: the one shown and the one replacing it. All splashes are downloaded in the background, at low priority, after the card portraits, and kept on disk.
|
||||
- During champ select, the Anvil grid is cached at the height of its card rows. The capture replay checks that a splash fade builds no cards and that traversing the hand and « Autres champions » keeps at most two decoded splashes. The latest hovered card takes over when the current fade finishes.
|
||||
|
||||
Reference in new issue
Block a user