You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e62999a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(background): scroll only the presets that are periodic under it (#414)
compute_scroll_offset translated every preset before dispatch. Three of
the seven are not periodic under translation and already animate
themselves from speed:
- gradient_shift uses direction for the rotation sense, and paints its
shader over the frame rect with no margin, so any translation left an
uncovered band.
- concentric_circles computes its own offset = (time * speed) % spacing.
The outer translation was a second animation on top, and translating a
radial pattern moves its centre.
- halo animates its zones internally.
PR #154 bounded the offset to one tile period, which turned an unbounded
drift into a bounded periodic jump. It is now zero for those three:
declaring a direction on one of them is pixel-inert, verified frame by
frame against the same scenario with no direction at all.
This is a visible rendering change for an existing scenario that
declares one. The motion being removed is the motion that dragged the
background off the frame.
The four that keep it -- grid_dots, grid_lines, pixel_grid, heropattern
-- are tiled patterns with no motion of their own, drawn with a whole
period of margin on each side. pixel_grid was the exception: its cell
loops started at index 0, so scrolling right uncovered a band on the
left. They start at -1 now, which is what the other three already did.
pixel_grid's own `motion` field does not translate anything, so it
composes with the scroll rather than doubling it, and its default
(`none`) leaves it exactly in grid_dots's position: a still texture the
outer scroll is the only thing that can move.
## `speed` + `direction` : seuls quatre fonds se laissent faire défiler
18
+
19
+
`direction` translate la texture du fond. Ça n'a de sens que pour un motif
20
+
**périodique sous translation**, qui n'a par ailleurs aucun mouvement propre :
21
+
22
+
| Preset |`direction`| Pourquoi |
23
+
|---|---|---|
24
+
|`grid_dots`, `grid_lines`, `pixel_grid`, `heropattern`|**actif**| Motifs pavés, dessinés avec une période entière de marge de chaque côté. Le défilement extérieur est leur seul mouvement. |
25
+
|`gradient_shift`|**inerte**|`speed` pilote déjà le sens de rotation du dégradé (`direction` vaut `cw`/`ccw` ici), et le shader est peint sur le rectangle du cadre **sans marge** : toute translation laissait une bande découverte. |
26
+
|`concentric_circles`|**inerte**| Calcule déjà son propre `offset = (time * speed) % spacing`. Translater un motif radial déplace son centre — c'était une double animation. |
27
+
|`halo`|**inerte**| Anime ses zones lui-même. |
28
+
29
+
Sur les trois derniers, déclarer une `direction` ne produit plus **rien du tout**
30
+
(vérifié frame par frame, pixel pour pixel). C'est un changement de rendu visible
31
+
pour un scénario existant qui en déclarait une — mais le mouvement supprimé est
32
+
celui qui faisait sortir le fond du cadre, pas un effet qu'on perd.
33
+
34
+
> `pixel_grid` a son propre champ `motion` (`twinkle`, `sweep`), qui ne translate
35
+
> rien : il compose avec le défilement au lieu de le doubler. Son défaut,
36
+
> `motion: none`, en fait une texture immobile — exactement le cas de `grid_dots`.
0 commit comments