-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathR3D.lua
More file actions
31 lines (23 loc) · 871 Bytes
/
R3D.lua
File metadata and controls
31 lines (23 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--#region Type aliases
---@alias R3D.ModelChannelCall { action: "add"|"remove"|"update"|"setMatrix", modelId: string, model: obj, mtl?:table }
---@alias R3D.InputChannelCall { mat: mat4, frustum:{near:table}}
---@alias R3D.OutputChannelCall R3D.DrawCall[]
---@alias R3D.DrawCall {color: table, polygon:number[]}
---@alias R3D.vec3 {x:number, y:number, z:number}
--#endregion
---@class R3D
--- Top-level namespace object
local R3D = {}
--- Model channel
-- Handles model adding, removing and modification
---@type love.Channel
R3D.modelChannel = love.thread.getChannel("r3d_model")
--- Input channel
-- Transports matrices for calculations
---@type love.Channel
R3D.inputChannel = love.thread.getChannel("r3d_input")
--- Output channel
-- Transports arrays of draw calls
---@type love.Channel
R3D.outputChannel = love.thread.getChannel("r3d_output")
return R3D