@gamely/gly-engine-lite 0.2.1 → 0.2.2
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 +98 -97
- 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_23a6 = nil
|
|
3
|
+
local source_shared_engine_loadcore_23b1 = nil
|
|
4
|
+
local source_shared_engine_loadgame_23bc = nil
|
|
5
|
+
local source_engine_api_data_encoder_23ce = nil
|
|
6
|
+
local source_engine_api_system_app_23d9 = nil
|
|
7
|
+
local source_engine_api_data_hash_23e4 = nil
|
|
8
|
+
local source_engine_api_io_http_23ef = nil
|
|
9
|
+
local source_engine_api_data_i18n_23fa = nil
|
|
10
|
+
local source_engine_api_system_key_2405 = nil
|
|
11
|
+
local source_engine_api_debug_log_2410 = nil
|
|
12
|
+
local source_engine_api_math_basic_241b = nil
|
|
13
|
+
local source_engine_api_math_clib_2426 = nil
|
|
14
|
+
local source_engine_api_math_random_2431 = nil
|
|
15
|
+
local source_engine_api_data_array_243c = nil
|
|
16
|
+
local source_engine_api_io_media_2447 = nil
|
|
17
|
+
local source_engine_api_draw_fps_2452 = nil
|
|
18
|
+
local source_engine_api_draw_text_245d = nil
|
|
19
|
+
local source_engine_api_draw_poly_2468 = nil
|
|
20
|
+
local source_engine_api_raw_memory_2473 = nil
|
|
21
|
+
local source_engine_protocol_http_callback_2485 = nil
|
|
22
|
+
local source_shared_var_object_root_2497 = nil
|
|
23
|
+
local source_engine_api_system_color_24a2 = nil
|
|
24
|
+
local source_shared_var_object_std_24ad = nil
|
|
25
|
+
local source_shared_functional_pipeline_295b = nil
|
|
26
|
+
local source_shared_string_dsl_requires_2966 = nil
|
|
27
|
+
local source_shared_string_eval_file_2bcd = nil
|
|
28
|
+
local source_shared_string_eval_code_2bd8 = nil
|
|
29
|
+
local source_shared_functional_decorator_2e79 = nil
|
|
30
|
+
local source_shared_string_encode_http_5c6c = nil
|
|
31
|
+
local source_shared_string_encode_url_5c77 = nil
|
|
32
|
+
local function main_239d()
|
|
33
|
+
local version = source_version_23a6()
|
|
34
|
+
local loadcore = source_shared_engine_loadcore_23b1()
|
|
35
|
+
local loadgame = source_shared_engine_loadgame_23bc()
|
|
36
|
+
local engine_encoder = source_engine_api_data_encoder_23ce()
|
|
37
|
+
local engine_game = source_engine_api_system_app_23d9()
|
|
38
|
+
local engine_hash = source_engine_api_data_hash_23e4()
|
|
39
|
+
local engine_http = source_engine_api_io_http_23ef()
|
|
40
|
+
local engine_i18n = source_engine_api_data_i18n_23fa()
|
|
41
|
+
local engine_key = source_engine_api_system_key_2405()
|
|
42
|
+
local engine_log = source_engine_api_debug_log_2410()
|
|
43
|
+
local engine_math = source_engine_api_math_basic_241b()
|
|
44
|
+
local engine_math_clib = source_engine_api_math_clib_2426()
|
|
45
|
+
local engine_math_random = source_engine_api_math_random_2431()
|
|
46
|
+
local engine_array = source_engine_api_data_array_243c()
|
|
47
|
+
local engine_media = source_engine_api_io_media_2447()
|
|
48
|
+
local engine_api_draw_fps = source_engine_api_draw_fps_2452()
|
|
49
|
+
local engine_api_draw_text = source_engine_api_draw_text_245d()
|
|
50
|
+
local engine_api_draw_poly = source_engine_api_draw_poly_2468()
|
|
51
|
+
local engine_raw_memory = source_engine_api_raw_memory_2473()
|
|
52
|
+
local callback_http = source_engine_protocol_http_callback_2485()
|
|
53
|
+
local application_default = source_shared_var_object_root_2497()
|
|
54
|
+
local color = source_engine_api_system_color_24a2()
|
|
55
|
+
local std = source_shared_var_object_std_24ad()
|
|
56
56
|
local application = application_default
|
|
57
57
|
local engine = {
|
|
58
58
|
keyboard = function(a, b, c, d) end,
|
|
@@ -156,6 +156,7 @@ listen_std_engine=function() end
|
|
|
156
156
|
}
|
|
157
157
|
std.draw.color=native_draw_color
|
|
158
158
|
std.draw.font=native_draw_font
|
|
159
|
+
std.draw.rect2=native_draw_rect2 or native_draw_rect
|
|
159
160
|
std.draw.rect=native_draw_rect
|
|
160
161
|
std.draw.line=native_draw_line
|
|
161
162
|
std.image.load=native_image_load
|
|
@@ -209,13 +210,13 @@ version=version
|
|
|
209
210
|
}
|
|
210
211
|
return P
|
|
211
212
|
end
|
|
212
|
-
|
|
213
|
-
return '0.2.
|
|
213
|
+
source_version_23a6 = function()
|
|
214
|
+
return '0.2.2'
|
|
214
215
|
end
|
|
215
216
|
--
|
|
216
|
-
|
|
217
|
-
local zeebo_pipeline =
|
|
218
|
-
local requires =
|
|
217
|
+
source_shared_engine_loadcore_23b1 = function()
|
|
218
|
+
local zeebo_pipeline = source_shared_functional_pipeline_295b()
|
|
219
|
+
local requires = source_shared_string_dsl_requires_2966()
|
|
219
220
|
local function step_install_libsys(self, lib_name, library, custom, is_system)
|
|
220
221
|
if not is_system then return end
|
|
221
222
|
local ok, msg = pcall(function()
|
|
@@ -297,9 +298,9 @@ setup = setup
|
|
|
297
298
|
return P
|
|
298
299
|
end
|
|
299
300
|
--
|
|
300
|
-
|
|
301
|
-
local eval_file =
|
|
302
|
-
local eval_code =
|
|
301
|
+
source_shared_engine_loadgame_23bc = function()
|
|
302
|
+
local eval_file = source_shared_string_eval_file_2bcd()
|
|
303
|
+
local eval_code = source_shared_string_eval_code_2bd8()
|
|
303
304
|
local has_io_open = io and io.open
|
|
304
305
|
local function normalize(app, base)
|
|
305
306
|
if not app then return nil end
|
|
@@ -372,7 +373,7 @@ script = script
|
|
|
372
373
|
return P
|
|
373
374
|
end
|
|
374
375
|
--
|
|
375
|
-
|
|
376
|
+
source_engine_api_data_encoder_23ce = function()
|
|
376
377
|
local function install(std, engine, library, name)
|
|
377
378
|
std = std or {}
|
|
378
379
|
std[name] = {
|
|
@@ -387,8 +388,8 @@ install=install
|
|
|
387
388
|
return P
|
|
388
389
|
end
|
|
389
390
|
--
|
|
390
|
-
|
|
391
|
-
local util_decorator =
|
|
391
|
+
source_engine_api_system_app_23d9 = function()
|
|
392
|
+
local util_decorator = source_shared_functional_decorator_2e79()
|
|
392
393
|
local function reset(std, engine)
|
|
393
394
|
if std.node then
|
|
394
395
|
std.bus.emit('exit')
|
|
@@ -428,7 +429,7 @@ install=install
|
|
|
428
429
|
return P
|
|
429
430
|
end
|
|
430
431
|
--
|
|
431
|
-
|
|
432
|
+
source_engine_api_data_hash_23e4 = function()
|
|
432
433
|
local function djb2(digest)
|
|
433
434
|
local index = 1
|
|
434
435
|
local hash = 5381
|
|
@@ -452,8 +453,8 @@ install = install
|
|
|
452
453
|
return P
|
|
453
454
|
end
|
|
454
455
|
--
|
|
455
|
-
|
|
456
|
-
local zeebo_pipeline =
|
|
456
|
+
source_engine_api_io_http_23ef = function()
|
|
457
|
+
local zeebo_pipeline = source_shared_functional_pipeline_295b()
|
|
457
458
|
local function json(self)
|
|
458
459
|
self.options['json'] = true
|
|
459
460
|
return self
|
|
@@ -611,7 +612,7 @@ install=install
|
|
|
611
612
|
return P
|
|
612
613
|
end
|
|
613
614
|
--
|
|
614
|
-
|
|
615
|
+
source_engine_api_data_i18n_23fa = function()
|
|
615
616
|
local language = 'en-US'
|
|
616
617
|
local language_default = 'en-US'
|
|
617
618
|
local language_list = {}
|
|
@@ -703,7 +704,7 @@ install=install
|
|
|
703
704
|
return P
|
|
704
705
|
end
|
|
705
706
|
--
|
|
706
|
-
|
|
707
|
+
source_engine_api_system_key_2405 = function()
|
|
707
708
|
local function real_key(std, engine, rkey, rvalue)
|
|
708
709
|
local value = rvalue == 1 or rvalue == true
|
|
709
710
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -740,8 +741,8 @@ install = install
|
|
|
740
741
|
return P
|
|
741
742
|
end
|
|
742
743
|
--
|
|
743
|
-
|
|
744
|
-
local util_decorator =
|
|
744
|
+
source_engine_api_debug_log_2410 = function()
|
|
745
|
+
local util_decorator = source_shared_functional_decorator_2e79()
|
|
745
746
|
local logging_types = {
|
|
746
747
|
'none', 'fatal', 'error', 'warn', 'debug', 'info'
|
|
747
748
|
}
|
|
@@ -787,7 +788,7 @@ install = install
|
|
|
787
788
|
return P
|
|
788
789
|
end
|
|
789
790
|
--
|
|
790
|
-
|
|
791
|
+
source_engine_api_math_basic_241b = function()
|
|
791
792
|
local function abs(value)
|
|
792
793
|
if value < 0 then
|
|
793
794
|
return -value
|
|
@@ -886,7 +887,7 @@ install = install
|
|
|
886
887
|
return P
|
|
887
888
|
end
|
|
888
889
|
--
|
|
889
|
-
|
|
890
|
+
source_engine_api_math_clib_2426 = function()
|
|
890
891
|
local function install(std)
|
|
891
892
|
assert(math and (1/2 ~= 0))
|
|
892
893
|
std.math = std.math or {}
|
|
@@ -922,7 +923,7 @@ install = install
|
|
|
922
923
|
return P
|
|
923
924
|
end
|
|
924
925
|
--
|
|
925
|
-
|
|
926
|
+
source_engine_api_math_random_2431 = function()
|
|
926
927
|
local function install(std)
|
|
927
928
|
assert(math and (1/2 ~= 0))
|
|
928
929
|
std.math = std.math or {}
|
|
@@ -939,8 +940,8 @@ install = install
|
|
|
939
940
|
return P
|
|
940
941
|
end
|
|
941
942
|
--
|
|
942
|
-
|
|
943
|
-
local util_decorator =
|
|
943
|
+
source_engine_api_data_array_243c = function()
|
|
944
|
+
local util_decorator = source_shared_functional_decorator_2e79()
|
|
944
945
|
local function array_map(array, func)
|
|
945
946
|
local res = {}
|
|
946
947
|
local index = 1
|
|
@@ -1101,7 +1102,7 @@ install = install
|
|
|
1101
1102
|
return P
|
|
1102
1103
|
end
|
|
1103
1104
|
--
|
|
1104
|
-
|
|
1105
|
+
source_engine_api_io_media_2447 = function()
|
|
1105
1106
|
local function media_create(node, channels, handler)
|
|
1106
1107
|
local decorator = function(func)
|
|
1107
1108
|
func = func or function() end
|
|
@@ -1148,7 +1149,7 @@ install=install
|
|
|
1148
1149
|
return P
|
|
1149
1150
|
end
|
|
1150
1151
|
--
|
|
1151
|
-
|
|
1152
|
+
source_engine_api_draw_fps_2452 = function()
|
|
1152
1153
|
local function draw_fps(std, engine, show, pos_x, pos_y)
|
|
1153
1154
|
if show < 1 then return end
|
|
1154
1155
|
local x = engine.current.config.offset_x + pos_x
|
|
@@ -1197,8 +1198,8 @@ install=install
|
|
|
1197
1198
|
return P
|
|
1198
1199
|
end
|
|
1199
1200
|
--
|
|
1200
|
-
|
|
1201
|
-
local util_decorator =
|
|
1201
|
+
source_engine_api_draw_text_245d = function()
|
|
1202
|
+
local util_decorator = source_shared_functional_decorator_2e79()
|
|
1202
1203
|
local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
|
|
1203
1204
|
size = size or 2
|
|
1204
1205
|
local hem = engine.current.data.width / 80
|
|
@@ -1227,7 +1228,7 @@ install=install
|
|
|
1227
1228
|
return P
|
|
1228
1229
|
end
|
|
1229
1230
|
--
|
|
1230
|
-
|
|
1231
|
+
source_engine_api_draw_poly_2468 = function()
|
|
1231
1232
|
local function decorator_poo(object, func)
|
|
1232
1233
|
if not object or not func then return func end
|
|
1233
1234
|
return function(a, b, c, d)
|
|
@@ -1334,7 +1335,7 @@ install=install
|
|
|
1334
1335
|
return P
|
|
1335
1336
|
end
|
|
1336
1337
|
--
|
|
1337
|
-
|
|
1338
|
+
source_engine_api_raw_memory_2473 = function()
|
|
1338
1339
|
local memory_dict_unload = {}
|
|
1339
1340
|
local memory_dict = {}
|
|
1340
1341
|
local memory_list = {}
|
|
@@ -1389,9 +1390,9 @@ install=install
|
|
|
1389
1390
|
return P
|
|
1390
1391
|
end
|
|
1391
1392
|
--
|
|
1392
|
-
|
|
1393
|
-
local str_http =
|
|
1394
|
-
local str_url =
|
|
1393
|
+
source_engine_protocol_http_callback_2485 = function()
|
|
1394
|
+
local str_http = source_shared_string_encode_http_5c6c()
|
|
1395
|
+
local str_url = source_shared_string_encode_url_5c77()
|
|
1395
1396
|
local callbacks = {
|
|
1396
1397
|
['async-promise'] = function(self)
|
|
1397
1398
|
return self:promise()
|
|
@@ -1458,7 +1459,7 @@ func = native_http_callback
|
|
|
1458
1459
|
return P
|
|
1459
1460
|
end
|
|
1460
1461
|
--
|
|
1461
|
-
|
|
1462
|
+
source_shared_var_object_root_2497 = function()
|
|
1462
1463
|
local P = {
|
|
1463
1464
|
data={
|
|
1464
1465
|
width=1280,
|
|
@@ -1488,7 +1489,7 @@ callbacks={
|
|
|
1488
1489
|
return P;
|
|
1489
1490
|
end
|
|
1490
1491
|
--
|
|
1491
|
-
|
|
1492
|
+
source_engine_api_system_color_24a2 = function()
|
|
1492
1493
|
local function install(std)
|
|
1493
1494
|
std.color = std.color or {}
|
|
1494
1495
|
std.color.white = 0xFFFFFFFF
|
|
@@ -1523,7 +1524,7 @@ install = install
|
|
|
1523
1524
|
return P
|
|
1524
1525
|
end
|
|
1525
1526
|
--
|
|
1526
|
-
|
|
1527
|
+
source_shared_var_object_std_24ad = function()
|
|
1527
1528
|
local P = {
|
|
1528
1529
|
milis = 0,
|
|
1529
1530
|
delta = 0,
|
|
@@ -1591,7 +1592,7 @@ any=false
|
|
|
1591
1592
|
return P;
|
|
1592
1593
|
end
|
|
1593
1594
|
--
|
|
1594
|
-
|
|
1595
|
+
source_shared_functional_pipeline_295b = function()
|
|
1595
1596
|
local function pipe(self)
|
|
1596
1597
|
return function()
|
|
1597
1598
|
self:run()
|
|
@@ -1641,7 +1642,7 @@ run=run
|
|
|
1641
1642
|
return P
|
|
1642
1643
|
end
|
|
1643
1644
|
--
|
|
1644
|
-
|
|
1645
|
+
source_shared_string_dsl_requires_2966 = function()
|
|
1645
1646
|
local function encode(dsl_string)
|
|
1646
1647
|
local spec = {
|
|
1647
1648
|
list = {},
|
|
@@ -1690,7 +1691,7 @@ should_import = should_import
|
|
|
1690
1691
|
return P
|
|
1691
1692
|
end
|
|
1692
1693
|
--
|
|
1693
|
-
|
|
1694
|
+
source_shared_string_eval_file_2bcd = function()
|
|
1694
1695
|
local function script(src)
|
|
1695
1696
|
local ok, app = false, nil
|
|
1696
1697
|
if require then
|
|
@@ -1716,7 +1717,7 @@ script = script,
|
|
|
1716
1717
|
return P
|
|
1717
1718
|
end
|
|
1718
1719
|
--
|
|
1719
|
-
|
|
1720
|
+
source_shared_string_eval_code_2bd8 = function()
|
|
1720
1721
|
local function script(src)
|
|
1721
1722
|
local loader = loadstring or load
|
|
1722
1723
|
if not loader then
|
|
@@ -1737,7 +1738,7 @@ script = script,
|
|
|
1737
1738
|
return P
|
|
1738
1739
|
end
|
|
1739
1740
|
--
|
|
1740
|
-
|
|
1741
|
+
source_shared_functional_decorator_2e79 = function()
|
|
1741
1742
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
1742
1743
|
return function (a, b, c, d, e, f)
|
|
1743
1744
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -1795,7 +1796,7 @@ prefix1_t = table_prefix1
|
|
|
1795
1796
|
return P
|
|
1796
1797
|
end
|
|
1797
1798
|
--
|
|
1798
|
-
|
|
1799
|
+
source_shared_string_encode_http_5c6c = function()
|
|
1799
1800
|
local function is_ok(status)
|
|
1800
1801
|
return (status and 200 <= status and status < 300) or false
|
|
1801
1802
|
end
|
|
@@ -1942,7 +1943,7 @@ create_request=create_request
|
|
|
1942
1943
|
}
|
|
1943
1944
|
end
|
|
1944
1945
|
--
|
|
1945
|
-
|
|
1946
|
+
source_shared_string_encode_url_5c77 = function()
|
|
1946
1947
|
local function search_param(param_list, param_dict)
|
|
1947
1948
|
local index, params = 1, ''
|
|
1948
1949
|
while param_list and param_dict and index <= #param_list do
|
|
@@ -1964,4 +1965,4 @@ search_param = search_param
|
|
|
1964
1965
|
return P
|
|
1965
1966
|
end
|
|
1966
1967
|
--
|
|
1967
|
-
return
|
|
1968
|
+
return main_239d()
|