mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-13 16:18:50 -05:00
fixed scaling on RenderPixi view bounds
This commit is contained in:
parent
6652bb4f34
commit
c1964e2de8
1 changed files with 5 additions and 1 deletions
|
@ -121,6 +121,10 @@ var RenderPixi = {};
|
|||
|
||||
// reset background state
|
||||
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
|
||||
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 {
|
||||
constraints = allConstraints;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue