add zoom option to camera to work around the orthographic camera

This commit is contained in:
veclavtalica
2025-01-27 03:25:14 +03:00
parent 791ab628ca
commit 6a87119c70
5 changed files with 24 additions and 10 deletions

View File

@ -83,7 +83,8 @@ TWN_API void draw_billboard(const char *texture,
TWN_API void draw_camera(Vec3 position,
Vec3 direction, /* optional, default: (0, 0, -1) */
Vec3 up, /* optional, default: (0, 1, 0) */
float fov); /* optional, default: PI / 6 * 3 (90 degrees) */
float fov, /* optional, default: PI / 6 * 3 (90 degrees) */
float zoom); /* optional, default: 1 */
/* same as draw_camera(), but with first person controller in mind */
/* direction and up vectors are inferred from roll, pitch and yaw parameters (in radians) */
@ -97,7 +98,8 @@ draw_camera_from_principal_axes(Vec3 position,
float roll, /* optional, default: 0 */
float pitch, /* optional, default: 0 */
float yaw, /* optional, default: 0 */
float fov); /* optional, default: PI / 6 * 3 (90 degrees) */
float fov, /* optional, default: PI / 6 * 3 (90 degrees) */
float zoom); /* optional, default: 1 */
/* expects '*' masks that will be expanded to 6 names: 'up', 'down', 'east', 'west', 'north' and 'south' */
TWN_API void draw_skybox(const char *textures);