Skip to content

Conversation

@Geokureli
Copy link
Member

@Geokureli Geokureli commented Apr 17, 2025

Closes #2301 and #2898

  • FlxCamera: Adds worldToViewPosition, viewToWorldPosition, gameToViewPosition, viewToGamePosition as well as x and y specific methods for each
  • FlxObject: Adds getViewPosition, getViewX and getViewY
  • FlxSprite:
    • Helpers methods for clipRect: clipToWorldRect, clipToViewRect, clipToWorldBounds and clipToViewBounds
    • Converters: worldToFramePosition, worldToFramePositionSimple and viewToFramePosition
  • FlxFrame: Adds getPixelAt and toSourcePosition
  • FlxRect: Adds the abs method
  • IFlxPooled and FlxDestroyUtil: Adds putWeak methods

To Do

  • Retry CI when stuff works
  • Find out why this fails on hardware="false"
  • Use different x/y values in tests. this would have caught the previous error
  • Make getPixelAt this work with sprite.color and colorTransform

@Geokureli Geokureli changed the title Frame clip rect Add clipToWorldBounds and converters between: frame, world, view and game Apr 17, 2025
@Geokureli Geokureli mentioned this pull request Apr 17, 2025
@Geokureli Geokureli changed the base branch from dev to 6.2.0 April 28, 2025 21:45
Copy link

@rodney528 rodney528 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing I have to say is... does overload really need to be used that much?

@Geokureli
Copy link
Member Author

Geokureli commented Dec 12, 2025

The only thing I have to say is... does overload really need to be used that much?

Is there a disadvantage to it?

@rodney528
Copy link

rodney528 commented Dec 12, 2025

Idk much about overload besides being able to use the same function name multiple times. Just feels like too many versions of the same function.

@Geokureli
Copy link
Member Author

Geokureli commented Dec 12, 2025

Idk much about overload besides being able to use the same function name multiple times. Just feels like too many versions of the same function.

Why is it "too many"? What is the downside of more vs less?

@rodney528
Copy link

Idk much about overload besides being able to use the same function name multiple times. Just feels like too many versions of the same function.

Why is it "too many"? What is the downside of more vs less?

Just feels weird to me ig.

@Geokureli
Copy link
Member Author

Geokureli commented Dec 12, 2025

Just feels weird to me ig.

Well, let me know when you find a reason, or if you have a suggestion

@Geokureli Geokureli changed the base branch from 6.2.0 to dev December 12, 2025 23:55
@Geokureli Geokureli merged commit 620d8e0 into HaxeFlixel:dev Dec 16, 2025
10 checks passed
@Geokureli Geokureli deleted the frame-clip-rect branch December 16, 2025 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Oddities when using clipRect + scale.

2 participants