-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
me.ImageLayer.anchorPoint is broken #332
Comments
ahah, i'm probably responsible for that one ;) |
Sadly, I could not get the |
oh so my patch won't help furthermore I guess :P |
Just successfully tested this on the tutorial by first resizing used image to half their size and then by adding the following line after loading a level (in the play screen reset function) : me.game.currentLevel.getLayerByName("Parallax1").anchorPoint.set(0.0, 0.5);
me.game.currentLevel.getLayerByName("Parallax2").anchorPoint.set(0.0, 0.5); all working fine, so closing this one :) |
@obiot What exactly does it look like? And does it work as expected with the |
Aha! I got it. Now I see why this confused me before. As an example, I want the buildings and moon backgrounds in Kung Fu Star to align the bottom of the image with the bottom of the map. The current implementation creates an ugly window effect when the image is smaller than the viewport, which is not at all what I expect. And when the image is bigger, the bottom of the image is aligned with the bottom of the viewport initially. Here is an explanation of how I expect this to work, with pictures:
In the images, I have represented the map as the entire white background, and the |
Actually I would rather stick with the current implementation and rewrite the whole stuff as part of the 1.0.0 release. |
- This shows a potential optimization path; melonJS should only use known regions, so we can remove this safety net code! - Requires Texture [atlas] support for TMX tilesets and bitmap fonts, at the very least
this.viewport
is never set. inme.ImageLayer
The text was updated successfully, but these errors were encountered: