@gamely/gly-engine-lite 0.1.2 → 0.1.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 +139 -155
- package/package.json +9 -2
- package/README.md +0 -3
package/dist/main.lua
CHANGED
|
@@ -1,54 +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
|
|
33
|
-
local
|
|
34
|
-
local
|
|
35
|
-
local
|
|
36
|
-
local
|
|
37
|
-
local
|
|
38
|
-
local
|
|
39
|
-
local
|
|
40
|
-
local
|
|
41
|
-
local
|
|
42
|
-
local
|
|
43
|
-
local
|
|
44
|
-
local
|
|
45
|
-
local
|
|
46
|
-
local
|
|
47
|
-
local
|
|
48
|
-
local
|
|
49
|
-
local
|
|
50
|
-
local
|
|
51
|
-
local
|
|
2
|
+
local source_version_2399 = nil
|
|
3
|
+
local source_shared_engine_loadcore_23a4 = nil
|
|
4
|
+
local source_shared_engine_loadgame_23af = nil
|
|
5
|
+
local source_engine_api_data_encoder_23c1 = nil
|
|
6
|
+
local source_engine_api_system_app_23cc = nil
|
|
7
|
+
local source_engine_api_data_hash_23d7 = nil
|
|
8
|
+
local source_engine_api_io_http_23e2 = nil
|
|
9
|
+
local source_engine_api_data_i18n_23ed = nil
|
|
10
|
+
local source_engine_api_system_key_23f8 = nil
|
|
11
|
+
local source_engine_api_debug_log_2403 = nil
|
|
12
|
+
local source_engine_api_math_basic_240e = nil
|
|
13
|
+
local source_engine_api_math_clib_2419 = nil
|
|
14
|
+
local source_engine_api_math_random_2424 = nil
|
|
15
|
+
local source_engine_api_data_array_242f = nil
|
|
16
|
+
local source_engine_api_io_media_243a = nil
|
|
17
|
+
local source_engine_api_draw_fps_2445 = nil
|
|
18
|
+
local source_engine_api_draw_text_2450 = nil
|
|
19
|
+
local source_engine_api_draw_poly_245b = nil
|
|
20
|
+
local source_engine_api_raw_memory_2466 = nil
|
|
21
|
+
local source_engine_protocol_http_callback_2478 = nil
|
|
22
|
+
local source_shared_var_object_root_248a = nil
|
|
23
|
+
local source_engine_api_system_color_2495 = nil
|
|
24
|
+
local source_shared_var_object_std_24a0 = nil
|
|
25
|
+
local source_shared_functional_pipeline_2940 = nil
|
|
26
|
+
local source_shared_string_dsl_requires_294b = nil
|
|
27
|
+
local source_shared_string_eval_file_2bb2 = nil
|
|
28
|
+
local source_shared_string_eval_code_2bbd = nil
|
|
29
|
+
local source_shared_functional_decorator_2e5e = nil
|
|
30
|
+
local source_shared_string_encode_http_5c51 = nil
|
|
31
|
+
local source_shared_string_encode_url_5c5c = nil
|
|
32
|
+
local function main_2390()
|
|
33
|
+
local version = source_version_2399()
|
|
34
|
+
local loadcore = source_shared_engine_loadcore_23a4()
|
|
35
|
+
local loadgame = source_shared_engine_loadgame_23af()
|
|
36
|
+
local engine_encoder = source_engine_api_data_encoder_23c1()
|
|
37
|
+
local engine_game = source_engine_api_system_app_23cc()
|
|
38
|
+
local engine_hash = source_engine_api_data_hash_23d7()
|
|
39
|
+
local engine_http = source_engine_api_io_http_23e2()
|
|
40
|
+
local engine_i18n = source_engine_api_data_i18n_23ed()
|
|
41
|
+
local engine_key = source_engine_api_system_key_23f8()
|
|
42
|
+
local engine_log = source_engine_api_debug_log_2403()
|
|
43
|
+
local engine_math = source_engine_api_math_basic_240e()
|
|
44
|
+
local engine_math_clib = source_engine_api_math_clib_2419()
|
|
45
|
+
local engine_math_random = source_engine_api_math_random_2424()
|
|
46
|
+
local engine_array = source_engine_api_data_array_242f()
|
|
47
|
+
local engine_media = source_engine_api_io_media_243a()
|
|
48
|
+
local engine_api_draw_fps = source_engine_api_draw_fps_2445()
|
|
49
|
+
local engine_api_draw_text = source_engine_api_draw_text_2450()
|
|
50
|
+
local engine_api_draw_poly = source_engine_api_draw_poly_245b()
|
|
51
|
+
local engine_raw_memory = source_engine_api_raw_memory_2466()
|
|
52
|
+
local callback_http = source_engine_protocol_http_callback_2478()
|
|
53
|
+
local application_default = source_shared_var_object_root_248a()
|
|
54
|
+
local color = source_engine_api_system_color_2495()
|
|
55
|
+
local std = source_shared_var_object_std_24a0()
|
|
52
56
|
local application = application_default
|
|
53
57
|
local engine = {
|
|
54
58
|
keyboard = function(a, b, c, d) end,
|
|
@@ -85,6 +89,7 @@ poly = native_draw_poly,
|
|
|
85
89
|
line = native_draw_line
|
|
86
90
|
}
|
|
87
91
|
local cfg_text = {
|
|
92
|
+
is_tui = native_text_is_tui,
|
|
88
93
|
font_previous = native_text_font_previous
|
|
89
94
|
}
|
|
90
95
|
local cfg_http = {
|
|
@@ -133,10 +138,7 @@ function native_callback_keyboard(key, value)
|
|
|
133
138
|
engine.keyboard(std, engine, key, value)
|
|
134
139
|
end
|
|
135
140
|
function native_callback_http(id, key, data)
|
|
136
|
-
|
|
137
|
-
return callback_http.func(engine['http_requests'][id], key, data)
|
|
138
|
-
end
|
|
139
|
-
return nil
|
|
141
|
+
return callback_http.func(engine['http'][id], key, data, std)
|
|
140
142
|
end
|
|
141
143
|
function native_callback_init(width, height, game_lua)
|
|
142
144
|
application = loadgame.script(game_lua, application_default)
|
|
@@ -156,7 +158,6 @@ std.draw.color=native_draw_color
|
|
|
156
158
|
std.draw.font=native_draw_font
|
|
157
159
|
std.draw.rect=native_draw_rect
|
|
158
160
|
std.draw.line=native_draw_line
|
|
159
|
-
std.draw.image=native_image_draw
|
|
160
161
|
std.image.load=native_image_load
|
|
161
162
|
std.image.draw=native_image_draw
|
|
162
163
|
std.text.print=native_text_print
|
|
@@ -179,9 +180,8 @@ loadcore.setup(std, application, engine)
|
|
|
179
180
|
:package('@draw.poly', engine_api_draw_poly, cfg_poly)
|
|
180
181
|
:package('@color', color)
|
|
181
182
|
:package('@log', engine_log, cfg_log)
|
|
182
|
-
:package('math',
|
|
183
|
-
:package('math.
|
|
184
|
-
:package('math.random', engine_math.clib_random)
|
|
183
|
+
:package('math', engine_math_clib)
|
|
184
|
+
:package('math.random', engine_math_random)
|
|
185
185
|
:package('http', engine_http, cfg_http)
|
|
186
186
|
:package('base64', engine_encoder, cfg_base64)
|
|
187
187
|
:package('json', engine_encoder, cfg_json)
|
|
@@ -208,13 +208,13 @@ version=version
|
|
|
208
208
|
}
|
|
209
209
|
return P
|
|
210
210
|
end
|
|
211
|
-
|
|
212
|
-
return '0.1.
|
|
211
|
+
source_version_2399 = function()
|
|
212
|
+
return '0.1.4'
|
|
213
213
|
end
|
|
214
214
|
--
|
|
215
|
-
|
|
216
|
-
local zeebo_pipeline =
|
|
217
|
-
local requires =
|
|
215
|
+
source_shared_engine_loadcore_23a4 = function()
|
|
216
|
+
local zeebo_pipeline = source_shared_functional_pipeline_2940()
|
|
217
|
+
local requires = source_shared_string_dsl_requires_294b()
|
|
218
218
|
local function step_install_libsys(self, lib_name, library, custom, is_system)
|
|
219
219
|
if not is_system then return end
|
|
220
220
|
local ok, msg = pcall(function()
|
|
@@ -296,9 +296,9 @@ setup = setup
|
|
|
296
296
|
return P
|
|
297
297
|
end
|
|
298
298
|
--
|
|
299
|
-
|
|
300
|
-
local eval_file =
|
|
301
|
-
local eval_code =
|
|
299
|
+
source_shared_engine_loadgame_23af = function()
|
|
300
|
+
local eval_file = source_shared_string_eval_file_2bb2()
|
|
301
|
+
local eval_code = source_shared_string_eval_code_2bbd()
|
|
302
302
|
local has_io_open = io and io.open
|
|
303
303
|
local function normalize(app, base)
|
|
304
304
|
if not app then return nil end
|
|
@@ -332,14 +332,18 @@ end
|
|
|
332
332
|
return app
|
|
333
333
|
end
|
|
334
334
|
local function script(src, base)
|
|
335
|
+
if not src and package and package.jspath then
|
|
336
|
+
src = {}
|
|
337
|
+
end
|
|
335
338
|
if type(src) == 'table' or type(src) == 'userdata' then
|
|
336
339
|
return normalize(src, base)
|
|
337
340
|
end
|
|
338
341
|
local application = type(src) == 'function' and src
|
|
339
|
-
if not
|
|
342
|
+
if not application then
|
|
343
|
+
if type(application) ~= 'string' or #src == 0 then
|
|
340
344
|
src = 'game'
|
|
341
345
|
end
|
|
342
|
-
if
|
|
346
|
+
if src:find('\n') then
|
|
343
347
|
local ok, app = eval_code.script(src)
|
|
344
348
|
application = ok and app
|
|
345
349
|
else
|
|
@@ -355,6 +359,10 @@ application = ok and app
|
|
|
355
359
|
app_file:close()
|
|
356
360
|
end
|
|
357
361
|
end
|
|
362
|
+
end
|
|
363
|
+
while type(application) == 'function' do
|
|
364
|
+
application = application()
|
|
365
|
+
end
|
|
358
366
|
return normalize(application, base)
|
|
359
367
|
end
|
|
360
368
|
local P = {
|
|
@@ -363,7 +371,7 @@ script = script
|
|
|
363
371
|
return P
|
|
364
372
|
end
|
|
365
373
|
--
|
|
366
|
-
|
|
374
|
+
source_engine_api_data_encoder_23c1 = function()
|
|
367
375
|
local function install(std, engine, library, name)
|
|
368
376
|
std = std or {}
|
|
369
377
|
std[name] = {
|
|
@@ -378,8 +386,8 @@ install=install
|
|
|
378
386
|
return P
|
|
379
387
|
end
|
|
380
388
|
--
|
|
381
|
-
|
|
382
|
-
local util_decorator =
|
|
389
|
+
source_engine_api_system_app_23cc = function()
|
|
390
|
+
local util_decorator = source_shared_functional_decorator_2e5e()
|
|
383
391
|
local function reset(std, engine)
|
|
384
392
|
if std.node then
|
|
385
393
|
std.bus.emit('exit')
|
|
@@ -419,7 +427,7 @@ install=install
|
|
|
419
427
|
return P
|
|
420
428
|
end
|
|
421
429
|
--
|
|
422
|
-
|
|
430
|
+
source_engine_api_data_hash_23d7 = function()
|
|
423
431
|
local function djb2(digest)
|
|
424
432
|
local index = 1
|
|
425
433
|
local hash = 5381
|
|
@@ -443,8 +451,8 @@ install = install
|
|
|
443
451
|
return P
|
|
444
452
|
end
|
|
445
453
|
--
|
|
446
|
-
|
|
447
|
-
local zeebo_pipeline =
|
|
454
|
+
source_engine_api_io_http_23e2 = function()
|
|
455
|
+
local zeebo_pipeline = source_shared_functional_pipeline_2940()
|
|
448
456
|
local function json(self)
|
|
449
457
|
self.options['json'] = true
|
|
450
458
|
return self
|
|
@@ -498,15 +506,11 @@ engine.current.callbacks.http(std, engine.current.data)
|
|
|
498
506
|
end
|
|
499
507
|
end
|
|
500
508
|
return function (url)
|
|
501
|
-
if protocol.has_callback then
|
|
502
|
-
engine.http_count = engine.http_count + 1
|
|
503
|
-
end
|
|
504
509
|
local json_encode = std.json and std.json.encode
|
|
505
510
|
local json_decode = std.json and std.json.decode
|
|
506
511
|
local http_body = function(self, content) return body(self, content, json_encode) end
|
|
507
512
|
local game = engine.current.data
|
|
508
513
|
local self = {
|
|
509
|
-
id = engine.http_count,
|
|
510
514
|
url = url,
|
|
511
515
|
speed = '',
|
|
512
516
|
options = {},
|
|
@@ -541,11 +545,13 @@ std.http[key] = value
|
|
|
541
545
|
end
|
|
542
546
|
self.pipeline = {
|
|
543
547
|
function()
|
|
544
|
-
|
|
548
|
+
self.id = tonumber(tostring({}):gsub('0x', ''):match('^table: (%w+)$'), 16)
|
|
549
|
+
engine.http[self.id] = self
|
|
550
|
+
if protocol.force and not self.options['noforce'] then
|
|
545
551
|
self.url = url:gsub("^[^:]+://", protocol.force.."://")
|
|
552
|
+
end
|
|
546
553
|
end,
|
|
547
554
|
function()
|
|
548
|
-
if protocol.has_callback then engine.http_requests[self.id] = self end
|
|
549
555
|
protocol.handler(self, self.id)
|
|
550
556
|
end,
|
|
551
557
|
function()
|
|
@@ -577,7 +583,7 @@ std.http.status = nil
|
|
|
577
583
|
std.http.body_is_table = nil
|
|
578
584
|
end,
|
|
579
585
|
function()
|
|
580
|
-
|
|
586
|
+
engine.http[self.id] = nil
|
|
581
587
|
zeebo_pipeline.reset(self)
|
|
582
588
|
end
|
|
583
589
|
}
|
|
@@ -586,10 +592,7 @@ end
|
|
|
586
592
|
end
|
|
587
593
|
local function install(std, engine, protocol)
|
|
588
594
|
assert(protocol and protocol.handler, 'missing protocol handler')
|
|
589
|
-
|
|
590
|
-
engine.http_count = 0
|
|
591
|
-
engine.http_requests = {}
|
|
592
|
-
end
|
|
595
|
+
engine.http = {}
|
|
593
596
|
std.http = std.http or {}
|
|
594
597
|
std.http.get=request('GET', std, engine, protocol)
|
|
595
598
|
std.http.head=request('HEAD', std, engine, protocol)
|
|
@@ -607,7 +610,7 @@ install=install
|
|
|
607
610
|
return P
|
|
608
611
|
end
|
|
609
612
|
--
|
|
610
|
-
|
|
613
|
+
source_engine_api_data_i18n_23ed = function()
|
|
611
614
|
local language = 'en-US'
|
|
612
615
|
local language_default = 'en-US'
|
|
613
616
|
local language_list = {}
|
|
@@ -699,7 +702,7 @@ install=install
|
|
|
699
702
|
return P
|
|
700
703
|
end
|
|
701
704
|
--
|
|
702
|
-
|
|
705
|
+
source_engine_api_system_key_23f8 = function()
|
|
703
706
|
local function real_key(std, engine, rkey, rvalue)
|
|
704
707
|
local value = rvalue == 1 or rvalue == true
|
|
705
708
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -736,8 +739,8 @@ install = install
|
|
|
736
739
|
return P
|
|
737
740
|
end
|
|
738
741
|
--
|
|
739
|
-
|
|
740
|
-
local util_decorator =
|
|
742
|
+
source_engine_api_debug_log_2403 = function()
|
|
743
|
+
local util_decorator = source_shared_functional_decorator_2e5e()
|
|
741
744
|
local logging_types = {
|
|
742
745
|
'none', 'fatal', 'error', 'warn', 'debug', 'info'
|
|
743
746
|
}
|
|
@@ -783,7 +786,7 @@ install = install
|
|
|
783
786
|
return P
|
|
784
787
|
end
|
|
785
788
|
--
|
|
786
|
-
|
|
789
|
+
source_engine_api_math_basic_240e = function()
|
|
787
790
|
local function abs(value)
|
|
788
791
|
if value < 0 then
|
|
789
792
|
return -value
|
|
@@ -862,30 +865,6 @@ index = index + 1
|
|
|
862
865
|
end
|
|
863
866
|
return min_value
|
|
864
867
|
end
|
|
865
|
-
local function sine(t, freq)
|
|
866
|
-
return math.pi and math.sin(2 * math.pi * freq * t) or 1
|
|
867
|
-
end
|
|
868
|
-
local function ramp(t, freq, ratio)
|
|
869
|
-
t = (t / 2) % (1 / freq) * freq
|
|
870
|
-
if t < ratio then
|
|
871
|
-
return 2 * t / ratio - 1
|
|
872
|
-
else
|
|
873
|
-
return (2 * t - ratio - 1) / (ratio - 1)
|
|
874
|
-
end
|
|
875
|
-
end
|
|
876
|
-
local function saw(t, freq)
|
|
877
|
-
return ramp(t, freq, 1)
|
|
878
|
-
end
|
|
879
|
-
local function triangle(t, freq)
|
|
880
|
-
return ramp(t, freq, 1/2)
|
|
881
|
-
end
|
|
882
|
-
local function rect(t, freq, duty)
|
|
883
|
-
duty = 1 - duty * 2
|
|
884
|
-
return saw(t, freq) > duty and 1 or -1
|
|
885
|
-
end
|
|
886
|
-
local function square(t, freq)
|
|
887
|
-
return rect(t, freq, 1/2)
|
|
888
|
-
end
|
|
889
868
|
local function install(std)
|
|
890
869
|
std.math = std.math or {}
|
|
891
870
|
std.math.abs=abs
|
|
@@ -900,14 +879,15 @@ std.math.map=map
|
|
|
900
879
|
std.math.max=max
|
|
901
880
|
std.math.min=min
|
|
902
881
|
end
|
|
903
|
-
local
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
std.math.square=square
|
|
908
|
-
std.math.triangle=triangle
|
|
882
|
+
local P = {
|
|
883
|
+
install = install
|
|
884
|
+
}
|
|
885
|
+
return P
|
|
909
886
|
end
|
|
910
|
-
|
|
887
|
+
--
|
|
888
|
+
source_engine_api_math_clib_2419 = function()
|
|
889
|
+
local function install(std)
|
|
890
|
+
assert(math and (1/2 ~= 0))
|
|
911
891
|
std.math = std.math or {}
|
|
912
892
|
std.math.acos=math.acos
|
|
913
893
|
std.math.asin=math.asin
|
|
@@ -935,31 +915,31 @@ std.math.sqrt=math.sqrt
|
|
|
935
915
|
std.math.tan=math.tan
|
|
936
916
|
std.math.tanh=math.tanh
|
|
937
917
|
end
|
|
938
|
-
local
|
|
918
|
+
local P = {
|
|
919
|
+
install = install
|
|
920
|
+
}
|
|
921
|
+
return P
|
|
922
|
+
end
|
|
923
|
+
--
|
|
924
|
+
source_engine_api_math_random_2424 = function()
|
|
925
|
+
local function install(std)
|
|
926
|
+
assert(math and (1/2 ~= 0))
|
|
939
927
|
std.math = std.math or {}
|
|
940
928
|
std.math.random = function(a, b)
|
|
941
929
|
a = a and math.floor(a)
|
|
942
930
|
b = b and math.floor(b)
|
|
931
|
+
if a > b then a, b = b, a end
|
|
943
932
|
return math.random(a, b)
|
|
944
933
|
end
|
|
945
934
|
end
|
|
946
935
|
local P = {
|
|
947
|
-
install = install
|
|
948
|
-
wave = {
|
|
949
|
-
install = install_wave
|
|
950
|
-
},
|
|
951
|
-
clib = {
|
|
952
|
-
install = install_clib
|
|
953
|
-
},
|
|
954
|
-
clib_random = {
|
|
955
|
-
install = install_clib_random
|
|
956
|
-
}
|
|
936
|
+
install = install
|
|
957
937
|
}
|
|
958
|
-
return P
|
|
938
|
+
return P
|
|
959
939
|
end
|
|
960
940
|
--
|
|
961
|
-
|
|
962
|
-
local util_decorator =
|
|
941
|
+
source_engine_api_data_array_242f = function()
|
|
942
|
+
local util_decorator = source_shared_functional_decorator_2e5e()
|
|
963
943
|
local function array_map(array, func)
|
|
964
944
|
local res = {}
|
|
965
945
|
local index = 1
|
|
@@ -1120,7 +1100,7 @@ install = install
|
|
|
1120
1100
|
return P
|
|
1121
1101
|
end
|
|
1122
1102
|
--
|
|
1123
|
-
|
|
1103
|
+
source_engine_api_io_media_243a = function()
|
|
1124
1104
|
local function media_create(node, channels, handler)
|
|
1125
1105
|
local decorator = function(func)
|
|
1126
1106
|
func = func or function() end
|
|
@@ -1167,7 +1147,7 @@ install=install
|
|
|
1167
1147
|
return P
|
|
1168
1148
|
end
|
|
1169
1149
|
--
|
|
1170
|
-
|
|
1150
|
+
source_engine_api_draw_fps_2445 = function()
|
|
1171
1151
|
local function draw_fps(std, engine, show, pos_x, pos_y)
|
|
1172
1152
|
if show < 1 then return end
|
|
1173
1153
|
local x = engine.current.config.offset_x + pos_x
|
|
@@ -1216,8 +1196,8 @@ install=install
|
|
|
1216
1196
|
return P
|
|
1217
1197
|
end
|
|
1218
1198
|
--
|
|
1219
|
-
|
|
1220
|
-
local util_decorator =
|
|
1199
|
+
source_engine_api_draw_text_2450 = function()
|
|
1200
|
+
local util_decorator = source_shared_functional_decorator_2e5e()
|
|
1221
1201
|
local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
|
|
1222
1202
|
size = size or 2
|
|
1223
1203
|
local hem = engine.current.data.width / 80
|
|
@@ -1235,6 +1215,8 @@ std.text.print(x - aligns_x[(align_x or 1) + 2], y - aligns_y[(align_y or 1) + 2
|
|
|
1235
1215
|
return w, h
|
|
1236
1216
|
end
|
|
1237
1217
|
local function install(std, engine, config)
|
|
1218
|
+
std.text.font_previous = config.font_previous
|
|
1219
|
+
std.text.is_tui = config.is_tui or function() return false end
|
|
1238
1220
|
std.text.print_ex = util_decorator.prefix2(std, engine, text_print_ex)
|
|
1239
1221
|
std.text.put = util_decorator.prefix3(std, engine, config.font_previous, text_put)
|
|
1240
1222
|
end
|
|
@@ -1244,7 +1226,7 @@ install=install
|
|
|
1244
1226
|
return P
|
|
1245
1227
|
end
|
|
1246
1228
|
--
|
|
1247
|
-
|
|
1229
|
+
source_engine_api_draw_poly_245b = function()
|
|
1248
1230
|
local function decorator_poo(object, func)
|
|
1249
1231
|
if not object or not func then return func end
|
|
1250
1232
|
return function(a, b, c, d)
|
|
@@ -1351,7 +1333,7 @@ install=install
|
|
|
1351
1333
|
return P
|
|
1352
1334
|
end
|
|
1353
1335
|
--
|
|
1354
|
-
|
|
1336
|
+
source_engine_api_raw_memory_2466 = function()
|
|
1355
1337
|
local memory_dict_unload = {}
|
|
1356
1338
|
local memory_dict = {}
|
|
1357
1339
|
local memory_list = {}
|
|
@@ -1406,9 +1388,9 @@ install=install
|
|
|
1406
1388
|
return P
|
|
1407
1389
|
end
|
|
1408
1390
|
--
|
|
1409
|
-
|
|
1410
|
-
local str_http =
|
|
1411
|
-
local str_url =
|
|
1391
|
+
source_engine_protocol_http_callback_2478 = function()
|
|
1392
|
+
local str_http = source_shared_string_encode_http_5c51()
|
|
1393
|
+
local str_url = source_shared_string_encode_url_5c5c()
|
|
1412
1394
|
local callbacks = {
|
|
1413
1395
|
['async-promise'] = function(self)
|
|
1414
1396
|
return self:promise()
|
|
@@ -1475,7 +1457,7 @@ func = native_http_callback
|
|
|
1475
1457
|
return P
|
|
1476
1458
|
end
|
|
1477
1459
|
--
|
|
1478
|
-
|
|
1460
|
+
source_shared_var_object_root_248a = function()
|
|
1479
1461
|
local P = {
|
|
1480
1462
|
data={
|
|
1481
1463
|
width=1280,
|
|
@@ -1505,7 +1487,7 @@ callbacks={
|
|
|
1505
1487
|
return P;
|
|
1506
1488
|
end
|
|
1507
1489
|
--
|
|
1508
|
-
|
|
1490
|
+
source_engine_api_system_color_2495 = function()
|
|
1509
1491
|
local function install(std)
|
|
1510
1492
|
std.color = std.color or {}
|
|
1511
1493
|
std.color.white = 0xFFFFFFFF
|
|
@@ -1540,12 +1522,14 @@ install = install
|
|
|
1540
1522
|
return P
|
|
1541
1523
|
end
|
|
1542
1524
|
--
|
|
1543
|
-
|
|
1525
|
+
source_shared_var_object_std_24a0 = function()
|
|
1544
1526
|
local P = {
|
|
1545
1527
|
milis = 0,
|
|
1546
1528
|
delta = 0,
|
|
1547
1529
|
math = {
|
|
1548
1530
|
},
|
|
1531
|
+
media = {
|
|
1532
|
+
},
|
|
1549
1533
|
draw = {
|
|
1550
1534
|
image = function() end,
|
|
1551
1535
|
clear = function () end,
|
|
@@ -1606,7 +1590,7 @@ any=false
|
|
|
1606
1590
|
return P;
|
|
1607
1591
|
end
|
|
1608
1592
|
--
|
|
1609
|
-
|
|
1593
|
+
source_shared_functional_pipeline_2940 = function()
|
|
1610
1594
|
local function pipe(self)
|
|
1611
1595
|
return function()
|
|
1612
1596
|
self:run()
|
|
@@ -1656,7 +1640,7 @@ run=run
|
|
|
1656
1640
|
return P
|
|
1657
1641
|
end
|
|
1658
1642
|
--
|
|
1659
|
-
|
|
1643
|
+
source_shared_string_dsl_requires_294b = function()
|
|
1660
1644
|
local function encode(dsl_string)
|
|
1661
1645
|
local spec = {
|
|
1662
1646
|
list = {},
|
|
@@ -1705,7 +1689,7 @@ should_import = should_import
|
|
|
1705
1689
|
return P
|
|
1706
1690
|
end
|
|
1707
1691
|
--
|
|
1708
|
-
|
|
1692
|
+
source_shared_string_eval_file_2bb2 = function()
|
|
1709
1693
|
local function script(src)
|
|
1710
1694
|
local ok, app = false, nil
|
|
1711
1695
|
if require then
|
|
@@ -1731,7 +1715,7 @@ script = script,
|
|
|
1731
1715
|
return P
|
|
1732
1716
|
end
|
|
1733
1717
|
--
|
|
1734
|
-
|
|
1718
|
+
source_shared_string_eval_code_2bbd = function()
|
|
1735
1719
|
local function script(src)
|
|
1736
1720
|
local loader = loadstring or load
|
|
1737
1721
|
if not loader then
|
|
@@ -1752,7 +1736,7 @@ script = script,
|
|
|
1752
1736
|
return P
|
|
1753
1737
|
end
|
|
1754
1738
|
--
|
|
1755
|
-
|
|
1739
|
+
source_shared_functional_decorator_2e5e = function()
|
|
1756
1740
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
1757
1741
|
return function (a, b, c, d, e, f)
|
|
1758
1742
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -1810,7 +1794,7 @@ prefix1_t = table_prefix1
|
|
|
1810
1794
|
return P
|
|
1811
1795
|
end
|
|
1812
1796
|
--
|
|
1813
|
-
|
|
1797
|
+
source_shared_string_encode_http_5c51 = function()
|
|
1814
1798
|
local function is_ok(status)
|
|
1815
1799
|
return (status and 200 <= status and status < 300) or false
|
|
1816
1800
|
end
|
|
@@ -1957,7 +1941,7 @@ create_request=create_request
|
|
|
1957
1941
|
}
|
|
1958
1942
|
end
|
|
1959
1943
|
--
|
|
1960
|
-
|
|
1944
|
+
source_shared_string_encode_url_5c5c = function()
|
|
1961
1945
|
local function search_param(param_list, param_dict)
|
|
1962
1946
|
local index, params = 1, ''
|
|
1963
1947
|
while param_list and param_dict and index <= #param_list do
|
|
@@ -1979,4 +1963,4 @@ search_param = search_param
|
|
|
1979
1963
|
return P
|
|
1980
1964
|
end
|
|
1981
1965
|
--
|
|
1982
|
-
return
|
|
1966
|
+
return main_2390()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamely/gly-engine-lite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"author": "RodrigoDornelles",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.gamely.com.br",
|
|
@@ -15,5 +15,12 @@
|
|
|
15
15
|
"game engine",
|
|
16
16
|
"game",
|
|
17
17
|
"engine"
|
|
18
|
-
]
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"step1": "cd ../.. && rm -Rf dist && mkdir -p ./dist/types",
|
|
21
|
+
"step2": "cd ../.. && node cli.js build --core lite --bundler --outdir dist/dist",
|
|
22
|
+
"step3": "cd ../.. && node cli.js meta source/cli/main.lua --infile npm/gly-engine-lite/package.json --outfile dist/package.json",
|
|
23
|
+
"step4": "cd ../.. && echo \"declare module '@gamely/gly-engine-lite' {\n const content: string;\n export default content;\n}\" > dist/types/main.d.ts",
|
|
24
|
+
"build": "npm run step1 && npm run step2 && npm run step3 && npm run step4"
|
|
25
|
+
}
|
|
19
26
|
}
|
package/README.md
DELETED