feat(classic-games): 新增 Mini Circus 小游戏#768
Conversation
Made-with: Cursor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe6a0fd6e9
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| document.getElementById("leftBtn").addEventListener("pointerdown", () => keys.add("ArrowLeft")); | ||
| document.getElementById("leftBtn").addEventListener("pointerup", () => keys.delete("ArrowLeft")); | ||
| document.getElementById("rightBtn").addEventListener("pointerdown", () => keys.add("ArrowRight")); | ||
| document.getElementById("rightBtn").addEventListener("pointerup", () => keys.delete("ArrowRight")); |
There was a problem hiding this comment.
Clear movement state when pointer control is canceled
On touch or mouse input, if the user presses a movement button and the pointer is canceled or released outside the button, these handlers never remove the corresponding key from keys, so the board keeps moving indefinitely until the page receives a matching key/pointer event or reloads. This affects mobile play in particular when a finger drifts off the button; add pointercancel/pointerleave or a document-level pointerup cleanup for both movement buttons.
Useful? React with 👍 / 👎.
Summary
project/classic-games/20260703-1814-circus.htmlproject/classic-games/文件名;Circus 未与已使用玩法重复。Validation
resetGame、gameLoop、launchAcrobat、updateAcrobat、renderCircus。INLINE_JS_PARSE=pass。git diff --check -- project/classic-games/20260703-1814-circus.html,无空白错误。Audit
OVERALL_EXIT=0AUDIT_DIR=/tmp/git-commit-audit-20260703-181822-81131Remote
mainSHA:f5ba84844397901a59c6cd2c18f930a09c807230codex/classic-game-20260703-1814-circusfe6a0fd6e99c0da4dea40ca6618390a468d8c1f1