forked from LeenkxTeam/LNXSDK
Revert PAR
This commit is contained in:
@ -62,20 +62,7 @@ class CameraObject extends Object {
|
||||
|
||||
public function buildProjection(screenAspect: Null<Float> = null) {
|
||||
if (data.raw.ortho != null) {
|
||||
var left = data.raw.ortho[0];
|
||||
var right = data.raw.ortho[1];
|
||||
var bottom = data.raw.ortho[2];
|
||||
var top = data.raw.ortho[3];
|
||||
if (data.raw.aspect != null) {
|
||||
var aspect: kha.FastFloat = data.raw.aspect;
|
||||
if (screenAspect == null) screenAspect = iron.App.w() / iron.App.h();
|
||||
var scale = aspect / screenAspect;
|
||||
var cx = (left + right) * 0.5;
|
||||
var hw = (right - left) * 0.5 * scale;
|
||||
left = cx - hw;
|
||||
right = cx + hw;
|
||||
}
|
||||
P = Mat4.ortho(left, right, bottom, top, data.raw.near_plane, data.raw.far_plane);
|
||||
P = Mat4.ortho(data.raw.ortho[0], data.raw.ortho[1], data.raw.ortho[2], data.raw.ortho[3], data.raw.near_plane, data.raw.far_plane);
|
||||
}
|
||||
else {
|
||||
if (screenAspect == null) screenAspect = iron.App.w() / iron.App.h();
|
||||
|
||||
Reference in New Issue
Block a user