Axel icon indicating copy to clipboard operation
Axel copied to clipboard

Why does not support zoom out ?

Open fanflash opened this issue 11 years ago • 1 comments

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;

fanflash avatar Dec 04 '13 16:12 fanflash

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.

arkeus avatar Dec 04 '13 22:12 arkeus