Skip to content

fix(core): retain mesh background during async album loads - #578

Merged
apoint123 merged 2 commits into
amll-dev:mainfrom
LuorixDev:fix/mesh-gradient-async-loading
Aug 15, 2026
Merged

fix(core): retain mesh background during async album loads#578
apoint123 merged 2 commits into
amll-dev:mainfrom
LuorixDev:fix/mesh-gradient-async-loading

Conversation

@LuorixDev

Copy link
Copy Markdown
Contributor

Summary

  • Ignore stale album-load completions and abort the previous fetch when a new cover is requested.
  • Preserve the currently rendered mesh when the latest cover fails to load.
  • Recreate WebGL programs, buffers, framebuffer resources, mesh, and texture after context restoration using the last successful album pixels.

Root cause

Concurrent setAlbum calls shared isNoCover state. A failed request for an older cover could mark the renderer as having no cover after a newer cover had already loaded, which faded out the visible background. The renderer also had no context-loss recovery path.

Validation

  • pnpm --filter @applemusic-like-lyrics/core typecheck
  • pnpm --filter @applemusic-like-lyrics/core build
  • biome lint packages/core/src/bg-render/mesh-renderer/index.ts --error-on-warnings
  • git diff --check

@LuorixDev

Copy link
Copy Markdown
Contributor Author

修有时候背景是黑色的bug
image

@LuorixDev
LuorixDev force-pushed the fix/mesh-gradient-async-loading branch from c0841a1 to f6f3502 Compare August 15, 2026 15:41
@apoint123
apoint123 merged commit 0a5d403 into amll-dev:main Aug 15, 2026
2 checks passed
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.

2 participants