Repository navigation
Fix world bounds from member shapes - #48
Open
dajiaohuang wants to merge 1 commit into
Open
dajiaohuang wants to merge 1 commit into
dajiaohuang wants to merge 1 commit into
Conversation
This branch has not been deployed
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
World.set_from_members()initialized all four bounds at zero, so members located entirely to the right/below the origin (or entirely in negative coordinates) did not produce the tight bounds described by the method. Initialize the aggregate from the first actual shape, then expand it for later shapes. If there are no shapes, leave the world's current bounds unchanged.Added a synthetic Haxe regression test for positive-only, negative-only, and mixed-position shapes, plus a dedicated HXML entry and the repository build composite step that runs it.
Validation
haxe test-world-bounds.hxmlpassed.test/Main.hxcompiled to JavaScript; the generated JavaScript was not run.git diff --checkpassed.The exact frozen-window GitHub Search capture returned zero issues and zero PRs; this source-discovered fix is not presented as a response to an in-window report.