Skip to content

fix(holiday): use standard Wikimedia thumbnail size and load images once - #1278

Merged
Mygod merged 2 commits into
WatWowMap:mainfrom
Boby360:fix/holiday-image-400
Nov 1, 2026
Merged

Mygod merged 2 commits into
WatWowMap:mainfrom
Boby360:fix/holiday-image-400

Conversation

@Boby360

@Boby360 Boby360 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Wikimedia only serves thumbnails at its standard widths, so the 640px pumpkin and ghost URLs returned 400. Switch them to 120px; the sprites render at about 30px.

The animation also created a new Image for every sprite on every frame (about 1000 requests/sec), so a failing URL was requested again on every frame. Load each image once and skip ones that haven't loaded or failed.

Wikimedia only serves thumbnails at its standard widths, so the 640px
pumpkin and ghost URLs returned 400. Switch them to 120px; the sprites
render at about 30px.

The animation also created a new Image for every sprite on every frame
(about 1000 requests/sec), so a failing URL was requested again on every
frame. Load each image once and skip ones that haven't loaded or failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjBJekNgjZKdL2oSVY4PUe
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-31T21:04:44.076915Z f3ec583 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Chrome marks a failed image complete before its onerror runs, and
drawImage throws on it, so the naturalWidth check is what keeps draw()
safe. Deleting the map entry in onerror was redundant; drop it and the
!image check it required.

Also correct the comment: same-URL loads are merged, so the old code
re-requested each failed URL once per frame, not once per sprite.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Mygod
Mygod merged commit 5202ee2 into WatWowMap:main Nov 1, 2026
2 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 1, 2026
## [1.56.3](v1.56.2...v1.56.3) (2026-11-01)

### Bug Fixes

* **holiday:** use standard Wikimedia thumbnail size and load images once ([#1278](#1278)) ([5202ee2](5202ee2))
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.56.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants