Repository navigation
2D: sprite animation, Camera2D controller and pixel-perfect rendering - #165
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…and runtime checks Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd docs Also stops EditorSceneViewportView.uiProjectRoot from looping forever when no ancestor holds a project marker. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e view; fix multi-camera CameraSystem CameraSystem inserted a camera's first GlobalViewUniform while iterating, which skipped cameras when several existed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ull-resolution UI Camera.pixelPerfect renders at a fixed resolution and presents with nearest sampling. UI is drawn onto the scaled picture at output resolution. Studio Camera settings, picking and input mapping included. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SpectralDragon
marked this pull request as ready for review
October 19, 2026 22:10
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
What
Sprite animation:
SpriteAnimatorplays clips of a shared.spriteanimresource (SpriteAnimationSet) on aSprite. Frames are grid cells or pixel rectangles. Events for frame, marker, loop and finish. Aseprite JSON import (AsepriteSheet), AdaScript control through plain fields, and a Studio resource editor with preview, Aseprite import and Add to Scene. Docs:Documentation/SpriteAnimation.md.Camera 2D:
Camera2DController+CameraTarget2D: follow groups by weight, offset, dead zone, frame-rate-independent smoothing, limits (zoom/origin aware), zoom with smoothing, trauma shake with optional roll, pixel snapping. It runs after transform propagation and publishes the view itself (CameraSystem.refreshView), so the frame is extracted with the camera on its target's final position. Studio components and AdaScript fields included. Docs:Documentation/Camera2D.md.Pixel-perfect rendering:
Camera.pixelPerfectrenders at a fixed resolution and presents with a whole-number scale (or fit), nearest sampling and a border. The projection uses the fixed size (one world unit = one art pixel at zoom 1); AdaUI is drawn onto the scaled picture at the output's own resolution, so UI stays crisp; pointer mapping and sprite picking measure against the picture. Studio's Camera component has the settings. Docs:Documentation/PixelPerfect.md. ADR-0022 records all three with validation.Bugs found and fixed on the way
CameraSysteminserted a camera's firstGlobalViewUniformwhile iterating its query, which moves the camera to another archetype; with several cameras some were skipped or visited twice. Regression test fails before the fix.EditorSceneViewportView.uiProjectRoot(from:)looped forever when no ancestor folder holds a project marker (Foundation maps the parent of/to/../). It hung every scene load from a temp folder, including the existing sprite layout test.GlobalTransform.init(matrix:)is now public (documented as for systems that publish a final matrix after propagation).Camera2DControllerPluginis installed byDefaultPlugins, notScenePlugin, because it depends onTransformSystemandSceneNavigatorTestsuseScenePluginwithout it.Validation
Not covered
Studio preview viewport and play window on a real GPU, WebGPU/browser, mobile, Windows. Cameras with a parent are unsupported for the controller (documented). Culling still uses the camera from the start of the frame. Pixel-perfect with real UI text/gradients and the glass effect was not drawn through the new path (the UI test uses an injected render item).
Reviewer notes
AdaUITestsaborts withValue WindowFrameRequests is not stored in worldboth here and on the base commit (2855be92, verified in a separate copy), so it is not caused by this PR and could not be used as a regression check.EditorAgentWorkspaceMCPTools.swiftuses_meta/Metadata, which that tag lacks. I verified the Editor in a scratch copy with that argument removed; the repository file is untouched by this PR.Camera's layout makes incremental SwiftPM builds with older objects crash (staleAdaSprite/test objects; a clean build is fine).🤖 Generated with Claude Code