@gamely/gly-engine-lite 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.lua +99 -100
- package/package.json +1 -1
package/dist/main.lua
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
|
|
2
|
-
local
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local
|
|
18
|
-
local
|
|
19
|
-
local
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local
|
|
23
|
-
local
|
|
24
|
-
local
|
|
25
|
-
local
|
|
26
|
-
local
|
|
27
|
-
local
|
|
28
|
-
local
|
|
29
|
-
local
|
|
30
|
-
local
|
|
31
|
-
local
|
|
32
|
-
local function
|
|
33
|
-
local version =
|
|
34
|
-
local loadcore =
|
|
35
|
-
local loadgame =
|
|
36
|
-
local engine_encoder =
|
|
37
|
-
local engine_game =
|
|
38
|
-
local engine_hash =
|
|
39
|
-
local engine_http =
|
|
40
|
-
local engine_i18n =
|
|
41
|
-
local engine_key =
|
|
42
|
-
local engine_log =
|
|
43
|
-
local engine_math =
|
|
44
|
-
local engine_math_clib =
|
|
45
|
-
local engine_math_random =
|
|
46
|
-
local engine_array =
|
|
47
|
-
local engine_media =
|
|
48
|
-
local engine_api_draw_fps =
|
|
49
|
-
local engine_api_draw_text =
|
|
50
|
-
local engine_api_draw_poly =
|
|
51
|
-
local engine_raw_memory =
|
|
52
|
-
local callback_http =
|
|
53
|
-
local application_default =
|
|
54
|
-
local color =
|
|
55
|
-
local std =
|
|
2
|
+
local source_version_23a4 = nil
|
|
3
|
+
local source_shared_engine_loadcore_23af = nil
|
|
4
|
+
local source_shared_engine_loadgame_23ba = nil
|
|
5
|
+
local source_engine_api_data_encoder_23cc = nil
|
|
6
|
+
local source_engine_api_system_app_23d7 = nil
|
|
7
|
+
local source_engine_api_data_hash_23e2 = nil
|
|
8
|
+
local source_engine_api_io_http_23ed = nil
|
|
9
|
+
local source_engine_api_data_i18n_23f8 = nil
|
|
10
|
+
local source_engine_api_system_key_2403 = nil
|
|
11
|
+
local source_engine_api_debug_log_240e = nil
|
|
12
|
+
local source_engine_api_math_basic_2419 = nil
|
|
13
|
+
local source_engine_api_math_clib_2424 = nil
|
|
14
|
+
local source_engine_api_math_random_242f = nil
|
|
15
|
+
local source_engine_api_data_array_243a = nil
|
|
16
|
+
local source_engine_api_io_media_2445 = nil
|
|
17
|
+
local source_engine_api_draw_fps_2450 = nil
|
|
18
|
+
local source_engine_api_draw_text_245b = nil
|
|
19
|
+
local source_engine_api_draw_poly_2466 = nil
|
|
20
|
+
local source_engine_api_raw_memory_2471 = nil
|
|
21
|
+
local source_engine_protocol_http_callback_2483 = nil
|
|
22
|
+
local source_shared_var_object_root_2495 = nil
|
|
23
|
+
local source_engine_api_system_color_24a0 = nil
|
|
24
|
+
local source_shared_var_object_std_24ab = nil
|
|
25
|
+
local source_shared_functional_pipeline_2959 = nil
|
|
26
|
+
local source_shared_string_dsl_requires_2964 = nil
|
|
27
|
+
local source_shared_string_eval_file_2bcb = nil
|
|
28
|
+
local source_shared_string_eval_code_2bd6 = nil
|
|
29
|
+
local source_shared_functional_decorator_2e77 = nil
|
|
30
|
+
local source_shared_string_encode_http_5c63 = nil
|
|
31
|
+
local source_shared_string_encode_url_5c6e = nil
|
|
32
|
+
local function main_239b()
|
|
33
|
+
local version = source_version_23a4()
|
|
34
|
+
local loadcore = source_shared_engine_loadcore_23af()
|
|
35
|
+
local loadgame = source_shared_engine_loadgame_23ba()
|
|
36
|
+
local engine_encoder = source_engine_api_data_encoder_23cc()
|
|
37
|
+
local engine_game = source_engine_api_system_app_23d7()
|
|
38
|
+
local engine_hash = source_engine_api_data_hash_23e2()
|
|
39
|
+
local engine_http = source_engine_api_io_http_23ed()
|
|
40
|
+
local engine_i18n = source_engine_api_data_i18n_23f8()
|
|
41
|
+
local engine_key = source_engine_api_system_key_2403()
|
|
42
|
+
local engine_log = source_engine_api_debug_log_240e()
|
|
43
|
+
local engine_math = source_engine_api_math_basic_2419()
|
|
44
|
+
local engine_math_clib = source_engine_api_math_clib_2424()
|
|
45
|
+
local engine_math_random = source_engine_api_math_random_242f()
|
|
46
|
+
local engine_array = source_engine_api_data_array_243a()
|
|
47
|
+
local engine_media = source_engine_api_io_media_2445()
|
|
48
|
+
local engine_api_draw_fps = source_engine_api_draw_fps_2450()
|
|
49
|
+
local engine_api_draw_text = source_engine_api_draw_text_245b()
|
|
50
|
+
local engine_api_draw_poly = source_engine_api_draw_poly_2466()
|
|
51
|
+
local engine_raw_memory = source_engine_api_raw_memory_2471()
|
|
52
|
+
local callback_http = source_engine_protocol_http_callback_2483()
|
|
53
|
+
local application_default = source_shared_var_object_root_2495()
|
|
54
|
+
local color = source_engine_api_system_color_24a0()
|
|
55
|
+
local std = source_shared_var_object_std_24ab()
|
|
56
56
|
local application = application_default
|
|
57
57
|
local engine = {
|
|
58
58
|
keyboard = function(a, b, c, d) end,
|
|
@@ -210,13 +210,13 @@ version=version
|
|
|
210
210
|
}
|
|
211
211
|
return P
|
|
212
212
|
end
|
|
213
|
-
|
|
214
|
-
return '0.2.
|
|
213
|
+
source_version_23a4 = function()
|
|
214
|
+
return '0.2.4'
|
|
215
215
|
end
|
|
216
216
|
--
|
|
217
|
-
|
|
218
|
-
local zeebo_pipeline =
|
|
219
|
-
local requires =
|
|
217
|
+
source_shared_engine_loadcore_23af = function()
|
|
218
|
+
local zeebo_pipeline = source_shared_functional_pipeline_2959()
|
|
219
|
+
local requires = source_shared_string_dsl_requires_2964()
|
|
220
220
|
local function step_install_libsys(self, lib_name, library, custom, is_system)
|
|
221
221
|
if not is_system then return end
|
|
222
222
|
local ok, msg = pcall(function()
|
|
@@ -298,9 +298,9 @@ setup = setup
|
|
|
298
298
|
return P
|
|
299
299
|
end
|
|
300
300
|
--
|
|
301
|
-
|
|
302
|
-
local eval_file =
|
|
303
|
-
local eval_code =
|
|
301
|
+
source_shared_engine_loadgame_23ba = function()
|
|
302
|
+
local eval_file = source_shared_string_eval_file_2bcb()
|
|
303
|
+
local eval_code = source_shared_string_eval_code_2bd6()
|
|
304
304
|
local has_io_open = io and io.open
|
|
305
305
|
local function normalize(app, base)
|
|
306
306
|
if not app then return nil end
|
|
@@ -373,7 +373,7 @@ script = script
|
|
|
373
373
|
return P
|
|
374
374
|
end
|
|
375
375
|
--
|
|
376
|
-
|
|
376
|
+
source_engine_api_data_encoder_23cc = function()
|
|
377
377
|
local function install(std, engine, library, name)
|
|
378
378
|
std = std or {}
|
|
379
379
|
std[name] = {
|
|
@@ -388,8 +388,8 @@ install=install
|
|
|
388
388
|
return P
|
|
389
389
|
end
|
|
390
390
|
--
|
|
391
|
-
|
|
392
|
-
local util_decorator =
|
|
391
|
+
source_engine_api_system_app_23d7 = function()
|
|
392
|
+
local util_decorator = source_shared_functional_decorator_2e77()
|
|
393
393
|
local function reset(std, engine)
|
|
394
394
|
if std.node then
|
|
395
395
|
std.bus.emit('exit')
|
|
@@ -429,7 +429,7 @@ install=install
|
|
|
429
429
|
return P
|
|
430
430
|
end
|
|
431
431
|
--
|
|
432
|
-
|
|
432
|
+
source_engine_api_data_hash_23e2 = function()
|
|
433
433
|
local function djb2(digest)
|
|
434
434
|
local index = 1
|
|
435
435
|
local hash = 5381
|
|
@@ -453,8 +453,8 @@ install = install
|
|
|
453
453
|
return P
|
|
454
454
|
end
|
|
455
455
|
--
|
|
456
|
-
|
|
457
|
-
local zeebo_pipeline =
|
|
456
|
+
source_engine_api_io_http_23ed = function()
|
|
457
|
+
local zeebo_pipeline = source_shared_functional_pipeline_2959()
|
|
458
458
|
local function json(self)
|
|
459
459
|
self.options['json'] = true
|
|
460
460
|
return self
|
|
@@ -612,7 +612,7 @@ install=install
|
|
|
612
612
|
return P
|
|
613
613
|
end
|
|
614
614
|
--
|
|
615
|
-
|
|
615
|
+
source_engine_api_data_i18n_23f8 = function()
|
|
616
616
|
local language = 'en-US'
|
|
617
617
|
local language_default = 'en-US'
|
|
618
618
|
local language_list = {}
|
|
@@ -704,7 +704,7 @@ install=install
|
|
|
704
704
|
return P
|
|
705
705
|
end
|
|
706
706
|
--
|
|
707
|
-
|
|
707
|
+
source_engine_api_system_key_2403 = function()
|
|
708
708
|
local function real_key(std, engine, rkey, rvalue)
|
|
709
709
|
local value = rvalue == 1 or rvalue == true
|
|
710
710
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -741,8 +741,8 @@ install = install
|
|
|
741
741
|
return P
|
|
742
742
|
end
|
|
743
743
|
--
|
|
744
|
-
|
|
745
|
-
local util_decorator =
|
|
744
|
+
source_engine_api_debug_log_240e = function()
|
|
745
|
+
local util_decorator = source_shared_functional_decorator_2e77()
|
|
746
746
|
local logging_types = {
|
|
747
747
|
'none', 'fatal', 'error', 'warn', 'debug', 'info'
|
|
748
748
|
}
|
|
@@ -788,7 +788,7 @@ install = install
|
|
|
788
788
|
return P
|
|
789
789
|
end
|
|
790
790
|
--
|
|
791
|
-
|
|
791
|
+
source_engine_api_math_basic_2419 = function()
|
|
792
792
|
local function abs(value)
|
|
793
793
|
if value < 0 then
|
|
794
794
|
return -value
|
|
@@ -887,7 +887,7 @@ install = install
|
|
|
887
887
|
return P
|
|
888
888
|
end
|
|
889
889
|
--
|
|
890
|
-
|
|
890
|
+
source_engine_api_math_clib_2424 = function()
|
|
891
891
|
local function install(std)
|
|
892
892
|
assert(math and (1/2 ~= 0))
|
|
893
893
|
std.math = std.math or {}
|
|
@@ -923,7 +923,7 @@ install = install
|
|
|
923
923
|
return P
|
|
924
924
|
end
|
|
925
925
|
--
|
|
926
|
-
|
|
926
|
+
source_engine_api_math_random_242f = function()
|
|
927
927
|
local function install(std)
|
|
928
928
|
assert(math and (1/2 ~= 0))
|
|
929
929
|
std.math = std.math or {}
|
|
@@ -940,8 +940,8 @@ install = install
|
|
|
940
940
|
return P
|
|
941
941
|
end
|
|
942
942
|
--
|
|
943
|
-
|
|
944
|
-
local util_decorator =
|
|
943
|
+
source_engine_api_data_array_243a = function()
|
|
944
|
+
local util_decorator = source_shared_functional_decorator_2e77()
|
|
945
945
|
local function array_map(array, func)
|
|
946
946
|
local res = {}
|
|
947
947
|
local index = 1
|
|
@@ -1102,12 +1102,12 @@ install = install
|
|
|
1102
1102
|
return P
|
|
1103
1103
|
end
|
|
1104
1104
|
--
|
|
1105
|
-
|
|
1105
|
+
source_engine_api_io_media_2445 = function()
|
|
1106
1106
|
local function media_create(node, channels, handler)
|
|
1107
1107
|
local decorator = function(func)
|
|
1108
1108
|
func = func or function() end
|
|
1109
|
-
return function(self, a, b, c)
|
|
1110
|
-
func(0, a, b, c)
|
|
1109
|
+
return function(self, a, b, c, d)
|
|
1110
|
+
func(0, a, b, c, d)
|
|
1111
1111
|
return self
|
|
1112
1112
|
end
|
|
1113
1113
|
end
|
|
@@ -1118,7 +1118,6 @@ pause = decorator(handler.pause),
|
|
|
1118
1118
|
resume = decorator(handler.resume),
|
|
1119
1119
|
stop = decorator(handler.stop),
|
|
1120
1120
|
position = decorator(handler.position),
|
|
1121
|
-
resize = decorator(handler.resize),
|
|
1122
1121
|
in_mutex = handler.mutex or function() return false end,
|
|
1123
1122
|
get_error = handler.error or function() return nil end,
|
|
1124
1123
|
node = node,
|
|
@@ -1149,7 +1148,7 @@ install=install
|
|
|
1149
1148
|
return P
|
|
1150
1149
|
end
|
|
1151
1150
|
--
|
|
1152
|
-
|
|
1151
|
+
source_engine_api_draw_fps_2450 = function()
|
|
1153
1152
|
local function draw_fps(std, engine, show, pos_x, pos_y)
|
|
1154
1153
|
if show < 1 then return end
|
|
1155
1154
|
local x = engine.current.config.offset_x + pos_x
|
|
@@ -1198,8 +1197,8 @@ install=install
|
|
|
1198
1197
|
return P
|
|
1199
1198
|
end
|
|
1200
1199
|
--
|
|
1201
|
-
|
|
1202
|
-
local util_decorator =
|
|
1200
|
+
source_engine_api_draw_text_245b = function()
|
|
1201
|
+
local util_decorator = source_shared_functional_decorator_2e77()
|
|
1203
1202
|
local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
|
|
1204
1203
|
size = size or 2
|
|
1205
1204
|
local hem = engine.current.data.width / 80
|
|
@@ -1228,7 +1227,7 @@ install=install
|
|
|
1228
1227
|
return P
|
|
1229
1228
|
end
|
|
1230
1229
|
--
|
|
1231
|
-
|
|
1230
|
+
source_engine_api_draw_poly_2466 = function()
|
|
1232
1231
|
local function decorator_poo(object, func)
|
|
1233
1232
|
if not object or not func then return func end
|
|
1234
1233
|
return function(a, b, c, d)
|
|
@@ -1335,7 +1334,7 @@ install=install
|
|
|
1335
1334
|
return P
|
|
1336
1335
|
end
|
|
1337
1336
|
--
|
|
1338
|
-
|
|
1337
|
+
source_engine_api_raw_memory_2471 = function()
|
|
1339
1338
|
local memory_dict_unload = {}
|
|
1340
1339
|
local memory_dict = {}
|
|
1341
1340
|
local memory_list = {}
|
|
@@ -1390,9 +1389,9 @@ install=install
|
|
|
1390
1389
|
return P
|
|
1391
1390
|
end
|
|
1392
1391
|
--
|
|
1393
|
-
|
|
1394
|
-
local str_http =
|
|
1395
|
-
local str_url =
|
|
1392
|
+
source_engine_protocol_http_callback_2483 = function()
|
|
1393
|
+
local str_http = source_shared_string_encode_http_5c63()
|
|
1394
|
+
local str_url = source_shared_string_encode_url_5c6e()
|
|
1396
1395
|
local callbacks = {
|
|
1397
1396
|
['async-promise'] = function(self)
|
|
1398
1397
|
return self:promise()
|
|
@@ -1459,7 +1458,7 @@ func = native_http_callback
|
|
|
1459
1458
|
return P
|
|
1460
1459
|
end
|
|
1461
1460
|
--
|
|
1462
|
-
|
|
1461
|
+
source_shared_var_object_root_2495 = function()
|
|
1463
1462
|
local P = {
|
|
1464
1463
|
data={
|
|
1465
1464
|
width=1280,
|
|
@@ -1489,7 +1488,7 @@ callbacks={
|
|
|
1489
1488
|
return P;
|
|
1490
1489
|
end
|
|
1491
1490
|
--
|
|
1492
|
-
|
|
1491
|
+
source_engine_api_system_color_24a0 = function()
|
|
1493
1492
|
local function install(std)
|
|
1494
1493
|
std.color = std.color or {}
|
|
1495
1494
|
std.color.white = 0xFFFFFFFF
|
|
@@ -1524,7 +1523,7 @@ install = install
|
|
|
1524
1523
|
return P
|
|
1525
1524
|
end
|
|
1526
1525
|
--
|
|
1527
|
-
|
|
1526
|
+
source_shared_var_object_std_24ab = function()
|
|
1528
1527
|
local P = {
|
|
1529
1528
|
milis = 0,
|
|
1530
1529
|
delta = 0,
|
|
@@ -1592,7 +1591,7 @@ any=false
|
|
|
1592
1591
|
return P;
|
|
1593
1592
|
end
|
|
1594
1593
|
--
|
|
1595
|
-
|
|
1594
|
+
source_shared_functional_pipeline_2959 = function()
|
|
1596
1595
|
local function pipe(self)
|
|
1597
1596
|
return function()
|
|
1598
1597
|
self:run()
|
|
@@ -1642,7 +1641,7 @@ run=run
|
|
|
1642
1641
|
return P
|
|
1643
1642
|
end
|
|
1644
1643
|
--
|
|
1645
|
-
|
|
1644
|
+
source_shared_string_dsl_requires_2964 = function()
|
|
1646
1645
|
local function encode(dsl_string)
|
|
1647
1646
|
local spec = {
|
|
1648
1647
|
list = {},
|
|
@@ -1691,7 +1690,7 @@ should_import = should_import
|
|
|
1691
1690
|
return P
|
|
1692
1691
|
end
|
|
1693
1692
|
--
|
|
1694
|
-
|
|
1693
|
+
source_shared_string_eval_file_2bcb = function()
|
|
1695
1694
|
local function script(src)
|
|
1696
1695
|
local ok, app = false, nil
|
|
1697
1696
|
if require then
|
|
@@ -1717,7 +1716,7 @@ script = script,
|
|
|
1717
1716
|
return P
|
|
1718
1717
|
end
|
|
1719
1718
|
--
|
|
1720
|
-
|
|
1719
|
+
source_shared_string_eval_code_2bd6 = function()
|
|
1721
1720
|
local function script(src)
|
|
1722
1721
|
local loader = loadstring or load
|
|
1723
1722
|
if not loader then
|
|
@@ -1738,7 +1737,7 @@ script = script,
|
|
|
1738
1737
|
return P
|
|
1739
1738
|
end
|
|
1740
1739
|
--
|
|
1741
|
-
|
|
1740
|
+
source_shared_functional_decorator_2e77 = function()
|
|
1742
1741
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
1743
1742
|
return function (a, b, c, d, e, f)
|
|
1744
1743
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -1796,7 +1795,7 @@ prefix1_t = table_prefix1
|
|
|
1796
1795
|
return P
|
|
1797
1796
|
end
|
|
1798
1797
|
--
|
|
1799
|
-
|
|
1798
|
+
source_shared_string_encode_http_5c63 = function()
|
|
1800
1799
|
local function is_ok(status)
|
|
1801
1800
|
return (status and 200 <= status and status < 300) or false
|
|
1802
1801
|
end
|
|
@@ -1943,7 +1942,7 @@ create_request=create_request
|
|
|
1943
1942
|
}
|
|
1944
1943
|
end
|
|
1945
1944
|
--
|
|
1946
|
-
|
|
1945
|
+
source_shared_string_encode_url_5c6e = function()
|
|
1947
1946
|
local function search_param(param_list, param_dict)
|
|
1948
1947
|
local index, params = 1, ''
|
|
1949
1948
|
while param_list and param_dict and index <= #param_list do
|
|
@@ -1965,4 +1964,4 @@ search_param = search_param
|
|
|
1965
1964
|
return P
|
|
1966
1965
|
end
|
|
1967
1966
|
--
|
|
1968
|
-
return
|
|
1967
|
+
return main_239b()
|