-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlxCamera: fix object visibility for zoom < 1, closes #292 #2003
Conversation
FlxSprites and tilemaps are working. This work isn't finished and needs documentation
…ous (which is much more perfomance intensive)
Thanks @MSGhero for pointing it
damn, i need to sleep more
scale objects down, not the buffer
Maybe this feeling is wrong
@Gama11 could you review this pull request please? |
@Gama11 i'll try to see what's wrong with this |
@Gama11 i think i've fixed this issue with FlxCamera demo. At least it works as expected on my machine. Could you check it also? |
It looks like @Gama11 's issue was fixed. Also my demo is working too. |
@starry-abyss FlxCamera demo doesn't use tilemaps. Actually you see gaps between FlxSprites which forms background |
But i can't find solution for zoom values less than 1.0 yet
i just can't fix tearing problem on flash target for zoom values less than 1.0. and doubt that this is possible. |
…aling # Conflicts: # flixel/FlxObject.hx
Is this change compatible with new opengl renderer? |
@gamedevsam i've merged this changes on my working branch recently |
So should this PR be closed? |
@Beeblerox This PR adds some TODO comments, are these still relevant? |
What is the reason to not merge it before the OpenFl 4 PR? |
flixel/FlxCamera.hx
Outdated
/** | ||
* Floored down values of viewOffsetX and viewOffsetY. | ||
*/ | ||
private var viewOffsetXFloored:Int = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of caching these values? Std.int()
should be pretty cheap. Also, "floored" implies that Math.floor()
was used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Gama11 ok, i'll remove these variables.
flixel/FlxCamera.hx
Outdated
* @param rect rectangle to prepare for rendering | ||
* @return trasformed rectangle with respect to camera's zoom factor | ||
*/ | ||
@:noCompletion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a big fan of @:noCompletion
, things still show up in API docs with that (see startQuadBatch()
for instance). There's @:dox(hide)
, but I feel like it's cleaner to just make them private
to begin with (and use @:access
to access them)?
…axeFlixel#2003) (cherry picked from commit cbc9269)
Support for camera zoom values less than 1 for blit and tile render modes