Orthographic camera distord / stretch with canvas, look simple examples ;)

You have idea, why orthographic is stretch ?! :DDD (CLICK ON CORNER RIGHT “Edit on Codepen”

You must take into account the ratio of the viewport (ie. the width/height) to update the orthographic bounds.

Change:

    var zoomFactorbis = zoomFactor * 4;

with:

    var zoomFactorbis = zoomFactor * engine.getRenderWidth() / engine.getRenderHeight();

and it should work:

1 Like