2024-02-29 13:54:33 -06:00
|
|
|
this.phys = physics.kinematic;
|
|
|
|
this.dir_view2world = function(dir) { return dir.scale(this.realzoom()); };
|
|
|
|
this.view2world = function(pos) { return cmd(137,pos); };
|
|
|
|
this.world2view = function(pos) { return cmd(136,pos); };
|
|
|
|
this.realzoom = function() { return cmd(135); };
|
|
|
|
|
2024-03-01 11:45:06 -06:00
|
|
|
this.right = function()
|
|
|
|
{
|
2024-03-18 08:16:25 -05:00
|
|
|
return this.pos.x + (window.rendersize.x/2);
|
2024-03-01 11:45:06 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
this.left = function()
|
|
|
|
{
|
2024-03-18 08:16:25 -05:00
|
|
|
return this.pos.x - (window.rendersize.x/2);
|
2024-03-01 11:45:06 -06:00
|
|
|
}
|
|
|
|
|
2024-02-29 13:54:33 -06:00
|
|
|
this.mixin({
|
|
|
|
get zoom() {
|
2024-03-18 08:16:25 -05:00
|
|
|
// var z = game.native.y / window.dimensions.y;
|
2024-03-05 00:11:34 -06:00
|
|
|
return cmd(135);///z;
|
2024-02-29 13:54:33 -06:00
|
|
|
},
|
|
|
|
|
|
|
|
set zoom(x) {
|
|
|
|
x = Math.clamp(x,0.1,10);
|
2024-03-18 08:16:25 -05:00
|
|
|
// var z = game.native.y / window.dimensions.y;
|
2024-03-05 00:11:34 -06:00
|
|
|
// z *= x;
|
|
|
|
cmd(62,x);
|
2024-02-29 13:54:33 -06:00
|
|
|
},
|
|
|
|
});
|