Skip to content
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

Why does not support zoom out ? #28

Open
fanflash opened this issue Dec 4, 2013 · 1 comment
Open

Why does not support zoom out ? #28

fanflash opened this issue Dec 4, 2013 · 1 comment

Comments

@fanflash
Copy link

fanflash commented Dec 4, 2013

I have a question: Why does not support zoom out?
I found that I just changed very little code can support this feature.
you are deliberately wrote?

change the following code:
1.
public function Ax(initialState:Class = null, width:uint = 0, height:uint = 0, zoom:uint = 1, framerate:uint = 60, fixedTimestep:Boolean = false) {
if (zoom < 1) {
throw new Error("Zoom level must be an integer greater than 0");
}
==>

    public function Ax(initialState:Class = null, width:uint = 0, height:uint = 0, zoom:Number = 1, framerate:uint = 60, fixedTimestep:Boolean = false) {
        //if (zoom < 1) {
            //throw new Error("Zoom level must be an integer greater than 0");
        //}

Ax.worldZoom = Math.ceil(worldZoom);
==>
Ax.worldZoom = worldZoom;

@arkeus
Copy link
Owner

arkeus commented Dec 4, 2013

That's how the code originally was. It works in some cases. But in others it doesn't. I made it unsupported until those issues are resolved. However, it's a rarely needed feature, so it's normally at the bottom of my todo list. One of the biggest issue is rounding errors when drawing things that should line up (one example, on some tilemaps, as you zoom in and out, depending on your position, you can see gaps between the tiles).

For anyone who needs it, they can do what you did, and it may work. But since it's not stable, I didn't want it to treat it as a feature yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants