@gamely/gly-engine-micro 0.0.20 → 0.0.21
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 +44 -44
- 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
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local function
|
|
15
|
-
local version =
|
|
16
|
-
local engine_game =
|
|
17
|
-
local engine_key =
|
|
18
|
-
local engine_math =
|
|
19
|
-
local engine_array =
|
|
20
|
-
local engine_draw_text =
|
|
21
|
-
local engine_draw_poly =
|
|
22
|
-
local engine_raw_memory =
|
|
23
|
-
local color =
|
|
24
|
-
local std =
|
|
25
|
-
local util_lua =
|
|
2
|
+
local src_version_56078ae2e450 = nil
|
|
3
|
+
local src_lib_engine_api_app_56078ae26860 = nil
|
|
4
|
+
local src_lib_engine_api_key_56078ae15370 = nil
|
|
5
|
+
local src_lib_engine_api_math_56078ae19820 = nil
|
|
6
|
+
local src_lib_engine_api_array_56078ae0aa30 = nil
|
|
7
|
+
local src_lib_engine_draw_text_56078ae24270 = nil
|
|
8
|
+
local src_lib_engine_draw_poly_56078ae23740 = nil
|
|
9
|
+
local src_lib_engine_raw_memory_56078ae11460 = nil
|
|
10
|
+
local src_lib_object_color_56078ae368c0 = nil
|
|
11
|
+
local src_lib_object_std_56078ae37020 = nil
|
|
12
|
+
local src_lib_util_lua_56078ae37b10 = nil
|
|
13
|
+
local src_lib_util_decorator_56078ae36c30 = nil
|
|
14
|
+
local function main_56078ae28800()
|
|
15
|
+
local version = src_version_56078ae2e450()
|
|
16
|
+
local engine_game = src_lib_engine_api_app_56078ae26860()
|
|
17
|
+
local engine_key = src_lib_engine_api_key_56078ae15370()
|
|
18
|
+
local engine_math = src_lib_engine_api_math_56078ae19820()
|
|
19
|
+
local engine_array = src_lib_engine_api_array_56078ae0aa30()
|
|
20
|
+
local engine_draw_text = src_lib_engine_draw_text_56078ae24270()
|
|
21
|
+
local engine_draw_poly = src_lib_engine_draw_poly_56078ae23740()
|
|
22
|
+
local engine_raw_memory = src_lib_engine_raw_memory_56078ae11460()
|
|
23
|
+
local color = src_lib_object_color_56078ae368c0()
|
|
24
|
+
local std = src_lib_object_std_56078ae37020()
|
|
25
|
+
local util_lua = src_lib_util_lua_56078ae37b10()
|
|
26
26
|
local f=function(a,b)end
|
|
27
27
|
local engine={keyboard=f}
|
|
28
28
|
local application={
|
|
@@ -131,12 +131,12 @@ version=version
|
|
|
131
131
|
}
|
|
132
132
|
return P
|
|
133
133
|
end
|
|
134
|
-
|
|
135
|
-
return '0.0.
|
|
134
|
+
src_version_56078ae2e450 = function()
|
|
135
|
+
return '0.0.21'
|
|
136
136
|
end
|
|
137
137
|
--
|
|
138
|
-
|
|
139
|
-
local util_decorator =
|
|
138
|
+
src_lib_engine_api_app_56078ae26860 = function()
|
|
139
|
+
local util_decorator = src_lib_util_decorator_56078ae36c30()
|
|
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
|
-
|
|
179
|
+
src_lib_engine_api_key_56078ae15370 = 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
|
-
|
|
219
|
+
src_lib_engine_api_math_56078ae19820 = 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
|
-
|
|
395
|
-
local util_decorator =
|
|
394
|
+
src_lib_engine_api_array_56078ae0aa30 = function()
|
|
395
|
+
local util_decorator = src_lib_util_decorator_56078ae36c30()
|
|
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
|
-
|
|
557
|
-
local util_decorator =
|
|
556
|
+
src_lib_engine_draw_text_56078ae24270 = function()
|
|
557
|
+
local util_decorator = src_lib_util_decorator_56078ae36c30()
|
|
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,
|
|
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
|
|
571
|
-
std.text.print(x -
|
|
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
|
-
|
|
584
|
+
src_lib_engine_draw_poly_56078ae23740 = 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
|
-
|
|
691
|
+
src_lib_engine_raw_memory_56078ae11460 = 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
|
-
|
|
746
|
+
src_lib_object_color_56078ae368c0 = 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
|
-
|
|
781
|
+
src_lib_object_std_56078ae37020 = function()
|
|
782
782
|
local P = {
|
|
783
783
|
milis = 0,
|
|
784
784
|
delta = 0,
|
|
@@ -844,7 +844,7 @@ any=false
|
|
|
844
844
|
return P;
|
|
845
845
|
end
|
|
846
846
|
--
|
|
847
|
-
|
|
847
|
+
src_lib_util_lua_56078ae37b10 = function()
|
|
848
848
|
local function has_support_utf8()
|
|
849
849
|
if jit then
|
|
850
850
|
return true
|
|
@@ -875,7 +875,7 @@ has_support_utf8=has_support_utf8
|
|
|
875
875
|
return P
|
|
876
876
|
end
|
|
877
877
|
--
|
|
878
|
-
|
|
878
|
+
src_lib_util_decorator_56078ae36c30 = function()
|
|
879
879
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
880
880
|
return function (a, b, c, d, e, f)
|
|
881
881
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -933,4 +933,4 @@ prefix1_t = table_prefix1
|
|
|
933
933
|
return P
|
|
934
934
|
end
|
|
935
935
|
--
|
|
936
|
-
return
|
|
936
|
+
return main_56078ae28800()
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamely/gly-engine-micro",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"author": "RodrigoDornelles",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://docs.gamely.com.br",
|
|
7
|
-
"repository": "https://github.com/
|
|
7
|
+
"repository": "https://github.com/gly-engine/gly-engine",
|
|
8
8
|
"funding": "https://github.com/sponsors/RodrigoDornelles",
|
|
9
|
-
"bugs": "https://github.com/
|
|
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",
|