From 9c9690ab5e4ecb484ee130c21f1767785908bd10 Mon Sep 17 00:00:00 2001 From: sanine-a Date: Tue, 9 May 2023 14:46:08 -0500 Subject: fix texture loading --- scripts/cameraHandleResize.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 scripts/cameraHandleResize.lua (limited to 'scripts/cameraHandleResize.lua') diff --git a/scripts/cameraHandleResize.lua b/scripts/cameraHandleResize.lua new file mode 100644 index 0000000..7d1713d --- /dev/null +++ b/scripts/cameraHandleResize.lua @@ -0,0 +1,6 @@ +return function(entities, id, data) + local camera = entities:getComponent(id, "camera") + if camera then + camera.projection:perspectiveResize(data.width/data.height) + end +end -- cgit v1.2.1