I’m updating the Matrix4 docs and there’s a method called Matrix4.makePerspective( fov, aspect, near, far )
Internally this calculates the values of left, right, top and bottom and calls
Matrix4.makeFrustum( left, right, bottom, top, near, far )
and it looks like it is intended for use in PerspectiveCamera.updateProjectionMatrix()
However the PerspectiveCamera calculates its own versions of left, right, top and bottom in a slightly more complex way, taking into account zoom, view (if set) and filmOffset, and then calls Matrix4.makeFrustum directly.
So it seems that Matrix4.makePerspective() is superfluous – is there a use case that I am missing?
We have
Matrix4
methods to create a rotation matrix, a translation matrix, a scale matrix, a shear matrix, etc., so why not have methods to create an orthographic projection matrix and a perspective projection matrix?Maybe
makeFrustum
could be renamedMakePerspective
. (Thing is, the order of the args is different than those inMakeOrthographic
… That’s unfortunate.)makePerspective
, then, could be removed. It is just a different way of parameterizing the args. I am not sure if users rely on it or not.This is sort of a mess, but I do not have a strong opinion on this one.