Clean up TODO/FIXME/XXX comments across codebase#1282
Merged
Conversation
- Replace vague XXX comments with proper TODOs or issue references - Accept Vector3d type in vector3d/observableVector3d rotate methods - Remove stale TODOs for memoization (camera2d, color) and recursion (container) - Remove resolved TODO in draggable (z is correctly preserved) - Reference tickets for items needing future work: - #1180 (text offscreenCanvas) - #1277 (color memoization) - #1278 (createPattern texture leak) - #1279 (setAntiAlias texture filtering) - #1280 (texture cache overflow) - #1281 (atlas region refactor) - Add .claude to .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR standardizes and cleans up TODO/FIXME/XXX comments across melonJS, replacing vague inline markers with concrete issue links where appropriate, removing stale TODOs, and slightly widening the TypeScript typings for Vector3d/ObservableVector3d rotate() to explicitly accept Vector3d.
Changes:
- Replace/remove various TODO/FIXME/XXX comments, often linking to tracked GitHub issues (#1180, #1278–#1281).
- Widen
rotate()method parameter types to allow passingVector3dexplicitly. - Add
.claudeto.gitignore.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/melonjs/src/video/webgl/webgl_renderer.js | Replaces inline FIXME/TODO notes with direct issue references for repeat-mode cache cleanup and anti-alias filtering behavior. |
| packages/melonjs/src/video/texture/cache.js | Replaces a TODO with an issue link for handling texture unit exhaustion (#1280). |
| packages/melonjs/src/video/texture/atlas.js | Replaces TODO notes with issue links related to region caching/UV lookup behavior (#1281). |
| packages/melonjs/src/renderable/text/text.js | Replaces “XXX” note with clearer comment + issue link about OffscreenCanvas being disabled in WebGL text rendering (#1180). |
| packages/melonjs/src/renderable/sprite.js | Replaces TODO with issue link regarding undefined entries caused by atlas coordinate caching (#1281). |
| packages/melonjs/src/renderable/renderable.js | Replaces “XXX” with a concrete TODO describing intended absolute-position caching/invalidation. |
| packages/melonjs/src/renderable/draggable.js | Removes stale inline TODO about z handling (no behavior change). |
| packages/melonjs/src/renderable/container.js | Removes stale TODO about recursion in body-collection logic (no behavior change). |
| packages/melonjs/src/math/vector3d.ts | Updates rotate() signature to accept Vector3d explicitly; clarifies param doc. |
| packages/melonjs/src/math/observableVector3d.ts | Updates rotate() signature to accept Vector3d explicitly; clarifies param doc. |
| packages/melonjs/src/math/color.ts | Removes stale TODOs about memoization (tracked via issue #1277). |
| packages/melonjs/src/level/tiled/TMXTileMap.js | Replaces “XXX” comment with a clearer TODO explaining the refactor goal for object instantiation logic. |
| packages/melonjs/src/camera/camera2d.js | Removes stale TODOs about memoization in coordinate conversion helpers. |
| .gitignore | Ignores .claude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
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.
Summary
Vector3dtype invector3d/observableVector3drotate()methodstextImage2Ddoes not accept OffscreenCanvas anymore as a pixel source for texture #1180, Add memoization to Color parsing and serialization methods #1277, WebGL: createPattern leaks textures when changing repeat mode #1278, WebGL: setAntiAlias should control texture filtering (GL_NEAREST vs GL_LINEAR) #1279, WebGL: flush and rebatch when texture units are exhausted instead of throwing #1280, Refactor Batcher to use pre-computed UVs from region objects instead of coordinate-string lookups #1281.claudeto.gitignoreTest plan
🤖 Generated with Claude Code