0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2025-01-14 16:28:42 -05:00

fixed scaling on RenderPixi view bounds

This commit is contained in:
liabru 2014-07-12 18:10:05 +01:00
parent 6652bb4f34
commit c1964e2de8

View file

@ -121,6 +121,10 @@ var RenderPixi = {};
// reset background state // reset background state
render.currentBackground = null; render.currentBackground = null;
// reset bounds transforms
container.scale.set(1, 1);
container.position.set(0, 0);
}; };
/** /**
@ -214,7 +218,7 @@ var RenderPixi = {};
// transform the view // transform the view
container.scale.set(1 / boundsScaleX, 1 / boundsScaleY); container.scale.set(1 / boundsScaleX, 1 / boundsScaleY);
container.position.set(-render.bounds.min.x, -render.bounds.min.y); container.position.set(-render.bounds.min.x * (1 / boundsScaleX), -render.bounds.min.y * (1 / boundsScaleY))
} else { } else {
constraints = allConstraints; constraints = allConstraints;
} }