@gamely/gly-engine-micro 0.0.20 → 0.1.0

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 +46 -56
  2. package/package.json +4 -3
package/dist/main.lua CHANGED
@@ -1,28 +1,28 @@
1
1
  local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
2
- local src_version_5630bfb01410 = nil
3
- local src_lib_engine_api_app_5630bfb08c80 = nil
4
- local src_lib_engine_api_key_5630bfb14660 = nil
5
- local src_lib_engine_api_math_5630bfb12d50 = nil
6
- local src_lib_engine_api_array_5630bfb125c0 = nil
7
- local src_lib_engine_draw_text_5630bfaedb60 = nil
8
- local src_lib_engine_draw_poly_5630bfb09000 = nil
9
- local src_lib_engine_raw_memory_5630bfb08090 = nil
10
- local src_lib_object_color_5630bfaff810 = nil
11
- local src_lib_object_std_5630bfafeb40 = nil
12
- local src_lib_util_lua_5630bfafb150 = nil
13
- local src_lib_util_decorator_5630bfb153d0 = nil
14
- local function main_5630bfacf130()
15
- local version = src_version_5630bfb01410()
16
- local engine_game = src_lib_engine_api_app_5630bfb08c80()
17
- local engine_key = src_lib_engine_api_key_5630bfb14660()
18
- local engine_math = src_lib_engine_api_math_5630bfb12d50()
19
- local engine_array = src_lib_engine_api_array_5630bfb125c0()
20
- local engine_draw_text = src_lib_engine_draw_text_5630bfaedb60()
21
- local engine_draw_poly = src_lib_engine_draw_poly_5630bfb09000()
22
- local engine_raw_memory = src_lib_engine_raw_memory_5630bfb08090()
23
- local color = src_lib_object_color_5630bfaff810()
24
- local std = src_lib_object_std_5630bfafeb40()
25
- local util_lua = src_lib_util_lua_5630bfafb150()
2
+ local source_version_56479d4d65a0 = nil
3
+ local source_engine_api_system_app_56479d4f2b50 = nil
4
+ local source_engine_api_system_key_56479d4f4c70 = nil
5
+ local source_engine_api_system_math_56479d4f0360 = nil
6
+ local source_engine_api_data_array_56479d4fc380 = nil
7
+ local source_engine_api_draw_text_56479d4ff250 = nil
8
+ local source_engine_api_draw_poly_56479d4e5b10 = nil
9
+ local source_engine_api_raw_memory_56479d506680 = nil
10
+ local source_engine_api_system_color_56479d50aec0 = nil
11
+ local source_shared_var_object_std_56479d50b240 = nil
12
+ local source_shared_string_parse_lua_56479d50a360 = nil
13
+ local source_shared_functional_decorator_56479d50aff0 = nil
14
+ local function main_56479d4e8220()
15
+ local version = source_version_56479d4d65a0()
16
+ local engine_game = source_engine_api_system_app_56479d4f2b50()
17
+ local engine_key = source_engine_api_system_key_56479d4f4c70()
18
+ local engine_math = source_engine_api_system_math_56479d4f0360()
19
+ local engine_array = source_engine_api_data_array_56479d4fc380()
20
+ local engine_api_draw_text = source_engine_api_draw_text_56479d4ff250()
21
+ local engine_api_draw_poly = source_engine_api_draw_poly_56479d4e5b10()
22
+ local engine_raw_memory = source_engine_api_raw_memory_56479d506680()
23
+ local color = source_engine_api_system_color_56479d50aec0()
24
+ local std = source_shared_var_object_std_56479d50b240()
25
+ local util_lua = source_shared_string_parse_lua_56479d50a360()
26
26
  local f=function(a,b)end
27
27
  local engine={keyboard=f}
28
28
  local application={
@@ -114,8 +114,8 @@ engine_math.wave.install(std, engine)
114
114
  engine_math.clib.install(std, engine)
115
115
  engine_math.clib_random.install(std, engine)
116
116
  engine_array.install(std, engine, nil, 'array')
117
- engine_draw_text.install(std, engine, cfg_text)
118
- engine_draw_poly.install(std, engine, cfg_poly)
117
+ engine_api_draw_text.install(std, engine, cfg_text)
118
+ engine_api_draw_poly.install(std, engine, cfg_poly)
119
119
  color.install(std, engine)
120
120
  std.app.title(application.meta.title..' - '..application.meta.version)
121
121
  engine.current=application
@@ -131,12 +131,12 @@ version=version
131
131
  }
132
132
  return P
133
133
  end
134
- src_version_5630bfb01410 = function()
135
- return '0.0.20'
134
+ source_version_56479d4d65a0 = function()
135
+ return '0.1.0'
136
136
  end
137
137
  --
138
- src_lib_engine_api_app_5630bfb08c80 = function()
139
- local util_decorator = src_lib_util_decorator_5630bfb153d0()
138
+ source_engine_api_system_app_56479d4f2b50 = function()
139
+ local util_decorator = source_shared_functional_decorator_56479d50aff0()
140
140
  local function reset(std, engine)
141
141
  if std.node then
142
142
  std.bus.emit('exit')
@@ -176,7 +176,7 @@ install=install
176
176
  return P
177
177
  end
178
178
  --
179
- src_lib_engine_api_key_5630bfb14660 = function()
179
+ source_engine_api_system_key_56479d4f4c70 = function()
180
180
  local function real_key(std, engine, rkey, rvalue)
181
181
  local value = rvalue == 1 or rvalue == true
182
182
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -216,7 +216,7 @@ install = install
216
216
  return P
217
217
  end
218
218
  --
219
- src_lib_engine_api_math_5630bfb12d50 = function()
219
+ source_engine_api_system_math_56479d4f0360 = function()
220
220
  local function abs(value)
221
221
  if value < 0 then
222
222
  return -value
@@ -391,8 +391,8 @@ install = install_clib_random
391
391
  return P;
392
392
  end
393
393
  --
394
- src_lib_engine_api_array_5630bfb125c0 = function()
395
- local util_decorator = src_lib_util_decorator_5630bfb153d0()
394
+ source_engine_api_data_array_56479d4fc380 = function()
395
+ local util_decorator = source_shared_functional_decorator_56479d50aff0()
396
396
  local function array_map(array, func)
397
397
  local res = {}
398
398
  local index = 1
@@ -553,8 +553,8 @@ install = install
553
553
  return P
554
554
  end
555
555
  --
556
- src_lib_engine_draw_text_5630bfaedb60 = function()
557
- local util_decorator = src_lib_util_decorator_5630bfb153d0()
556
+ source_engine_api_draw_text_56479d4ff250 = function()
557
+ local util_decorator = source_shared_functional_decorator_56479d50aff0()
558
558
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
559
559
  size = size or 2
560
560
  local hem = engine.current.data.width / 80
@@ -565,10 +565,10 @@ std.text.font_size(font_size)
565
565
  std.text.print(pos_x * hem, pos_y * vem, text)
566
566
  font_previous()
567
567
  end
568
- local function text_print_ex(std, engine, x, y, text, align)
568
+ local function text_print_ex(std, engine, x, y, text, align_x, align_y)
569
569
  local w, h = std.text.mensure(text)
570
- local aligns = {w, w/2, 0}
571
- std.text.print(x - aligns[(align or 1) + 2], y, text)
570
+ local aligns_x, aligns_y = {w, w/2, 0}, {h, h/2, 0}
571
+ std.text.print(x - aligns_x[(align_x or 1) + 2], y - aligns_y[(align_y or 1) + 2], text)
572
572
  return w, h
573
573
  end
574
574
  local function install(std, engine, config)
@@ -581,7 +581,7 @@ install=install
581
581
  return P
582
582
  end
583
583
  --
584
- src_lib_engine_draw_poly_5630bfb09000 = function()
584
+ source_engine_api_draw_poly_56479d4e5b10 = function()
585
585
  local function decorator_poo(object, func)
586
586
  if not object or not func then return func end
587
587
  return function(a, b, c, d)
@@ -688,7 +688,7 @@ install=install
688
688
  return P
689
689
  end
690
690
  --
691
- src_lib_engine_raw_memory_5630bfb08090 = function()
691
+ source_engine_api_raw_memory_56479d506680 = function()
692
692
  local memory_dict_unload = {}
693
693
  local memory_dict = {}
694
694
  local memory_list = {}
@@ -743,7 +743,7 @@ install=install
743
743
  return P
744
744
  end
745
745
  --
746
- src_lib_object_color_5630bfaff810 = function()
746
+ source_engine_api_system_color_56479d50aec0 = function()
747
747
  local function install(std)
748
748
  std.color = std.color or {}
749
749
  std.color.white = 0xFFFFFFFF
@@ -778,7 +778,7 @@ install = install
778
778
  return P
779
779
  end
780
780
  --
781
- src_lib_object_std_5630bfafeb40 = function()
781
+ source_shared_var_object_std_56479d50b240 = function()
782
782
  local P = {
783
783
  milis = 0,
784
784
  delta = 0,
@@ -844,16 +844,7 @@ any=false
844
844
  return P;
845
845
  end
846
846
  --
847
- src_lib_util_lua_5630bfafb150 = function()
848
- local function has_support_utf8()
849
- if jit then
850
- return true
851
- end
852
- if tonumber(_VERSION:match('Lua 5.(%d+)')) >= 3 then
853
- return true
854
- end
855
- return false
856
- end
847
+ source_shared_string_parse_lua_56479d50a360 = function()
857
848
  local function eval(script)
858
849
  local loader = loadstring or load
859
850
  if not loader then
@@ -870,12 +861,11 @@ return pcall(chunk)
870
861
  end
871
862
  local P = {
872
863
  eval = eval,
873
- has_support_utf8=has_support_utf8
874
864
  }
875
865
  return P
876
866
  end
877
867
  --
878
- src_lib_util_decorator_5630bfb153d0 = function()
868
+ source_shared_functional_decorator_56479d50aff0 = function()
879
869
  local function decorator_prefix3(zig, zag, zom, func)
880
870
  return function (a, b, c, d, e, f)
881
871
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -933,4 +923,4 @@ prefix1_t = table_prefix1
933
923
  return P
934
924
  end
935
925
  --
936
- return main_5630bfacf130()
926
+ return main_56479d4e8220()
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-micro",
3
- "version": "0.0.20",
3
+ "version": "0.1.0",
4
4
  "author": "RodrigoDornelles",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.gamely.com.br",
7
- "repository": "https://github.com/gamelly/gly-engine",
7
+ "repository": "https://github.com/gly-engine/gly-engine",
8
8
  "funding": "https://github.com/sponsors/RodrigoDornelles",
9
- "bugs": "https://github.com/gamelly/gly-engine/issues",
9
+ "bugs": "https://github.com/gly-engine/gly-engine/issues",
10
10
  "description": "Game Engine written in 100% lua that runs in a vacuum.",
11
11
  "main": "dist/main.lua",
12
+ "browser": "dist/main.lua",
12
13
  "types": "types/main.d.ts",
13
14
  "keywords": [
14
15
  "game engine",