Skip to content

Commit

Permalink
fix: makeMatrix4OrthographicSimple zoom.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhouston committed Sep 14, 2020
1 parent 78bacd1 commit 2f55ecf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/math/Matrix4.Functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,8 @@ export function makeMatrix4OrthographicSimple(
aspectRatio = 1.0,
result = new Matrix4(),
): Matrix4 {
const width = (height * aspectRatio) / zoom;
height /= zoom;
const width = height * aspectRatio;

const left = -width * 0.5 + center.x;
const right = left + width;
Expand Down

0 comments on commit 2f55ecf

Please sign in to comment.