Add animation style toggle
This commit is contained in:
parent
02222d5189
commit
e7f9a5cb09
15 changed files with 238 additions and 20 deletions
|
|
@ -24,9 +24,24 @@ Relevant internal config hooks:
|
|||
|
||||
- `SetAnimationsEnabled`
|
||||
- `SetAnimationDurationMs`
|
||||
- `SetAnimationStyle`
|
||||
- `SetAnimationCurve`
|
||||
- `SetAnimationCubicBezier`
|
||||
|
||||
TOML example:
|
||||
|
||||
```toml
|
||||
[animations]
|
||||
enabled = true
|
||||
duration-ms = 600
|
||||
style = "multiphase"
|
||||
curve = "ease-out"
|
||||
```
|
||||
|
||||
Set `style = "plain"` to force ordinary one-step movement interpolation while
|
||||
keeping the configured curve. `curve = "linear"` only changes easing; it does
|
||||
not select the plain animation style.
|
||||
|
||||
Current curve IDs in code:
|
||||
|
||||
- `0`: linear
|
||||
|
|
@ -37,19 +52,20 @@ Current curve IDs in code:
|
|||
|
||||
## Enabling Multiphase Tests
|
||||
|
||||
There is currently no separate user-facing multiphase toggle. To exercise the
|
||||
multiphase planner:
|
||||
To exercise the multiphase planner:
|
||||
|
||||
1. Enable animations with `SetAnimationsEnabled`.
|
||||
2. Set a slow duration with `SetAnimationDurationMs`, around `400-700ms`.
|
||||
3. Use tiled layout commands that are wired through `State::with_layout_animations`.
|
||||
4. Use layouts where at least two tiled windows change geometry in the same
|
||||
3. Select `style = "multiphase"` in TOML, or call `SetAnimationStyle` with
|
||||
`AnimationStyle::MULTIPHASE`.
|
||||
4. Use tiled layout commands that are wired through `State::with_layout_animations`.
|
||||
5. Use layouts where at least two tiled windows change geometry in the same
|
||||
container layout batch.
|
||||
|
||||
The compositor then attempts multiphase planning automatically when the batched
|
||||
layout pass completes. If the planner proves a legal no-overlap sequence, that
|
||||
group uses phased animation. If it cannot prove one, only that motion group falls
|
||||
back to ordinary linear animation.
|
||||
back to ordinary plain animation.
|
||||
|
||||
Good command families for multiphase testing:
|
||||
|
||||
|
|
@ -64,7 +80,7 @@ Good command families for multiphase testing:
|
|||
|
||||
These paths should not be used as evidence of multiphase behavior:
|
||||
|
||||
- tile-to-float and float-to-tile, which deliberately use linear animation
|
||||
- tile-to-float and float-to-tile, which deliberately use plain animation
|
||||
- command-driven floating move/resize, which may animate but can overlap
|
||||
- pointer or tablet drag/resize, which should not animate
|
||||
- spawn-in and spawn-out, which are single-phase and use the configured curve
|
||||
|
|
@ -73,7 +89,7 @@ These paths should not be used as evidence of multiphase behavior:
|
|||
|
||||
Useful debug signal:
|
||||
|
||||
- `falling back to linear layout animation for group ...` means the group entered
|
||||
- `falling back to plain layout animation for group ...` means the group entered
|
||||
the multiphase gate but the planner rejected it. That is acceptable for
|
||||
unsupported patterns, but unexpected for the supported swap/extraction cases
|
||||
below.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue