re(ui): the rest fallback fires on 2 elements, and "last keyframe" wins there
Scored candidate rest-pose rules by rendering and correlating instead of
arguing, and both results correct something I had published.
First, the exposure. The guessing fallback is reached only by an element
that is plateau-less AND multi-keyframe -- a single-keyframe element
short-circuits at `match len { 1 => first }`. Per screen:
title (4) 24 elements 2 plateau-less 0 reach the fallback
main menu (5) 16 5 0
EXTRAS (6) 18 5 0
publisher splash (10) 3 2 1
developer splash (11) 7 2 1
So on the three screens the port cares most about, rest() never guesses.
That is why three different rules render builds 4/5/6 to identical
correlations -- the code is unreachable there, which I nearly read as
"the choice does not matter".
Second, where it does fire, the last keyframe is markedly better:
publisher splash dwell +0.9600 last +0.9982 maxalpha +0.9600
developer splash dwell +0.9643 last +0.9758 maxalpha +0.9643
That refutes my own earlier refutation. I had killed the last-keyframe
rule by arguing it makes palogo_anima_eff invisible while its two
siblings stay lit, which looked like an artefact. The capture says
otherwise: making it invisible is what improves the match. The sibling
symmetry was my expectation, not evidence.
Caveat kept in front: both captures are single frames of a transient
animation, so this fixes which pose matches THOSE frames, not which is
canonically at rest. Default unchanged -- better on both screens where it
fires and identical on the other three, but it would move 2 305 elements
disc-wide on two measurements. Reachable via SYLPHEED_REST_RULE=last.
Also confirmed: all 195 zero-scale rest poses are inside the corrected
2 305 ambiguous population; none is a single-keyframe element.
METHOD: score a rule where it can differ, or you measure nothing; and an
argument from symmetry is a prediction, not a refutation.
This commit is contained in:
@@ -190,6 +190,26 @@ impl Element {
|
||||
0 => None,
|
||||
1 => self.keyframes.first(),
|
||||
n => {
|
||||
// ⚠️ EXPERIMENT GATE, default off. Both published alternatives to
|
||||
// the longest-dwell fallback died by argument rather than by
|
||||
// measurement, and `compose` can score a rule against the live
|
||||
// captures — so they are reachable here to be tested.
|
||||
// SYLPHEED_REST_RULE=last -> the final keyframe
|
||||
// SYLPHEED_REST_RULE=maxalpha -> the most opaque keyframe
|
||||
match std::env::var("SYLPHEED_REST_RULE").as_deref() {
|
||||
Ok("last") => return self.keyframes.last(),
|
||||
Ok("maxalpha") => {
|
||||
let mut best = (0usize, 0u32);
|
||||
for (k, f) in self.keyframes.iter().enumerate() {
|
||||
let a = (f.fade >> 24) & 0xff;
|
||||
if a >= best.1 {
|
||||
best = (k, a);
|
||||
}
|
||||
}
|
||||
return self.keyframes.get(best.0);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
let mut best = (0usize, 0u32);
|
||||
for k in 0..n - 1 {
|
||||
let (Some(t0), Some(t1)) =
|
||||
|
||||
Reference in New Issue
Block a user