@gamely/gly-engine-lite 0.3.1 → 0.3.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.
Files changed (2) hide show
  1. package/dist/main.lua +73 -71
  2. package/package.json +1 -1
package/dist/main.lua CHANGED
@@ -1,37 +1,37 @@
1
- local b259c = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
2
- local r259c = function(i, f)
1
+ local b25a2 = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
2
+ local r25a2 = function(i, f)
3
3
  return function()
4
4
  local c = f()
5
- b259c[i] = function() return c end
5
+ b25a2[i] = function() return c end
6
6
  return c
7
7
  end
8
8
  end
9
9
  local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
10
- local function m259c()
11
- local version = b259c[1]('source_version')
12
- local loadcore = b259c[2]('source_shared_engine_loadcore')
13
- local loadgame = b259c[3]('source_shared_engine_loadgame')
14
- local engine_encoder = b259c[4]('source_engine_api_data_encoder')
15
- local engine_game = b259c[5]('source_engine_api_system_app')
16
- local engine_hash = b259c[6]('source_engine_api_data_hash')
17
- local engine_http = b259c[7]('source_engine_api_io_http')
18
- local engine_i18n = b259c[8]('source_engine_api_data_i18n')
19
- local engine_key = b259c[9]('source_engine_api_system_key')
20
- local engine_env = b259c[10]('source_engine_api_system_getenv')
21
- local engine_log = b259c[11]('source_engine_api_debug_log')
22
- local engine_math = b259c[12]('source_engine_api_math_basic')
23
- local engine_math_clib = b259c[13]('source_engine_api_math_clib')
24
- local engine_math_random = b259c[14]('source_engine_api_math_random')
25
- local engine_array = b259c[15]('source_engine_api_data_array')
26
- local engine_media = b259c[16]('source_engine_api_io_media')
27
- local engine_api_draw_fps = b259c[17]('source_engine_api_draw_fps')
28
- local engine_api_draw_text = b259c[18]('source_engine_api_draw_text')
29
- local engine_api_draw_poly = b259c[19]('source_engine_api_draw_poly')
30
- local engine_raw_memory = b259c[20]('source_engine_api_raw_memory')
31
- local callback_http = b259c[21]('source_engine_protocol_http_callback')
32
- local application_default = b259c[22]('source_shared_var_object_root')
33
- local color = b259c[23]('source_engine_api_system_color')
34
- local std = b259c[24]('source_shared_var_object_std')
10
+ local function m25a2()
11
+ local version = b25a2[1]('source_version')
12
+ local loadcore = b25a2[2]('source_shared_engine_loadcore')
13
+ local loadgame = b25a2[3]('source_shared_engine_loadgame')
14
+ local engine_encoder = b25a2[4]('source_engine_api_data_encoder')
15
+ local engine_game = b25a2[5]('source_engine_api_system_app')
16
+ local engine_hash = b25a2[6]('source_engine_api_data_hash')
17
+ local engine_http = b25a2[7]('source_engine_api_io_http')
18
+ local engine_i18n = b25a2[8]('source_engine_api_data_i18n')
19
+ local engine_key = b25a2[9]('source_engine_api_system_key')
20
+ local engine_env = b25a2[10]('source_engine_api_system_getenv')
21
+ local engine_log = b25a2[11]('source_engine_api_debug_log')
22
+ local engine_math = b25a2[12]('source_engine_api_math_basic')
23
+ local engine_math_clib = b25a2[13]('source_engine_api_math_clib')
24
+ local engine_math_random = b25a2[14]('source_engine_api_math_random')
25
+ local engine_array = b25a2[15]('source_engine_api_data_array')
26
+ local engine_media = b25a2[16]('source_engine_api_io_media')
27
+ local engine_api_draw_fps = b25a2[17]('source_engine_api_draw_fps')
28
+ local engine_api_draw_text = b25a2[18]('source_engine_api_draw_text')
29
+ local engine_api_draw_poly = b25a2[19]('source_engine_api_draw_poly')
30
+ local engine_raw_memory = b25a2[20]('source_engine_api_raw_memory')
31
+ local callback_http = b25a2[21]('source_engine_protocol_http_callback')
32
+ local application_default = b25a2[22]('source_shared_var_object_root')
33
+ local color = b25a2[23]('source_engine_api_system_color')
34
+ local std = b25a2[24]('source_shared_var_object_std')
35
35
  local application = application_default
36
36
  local engine = {
37
37
  keyboard = function(a, b, c, d) end,
@@ -193,12 +193,12 @@ version=version
193
193
  }
194
194
  return P
195
195
  end
196
- b259c[1] = r259c(1, function()
197
- return '0.3.1'
196
+ b25a2[1] = r25a2(1, function()
197
+ return '0.3.2'
198
198
  end)
199
- b259c[2] = r259c(2, function()
200
- local zeebo_pipeline = b259c[25]('source_shared_functional_pipeline')
201
- local requires = b259c[26]('source_shared_string_dsl_requires')
199
+ b25a2[2] = r25a2(2, function()
200
+ local zeebo_pipeline = b25a2[25]('source_shared_functional_pipeline')
201
+ local requires = b25a2[26]('source_shared_string_dsl_requires')
202
202
  local function step_install_libsys(self, lib_name, library, custom, is_system)
203
203
  if not is_system then return end
204
204
  local ok, msg = pcall(function()
@@ -279,15 +279,15 @@ setup = setup
279
279
  }
280
280
  return P
281
281
  end)
282
- b259c[3] = r259c(3, function()
283
- local eval_file = b259c[27]('source_shared_string_eval_file')
284
- local eval_code = b259c[28]('source_shared_string_eval_code')
282
+ b25a2[3] = r25a2(3, function()
283
+ local eval_file = b25a2[27]('source_shared_string_eval_file')
284
+ local eval_code = b25a2[28]('source_shared_string_eval_code')
285
285
  local has_io_open = io and io.open
286
286
  local function normalize(app, base)
287
287
  if not app then return nil end
288
288
  if not app.callbacks then
289
289
  local old_app = app
290
- app = {meta={},config={},callbacks={}, data={}}
290
+ app = {meta={},config={},callbacks={}, data={}, envs={}}
291
291
  for key, value in pairs(old_app) do
292
292
  local is_function = type(value) == 'function'
293
293
  if base.meta and base.meta[key] and not is_function then
@@ -296,6 +296,8 @@ elseif base.config and base.config[key] and not is_function then
296
296
  app.config[key] = value
297
297
  elseif is_function then
298
298
  app.callbacks[key] = value
299
+ elseif app[key] then
300
+ app[key] = value
299
301
  else
300
302
  app.data[key] = value
301
303
  end
@@ -353,7 +355,7 @@ script = script
353
355
  }
354
356
  return P
355
357
  end)
356
- b259c[4] = r259c(4, function()
358
+ b25a2[4] = r25a2(4, function()
357
359
  local function install(std, engine, library, name)
358
360
  std = std or {}
359
361
  std[name] = {
@@ -367,7 +369,7 @@ install=install
367
369
  }
368
370
  return P
369
371
  end)
370
- b259c[5] = r259c(5, function()
372
+ b25a2[5] = r25a2(5, function()
371
373
  local function reset(std, engine)
372
374
  if std.node then
373
375
  return function()
@@ -413,7 +415,7 @@ install=install
413
415
  }
414
416
  return P
415
417
  end)
416
- b259c[6] = r259c(6, function()
418
+ b25a2[6] = r25a2(6, function()
417
419
  local function djb2(digest)
418
420
  local index = 1
419
421
  local hash = 5381
@@ -436,8 +438,8 @@ install = install
436
438
  }
437
439
  return P
438
440
  end)
439
- b259c[7] = r259c(7, function()
440
- local zeebo_pipeline = b259c[25]('source_shared_functional_pipeline')
441
+ b25a2[7] = r25a2(7, function()
442
+ local zeebo_pipeline = b25a2[25]('source_shared_functional_pipeline')
441
443
  local function json(self)
442
444
  self.options['json'] = true
443
445
  return self
@@ -599,7 +601,7 @@ install=install
599
601
  }
600
602
  return P
601
603
  end)
602
- b259c[8] = r259c(8, function()
604
+ b25a2[8] = r25a2(8, function()
603
605
  local language = 'en-US'
604
606
  local language_default = 'en-US'
605
607
  local language_list = {}
@@ -690,7 +692,7 @@ install=install
690
692
  }
691
693
  return P
692
694
  end)
693
- b259c[9] = r259c(9, function()
695
+ b25a2[9] = r25a2(9, function()
694
696
  local function real_key(std, engine, rkey, rvalue)
695
697
  local value = (rvalue == 1 or rvalue == true) or false
696
698
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -739,7 +741,7 @@ return {
739
741
  install = install
740
742
  }
741
743
  end)
742
- b259c[10] = r259c(10, function()
744
+ b25a2[10] = r25a2(10, function()
743
745
  local function setenv(engine)
744
746
  return function(varname, value)
745
747
  if engine.root ~= engine.current then
@@ -782,8 +784,8 @@ install = install
782
784
  }
783
785
  return P
784
786
  end)
785
- b259c[11] = r259c(11, function()
786
- local util_decorator = b259c[29]('source_shared_functional_decorator')
787
+ b25a2[11] = r25a2(11, function()
788
+ local util_decorator = b25a2[29]('source_shared_functional_decorator')
787
789
  local logging_types = {
788
790
  'none', 'fatal', 'error', 'warn', 'debug', 'info'
789
791
  }
@@ -828,7 +830,7 @@ install = install
828
830
  }
829
831
  return P
830
832
  end)
831
- b259c[12] = r259c(12, function()
833
+ b25a2[12] = r25a2(12, function()
832
834
  local function abs(value)
833
835
  if value < 0 then
834
836
  return -value
@@ -926,7 +928,7 @@ install = install
926
928
  }
927
929
  return P
928
930
  end)
929
- b259c[13] = r259c(13, function()
931
+ b25a2[13] = r25a2(13, function()
930
932
  local function install(std)
931
933
  assert(math and (1/2 ~= 0))
932
934
  std.math = std.math or {}
@@ -961,7 +963,7 @@ install = install
961
963
  }
962
964
  return P
963
965
  end)
964
- b259c[14] = r259c(14, function()
966
+ b25a2[14] = r25a2(14, function()
965
967
  local function install(std)
966
968
  assert(math and (1/2 ~= 0))
967
969
  std.math = std.math or {}
@@ -977,8 +979,8 @@ install = install
977
979
  }
978
980
  return P
979
981
  end)
980
- b259c[15] = r259c(15, function()
981
- local util_decorator = b259c[29]('source_shared_functional_decorator')
982
+ b25a2[15] = r25a2(15, function()
983
+ local util_decorator = b25a2[29]('source_shared_functional_decorator')
982
984
  local function array_map(array, func)
983
985
  local res = {}
984
986
  local index = 1
@@ -1138,7 +1140,7 @@ install = install
1138
1140
  }
1139
1141
  return P
1140
1142
  end)
1141
- b259c[16] = r259c(16, function()
1143
+ b25a2[16] = r25a2(16, function()
1142
1144
  local function media_create(node, channels, handler)
1143
1145
  local decorator = function(func)
1144
1146
  func = func or function() end
@@ -1184,7 +1186,7 @@ install=install
1184
1186
  }
1185
1187
  return P
1186
1188
  end)
1187
- b259c[17] = r259c(17, function()
1189
+ b25a2[17] = r25a2(17, function()
1188
1190
  local function draw_fps(std, engine, show, pos_x, pos_y)
1189
1191
  if show < 1 then return end
1190
1192
  local x = engine.current.config.offset_x + pos_x
@@ -1232,7 +1234,7 @@ install=install
1232
1234
  }
1233
1235
  return P
1234
1236
  end)
1235
- b259c[18] = r259c(18, function()
1237
+ b25a2[18] = r25a2(18, function()
1236
1238
  local function text_put(std, engine, font_previous)
1237
1239
  return function(pos_x, pos_y, text, size)
1238
1240
  size = size or 2
@@ -1264,7 +1266,7 @@ install=install
1264
1266
  }
1265
1267
  return P
1266
1268
  end)
1267
- b259c[19] = r259c(19, function()
1269
+ b25a2[19] = r25a2(19, function()
1268
1270
  local function decorator_poo(object, func)
1269
1271
  if not object or not func then return func end
1270
1272
  return function(a, b, c, d)
@@ -1370,7 +1372,7 @@ install=install
1370
1372
  }
1371
1373
  return P
1372
1374
  end)
1373
- b259c[20] = r259c(20, function()
1375
+ b25a2[20] = r25a2(20, function()
1374
1376
  local memory_dict_unload = {}
1375
1377
  local memory_dict = {}
1376
1378
  local memory_list = {}
@@ -1424,9 +1426,9 @@ install=install
1424
1426
  }
1425
1427
  return P
1426
1428
  end)
1427
- b259c[21] = r259c(21, function()
1428
- local str_http = b259c[31]('source_shared_string_encode_http')
1429
- local str_url = b259c[32]('source_shared_string_encode_url')
1429
+ b25a2[21] = r25a2(21, function()
1430
+ local str_http = b25a2[31]('source_shared_string_encode_http')
1431
+ local str_url = b25a2[32]('source_shared_string_encode_url')
1430
1432
  local callbacks = {
1431
1433
  ['async-promise'] = function(self)
1432
1434
  return self:promise()
@@ -1495,7 +1497,7 @@ func = native_http_callback
1495
1497
  }
1496
1498
  return P
1497
1499
  end)
1498
- b259c[22] = r259c(22, function()
1500
+ b25a2[22] = r25a2(22, function()
1499
1501
  local P = {
1500
1502
  data={
1501
1503
  width=1280,
@@ -1524,7 +1526,7 @@ callbacks={
1524
1526
  }
1525
1527
  return P;
1526
1528
  end)
1527
- b259c[23] = r259c(23, function()
1529
+ b25a2[23] = r25a2(23, function()
1528
1530
  local function install(std)
1529
1531
  std.color = std.color or {}
1530
1532
  std.color.white = 0xFFFFFFFF
@@ -1558,7 +1560,7 @@ install = install
1558
1560
  }
1559
1561
  return P
1560
1562
  end)
1561
- b259c[24] = r259c(24, function()
1563
+ b25a2[24] = r25a2(24, function()
1562
1564
  local P = {
1563
1565
  milis = 0,
1564
1566
  delta = 0,
@@ -1625,7 +1627,7 @@ any=false
1625
1627
  }
1626
1628
  return P;
1627
1629
  end)
1628
- b259c[25] = r259c(25, function()
1630
+ b25a2[25] = r25a2(25, function()
1629
1631
  local function pipe(self)
1630
1632
  return function()
1631
1633
  self:run()
@@ -1674,7 +1676,7 @@ run=run
1674
1676
  }
1675
1677
  return P
1676
1678
  end)
1677
- b259c[26] = r259c(26, function()
1679
+ b25a2[26] = r25a2(26, function()
1678
1680
  local function encode(dsl_string)
1679
1681
  local spec = {
1680
1682
  list = {},
@@ -1722,7 +1724,7 @@ should_import = should_import
1722
1724
  }
1723
1725
  return P
1724
1726
  end)
1725
- b259c[27] = r259c(27, function()
1727
+ b25a2[27] = r25a2(27, function()
1726
1728
  local function script(src)
1727
1729
  local ok, app = false, nil
1728
1730
  if require then
@@ -1747,7 +1749,7 @@ script = script,
1747
1749
  }
1748
1750
  return P
1749
1751
  end)
1750
- b259c[28] = r259c(28, function()
1752
+ b25a2[28] = r25a2(28, function()
1751
1753
  local function script(src)
1752
1754
  local loader = loadstring or load
1753
1755
  if not loader then
@@ -1767,7 +1769,7 @@ script = script,
1767
1769
  }
1768
1770
  return P
1769
1771
  end)
1770
- b259c[29] = r259c(29, function()
1772
+ b25a2[29] = r25a2(29, function()
1771
1773
  local function decorator_prefix3(zig, zag, zom, func)
1772
1774
  return function (a, b, c, d, e, f)
1773
1775
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -1824,7 +1826,7 @@ prefix1_t = table_prefix1
1824
1826
  }
1825
1827
  return P
1826
1828
  end)
1827
- b259c[31] = r259c(31, function()
1829
+ b25a2[31] = r25a2(31, function()
1828
1830
  local function is_ok(status)
1829
1831
  return (status and 200 <= status and status < 300) or false
1830
1832
  end
@@ -1970,7 +1972,7 @@ get_user_agent=get_user_agent,
1970
1972
  create_request=create_request
1971
1973
  }
1972
1974
  end)
1973
- b259c[32] = r259c(32, function()
1975
+ b25a2[32] = r25a2(32, function()
1974
1976
  local function search_param(param_list, param_dict)
1975
1977
  local index, params = 1, ''
1976
1978
  while param_list and param_dict and index <= #param_list do
@@ -1991,4 +1993,4 @@ search_param = search_param
1991
1993
  }
1992
1994
  return P
1993
1995
  end)
1994
- return m259c()
1996
+ return m25a2()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-lite",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "author": "RodrigoDornelles",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.gamely.com.br",