From dbf9599fe51f65a124cb4e6dfa6cf2696fbf7198 Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Fri, 7 Mar 2025 19:40:56 +0300 Subject: [PATCH] twn_api.json: add draw_camera_unproject() --- share/twn_api.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/share/twn_api.json b/share/twn_api.json index 3559f98..bf4057d 100644 --- a/share/twn_api.json +++ b/share/twn_api.json @@ -251,6 +251,29 @@ "restriction": "parameters" }, + "draw_camera_unproject": { + "module": "draw", + "symbol": "camera_unproject", + "header": "twn_draw.h", + "params": [ + { "name": "point", "type": "Vec2", "default": { "x": 0, "y": 0 } }, + { "name": "position", "type": "Vec3", "default": { "x": 0, "y": 0, "z": 0 } }, + { "name": "direction", "type": "Vec3", "default": { "x": 0, "y": 0, "z": -1 } }, + { "name": "up", "type": "Vec3", "default": { "x": 0, "y": 1, "z": 0 } }, + { "name": "fov", "type": "float", "default": 1.57079632679 }, + { "name": "zoom", "type": "float", "default": 1 }, + { "name": "draw_distance", "type": "float", "default": 100 } + ], + "return": { + "fields": [ + { "name": "position", "type": "Vec3" }, + { "name": "direction", "type": "Vec3" } + ], + "c_type": "DrawCameraUnprojectResult" + }, + "restriction": "parameters" + }, + "draw_skybox": { "module": "draw", "symbol": "skybox",