Repository navigation
fix: allow named spritesheet animation frames - #368
Merged
Merged
Conversation
…tesheet-frame-names # Conflicts: # src/generated/l10nPayloadValidators.js
…-names # Conflicts: # src/generated/l10nPayloadValidators.js # vt/static/main.js
Restore visual-spritesheet-default, the only screenshot coverage of an animated trimmed atlas addressed by numeric indexes, and move the named-frame scenario to visual-spritesheet-named-frames. Schema tests now accept names, numeric indexes, and mixed lists, and reject boolean, null, object, and array frames.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spritesheet clips addressed by numeric index depend on JavaScript key enumeration. Numeric-looking atlas keys such as
"10","2", and"1"are reordered ascending, so an index can select a different frame than the author expects. Accept frame names as well as numeric indexes so authors can choose frames explicitly. The renderer already resolves named frames; the project schema rejected them. Numeric-index semantics are unchanged.Schema tests accept frame names, numeric indexes, and mixed lists, and reject boolean, null, object, and array frames at the offending index. Each of three wrong schemas fails them: accepting any item, strings only, or numbers only. A render test checks that named frames pass through unchanged.
Visual coverage: the new
visual-spritesheet-named-framesCI scenario uses a high-contrast atlas with numeric-looking names and stationary frames for deterministic capture. Named frames pass with zero mismatches. The same scenario using numeric indexes fails at 73.9% similarity, beyond the 0.8% threshold. The existingvisual-spritesheet-defaultscenario, an animated trimmed atlas using numeric indexes, is unchanged. Fixture-only assets require explicit opt-in.Validation on current main (
6bcde38): all 2,366 tests pass. Build, lint, test markers, formatting, and the regenerated ESM validators are clean. The named-frame, default spritesheet, and media-continuity browser scenarios pass with zero mismatches.Follow-up: the creator currently converts frame names to indexes on export, so it should emit names after this lands.