@gamely/gly-engine-lite 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. package/dist/main.lua +93 -92
  2. package/package.json +9 -2
  3. package/README.md +0 -3
package/dist/main.lua CHANGED
@@ -1,54 +1,54 @@
1
1
  local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
2
- local source_version_56220a4a1950 = nil
3
- local source_shared_engine_loadcore_56220a501f60 = nil
4
- local source_shared_engine_loadgame_56220a508730 = nil
5
- local source_engine_api_data_encoder_56220a502900 = nil
6
- local source_engine_api_system_app_56220a50a020 = nil
7
- local source_engine_api_data_hash_56220a510b30 = nil
8
- local source_engine_api_io_http_56220a507ca0 = nil
9
- local source_engine_api_data_i18n_56220a5082f0 = nil
10
- local source_engine_api_system_key_56220a500cf0 = nil
11
- local source_engine_api_debug_log_56220a4f3170 = nil
12
- local source_engine_api_system_math_56220a4f37c0 = nil
13
- local source_engine_api_data_array_56220a514a90 = nil
14
- local source_engine_api_io_media_56220a4ff470 = nil
15
- local source_engine_api_draw_fps_56220a4ffbf0 = nil
16
- local source_engine_api_draw_text_56220a506130 = nil
17
- local source_engine_api_draw_poly_56220a515410 = nil
18
- local source_engine_api_raw_memory_56220a50f100 = nil
19
- local source_engine_protocol_http_callback_56220a4a0ab0 = nil
20
- local source_shared_var_object_root_56220a505340 = nil
21
- local source_engine_api_system_color_56220a50c360 = nil
22
- local source_shared_var_object_std_56220a516510 = nil
23
- local source_shared_functional_pipeline_56220a5145d0 = nil
24
- local source_shared_string_dsl_requires_56220a4752f0 = nil
25
- local source_shared_string_eval_file_56220a47ff00 = nil
26
- local source_shared_string_eval_code_56220a4c4f40 = nil
27
- local source_shared_functional_decorator_56220a48ae90 = nil
28
- local source_shared_string_encode_http_56220a471880 = nil
29
- local source_shared_string_encode_url_56220a465e50 = nil
30
- local function main_56220a508c40()
31
- local version = source_version_56220a4a1950()
32
- local loadcore = source_shared_engine_loadcore_56220a501f60()
33
- local loadgame = source_shared_engine_loadgame_56220a508730()
34
- local engine_encoder = source_engine_api_data_encoder_56220a502900()
35
- local engine_game = source_engine_api_system_app_56220a50a020()
36
- local engine_hash = source_engine_api_data_hash_56220a510b30()
37
- local engine_http = source_engine_api_io_http_56220a507ca0()
38
- local engine_i18n = source_engine_api_data_i18n_56220a5082f0()
39
- local engine_key = source_engine_api_system_key_56220a500cf0()
40
- local engine_log = source_engine_api_debug_log_56220a4f3170()
41
- local engine_math = source_engine_api_system_math_56220a4f37c0()
42
- local engine_array = source_engine_api_data_array_56220a514a90()
43
- local engine_media = source_engine_api_io_media_56220a4ff470()
44
- local engine_api_draw_fps = source_engine_api_draw_fps_56220a4ffbf0()
45
- local engine_api_draw_text = source_engine_api_draw_text_56220a506130()
46
- local engine_api_draw_poly = source_engine_api_draw_poly_56220a515410()
47
- local engine_raw_memory = source_engine_api_raw_memory_56220a50f100()
48
- local callback_http = source_engine_protocol_http_callback_56220a4a0ab0()
49
- local application_default = source_shared_var_object_root_56220a505340()
50
- local color = source_engine_api_system_color_56220a50c360()
51
- local std = source_shared_var_object_std_56220a516510()
2
+ local source_version_22e4 = nil
3
+ local source_shared_engine_loadcore_22ef = nil
4
+ local source_shared_engine_loadgame_22fa = nil
5
+ local source_engine_api_data_encoder_230c = nil
6
+ local source_engine_api_system_app_2317 = nil
7
+ local source_engine_api_data_hash_2322 = nil
8
+ local source_engine_api_io_http_232d = nil
9
+ local source_engine_api_data_i18n_2338 = nil
10
+ local source_engine_api_system_key_2343 = nil
11
+ local source_engine_api_debug_log_234e = nil
12
+ local source_engine_api_system_math_2359 = nil
13
+ local source_engine_api_data_array_2364 = nil
14
+ local source_engine_api_io_media_236f = nil
15
+ local source_engine_api_draw_fps_237a = nil
16
+ local source_engine_api_draw_text_2385 = nil
17
+ local source_engine_api_draw_poly_2390 = nil
18
+ local source_engine_api_raw_memory_239b = nil
19
+ local source_engine_protocol_http_callback_23ad = nil
20
+ local source_shared_var_object_root_23bf = nil
21
+ local source_engine_api_system_color_23ca = nil
22
+ local source_shared_var_object_std_23d5 = nil
23
+ local source_shared_functional_pipeline_288a = nil
24
+ local source_shared_string_dsl_requires_2895 = nil
25
+ local source_shared_string_eval_file_2afc = nil
26
+ local source_shared_string_eval_code_2b07 = nil
27
+ local source_shared_functional_decorator_2d77 = nil
28
+ local source_shared_string_encode_http_5c3f = nil
29
+ local source_shared_string_encode_url_5c4a = nil
30
+ local function main_22db()
31
+ local version = source_version_22e4()
32
+ local loadcore = source_shared_engine_loadcore_22ef()
33
+ local loadgame = source_shared_engine_loadgame_22fa()
34
+ local engine_encoder = source_engine_api_data_encoder_230c()
35
+ local engine_game = source_engine_api_system_app_2317()
36
+ local engine_hash = source_engine_api_data_hash_2322()
37
+ local engine_http = source_engine_api_io_http_232d()
38
+ local engine_i18n = source_engine_api_data_i18n_2338()
39
+ local engine_key = source_engine_api_system_key_2343()
40
+ local engine_log = source_engine_api_debug_log_234e()
41
+ local engine_math = source_engine_api_system_math_2359()
42
+ local engine_array = source_engine_api_data_array_2364()
43
+ local engine_media = source_engine_api_io_media_236f()
44
+ local engine_api_draw_fps = source_engine_api_draw_fps_237a()
45
+ local engine_api_draw_text = source_engine_api_draw_text_2385()
46
+ local engine_api_draw_poly = source_engine_api_draw_poly_2390()
47
+ local engine_raw_memory = source_engine_api_raw_memory_239b()
48
+ local callback_http = source_engine_protocol_http_callback_23ad()
49
+ local application_default = source_shared_var_object_root_23bf()
50
+ local color = source_engine_api_system_color_23ca()
51
+ local std = source_shared_var_object_std_23d5()
52
52
  local application = application_default
53
53
  local engine = {
54
54
  keyboard = function(a, b, c, d) end,
@@ -156,7 +156,6 @@ std.draw.color=native_draw_color
156
156
  std.draw.font=native_draw_font
157
157
  std.draw.rect=native_draw_rect
158
158
  std.draw.line=native_draw_line
159
- std.draw.image=native_image_draw
160
159
  std.image.load=native_image_load
161
160
  std.image.draw=native_image_draw
162
161
  std.text.print=native_text_print
@@ -208,13 +207,13 @@ version=version
208
207
  }
209
208
  return P
210
209
  end
211
- source_version_56220a4a1950 = function()
212
- return '0.1.2'
210
+ source_version_22e4 = function()
211
+ return '0.1.3'
213
212
  end
214
213
  --
215
- source_shared_engine_loadcore_56220a501f60 = function()
216
- local zeebo_pipeline = source_shared_functional_pipeline_56220a5145d0()
217
- local requires = source_shared_string_dsl_requires_56220a4752f0()
214
+ source_shared_engine_loadcore_22ef = function()
215
+ local zeebo_pipeline = source_shared_functional_pipeline_288a()
216
+ local requires = source_shared_string_dsl_requires_2895()
218
217
  local function step_install_libsys(self, lib_name, library, custom, is_system)
219
218
  if not is_system then return end
220
219
  local ok, msg = pcall(function()
@@ -296,9 +295,9 @@ setup = setup
296
295
  return P
297
296
  end
298
297
  --
299
- source_shared_engine_loadgame_56220a508730 = function()
300
- local eval_file = source_shared_string_eval_file_56220a47ff00()
301
- local eval_code = source_shared_string_eval_code_56220a4c4f40()
298
+ source_shared_engine_loadgame_22fa = function()
299
+ local eval_file = source_shared_string_eval_file_2afc()
300
+ local eval_code = source_shared_string_eval_code_2b07()
302
301
  local has_io_open = io and io.open
303
302
  local function normalize(app, base)
304
303
  if not app then return nil end
@@ -363,7 +362,7 @@ script = script
363
362
  return P
364
363
  end
365
364
  --
366
- source_engine_api_data_encoder_56220a502900 = function()
365
+ source_engine_api_data_encoder_230c = function()
367
366
  local function install(std, engine, library, name)
368
367
  std = std or {}
369
368
  std[name] = {
@@ -378,8 +377,8 @@ install=install
378
377
  return P
379
378
  end
380
379
  --
381
- source_engine_api_system_app_56220a50a020 = function()
382
- local util_decorator = source_shared_functional_decorator_56220a48ae90()
380
+ source_engine_api_system_app_2317 = function()
381
+ local util_decorator = source_shared_functional_decorator_2d77()
383
382
  local function reset(std, engine)
384
383
  if std.node then
385
384
  std.bus.emit('exit')
@@ -419,7 +418,7 @@ install=install
419
418
  return P
420
419
  end
421
420
  --
422
- source_engine_api_data_hash_56220a510b30 = function()
421
+ source_engine_api_data_hash_2322 = function()
423
422
  local function djb2(digest)
424
423
  local index = 1
425
424
  local hash = 5381
@@ -443,8 +442,8 @@ install = install
443
442
  return P
444
443
  end
445
444
  --
446
- source_engine_api_io_http_56220a507ca0 = function()
447
- local zeebo_pipeline = source_shared_functional_pipeline_56220a5145d0()
445
+ source_engine_api_io_http_232d = function()
446
+ local zeebo_pipeline = source_shared_functional_pipeline_288a()
448
447
  local function json(self)
449
448
  self.options['json'] = true
450
449
  return self
@@ -607,7 +606,7 @@ install=install
607
606
  return P
608
607
  end
609
608
  --
610
- source_engine_api_data_i18n_56220a5082f0 = function()
609
+ source_engine_api_data_i18n_2338 = function()
611
610
  local language = 'en-US'
612
611
  local language_default = 'en-US'
613
612
  local language_list = {}
@@ -699,7 +698,7 @@ install=install
699
698
  return P
700
699
  end
701
700
  --
702
- source_engine_api_system_key_56220a500cf0 = function()
701
+ source_engine_api_system_key_2343 = function()
703
702
  local function real_key(std, engine, rkey, rvalue)
704
703
  local value = rvalue == 1 or rvalue == true
705
704
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -736,8 +735,8 @@ install = install
736
735
  return P
737
736
  end
738
737
  --
739
- source_engine_api_debug_log_56220a4f3170 = function()
740
- local util_decorator = source_shared_functional_decorator_56220a48ae90()
738
+ source_engine_api_debug_log_234e = function()
739
+ local util_decorator = source_shared_functional_decorator_2d77()
741
740
  local logging_types = {
742
741
  'none', 'fatal', 'error', 'warn', 'debug', 'info'
743
742
  }
@@ -783,7 +782,7 @@ install = install
783
782
  return P
784
783
  end
785
784
  --
786
- source_engine_api_system_math_56220a4f37c0 = function()
785
+ source_engine_api_system_math_2359 = function()
787
786
  local function abs(value)
788
787
  if value < 0 then
789
788
  return -value
@@ -958,8 +957,8 @@ install = install_clib_random
958
957
  return P;
959
958
  end
960
959
  --
961
- source_engine_api_data_array_56220a514a90 = function()
962
- local util_decorator = source_shared_functional_decorator_56220a48ae90()
960
+ source_engine_api_data_array_2364 = function()
961
+ local util_decorator = source_shared_functional_decorator_2d77()
963
962
  local function array_map(array, func)
964
963
  local res = {}
965
964
  local index = 1
@@ -1120,7 +1119,7 @@ install = install
1120
1119
  return P
1121
1120
  end
1122
1121
  --
1123
- source_engine_api_io_media_56220a4ff470 = function()
1122
+ source_engine_api_io_media_236f = function()
1124
1123
  local function media_create(node, channels, handler)
1125
1124
  local decorator = function(func)
1126
1125
  func = func or function() end
@@ -1167,7 +1166,7 @@ install=install
1167
1166
  return P
1168
1167
  end
1169
1168
  --
1170
- source_engine_api_draw_fps_56220a4ffbf0 = function()
1169
+ source_engine_api_draw_fps_237a = function()
1171
1170
  local function draw_fps(std, engine, show, pos_x, pos_y)
1172
1171
  if show < 1 then return end
1173
1172
  local x = engine.current.config.offset_x + pos_x
@@ -1216,8 +1215,8 @@ install=install
1216
1215
  return P
1217
1216
  end
1218
1217
  --
1219
- source_engine_api_draw_text_56220a506130 = function()
1220
- local util_decorator = source_shared_functional_decorator_56220a48ae90()
1218
+ source_engine_api_draw_text_2385 = function()
1219
+ local util_decorator = source_shared_functional_decorator_2d77()
1221
1220
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
1222
1221
  size = size or 2
1223
1222
  local hem = engine.current.data.width / 80
@@ -1244,7 +1243,7 @@ install=install
1244
1243
  return P
1245
1244
  end
1246
1245
  --
1247
- source_engine_api_draw_poly_56220a515410 = function()
1246
+ source_engine_api_draw_poly_2390 = function()
1248
1247
  local function decorator_poo(object, func)
1249
1248
  if not object or not func then return func end
1250
1249
  return function(a, b, c, d)
@@ -1351,7 +1350,7 @@ install=install
1351
1350
  return P
1352
1351
  end
1353
1352
  --
1354
- source_engine_api_raw_memory_56220a50f100 = function()
1353
+ source_engine_api_raw_memory_239b = function()
1355
1354
  local memory_dict_unload = {}
1356
1355
  local memory_dict = {}
1357
1356
  local memory_list = {}
@@ -1406,9 +1405,9 @@ install=install
1406
1405
  return P
1407
1406
  end
1408
1407
  --
1409
- source_engine_protocol_http_callback_56220a4a0ab0 = function()
1410
- local str_http = source_shared_string_encode_http_56220a471880()
1411
- local str_url = source_shared_string_encode_url_56220a465e50()
1408
+ source_engine_protocol_http_callback_23ad = function()
1409
+ local str_http = source_shared_string_encode_http_5c3f()
1410
+ local str_url = source_shared_string_encode_url_5c4a()
1412
1411
  local callbacks = {
1413
1412
  ['async-promise'] = function(self)
1414
1413
  return self:promise()
@@ -1475,7 +1474,7 @@ func = native_http_callback
1475
1474
  return P
1476
1475
  end
1477
1476
  --
1478
- source_shared_var_object_root_56220a505340 = function()
1477
+ source_shared_var_object_root_23bf = function()
1479
1478
  local P = {
1480
1479
  data={
1481
1480
  width=1280,
@@ -1505,7 +1504,7 @@ callbacks={
1505
1504
  return P;
1506
1505
  end
1507
1506
  --
1508
- source_engine_api_system_color_56220a50c360 = function()
1507
+ source_engine_api_system_color_23ca = function()
1509
1508
  local function install(std)
1510
1509
  std.color = std.color or {}
1511
1510
  std.color.white = 0xFFFFFFFF
@@ -1540,12 +1539,14 @@ install = install
1540
1539
  return P
1541
1540
  end
1542
1541
  --
1543
- source_shared_var_object_std_56220a516510 = function()
1542
+ source_shared_var_object_std_23d5 = function()
1544
1543
  local P = {
1545
1544
  milis = 0,
1546
1545
  delta = 0,
1547
1546
  math = {
1548
1547
  },
1548
+ media = {
1549
+ },
1549
1550
  draw = {
1550
1551
  image = function() end,
1551
1552
  clear = function () end,
@@ -1606,7 +1607,7 @@ any=false
1606
1607
  return P;
1607
1608
  end
1608
1609
  --
1609
- source_shared_functional_pipeline_56220a5145d0 = function()
1610
+ source_shared_functional_pipeline_288a = function()
1610
1611
  local function pipe(self)
1611
1612
  return function()
1612
1613
  self:run()
@@ -1656,7 +1657,7 @@ run=run
1656
1657
  return P
1657
1658
  end
1658
1659
  --
1659
- source_shared_string_dsl_requires_56220a4752f0 = function()
1660
+ source_shared_string_dsl_requires_2895 = function()
1660
1661
  local function encode(dsl_string)
1661
1662
  local spec = {
1662
1663
  list = {},
@@ -1705,7 +1706,7 @@ should_import = should_import
1705
1706
  return P
1706
1707
  end
1707
1708
  --
1708
- source_shared_string_eval_file_56220a47ff00 = function()
1709
+ source_shared_string_eval_file_2afc = function()
1709
1710
  local function script(src)
1710
1711
  local ok, app = false, nil
1711
1712
  if require then
@@ -1731,7 +1732,7 @@ script = script,
1731
1732
  return P
1732
1733
  end
1733
1734
  --
1734
- source_shared_string_eval_code_56220a4c4f40 = function()
1735
+ source_shared_string_eval_code_2b07 = function()
1735
1736
  local function script(src)
1736
1737
  local loader = loadstring or load
1737
1738
  if not loader then
@@ -1752,7 +1753,7 @@ script = script,
1752
1753
  return P
1753
1754
  end
1754
1755
  --
1755
- source_shared_functional_decorator_56220a48ae90 = function()
1756
+ source_shared_functional_decorator_2d77 = function()
1756
1757
  local function decorator_prefix3(zig, zag, zom, func)
1757
1758
  return function (a, b, c, d, e, f)
1758
1759
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -1810,7 +1811,7 @@ prefix1_t = table_prefix1
1810
1811
  return P
1811
1812
  end
1812
1813
  --
1813
- source_shared_string_encode_http_56220a471880 = function()
1814
+ source_shared_string_encode_http_5c3f = function()
1814
1815
  local function is_ok(status)
1815
1816
  return (status and 200 <= status and status < 300) or false
1816
1817
  end
@@ -1957,7 +1958,7 @@ create_request=create_request
1957
1958
  }
1958
1959
  end
1959
1960
  --
1960
- source_shared_string_encode_url_56220a465e50 = function()
1961
+ source_shared_string_encode_url_5c4a = function()
1961
1962
  local function search_param(param_list, param_dict)
1962
1963
  local index, params = 1, ''
1963
1964
  while param_list and param_dict and index <= #param_list do
@@ -1979,4 +1980,4 @@ search_param = search_param
1979
1980
  return P
1980
1981
  end
1981
1982
  --
1982
- return main_56220a508c40()
1983
+ return main_22db()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-lite",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
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
@@ -1,3 +0,0 @@
1
- <div align="center">
2
- <h1>:mechanical_arm:<br>GLY Engine<br><sup><sub>powered by <a href="https://gamely.com.br" target="_blank">gamely.com.br</a></sub></sup></h1>
3
- </div>