(eye, dir, up)
| 1322 | return Matrix4.from(x, 0, 0, 0, 0, y, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); |
| 1323 | } |
| 1324 | static lookToRh(eye, dir, up) { |
| 1325 | const f = dir.normal(); |
| 1326 | const s = f.cross(up).normal(); |
| 1327 | const u = s.cross(f); |
| 1328 | return Matrix4.from(s.x, u.x, -f.x, 0, s.y, u.y, -f.y, 0, s.z, u.z, -f.z, 0, -eye.dot(s), -eye.dot(u), eye.dot(f), 1); |
| 1329 | } |
| 1330 | static lookToLh(eye, dir, up) { |
| 1331 | return Matrix4.lookToRh(eye, dir.neg(), up); |
| 1332 | } |