diff options
| author | jussi | 2024-04-13 18:44:42 +0300 |
|---|---|---|
| committer | jussi | 2024-04-13 18:44:42 +0300 |
| commit | 1d66edf4f2390c25485ef4205b20c184de1c2f5d (patch) | |
| tree | 7a3cd79e26d7b93a2fb4a3764171fbe90d22a9d4 /examples/2D_lights | |
| parent | b96960a1f97f815a6872fedc422ea950ed477cda (diff) | |
| download | reilua-enhanced-1d66edf4f2390c25485ef4205b20c184de1c2f5d.tar.gz reilua-enhanced-1d66edf4f2390c25485ef4205b20c184de1c2f5d.tar.bz2 reilua-enhanced-1d66edf4f2390c25485ef4205b20c184de1c2f5d.zip | |
Position argument added for GetCodepoint, GetCodepointNext and GetCodepointPrevious.
Diffstat (limited to 'examples/2D_lights')
| -rw-r--r-- | examples/2D_lights/main.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/2D_lights/main.lua b/examples/2D_lights/main.lua index 847f5b2..34bf8bc 100644 --- a/examples/2D_lights/main.lua +++ b/examples/2D_lights/main.lua @@ -12,6 +12,8 @@ local LIGHTRENDER_SIZE = 1024 -- Maxinum light size. local SHADOW_FOV = 45 -- Camera fov for shadow rendering. local WALL_MESH_HEIGHT = math.tan( RL.DEG2RAD * ( 90 - SHADOW_FOV / 2 ) ) * LIGHTRENDER_SIZE / TILE_SIZE_PX / 2 +print( "WALL_MESH_HEIGHT", WALL_MESH_HEIGHT ) + local monitor = 0 local monitorPos = Vector2:new( RL.GetMonitorPosition( monitor ) ) local monitorSize = Vector2:new( RL.GetMonitorSize( monitor ) ) @@ -24,7 +26,7 @@ local lightTexSize = Vector2:new() local framebuffer = nil local lightMap = nil -- Final image of all lights. local lightRender = nil -- RenderTexture for individual light and shadow rendering. -local ambientLight = Color:new( 40, 40, 40, 255 ) +local ambientLight = Color:new( 40, 40, 40 ) local wallSegs = {} local shadowMesh = nil local lights = {} @@ -131,10 +133,10 @@ function RL.init() RL.rlDisableBackfaceCulling() end --- Process. +-- Update. function RL.update( delta ) - lights[1].pos = Vector2:new( RL.GetMousePosition() ) + lights[1].pos:set( RL.GetMousePosition() ) end -- Drawing. |
