-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathinit.lua
50 lines (41 loc) · 1.41 KB
/
init.lua
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
-- LuaRadio package.
--
-- @module radio
-- @tfield string _VERSION Package version as a string, e.g. "1.0.0".
-- @tfield string version Package version as a string, e.g. "1.0.0".
-- @tfield int version_number Package version as a number, encoded in decimal as xxyyzz, e.g. v1.2.15 would be 10215.
-- @tfield table version_info Package version as a table, with keys `major`, `minor`, `patch` and integer values.
-- @tfield module types Types module.
-- @tfield module block Block module.
-- @tfield module debug Debug module.
-- @tfield module platform Platform module.
assert(pcall(require, 'ffi') and pcall(require, 'jit'), 'Error: LuaRadio requires LuaJIT.')
local radio = {
-- Version
_VERSION = "0.11.0",
version = "0.11.0",
version_number = 001100,
version_info = {major = 0, minor = 11, patch = 0},
-- Core modules
platform = require('radio.core.platform'),
class = require('radio.core.class'),
block = require('radio.core.block'),
vector = require('radio.core.vector'),
debug = require('radio.core.debug'),
-- Types
types = require('radio.types'),
-- Blocks
blocks = require('radio.blocks'),
-- Composites
composites = require('radio.composites'),
}
-- Expose all blocks in top namespace
for k,v in pairs(radio.blocks) do
radio[k] = v
end
-- Expose all composites in top namespace
for k,v in pairs(radio.composites) do
radio[k] = v
end
return radio