Skip to content

feat(build): add animated texture mcmeta pipeline and frame strip packager (#55) - #192

Merged
BharathASL merged 1 commit into
mainfrom
feat/55-animated-texture-pipeline
Aug 31, 2026
Merged

feat(build): add animated texture mcmeta pipeline and frame strip packager (#55)#192
BharathASL merged 1 commit into
mainfrom
feat/55-animated-texture-pipeline

Conversation

@BharathASL

Copy link
Copy Markdown
Contributor

Description

Implements the headless animated texture .mcmeta pipeline and multi-frame animation strip compiler for Keyframe (Issue #55, Epic #40).

Key Highlights:

  1. Multi-Frame Vertical Strip Assembly: Compiles multi-frame SVG directories (e.g. textures/water_still/) into vertical 1:N PNG strips ($W \times (N \cdot W)$) across all 5 resolution tiers using @resvg/resvg-js.
  2. SVG Defs ID Collision Isolation: Strips XML prologs/DOCTYPES and prefixes per-frame <defs> element IDs (f${frameIdx}_${id}) and references (url(#...), href="#...") to prevent gradient/mask shadowing across animation frames.
  3. Natural Numerical Sorting: Enforces numerical sorting (0.svg, 1.svg, 2.svg ... 10.svg) to prevent alphabetical ordering issues.
  4. Metadata Discovery Ladder & Presets: Auto-detects companion <stem>.svg.mcmeta, <stem>.png.mcmeta, <stem>.mcmeta, or directory animation.json, with built-in preset fallbacks for water, lava, fire, prismarine, sea lanterns, campfires, and lanterns.
  5. Backwards-Compatibility Alias Propagation: Replicates .png.mcmeta files alongside aliased textures (e.g., short_grass -> grass.png.mcmeta).
  6. Automated Test Suite: Added 7 comprehensive unit/integration test suites executable via npm test.

Affected Assets

  • tools/lib/animation-packager.mjs (new)
  • tools/test-animation-packager.mjs (new)
  • tools/build.mjs (modified)
  • package.json (modified)

Type of Change

  • feat: New vector texture master, blockstate, or compiler capability
  • fix: Tiling fix, palette correction, or bugfix
  • docs: Documentation improvement
  • chore / refactor: Maintenance, dependencies, or codebase cleanup

Contributor Checklist

  • Ran npm run build and npm run build:all locally and verified all 5 resolution tiers compile successfully.
  • Verified that npm test runs and passes all 7/7 unit and integration tests.
  • Commit message follows Conventional Commits format.
  • Signed off with Developer Certificate of Origin (git commit -s).
  • Branch is rebased cleanly onto latest main.
  • Formatting complies with .editorconfig.

Closes #55

…kager (#55)

- Implement multi-frame vertical animation strip compiler via Resvg with SVG defs ID namespacing
- Add companion *.svg.mcmeta and *.png.mcmeta discovery ladder and auto-bundling
- Add default cinematic animation presets for water, lava, fire, and prismarine
- Support CLI frametime and interpolation overrides
- Add automated test harness and npm test scripts

Closes #55

Signed-off-by: Bharath <bharathasl74185@gmail.com>
@BharathASL
BharathASL force-pushed the feat/55-animated-texture-pipeline branch from 6956053 to 9cbad74 Compare August 31, 2026 08:31
@BharathASL
BharathASL merged commit cff23fc into main Aug 31, 2026
2 checks passed
@BharathASL
BharathASL deleted the feat/55-animated-texture-pipeline branch August 31, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task 1.1.2: Animated Texture .mcmeta Pipeline & Frame Strip Packager

1 participant