You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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");
//}
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.
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");
}
==>
Ax.worldZoom = Math.ceil(worldZoom);
==>
Ax.worldZoom = worldZoom;
The text was updated successfully, but these errors were encountered: