port: the refuted 24-unit constant was living in a default; make it loud instead
ScreenView.exit_ramp_units defaulted to 24.0 -- the constant HANDOFF ask 2 told this port to author and that it refused, since the file's own ramp is 10 units. The authored entry was deleted as progress when the corrected record layout removed the unknown, and the default plus boot.gd's timing.get(..., 24.0) made that deletion a no-op. Both use sites are unreachable on today's export (866 keyframes, 0 untimed), so the branch is kept for an older export but no longer invents: the default is -1.0 meaning not supplied, and an untimed group now raises an error naming the screen rather than fabricating a duration. My first verification accused the change: main_menu 641941 px and extras 226009 px changed, on a branch that cannot execute and with no error raised. The cause was --screen=X --capture= firing at an uncontrolled instant -- t=9.00 in the earlier run against t=8.00 in the later one, one unit apart mid-build-in. Three runs now are byte-identical, so it is not noise; the instant is stable within a session and moves between them. Re-run with --time=1.0 pinned, old against new is byte-identical on all four screens. Records the harness limitation: --screen=X --capture= cannot be used for before/after comparison on an unsettled screen, which also explains the earlier settle-vs-rest confound. Also corrects my overstatement that other tools call the CLI -- verify-screen is the only one, checked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N7FiFFFwbvG2uxdcEh8HyF
This commit is contained in:
@@ -200,7 +200,12 @@ func _ready() -> void:
|
||||
# give a synthetic time to. The default below is now unreachable rather than
|
||||
# authored, and both of ScreenView's uses are dead branches kept only so an
|
||||
# older export still loads.
|
||||
view.exit_ramp_units = float(timing.get("exit_ramp_units", 24.0))
|
||||
# ⚠️ The fallback is -1.0, NOT 24.0. It was 24.0 -- the constant HANDOFF ask 2
|
||||
# told this port to author and that it refused -- so deleting the authored
|
||||
# entry as progress silently reinstated the refuted number as a default.
|
||||
# Negative means "not supplied": ScreenView then declines to invent a duration
|
||||
# and says so, rather than making one up. See ScreenView.exit_ramp_units.
|
||||
view.exit_ramp_units = float(timing.get("exit_ramp_units", -1.0))
|
||||
_black_hold = float(timing.get("black_hold_units", 0.0))
|
||||
# Which focus records draw unconditionally and loop. Kept out of ScreenView's
|
||||
# own logic on purpose -- see `looping_focus` there for the census that says
|
||||
|
||||
@@ -40,7 +40,23 @@ var units_per_second: float = 60.0
|
||||
## Duration of the ramp into the final, untimed keyframe -- the screen playing
|
||||
## itself out. Authored (`authored/timing.json`): the disc has no time slot on
|
||||
## that keyframe, so this is the one unknown duration per screen.
|
||||
var exit_ramp_units: float = 24.0
|
||||
## Synthetic duration for a group's final UNTIMED keyframe.
|
||||
##
|
||||
## 🔴 NEGATIVE MEANS "NOT SUPPLIED", AND THAT IS NOW THE DEFAULT. It used to
|
||||
## default to **24.0** -- the exact constant HANDOFF ask 2 told this port to
|
||||
## author and that the port refused, because the file's own ramp is 10 units and
|
||||
## authoring 24 would run the fade 2.4x too long. The authored entry was deleted
|
||||
## as progress when the corrected record layout removed the unknown; the default
|
||||
## quietly put the refuted number back where nobody would look for it.
|
||||
##
|
||||
## The branch is kept so an older export still loads, but it no longer INVENTS a
|
||||
## duration: if a group really does end untimed, the port says so and declines to
|
||||
## make one up, which is the same choice `black_hold_units` and
|
||||
## `input_during_transition` make in `authored/timing.json`.
|
||||
##
|
||||
## Unreachable on today's export -- 866 keyframes across 16 screens, 0 untimed.
|
||||
var exit_ramp_units: float = -1.0
|
||||
var _warned_untimed := false
|
||||
|
||||
## Focus records this screen draws unconditionally, and the period each loops on.
|
||||
##
|
||||
@@ -290,9 +306,17 @@ func pose_at(element: Dictionary, t: float) -> Dictionary:
|
||||
# was measured and refuted -- see authored/timing.json.
|
||||
var last_frame: Dictionary = frames[frames.size() - 1]
|
||||
if not last_frame.has("t"):
|
||||
var exit_frame := last_frame.duplicate()
|
||||
exit_frame["t"] = float(timed[timed.size() - 1]["t"]) + exit_ramp_units
|
||||
timed.append(exit_frame)
|
||||
if exit_ramp_units < 0.0:
|
||||
if not _warned_untimed:
|
||||
_warned_untimed = true
|
||||
push_error("%s has an untimed final keyframe and no exit_ramp_units was supplied. "
|
||||
% [screen.get("name", "?")]
|
||||
+ "Not inventing one: the group ends at its last timed frame. "
|
||||
+ "This export predates the corrected record layout -- re-export it.")
|
||||
else:
|
||||
var exit_frame := last_frame.duplicate()
|
||||
exit_frame["t"] = float(timed[timed.size() - 1]["t"]) + exit_ramp_units
|
||||
timed.append(exit_frame)
|
||||
|
||||
if t <= float(timed[0]["t"]):
|
||||
return timed[0]
|
||||
@@ -420,7 +444,7 @@ func exit_time() -> float:
|
||||
for k: Dictionary in frames:
|
||||
if k.has("t"):
|
||||
timed_end = maxf(timed_end, float(k["t"]))
|
||||
if not frames[frames.size() - 1].has("t"):
|
||||
if not frames[frames.size() - 1].has("t") and exit_ramp_units >= 0.0:
|
||||
timed_end += exit_ramp_units
|
||||
last = maxf(last, timed_end)
|
||||
return last
|
||||
|
||||
Reference in New Issue
Block a user